Add background to .dmg file

This commit is contained in:
Fedor Indutny
2026-03-19 10:32:38 -07:00
committed by GitHub
parent 8b510c3b30
commit 1d884929ea
5 changed files with 41 additions and 5 deletions

BIN
build/dmg/background.tiff Normal file

Binary file not shown.

BIN
build/dmg/icon.icns Normal file

Binary file not shown.

View File

@@ -463,6 +463,29 @@
"NSAutoFillRequiresTextContentTypeForOneTimeCodeOnMac": true
}
},
"dmg": {
"title": "${productName} Installer",
"background": "build/dmg/background.tiff",
"icon": "build/dmg/icon.icns",
"iconSize": 96,
"window": {
"width": 540,
"height": 394
},
"contents": [
{
"type": "file",
"x": 152,
"y": 161
},
{
"path": "/Applications",
"type": "link",
"x": 368,
"y": 161
}
]
},
"masDev": {
"type": "development",
"sign": null,

View File

@@ -1,5 +1,5 @@
diff --git a/out/dmgLicense.js b/out/dmgLicense.js
index cf1dbdf803d3af37e439c7f0fa219b497f8faaef..d727aac55e263486b88801ac04d5b98360b374ce 100644
index cf1dbdf803d3af37e439c7f0fa219b497f8faaef..d546a96a2857c11e70c6489b33c87a7665399fd7 100644
--- a/out/dmgLicense.js
+++ b/out/dmgLicense.js
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
@@ -11,3 +11,16 @@ index cf1dbdf803d3af37e439c7f0fa219b497f8faaef..d727aac55e263486b88801ac04d5b983
const fs_extra_1 = require("fs-extra");
const js_yaml_1 = require("js-yaml");
const licenseButtons_1 = require("./licenseButtons");
diff --git a/vendor/dmgbuild/core.py b/vendor/dmgbuild/core.py
index 1adc35289fc604f3dd5545d3d86fbacb6baeaf69..473e70a3a7a4e9285517634a0749d9da82211699 100644
--- a/vendor/dmgbuild/core.py
+++ b/vendor/dmgbuild/core.py
@@ -255,7 +255,7 @@ def build_dmg():
icvp['backgroundColorBlue'] = float(c.b)
elif background_file:
alias = Alias.for_file(background_file)
- background_bmk = Bookmark.for_file(background_file)
+ # background_bmk = Bookmark.for_file(background_file)
icvp['backgroundType'] = 2
icvp['backgroundImageAlias'] = biplist.Data(alias.to_bytes())

8
pnpm-lock.yaml generated
View File

@@ -40,7 +40,7 @@ patchedDependencies:
hash: b88b5052437cbdc1882137778b76ca5037f71b2a030ae9ef39dc97f51670d599
path: patches/casual+1.6.2.patch
dmg-builder:
hash: cb72ed47fa8d45513a36db33fcb41cb75c30cada4737da067bf3fa1f063725f2
hash: 7ce1df215d2c4dcbe797485ec0456168d19a4870687b21c489062abd079c7982
path: patches/dmg-builder.patch
eslint-plugin-better-tailwindcss:
hash: a94affa4d170a27c4cfd44f7ac30ea11ae285cb4e270a5d930dd28cc79901b4f
@@ -15468,7 +15468,7 @@ snapshots:
chromium-pickle-js: 0.2.0
config-file-ts: 0.2.8-rc1
debug: 4.3.7(supports-color@8.1.1)
dmg-builder: 26.0.14(patch_hash=cb72ed47fa8d45513a36db33fcb41cb75c30cada4737da067bf3fa1f063725f2)(electron-builder-squirrel-windows@26.0.14)
dmg-builder: 26.0.14(patch_hash=7ce1df215d2c4dcbe797485ec0456168d19a4870687b21c489062abd079c7982)(electron-builder-squirrel-windows@26.0.14)
dotenv: 16.4.7
dotenv-expand: 11.0.7
ejs: 3.1.10
@@ -16663,7 +16663,7 @@ snapshots:
direction@1.0.4: {}
dmg-builder@26.0.14(patch_hash=cb72ed47fa8d45513a36db33fcb41cb75c30cada4737da067bf3fa1f063725f2)(electron-builder-squirrel-windows@26.0.14):
dmg-builder@26.0.14(patch_hash=7ce1df215d2c4dcbe797485ec0456168d19a4870687b21c489062abd079c7982)(electron-builder-squirrel-windows@26.0.14):
dependencies:
app-builder-lib: 26.0.14(patch_hash=bcbaa020b1d47a2b1e6ba770e561454819f95f13e01361cc3b2a25560a607fd5)(dmg-builder@26.0.14)(electron-builder-squirrel-windows@26.0.14)
builder-util: 26.0.13
@@ -16825,7 +16825,7 @@ snapshots:
builder-util: 26.0.13
builder-util-runtime: 9.3.2
chalk: 4.1.2
dmg-builder: 26.0.14(patch_hash=cb72ed47fa8d45513a36db33fcb41cb75c30cada4737da067bf3fa1f063725f2)(electron-builder-squirrel-windows@26.0.14)
dmg-builder: 26.0.14(patch_hash=7ce1df215d2c4dcbe797485ec0456168d19a4870687b21c489062abd079c7982)(electron-builder-squirrel-windows@26.0.14)
fs-extra: 10.1.0
is-ci: 3.0.1
lazy-val: 1.0.5