truebit / xUnique

merge Xcode project file is so easy
https://fclef.wordpress.com
Other
1.5k stars 120 forks source link

how to run xunique on non Mac OS X systems? #41

Closed privateOmega closed 7 years ago

privateOmega commented 7 years ago
  File "/usr/local/bin/xunique", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/xUnique.py", line 543, in main
    xunique = XUnique(xcode_proj_path, options.verbose)
  File "/usr/local/lib/python2.7/dist-packages/xUnique.py", line 105, in __init__
    self.proj_json = self.pbxproj_to_json()
  File "/usr/local/lib/python2.7/dist-packages/xUnique.py", line 128, in pbxproj_to_json
    json_unicode_str = decoded_string(sp_co(pbproj_to_json_cmd))
  File "/usr/lib/python2.7/subprocess.py", line 567, in check_output
    process = Popen(stdout=PIPE, *popenargs, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

I have referenced the file using git hook.

truebit commented 7 years ago

“No such file or directory”, it seems that you did not install Xcode Command Line Tools. and make sure 'plutil' could be found in $PATH;

privateOmega commented 7 years ago

@truebit Well I am unable to do so, since I am running xUnique on my ubuntu and I don't have access to a mac. I have encountered git merge conflict on project.pbxproj file while upgrading my react-native app.

truebit commented 7 years ago

After some searching , biplist maybe the only one tool to convert plist binary file to json in linux.

You could adapt pbxproj_to_json method to use biplist instead of plutil.

privateOmega commented 7 years ago

@truebit Does this mean I have to alter the source code to change to biplist and build on my own from source?

truebit commented 7 years ago

Yes. writing a xcode project in non Mac OS X sytems is a very rare case after all.

privateOmega commented 7 years ago

Well all I tried to do was to develop a react-native app. Hell Hath no fury.

truebit commented 7 years ago

After some trial, I found that there is no tool in linux to parse .pbxproj file (a.k.a old-style NeXT ASCII format). all tools are for modern property list file

So xunique could NOT be supported on Linux

privateOmega commented 7 years ago

Oh well I guess I have no way out of this mess. Can you help me out and remove conflicts in my .pbxproj file

truebit commented 7 years ago

you could find someone who got a mac...

privateOmega commented 7 years ago

haha. well highly unlikely in my school. Will try anyways :D