Skip to content

Commit

Permalink
Merge pull request #844 from nextcloud/build/mac-dmg
Browse files Browse the repository at this point in the history
build: add macOS dmg distributive
  • Loading branch information
ShGKme authored Nov 7, 2024
2 parents 64ce56a + b2f4d0c commit ce3a283
Show file tree
Hide file tree
Showing 7 changed files with 879 additions and 587 deletions.
7 changes: 7 additions & 0 deletions REUSE.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ precedence = "aggregate"
SPDX-FileCopyrightText = "none"
SPDX-License-Identifier = "CC0-1.0"

[[annotations]]
path = ["img/dmg-background.png", "img/[email protected]"]
precedence = "aggregate"
SPDX-FileCopyrightText = "2024 Nextcloud GmbH"
SPDX-License-Identifier = "CC-BY-SA-4.0"
SPDX-FileAttributionText = "Modified jenna-kim-the-globe.webp with app icon placeholders and an arrow on top to use as a background image for the macOS DMG installer"

[[annotations]]
path = "resources/vue-devtools.crx"
precedence = "aggregate"
Expand Down
19 changes: 16 additions & 3 deletions forge.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const path = require('node:path')
const fs = require('node:fs')
const semver = require('semver')
const { MakerSquirrel } = require('@electron-forge/maker-squirrel')
const { MakerDMG } = require('@electron-forge/maker-dmg')
const { MakerZIP } = require('@electron-forge/maker-zip')
const packageJSON = require('./package.json')
const { MIN_REQUIRED_BUILT_IN_TALK_VERSION } = require('./src/constants.js')
Expand All @@ -21,7 +22,7 @@ const CONFIG = {
description: packageJSON.description,

// macOS
macAppId: 'com.nextcloud.NextcloudTalk',
appleAppBundleId: 'com.nextcloud.talk.mac',
// Windows
winAppId: 'NextcloudTalk',
}
Expand Down Expand Up @@ -80,9 +81,10 @@ module.exports = {
},

// macOS
appBundleId: CONFIG.macAppId,
appBundleId: CONFIG.appleAppBundleId,
darwinDarkModeSupport: true,
appCategoryType: 'public.app-category.social-networking', // LSApplicationCategoryType | https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html
// https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html#//apple_ref/doc/uid/TP40009250-SW8
appCategoryType: 'public.app-category.business',
},

makers: [
Expand All @@ -108,6 +110,17 @@ module.exports = {
loadingGif: path.join(__dirname, './img/squirrel-install-loading.gif'),
}),

// https://js.electronforge.io/interfaces/_electron_forge_maker_dmg.MakerDMGConfig.html
new MakerDMG({
icon: path.join(__dirname, 'img/icons/icon.icns'),
background: path.join(__dirname, 'img/dmg-background.png'),
// https://github.com/LinusU/node-appdmg?tab=readme-ov-file#specification
additionalDMGOptions: {
// Background does not work when the title has spaces or special characters
title: 'NextcloudTalk',
},
}),

// Portable, all platforms
new MakerZIP(),
],
Expand Down
Binary file added img/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 img/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit ce3a283

Please sign in to comment.