Code Monkey home page Code Monkey logo

Comments (13)

devernay avatar devernay commented on July 20, 2024 1

juste fixed it. re-download and execute XcodeLegacy install, it should recognize the old packages again

from xcodelegacy.

EricFromCanada avatar EricFromCanada commented on July 20, 2024

My findings were similar. The script would have to supply a tool that can decode pbzx streams, since macOS doesn't provide one.

Besides pbzx.c, another option is parse_pbzx2.py, which works with the system's Python. This successfully extracted the entire archive:

xar -xf Xcode8.3.3.xip
python parse_pbzx2.py Content
cpio -idm --quiet -F Content.part00.cpio.xz

Ideally the script would extract just the path we need, and both cpio and tar will do so if given a path as an argument. But in this case, both tools throw lots of random "Can't create [file]" errors without giving a reason why, and the resulting SDK has missing files. If no argument is given, they'll still throw the same errors, but (on my machine) the resulting SDK within the new Xcode.app is complete, according to a comparison with a known-good copy using FileMerge.

from xcodelegacy.

EricFromCanada avatar EricFromCanada commented on July 20, 2024

Solved it: as confirmed by ls -i, it turns out that Apple hard-links common files between everything in the Platforms folder, so the script needs to extract it entirely to get a complete SDK. Both of these commands work despite their errors, although the second throws far fewer of them:

cpio -idm --quiet -F Content.part00.cpio.xz ./Xcode.app/Contents/Developer/Platforms
xz --decompress --stdout Content.part00.cpio.xz | pax -r ./Xcode.app/Contents/Developer/Platforms

(see also this Q&A)

from xcodelegacy.

EricFromCanada avatar EricFromCanada commented on July 20, 2024

This version of parse_pbzx.py supports decompression and pipes, allowing the final command sequence to be:

xar -xf Xcode8.3.3.xip
./parse_pbzx.py Content | pax -r ./Xcode.app/Contents/Developer/Platforms 2>/dev/null

resulting in a 9GB package from which the SDK can be extracted. Since it takes a while to perform the extraction, even on a modern SSD-equipped system, it might be smart to wrap the command in a function that provides a progress bar or spinner in the terminal output.

from xcodelegacy.

sstillwell avatar sstillwell commented on July 20, 2024

Any further progress or comment on this issue, or is this a showstopper?

from xcodelegacy.

devernay avatar devernay commented on July 20, 2024

You can still download it from https://github.com/phracker/MacOSX-SDKs/releases .
Sorry, I don't have much time to work on this.

from xcodelegacy.

EricFromCanada avatar EricFromCanada commented on July 20, 2024

I've had success elsewhere with live-downloading-and-patching another tool within a script to accomplish a similar task. I can attempt to put a PR together.

from xcodelegacy.

sstillwell avatar sstillwell commented on July 20, 2024

@devernay I can manually download the SDK, no problem. I guess I'm questioning what to do WITH the SDK once I have it...will the existing script patch everything in Xcode 9.x with the exception of the 10.12 SDK and I just copy that into Xcode after patching?

from xcodelegacy.

devernay avatar devernay commented on July 20, 2024

use the latest github version. 6956e79 installs the file at the right place

from xcodelegacy.

devernay avatar devernay commented on July 20, 2024

temporary fix in XcodeLegacy 2.1

from xcodelegacy.

sstillwell avatar sstillwell commented on July 20, 2024

Evidently you also need to re-download 10.7-10.11 from the same github link above - the current XcodeLegacy.sh won't recognize the SDKs already extracted from older Xcode versions (due to naming, likely). Was that intended?

from xcodelegacy.

devernay avatar devernay commented on July 20, 2024

no it wasn't, it should check for both

from xcodelegacy.

sstillwell avatar sstillwell commented on July 20, 2024

I re-ran the -buildpackages section, and the XcodeSDK* files are there, but -install would not use them. Downloading the SDKs from the github site and placing the .xz files in the same folder did work, however.

from xcodelegacy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.