Files
modeling-app/forge.config.ts
Pierre Jacquier 12ed4d5925 First steps for electron app build and packaging in Github Actions
Builds on the ci.yml refactor started at !2815

commit 6813adf86d1d7b78a9a4e77039313dccd67c3083
Author: Pierre Jacquier <pierrejacquier39@gmail.com>
Date:   Mon Aug 5 11:27:03 2024 -0400

    Lint

commit fe95e2e1302beb213da9f9bde5feeda255e116fd
Author: Pierre Jacquier <pierrejacquier39@gmail.com>
Date:   Mon Aug 5 10:34:34 2024 -0400

    Disable sign if not BUILD_RELEASE

commit 8f31952e217f1dc1c683705cdb28bdd7042ccdc7
Author: Pierre Jacquier <pierrejacquier39@gmail.com>
Date:   Mon Aug 5 08:31:42 2024 -0400

    WIP sign windows

commit fbabc874d41e8e57011454afec68c2b4926c842b
Author: Pierre Jacquier <pierrejacquier39@gmail.com>
Date:   Mon Aug 5 07:51:20 2024 -0400

    WIP macos

commit 6a8cc629e45b0c041fb31f1daf5f3a56f10871cc
Author: Pierre Jacquier <pierrejacquier39@gmail.com>
Date:   Mon Aug 5 11:15:28 2024 +0000

    Change executable name for deb

commit b616aece2673086c2bf376d583dd4f0d8c09a23d
Author: Pierre Jacquier <pierrejacquier39@gmail.com>
Date:   Mon Aug 5 05:56:26 2024 -0400

    WIP macos signing, ubuntu build

commit b4c7ac8b9b73d18f26d2d1e7cfe0494e713e5231
Author: Pierre Jacquier <pierrejacquier39@gmail.com>
Date:   Mon Aug 5 05:41:53 2024 -0400

    Fix ubuntu target

commit 23b694327e2c5ee570257fb66f51ff65b7b6f6f4
Author: Pierre Jacquier <pierrejacquier39@gmail.com>
Date:   Mon Aug 5 05:23:29 2024 -0400

    Fix upload for Windows, add ubuntu

commit 54df186f632a277e68b280fccd547f83208c2b8b
Author: Pierre Jacquier <pierrejacquier39@gmail.com>
Date:   Mon Aug 5 05:00:47 2024 -0400

    Fix tsc, remove e2e/tauri tests

commit 1c76e793d1b2d8781f5fce7399b3118438331428
Author: Pierre Jacquier <pierrejacquier39@gmail.com>
Date:   Sat Aug 3 08:25:39 2024 -0400

    Lint, codespell, remove tauri/wdio ref, add author

commit 51e91558978e634677e58c8c7248b0bbda0a82d6
Author: Pierre Jacquier <pierrejacquier39@gmail.com>
Date:   Sat Aug 3 08:11:24 2024 -0400

    Add new ci.yml breakdown from pierremtb/issue2805. Windows and macOS only for now
2024-08-08 12:33:38 -04:00

67 lines
2.2 KiB
TypeScript

import type { ForgeConfig } from '@electron-forge/shared-types'
import { MakerSquirrel } from '@electron-forge/maker-squirrel'
import { MakerZIP } from '@electron-forge/maker-zip'
import { MakerDeb } from '@electron-forge/maker-deb'
import { MakerRpm } from '@electron-forge/maker-rpm'
import { VitePlugin } from '@electron-forge/plugin-vite'
import { FusesPlugin } from '@electron-forge/plugin-fuses'
import { FuseV1Options, FuseVersion } from '@electron/fuses'
const config: ForgeConfig = {
packagerConfig: {
asar: true,
osxSign: (process.env.BUILD_RELEASE === 'true' && {}) || undefined,
osxNotarize:
(process.env.BUILD_RELEASE === 'true' && {
appleId: process.env.APPLE_ID || '',
appleIdPassword: process.env.APPLE_PASSWORD || '',
teamId: process.env.APPLE_TEAM_ID || '',
}) ||
undefined,
executableName: 'zoo-modeling-app',
},
rebuildConfig: {},
makers: [
new MakerSquirrel({}),
new MakerZIP({}, ['darwin']),
new MakerRpm({}),
new MakerDeb({}),
],
plugins: [
new VitePlugin({
// `build` can specify multiple entry builds, which can be Main process, Preload scripts, Worker process, etc.
// If you are familiar with Vite configuration, it will look really familiar.
build: [
{
// `entry` is just an alias for `build.lib.entry` in the corresponding file of `config`.
entry: 'src/main.ts',
config: 'vite.main.config.ts',
},
{
entry: 'src/preload.ts',
config: 'vite.preload.config.ts',
},
],
renderer: [
{
name: 'main_window',
config: 'vite.renderer.config.ts',
},
],
}),
// Fuses are used to enable/disable various Electron functionality
// at package time, before code signing the application
new FusesPlugin({
version: FuseVersion.V1,
[FuseV1Options.RunAsNode]: false,
[FuseV1Options.EnableCookieEncryption]: true,
[FuseV1Options.EnableNodeOptionsEnvironmentVariable]: false,
[FuseV1Options.EnableNodeCliInspectArguments]: false,
[FuseV1Options.EnableEmbeddedAsarIntegrityValidation]: true,
[FuseV1Options.OnlyLoadAppFromAsar]: true,
}),
],
}
export default config