keniq / gyp

Automatically exported from code.google.com/p/gyp
0 stars 0 forks source link

GYP does not seem to be handling xcassets properly #458

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I don't think the Xcode emulation of gyp's ninja generator does anything 
special for xcassets files.

Original issue reported on code.google.com by sdefresne@chromium.org on 18 Sep 2014 at 2:45

GoogleCodeExporter commented 9 years ago

Original comment by justincohen@chromium.org on 7 Oct 2014 at 2:25

GoogleCodeExporter commented 9 years ago
Command run by Xcode when building .xcassets files (I replaced some path by 
variable names to make it more readable) is the following:

xcrun actool --output-format human-readable-text --notices --warnings 
--export-dependency-info ${INTERMEDIATES_DIR}/assetcatalog_dependencies.txt 
--output-partial-info-plist 
/${INTERMEDIATES_DIR}/assetcatalog_generated_info.plist --app-icon AppIcon 
--platform iphonesimulator --minimum-deployment-target 8.0 --target-device 
iphone --target-device ipad --compress-pngs --compile ${APPLICATION_DIR} 
${SOURCES}

The command is run with all the .xcassets files at the same time. The command 
generate files in the application directory directly and the 
assetcatalog_generated_info.plist is used to update the Info.plist (to include 
the AppIcon paths).

So, for xcode-emulation, it will have to collect all the .xcassets that are 
referenced in all dependend targets of "executable" that are also "bundle" and 
add extra steps to 1. compile the .xcassets using actool, 2. fix the Info.plist 
if it exists.

I feel it is starting to introduce too much magic and it may be better to 
provide a .gypi file that invokes the actool and tell developer to use it 
instead when using the ninja generator.

For the xcode generator, I don't think there is anything special to do as the 
.xcassets don't have any special treatment in the .pbproj file.

Original comment by sdefresne@chromium.org on 10 Oct 2014 at 2:41

GoogleCodeExporter commented 9 years ago

Original comment by sdefresne@chromium.org on 21 Oct 2014 at 2:01

GoogleCodeExporter commented 9 years ago
https://code.google.com/p/gyp/source/detail?r=1991

Original comment by sdefresne@chromium.org on 21 Oct 2014 at 4:38