|
| 1 | +/** |
| 2 | + * Electron Builder Configuration |
| 3 | + * https://www.electron.build/configuration/configuration |
| 4 | + */ |
| 5 | +module.exports = { |
| 6 | + appId: 'com.resgrid.unit', |
| 7 | + productName: 'Resgrid Unit', |
| 8 | + copyright: 'Copyright © 2024 Resgrid', |
| 9 | + |
| 10 | + directories: { |
| 11 | + output: 'electron-dist', |
| 12 | + buildResources: 'assets', |
| 13 | + }, |
| 14 | + |
| 15 | + files: [ |
| 16 | + 'dist/**/*', |
| 17 | + 'electron/**/*', |
| 18 | + '!**/node_modules/*/{CHANGELOG.md,README.md,README,readme.md,readme}', |
| 19 | + '!**/node_modules/*/{test,__tests__,tests,powered-test,example,examples}', |
| 20 | + '!**/node_modules/.bin', |
| 21 | + ], |
| 22 | + |
| 23 | + // macOS configuration |
| 24 | + mac: { |
| 25 | + category: 'public.app-category.productivity', |
| 26 | + target: [ |
| 27 | + { target: 'dmg', arch: ['x64', 'arm64'] }, |
| 28 | + { target: 'zip', arch: ['x64', 'arm64'] }, |
| 29 | + ], |
| 30 | + icon: 'assets/icon.icns', |
| 31 | + hardenedRuntime: true, |
| 32 | + gatekeeperAssess: false, |
| 33 | + entitlements: 'electron/entitlements.mac.plist', |
| 34 | + entitlementsInherit: 'electron/entitlements.mac.plist', |
| 35 | + darkModeSupport: true, |
| 36 | + }, |
| 37 | + |
| 38 | + dmg: { |
| 39 | + contents: [ |
| 40 | + { x: 130, y: 220 }, |
| 41 | + { x: 410, y: 220, type: 'link', path: '/Applications' }, |
| 42 | + ], |
| 43 | + window: { |
| 44 | + width: 540, |
| 45 | + height: 380, |
| 46 | + }, |
| 47 | + }, |
| 48 | + |
| 49 | + // Windows configuration |
| 50 | + win: { |
| 51 | + target: [ |
| 52 | + { target: 'nsis', arch: ['x64'] }, |
| 53 | + { target: 'portable', arch: ['x64'] }, |
| 54 | + ], |
| 55 | + icon: 'assets/icon.ico', |
| 56 | + publisherName: 'Resgrid', |
| 57 | + }, |
| 58 | + |
| 59 | + nsis: { |
| 60 | + oneClick: false, |
| 61 | + allowToChangeInstallationDirectory: true, |
| 62 | + installerIcon: 'assets/icon.ico', |
| 63 | + uninstallerIcon: 'assets/icon.ico', |
| 64 | + installerHeaderIcon: 'assets/icon.ico', |
| 65 | + createDesktopShortcut: true, |
| 66 | + createStartMenuShortcut: true, |
| 67 | + shortcutName: 'Resgrid Unit', |
| 68 | + license: 'LICENSE', |
| 69 | + }, |
| 70 | + |
| 71 | + // Linux configuration |
| 72 | + linux: { |
| 73 | + target: [ |
| 74 | + { target: 'AppImage', arch: ['x64'] }, |
| 75 | + { target: 'deb', arch: ['x64'] }, |
| 76 | + { target: 'rpm', arch: ['x64'] }, |
| 77 | + ], |
| 78 | + category: 'Office', |
| 79 | + icon: 'assets/icon.png', |
| 80 | + maintainer: 'Resgrid <support@resgrid.com>', |
| 81 | + vendor: 'Resgrid', |
| 82 | + desktop: { |
| 83 | + Name: 'Resgrid Unit', |
| 84 | + Comment: 'Resgrid Unit Management Application', |
| 85 | + Category: 'Office;Utility;', |
| 86 | + StartupWMClass: 'resgrid-unit', |
| 87 | + }, |
| 88 | + }, |
| 89 | + |
| 90 | + // Extra metadata |
| 91 | + extraMetadata: { |
| 92 | + main: 'electron/main.js', |
| 93 | + }, |
| 94 | +}; |
0 commit comments