Skip to content

Commit

Permalink
Use APFS for the DMG (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
zorgiepoo authored Feb 7, 2023
1 parent 9094004 commit 228d8f8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,9 @@ async function init() {
composedIconPath = await composeIcon(path.join(appPath, 'Contents/Resources', `${appIconName}.icns`));
}

const minSystemVersion = (Object.prototype.hasOwnProperty.call(appInfo, 'LSMinimumSystemVersion') && appInfo.LSMinimumSystemVersion.length > 0) ? appInfo.LSMinimumSystemVersion.toString() : '10.11';
const minorVersion = Number(minSystemVersion.split('.')[1]) || 0;
const dmgFormat = (minorVersion >= 11) ? 'ULFO' : 'UDZO'; // ULFO requires 10.11+
ora.info(`Minimum runtime ${minSystemVersion} detected, using ${dmgFormat} format`).start();
// Xcode 14+ only supports building apps for macOS 10.13+
const dmgFormat = 'ULFO'; // ULFO requires macOS 10.11+
const dmgFilesystem = 'APFS'; // APFS requires macOS 10.13+

const ee = appdmg({
target: dmgPath,
Expand All @@ -123,6 +122,7 @@ async function init() {
background: path.join(__dirname, 'assets/dmg-background.png'),
'icon-size': 160,
format: dmgFormat,
filesystem: dmgFilesystem,
window: {
size: {
width: 660,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"apple"
],
"dependencies": {
"appdmg": "^0.6.0",
"appdmg": "^0.6.6",
"execa": "^1.0.0",
"gm": "^1.23.1",
"icns-lib": "^1.0.1",
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ $ create-dmg --help

## DMG

The DMG detects the minimum runtime of the app, and uses ULFO (macOS 10.11 or later) or UDZO as appropriate. The resulting image has the filename `App Name 0.0.0.dmg`, for example `Lungo 1.0.0.dmg`.
The DMG requires macOS 10.13 or later and has the filename `App Name 0.0.0.dmg`, for example `Lungo 1.0.0.dmg`.

It will try to code sign the DMG, but the DMG is still created and fine even if the code signing fails, for example if you don't have a developer certificate.

Expand Down

0 comments on commit 228d8f8

Please sign in to comment.