-
-
Notifications
You must be signed in to change notification settings - Fork 936
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
OSX: Compress DMG #745
OSX: Compress DMG #745
Conversation
UDB0 is good enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oddly enough when I created the dmg locally it already compressed the dmg to 89MB, probably an overall systemsetting that already enabled some kind of compression.
I tested your PR to compress with UDB0 and now the filesize reduced to 80MB. Everything is working fine.
gulpfile.js
Outdated
@@ -322,7 +322,8 @@ function release_osx64() { | |||
{ 'x': 448, 'y': 342, 'type': 'link', 'path': '/Applications' }, | |||
{ 'x': 192, 'y': 344, 'type': 'file', 'path': pkg.name + '.app', 'name': 'Betaflight Configurator.app' } | |||
] | |||
} | |||
}, | |||
format: 'UDB0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird, according to https://github.com/LinusU/node-appdmg#specification it looks like format
should go inside specification
(and the same applies to background
, maybe that's why the background is not working, @basdelfos).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doh, that's it. Now I remember that the background was working in the beginning when I used a separate json file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jflyper can you replace this from line 114:
return gulp.src([])
.pipe(appdmg({
target: path.join(releaseDir, get_release_filename('macOS', 'dmg')),
basepath: path.join(appsDir, pkg.name, 'osx64'),
specification: {
title: 'Betaflight Configurator',
contents: [
{ 'x': 448, 'y': 342, 'type': 'link', 'path': '/Applications' },
{ 'x': 192, 'y': 344, 'type': 'file', 'path': pkg.name + '.app', 'name': 'Betaflight Configurator.app' }
],
background: path.join(__dirname, 'images/dmg-background.png'),
format: 'UDZO',
window: {
size: {
width: 638,
height: 479
}
}
},
})
);
It fixes the compression to move to specification
and the correct enum value. Also fixes the background not showing in the dmg.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strange. The dmg file is 205MB, and still no background image...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tags should be double-quoted? Not mandatory???
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quoting is not mandatory as long as the name does not have special characters like spaces, dashes, ...
UDB0 is good enough.