Relative icon paths for PhoneGap and CLI builds

I noticed that although most of the differences between the cordova / PhoneGap and PhoneGap lines are pretty minor, it seems to me a bit more trouble - the expected paths for the icons and splash screen are:

Cordova docs :

  • put the config.xml file in the root directory - app / config.xml
  • link icon and screensaver files with a path relative to the root

PhoneGap creation documentation :

  • put the config.xml file in the www folder - app / www / config.xml
  • link icon and screensaver files with a path relative to the www directory.

It ends up breaking either a copy of the icons / splash screen on PhoneGap Build, or in the CLI. Has anyone found a way around this problem, so that local and PhoneGap Build-generated applications have the icons they need?

+6
source share
2 answers

Real answer

After a short search on the Internet, I found this open problem in the GitHub replica phonegap-cli:

https://github.com/phonegap/phonegap-cli/issues/522

Currently, the problem does not have an icon for it, but it seems that this is the right place to add our support for a more permanent fix to this problem. If you want this fixed, add a comment on this issue so that the PG team can understand how many people are implementing it.

Bypass

The workaround here is mentioned @ JesseMonroy650 - create a command command to copy the application / www / res to app / res for local builds.

To do this, you also need to add the following to .gitignore :

 ## ignore copied (local) directories res/ 

This way you will not get two copies of the / res folder registered in your repo.

+1
source

@ eb1 explains a lot of questions here and in the Google group. Using symlinks will not work, because it will only work with Unix / Linux, and it may break on the assembly. I saw someone using scripts (batch files) to copy. For me, this seems like the best solution until we can get Phonegap to fix it. In the past, they had fixed inconsistencies. I think we just need to make enough noise. --Jesse

+1
source

Source: https://habr.com/ru/post/988354/


All Articles