This repository has been archived on 2024-05-27. You can view files and clone it, but cannot push or open issues or pull requests.
Nexus-Polestar/.build/electron-builder.ts

92 lines
3.2 KiB
TypeScript
Raw Normal View History

2023-08-30 00:46:33 -05:00
import { Configuration } from 'electron-builder'
import {meta} from '../configuration/app'
import {splash} from '../configuration/theme'
import {update, macos, linux, windows} from '../configuration/electron-builder'
///////////////////////////////////////////////////////////////
// Please configure the "configuration/app.ts" file instead. //
///////////////////////////////////////////////////////////////
const config: Configuration = {
directories: {output: ".build/output/distribution/${platform}/${arch}"},
productName: meta.name,
appId: meta.id,
// Auto Update
publish: {
provider: "generic",
url: update.url,
channel: update.channel
},
// Operating Systems
/// macOS
mac: {
icon: ".build/assets/icons/macOS.icns",
target: "dmg",
darkModeSupport: true,
category: macos.category
},
dmg: {
background: ".build/assets/backgrounds/DMG-Background.png",
icon: ".build/assets/icons/macos/icon.icns"
},
/// Windows
win: {
icon: ".build/assets/icons/windows/icon.png",
target: [
{target: "appx", arch: "x64"},
{target: "nsis", arch: "x64"},
{target: "nsis", arch: "arm64"}
]
},
appx: {
backgroundColor: splash.backgroundColor,
applicationId: meta.id,
identityName: windows.identityName,
publisher: windows.publisher,
publisherDisplayName: meta.company
},
nsis: {
installerSidebar: ".build/assets/backgrounds/NSIS-Sidebar.bmp",
uninstallDisplayName: meta.name + ' - Uninstall.exe',
artifactName: meta.name + ' - Install.exe',
shortcutName: meta.name,
allowElevation: windows.requireAdmin,
oneClick: windows.silent,
allowToChangeInstallationDirectory: windows.allowToChangeInstallationDirectory,
displayLanguageSelector: windows.displayLanguageSelector,
createDesktopShortcut: windows.createDesktopShortcut,
deleteAppDataOnUninstall: windows.deleteAppDataOnUninstall
},
/// Linux
linux: {
icon: ".build/assets/icons/linux/icon.png",
category: linux.category,
maintainer: meta.id,
vendor: meta.company,
description: meta.description,
target: [
{ target: 'AppImage', arch: 'x64' }, // Universal - x86_64
{ target: 'AppImage', arch: 'arm64' }, // Universal - arm64
{ target: 'snap', arch: 'x64' }, // Snap Store - x86_64
{ target: 'deb', arch: 'x64' }, // Debian/Ubuntu - x86_64
{ target: 'deb', arch: 'arm64' }, // Debian/Ubuntu - arm64
{ target: 'rpm', arch: 'x64' }, // RHEL/Fedora - x86_64
{ target: 'rpm', arch: 'arm64' }, // RHEL/Fedora - arm64
{ target: 'freebsd', arch: 'x64' }, // BSD - x86_64
{ target: 'freebsd', arch: 'arm64' }, // BSD - arm64
{ target: 'pacman', arch: 'x64' }, // Arch - x86_64
{ target: 'pacman', arch: 'arm64' }, // Arch - arm64
]
},
snap: {
title: meta.name,
allowNativeWayland: true,
confinement: "strict"
}
}
export default config