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

Create APFS disk images for apps targeting macOS 10.13+ #81

Merged
merged 10 commits into from
Feb 7, 2023

Conversation

zorgiepoo
Copy link
Contributor

@zorgiepoo zorgiepoo commented Feb 4, 2023

As part of #79, create APFS disk images for macOS 10.13+ apps.

This also fixes a bug where create-dmg may previously prefer to use UDZO if the app's minimum system requirement was >= 11.0 because it didn't compare the major version component.

This requires nodeapp-dmg 0.6.6 which I added support for APFS disk images there.

@sindresorhus
Copy link
Owner

I just realized that we could simplify this a lot. The oldest macOS version Xcode can target now is macOS 10.13, so it makes sense for this package to also target that. That means we can remove both of the checks.

@zorgiepoo
Copy link
Contributor Author

zorgiepoo commented Feb 4, 2023

I can do that if you want but.. we may want to keep the checks for a few reasons so I'd personally keep it:

  1. Some developers can (and do) build an app using an older Xcode / OS to target older OS releases.
  2. It could still be useful to (re-)create dmgs or archives for a developer's older versions of apps even if their latest app supports macOS 10.13+ (for example if I want to change an older release from zip -> dmg or if I wanted to change a dmg after switching to create-dmg, etc)
  3. If we want to provide an option to apply extra compression in the future to finish Support for APFS and LZMA compression #79, these checks (or the basis of them) would be useful to determine if lzma (or possibly bzip2) should be used. With this current pull request, I think create-dmg has the right defaults.

@sindresorhus
Copy link
Owner

  1. They can do what they do with Xcode, use the older version of this package.
  2. ^
  3. The checks can always be added back later. They are not gone. They are still in the history here.

@zorgiepoo
Copy link
Contributor Author

zorgiepoo commented Feb 7, 2023

IMO, create-dmg should at least warn the user (or fail) if they're trying to build a dmg now with an app with a deployment target < 10.13. Xcode issues a build warning if you do this for comparison. (But also: if you can warn, then why not go through the small amount of extra effort to fallback on older formats?)

The other potential argument is: Xcode 14 doesn't support building binaries < 10.13, but hdiutil still supports building HFS+ and zlib disk images.. as a tool that creates disk images, hdiutil or disk utility is the more appropriate comparison.

I removed the minimum system version code like you asked however. Feel free to merge if that's what you want, or let me know if you'd like more refinement here.

@sindresorhus sindresorhus merged commit 228d8f8 into sindresorhus:main Feb 7, 2023
@sindresorhus
Copy link
Owner

Thanks :)

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 this pull request may close these issues.

2 participants