Skip to content
New issue

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

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

Already on GitHub? # to your account

Creating HFS+ DMG using hdiutil on Intel Mac fails on OS X 15.2 #8769

Closed
fwdillema opened this issue Jan 14, 2025 · 2 comments · Fixed by #8782
Closed

Creating HFS+ DMG using hdiutil on Intel Mac fails on OS X 15.2 #8769

fwdillema opened this issue Jan 14, 2025 · 2 comments · Fixed by #8782

Comments

@fwdillema
Copy link

          This is the only process.arch-specific logic that happens when creating the initial dmg

let filesystem = ["HFS+", "-fsargs", "-c c=64,a=16,e=16"]
if (process.arch === "arm64") {
// Apple Silicon `hdiutil` dropped support for HFS+, so we force the latest type
// https://github.com/electron-userland/electron-builder/issues/4606
filesystem = ["APFS"]
log.warn(null, "Detected arm64 process, HFS+ is unavailable. Creating dmg with APFS - supports Mac OSX 10.12+")
}
imageArgs.push("-fs", ...filesystem)
imageArgs.push(tempDmg)
await hdiUtil(imageArgs)

Re: The volume name, we use sanitize-filename under the hood.

const volumeName = sanitizeFileName(this.computeVolumeName(arch, this.options.title))

export function sanitizeFileName(s: string, normalizeNfd = false): string {
const sanitized = _sanitizeFileName(s)
return normalizeNfd ? sanitized.normalize("NFD") : sanitized
}

Originally posted by @mmaietta in #8415 (comment)

@fwdillema fwdillema changed the title This is the only process.arch-specific logic that happens when creating the initial dmg Creating HFS+ DMG using hdutil on Intel Mac fails on OS X 15.2 Jan 14, 2025
@fwdillema fwdillema changed the title Creating HFS+ DMG using hdutil on Intel Mac fails on OS X 15.2 Creating HFS+ DMG using hdiutil on Intel Mac fails on OS X 15.2 Jan 14, 2025
@fwdillema
Copy link
Author

Creating the DMG with APFS on Intel Macs does work on OS X 15.2 (AFAIK HFS+ still worked on OS X 15.1). I guess the arch check should be extended with an OS version check to make this correct for all macs.

@mmaietta
Copy link
Collaborator

I wonder if Apple finally sunset support for building HFS+ in the 15.2.

With electron-builder v26 major semver bump, it may be best to drop the arch-specific logic entirely and move to APFS entirely. The warning logged has been present for years.

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

Successfully merging a pull request may close this issue.

2 participants