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

Expand .xip on the destination volume #178

Open
juanjonol opened this issue Jan 13, 2022 · 2 comments · May be fixed by #179
Open

Expand .xip on the destination volume #178

juanjonol opened this issue Jan 13, 2022 · 2 comments · May be fixed by #179

Comments

@juanjonol
Copy link
Contributor

juanjonol commented Jan 13, 2022

After PR #126, xcode install supports a custom path for Xcode's installation, but this path isn't directly used for the .xip expansion, using instead the same directory where it’s downloaded (~/Library/Application Support/com.robotsandpencils.xcodes/)1. If this custom installation path is to a different volume than the .xip, this means that:

  • Xcode.app must be first expanded and then moved to another volume, a relatively slow operation given its massive size.
  • This installation requires double the free space than on a same-volume installation, because Xcode is first copied to the destination volume and only when it has finished it’s deleted from the original volume.

So I think it makes sense to expand the .xip directly on the final volume where Xcode will be installed (probably on the /.TemporaryItems folder).

Would you accept a pull request for this? Thank you!

Footnotes

  1. I assume this is done to avoid having a partial Xcode installation on the destination folder, which sounds reasonable to me.

@MattKiazyk
Copy link
Contributor

@juanjonol absolutely accept a PR for this.

Did something similar with Xcode.app - if you could follow the similar pattern that would be 💯

https://github.com/RobotsAndPencils/XcodesApp/pull/155/files

juanjonol added a commit to juanjonol/xcodes that referenced this issue Jan 23, 2022
Instead of expanding XIPs on its current directory, a temporal directory is used. The main advantage of this approach is that, because the temporal directory is created on the same volume where Xcode will be installed, the installation is vastly improved if the XIP is on a different volume.

- https://nshipster.com/temporary-files/
- The implementation of the `temporalDirectory` function and variable are based on the similar `trashItem`, but without the `@discardableResult` annotation (I cannot think of any case where this URL could to be ignored).

This closes XcodesOrg#178.
@juanjonol juanjonol linked a pull request Jan 23, 2022 that will close this issue
juanjonol added a commit to juanjonol/xcodes that referenced this issue Feb 6, 2022
Instead of expanding XIPs on its current directory, a temporal directory is used. The main advantage of this approach is that, because the temporal directory is created on the same volume where Xcode will be installed, the installation is vastly improved if the XIP is on a different volume.

- https://nshipster.com/temporary-files/
- The implementation of the `temporalDirectory` function and variable are based on the similar `trashItem`, but without the `@discardableResult` annotation (I cannot think of any case where this URL could to be ignored).

This closes XcodesOrg#178.
@juanjonol
Copy link
Contributor Author

Sorry to bother you @MattKiazyk, but the PR #179 that closes this has been ready for months. It says that some changes are required, but I made those changes a long time ago. Maybe you've missed this PR because it still says that there're changes requested?

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

Successfully merging a pull request may close this issue.

2 participants