Skip to content

Commit

Permalink
feat: dmg icon and background (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod authored Jul 6, 2024
1 parent bb30d56 commit 9948164
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 6 deletions.
40 changes: 34 additions & 6 deletions forge.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ const config: ForgeConfig = {
}),
keychain: process.env.KEYCHAIN_PATH,
},
osxNotarize: {
appleId: process.env.APPLE_ID!,
appleIdPassword: process.env.APPLE_PASSWORD!,
teamId: process.env.APPLE_TEAM_ID!,
},
...(process.env.APPLE_ID && process.env.APPLE_PASSWORD && process.env.APPLE_TEAM_ID && {
osxNotarize: {
appleId: process.env.APPLE_ID!,
appleIdPassword: process.env.APPLE_PASSWORD!,
teamId: process.env.APPLE_TEAM_ID!,
},
}),
},
rebuildConfig: {},
makers: [
Expand All @@ -36,7 +38,33 @@ const config: ForgeConfig = {
icon: "resources/icon.png",
},
}),
new MakerDMG({}),
new MakerDMG({
background: "resources/dmg-background.png",
icon: "resources/dmg-icon.icns",
iconSize: 160,
additionalDMGOptions: {
window: {
size: {
width: 660,
height: 400,
},
},
},
contents: (opts) => ([
{
x: 180,
y: 170,
type: "file",
path: (opts as any).appPath,

Check warning on line 58 in forge.config.ts

View workflow job for this annotation

GitHub Actions / Lint and Typecheck (18.x)

Unexpected any. Specify a different type
},
{
x: 480,
y: 170,
type: "link",
path: "/Applications",
},
]),
}),
],
plugins: [
// Fuses are used to enable/disable various Electron functionality
Expand Down
Binary file added resources/dmg-background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/dmg-background@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/dmg-icon.icns
Binary file not shown.

0 comments on commit 9948164

Please sign in to comment.