Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dead code path in mac_tool #398

Open
GoogleCodeExporter opened this issue Apr 19, 2015 · 1 comment
Open

dead code path in mac_tool #398

GoogleCodeExporter opened this issue Apr 19, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

there is a dead code path mac_tool that REQUIRES the build use the apple 
installed python (because of CoreFoundation dependency).

in mac_tool.py

def _CopyStringsFile(self, source, dest):
   ...
    # Xcode's CpyCopyStringsFile / builtin-copyStrings seems to call
    # CFPropertyListCreateFromXMLData() behind the scenes; at least it prints
    #     CFPropertyListCreateFromXMLData(): Old-style plist parser: missing
    #     semicolon in dictionary.
    # on invalid files. Do the same kind of validation.
   import CoreFoundation
    s = open(source).read()
    d = CoreFoundation.CFDataCreate(None, s, len(s))
    _, error = CoreFoundation.CFPropertyListCreateFromXMLData(None, d, 0, None)
    if error:
      return





Original issue reported on code.google.com by sitk...@gmail.com on 29 Dec 2013 at 8:02

@GoogleCodeExporter
Copy link
Author

I instrumented gyp-mac-tool to echo usage to syslog during a full build of 
node-webkit

it looks like it is only called once during the entire build.

12/29/13 11:49:22.821 AM syslog[61264]: CopyStringsFile called from 
['./gyp-mac-tool', 'copy-bundle-resource', 
'../../breakpad/src/client/mac/sender/English.lproj/Localizable.strings', 
'crash_report_sender.app/Contents/Resources/English.lproj/Localizable.strings']

Original comment by sitk...@gmail.com on 30 Dec 2013 at 12:15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant