Add DMG target to mac distribution (#833)
Summary: Fixes https://github.com/facebook/flipper/issues/807 by adding a DMG target to distribute the application for mac. The `.dmg` file is `97.2 MB` while the `.zip` is `101.5 MB`. 😄  ## Changelog Add DMG target for mac distribution Pull Request resolved: https://github.com/facebook/flipper/pull/833 Test Plan: 1. `yarn build --mac`; 1. Check `flipper-mac.dmg` inside of `dist`. --- **The background is completely discussable, I borrowed it [from an old project](https://github.com/lucasbento/react-native-actions/tree/feature/electron/packages/electron-react-native-actions) of mine and it's [totally not inspired by WebStorm `.dmg` file](https://user-images.githubusercontent.com/6207220/75276024-b3a16100-5805-11ea-8c69-063fe28316c1.png).** Reviewed By: nikoant Differential Revision: D20139188 Pulled By: passy fbshipit-source-id: 1aaaabd7c6ac51d12865388bf962d164f80a7a14
This commit is contained in:
committed by
Facebook Github Bot
parent
ab0078a13f
commit
be360157f6
21
package.json
21
package.json
@@ -25,6 +25,27 @@
|
||||
"NSUserNotificationAlertStyle": "alert"
|
||||
}
|
||||
},
|
||||
"dmg": {
|
||||
"background": "dmgBackground.png",
|
||||
"icon": "icon.icns",
|
||||
"iconSize": 155,
|
||||
"window": {
|
||||
"width": 660,
|
||||
"height": 400
|
||||
},
|
||||
"contents": [
|
||||
{
|
||||
"x": 123,
|
||||
"y": 172
|
||||
},
|
||||
{
|
||||
"x": 539,
|
||||
"y": 168,
|
||||
"type": "link",
|
||||
"path": "/Applications"
|
||||
}
|
||||
]
|
||||
},
|
||||
"win": {
|
||||
"publisherName": "Facebook, Inc.",
|
||||
"sign": null
|
||||
|
||||
@@ -67,7 +67,7 @@ async function buildDist(buildFolder: string) {
|
||||
const postBuildCallbacks: (() => void)[] = [];
|
||||
|
||||
if (process.argv.indexOf('--mac') > -1) {
|
||||
targetsRaw.push(Platform.MAC.createTarget(['dir']));
|
||||
targetsRaw.push(Platform.MAC.createTarget(['dir', 'dmg']));
|
||||
postBuildCallbacks.push(() =>
|
||||
spawn('zip', ['-qyr9', '../Flipper-mac.zip', 'Flipper.app'], {
|
||||
cwd: path.join(__dirname, '..', 'dist', 'mac'),
|
||||
|
||||
BIN
static/dmgBackground.png
Normal file
BIN
static/dmgBackground.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
Reference in New Issue
Block a user