diff --git a/.idea/dictionaries/develar.xml b/.idea/dictionaries/develar.xml
index d5b950c11cf..6046f33d56a 100644
--- a/.idea/dictionaries/develar.xml
+++ b/.idea/dictionaries/develar.xml
@@ -6,6 +6,7 @@
archs
authenticode
awaiter
+ buildpack
circleci
clcerts
cleanuper
@@ -19,14 +20,19 @@
github
globaldots
globby
+ graphicsmagick
hicolor
+ icnsutils
+ keyserver
libappindicator
libgcrypt
+ libgnome
libnotify
lzma
makedeb
mkdirp
mpass
+ multilib
nokeys
nomacver
noninteractive
@@ -50,6 +56,8 @@
userprofile
veyor
winstaller
+ xamarin
+ xenial
\ No newline at end of file
diff --git a/docs/Options.md b/docs/Options.md
index c37e602f0ed..4175c781799 100644
--- a/docs/Options.md
+++ b/docs/Options.md
@@ -69,7 +69,7 @@ See all [appdmg options](https://www.npmjs.com/package/appdmg#json-specification
| Name | Description
| --- | ---
| icon | The path to icon, which will be shown when mounted (default: `build/icon.icns`).
-| background | The path to background (default: `build/background.png`). The resolution of this file determines the resolution of the installer window.
+| background |
The path to background (default: build/background.png
if exists). The resolution of this file determines the resolution of the installer window. If background is not specified, use window.size
, see [specification](https://github.com/LinusU/node-appdmg#json-specification)).
| target | Target package type: list of `default`, `dmg`, `zip`, `mas`, `7z`. Defaults to `default` (dmg and zip for Squirrel.Mac).
| identity | The name of certificate to use when signing. Consider using environment variables [CSC_LINK or CSC_NAME](https://github.com/electron-userland/electron-builder/wiki/Code-Signing). MAS installer identity is specified in the [.build.mas](#MasBuildOptions-identity).
| entitlements | The path to entitlements file for signing the app. build/osx.entitlements
will be used if exists (it is a recommended way to set). MAS entitlements is specified in the [.build.mas](#MasBuildOptions-entitlements).
diff --git a/package.json b/package.json
index 1017cc7b678..06cd5037760 100644
--- a/package.json
+++ b/package.json
@@ -81,7 +81,7 @@
"tmp": "0.0.28"
},
"optionalDependencies": {
- "appdmg-tf": "^0.3.11"
+ "appdmg": "^0.4.2"
},
"config": {
"pre-git": {
diff --git a/src/metadata.ts b/src/metadata.ts
index 8a46c5226ab..4704e4fb38c 100755
--- a/src/metadata.ts
+++ b/src/metadata.ts
@@ -153,7 +153,8 @@ export interface OsXBuildOptions extends PlatformSpecificBuildOptions {
readonly icon?: string | null
/*
- The path to background (default: `build/background.png`). The resolution of this file determines the resolution of the installer window.
+ The path to background (default: `build/background.png` if exists). The resolution of this file determines the resolution of the installer window.
+ If background is not specified, use `window.size`, see [specification](https://github.com/LinusU/node-appdmg#json-specification).
*/
readonly background?: string | null
diff --git a/src/osxPackager.ts b/src/osxPackager.ts
index 93f45e80c66..43c17c7894a 100644
--- a/src/osxPackager.ts
+++ b/src/osxPackager.ts
@@ -164,7 +164,8 @@ export default class OsXPackager extends PlatformPackager {
{
"x": 130, "y": 220, "type": "file"
}
- ]
+ ],
+ format: this.devMetadata.build.compression === "store" ? "UDRO" : "UDBZ",
}, this.customBuildOptions)
if (!("background" in this.customBuildOptions)) {
@@ -190,14 +191,13 @@ export default class OsXPackager extends PlatformPackager {
target: artifactPath,
basepath: this.projectDir,
specification: await this.computeEffectiveDistOptions(appOutDir),
- compression: this.devMetadata.build.compression === "store" ? "NONE" : "UDBZ"
}
if (debug.enabled) {
debug(`appdmg: ${JSON.stringify(dmgOptions, null, 2)}`)
}
- const emitter = require("appdmg-tf")(dmgOptions)
+ const emitter = require("appdmg")(dmgOptions)
emitter.on("error", reject)
emitter.on("finish", () => resolve())
if (debug.enabled) {
diff --git a/test/src/osxPackagerTest.ts b/test/src/osxPackagerTest.ts
index e7229b75a8c..a82df4dc8d5 100644
--- a/test/src/osxPackagerTest.ts
+++ b/test/src/osxPackagerTest.ts
@@ -2,7 +2,7 @@ import test from "./helpers/avaEx"
import { assertPack, platform, modifyPackageJson, signed } from "./helpers/packTester"
import { Platform } from "out"
import OsXPackager from "out/osxPackager"
-import { move, writeFile } from "fs-extra-p"
+import { move, writeFile, deleteFile } from "fs-extra-p"
import * as path from "path"
import { BuildInfo, PackagerOptions } from "out/platformPackager"
import { Promise as BluebirdPromise } from "bluebird"
@@ -135,9 +135,9 @@ test.ifOsx("entitlements in build dir", () => {
})
})
-// test.ifOsx("no background", (t: any) => assertPack("test-app-one", platform(Platform.OSX), {
-// tempDirCreated: projectDir => deleteFile(path.join(projectDir, "build", "background.png"))
-// }))
+test.ifOsx("no background", (t: any) => assertPack("test-app-one", platform(Platform.OSX), {
+ tempDirCreated: projectDir => deleteFile(path.join(projectDir, "build", "background.png"))
+}))
test.ifOsx("custom background", () => {
let platformPackager: CheckingOsXPackager = null
diff --git a/typings/appdmg.d.ts b/typings/appdmg.d.ts
index 3f19b3b2db7..cd0cb00fe13 100644
--- a/typings/appdmg.d.ts
+++ b/typings/appdmg.d.ts
@@ -15,7 +15,7 @@ declare namespace appdmg {
}
}
-declare module "appdmg-tf" {
+declare module "appdmg" {
import { EventEmitter } from "events"
function appdmg(options: appdmg.Options): EventEmitter