mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
first commit
This commit is contained in:
commit
f1bdec484e
165 changed files with 20993 additions and 0 deletions
99
forge.config.ts
Normal file
99
forge.config.ts
Normal file
|
@ -0,0 +1,99 @@
|
|||
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 { AutoUnpackNativesPlugin } from "@electron-forge/plugin-auto-unpack-natives";
|
||||
import { WebpackPlugin } from "@electron-forge/plugin-webpack";
|
||||
import { FusesPlugin } from "@electron-forge/plugin-fuses";
|
||||
import { PublisherGithub } from "@electron-forge/publisher-github";
|
||||
import { FuseV1Options, FuseVersion } from "@electron/fuses";
|
||||
import { ElectronegativityPlugin } from "@electron-forge/plugin-electronegativity";
|
||||
|
||||
import { mainConfig } from "./webpack.main.config";
|
||||
import { rendererConfig } from "./webpack.renderer.config";
|
||||
|
||||
const config: ForgeConfig = {
|
||||
packagerConfig: {
|
||||
asar: true,
|
||||
icon: "./images/icon.png",
|
||||
executableName: "Hydra",
|
||||
extraResource: [
|
||||
"./resources/hydra.db",
|
||||
"./resources/icon_tray.png",
|
||||
"./resources/dist",
|
||||
],
|
||||
protocols: [
|
||||
{
|
||||
name: "Hydra",
|
||||
schemes: ["hydralauncher"],
|
||||
},
|
||||
],
|
||||
win32metadata: {
|
||||
"requested-execution-level": "requireAdministrator",
|
||||
},
|
||||
},
|
||||
rebuildConfig: {},
|
||||
makers: [
|
||||
new MakerSquirrel({
|
||||
setupIcon: "./images/icon.ico",
|
||||
}),
|
||||
new MakerZIP({}, ["darwin", "linux"]),
|
||||
new MakerRpm({
|
||||
options: {
|
||||
mimeType: ["x-scheme-handler/hydralauncher"],
|
||||
bin: "./Hydra",
|
||||
},
|
||||
}),
|
||||
new MakerDeb({
|
||||
options: {
|
||||
mimeType: ["x-scheme-handler/hydralauncher"],
|
||||
bin: "./Hydra",
|
||||
},
|
||||
}),
|
||||
],
|
||||
publishers: [
|
||||
new PublisherGithub({
|
||||
repository: {
|
||||
owner: "hydralauncher",
|
||||
name: "hydra",
|
||||
},
|
||||
}),
|
||||
],
|
||||
plugins: [
|
||||
new AutoUnpackNativesPlugin({}),
|
||||
new WebpackPlugin({
|
||||
mainConfig,
|
||||
devContentSecurityPolicy: "connect-src 'self' * 'unsafe-eval'",
|
||||
renderer: {
|
||||
config: rendererConfig,
|
||||
entryPoints: [
|
||||
{
|
||||
html: "./src/index.html",
|
||||
js: "./src/renderer.ts",
|
||||
name: "main_window",
|
||||
preload: {
|
||||
js: "./src/preload.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,
|
||||
}),
|
||||
new ElectronegativityPlugin({
|
||||
isSarif: true,
|
||||
}),
|
||||
],
|
||||
};
|
||||
|
||||
export default config;
|
Loading…
Add table
Add a link
Reference in a new issue