Android Tutorial Change Icon and Assets Files based on the Build Configuration

Discussion in 'Tutorials & Examples' started by Erel, May 11, 2014.

  1. Erel

    Erel Administrator Staff Member Licensed User

    Maybe because of Google Drive.Test it from a different folder.
     
  2. MoraviaVenus

    MoraviaVenus Member Licensed User

    Tried directly from C:/, but, unfortuantely, again without success...

    robocopy3.png

    Under Windows 7 works fine. Don't I need to install something, or play somehow with access rights...?

    I am desperate :(
     
  3. Erel

    Erel Administrator Staff Member Licensed User

    When you run it from the command line you should remove the commas.
     
  4. MoraviaVenus

    MoraviaVenus Member Licensed User

    Hi Erel,

    after posting previous screenshot I tested it also without commas, but with same result: poor message Access Denied...
     
  5. MoraviaVenus

    MoraviaVenus Member Licensed User

    Hi community,

    I did not manage to solve the problem, so I offer workaround for those with similar issue.

    I have two versions of app named AreHeaven (AH) and ArtAngels (AA). In the main project folder I created two folders: condcompil_ah and condcompil_aa, where I put files related to particular version. Inside of each folder I created two more subfolders named extra and drawable. To the extra folder I put files, which are copied to files\extra by compilation, to the drawable folder I put files, which are copied to \objects\res\drawable. Files in source folders condcompil_aa\drawable and condcompil_ah\drawable are all read-only.

    folders_min.png

    In the Main module of project I put following commands at the beginning, which "mirror" files from \condcompil_aa\extra to \files\extra and from \condcompil_aa\drawable to \objects\res\drawable, separately for AH and AA:

    #If AH
    #CustomBuildAction: 1, c:\windows\system32\robocopy.exe, ..\condcompil_ah\extra ..\files\extra /MIR
    #CustomBuildAction: 1, c:\windows\system32\robocopy.exe, ..\condcompil_ah\drawable ..\objects\res\drawable /MIR
    #End If

    #If AA
    #CustomBuildAction: 1, c:\windows\system32\robocopy.exe, ..\condcompil_aa\extra ..\files\extra /MIR
    #CustomBuildAction: 1, c:\windows\system32\robocopy.exe, ..\condcompil_aa\drawable ..\objects\res\drawable /MIR
    #End If

    Works smoothly.
     
    Last edited: Jun 11, 2015
  6. yo3ggx

    yo3ggx Active Member Licensed User

    Hi,

    It is possible that you want to write over a read only file (icon.png)?
    Just make icon.png writable and write it in the same way for the other configuration.

    If still doesn't work, just copy cmd.exe in the application source folder.
    It works for me.

    Dan
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice