haniceboy / gyp

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

Xcode seems to turn strings files into binary plists, mac_tools isn't following that #390

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Xcode (atleast for iOS targets) turns strings files into binary plists.  The 
current mac_tools support seems to turn them into UTF16 on disk, but leave them 
in what every format they started as.  Xcode's transforms mean the comments are 
stripped (smaller files), and the binary should be a little more machine 
friendly for parsing (likely faster too).

Original issue reported on code.google.com by thomasvl@chromium.org on 3 Dec 2013 at 9:09

GoogleCodeExporter commented 9 years ago
Sample output from what Xcode 5.0.2 says it does on an iOS project:

CopyStringsFile 
.../Library/Developer/Xcode/DerivedData/testing64-gppwzdxqfcsovxdrevjlovwygikg/B
uild/Products/Debug-iphonesimulator/testing64.app/en.lproj/InfoPlist.strings 
testing64/en.lproj/InfoPlist.strings
    cd .../Desktop/testing64
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/bin/g4bin:/usr/local/sbin:/usr/local/bin"
    builtin-copyStrings --validate --inputencoding utf-8 --outputencoding binary --outdir .../Library/Developer/Xcode/DerivedData/testing64-gppwzdxqfcsovxdrevjlovwygikg/Build/Products/Debug-iphonesimulator/testing64.app/en.lproj -- testing64/en.lproj/InfoPlist.strings

And running file one it:

.../Library/Developer/Xcode/DerivedData/testing64-gppwzdxqfcsovxdrevjlovwygikg/B
uild/Products/Debug-iphonesimulator/testing64.app/en.lproj/InfoPlist.strings: 
Apple binary property list

Original comment by thomasvl@chromium.org on 3 Dec 2013 at 9:13

GoogleCodeExporter commented 9 years ago
Issue 391 has been merged into this issue.

Original comment by justincohen@chromium.org on 3 Dec 2013 at 9:15

GoogleCodeExporter commented 9 years ago
At least on 4.x targeting mac, xcode creates utf16 files. The current mac_tool 
code explicitly emulates that (and there's a test that checks that mac_tool and 
xcode generate identical files)

Original comment by thakis@chromium.org on 3 Dec 2013 at 9:53

GoogleCodeExporter commented 9 years ago
Desktop should be the same, iOS will convert to binary.  Can be overridden with 
INFOPLIST_OUTPUT_FORMAT. 

https://codereview.chromium.org/825453002

Original comment by justincohen@chromium.org on 9 Mar 2015 at 5:53