forked from ohmplatform/FreedomGPT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathforge.config.ts
105 lines (102 loc) · 3.04 KB
/
forge.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
import MakerDMG from "@electron-forge/maker-dmg";
import MakerWix from "@electron-forge/maker-wix";
import MakerZIP from "@electron-forge/maker-zip";
import MakerSquirrel from "@electron-forge/maker-squirrel";
import { WebpackPlugin } from "@electron-forge/plugin-webpack";
import type { ForgeConfig } from "@electron-forge/shared-types";
import { mainConfig } from "./webpack.main.config";
import { rendererConfig } from "./webpack.renderer.config";
import * as dotenv from "dotenv";
dotenv.config();
const config: ForgeConfig = {
packagerConfig: {
icon:
process.platform === "win32"
? "./src/appicons/icons/win/icon.ico"
: "./src/appicons/icons/mac/ico",
extraResource: "./src/models",
osxSign: {
identity: process.env.APPLE_IDENTITY,
optionsForFile: () => {
return {
entitlements: "./macbuild/entitlements.mac.plist",
};
},
},
osxNotarize: {
tool: "notarytool",
appleId: process.env.APPLE_ID as string,
appleIdPassword: process.env.APPLE_ID_PASSWORD as string,
teamId: process.env.APPLE_TEAM_ID as string,
},
},
publishers: [
{
name: "@electron-forge/publisher-github",
config: {
repository: {
owner: "ohmplatform",
name: "FreedomGPT",
},
authToken: process.env.GITHUB_AUTH_TOKEN,
prerelease: false,
draft: false,
},
},
],
rebuildConfig: {},
makers: [
new MakerZIP({}, ["darwin"]),
new MakerDMG({}, ["darwin"]),
// new MakerWix(
// {
// name: "FreedomGPT",
// description: "FreedomGPT",
// manufacturer: process.env.MANUFACTURER_NAME as string,
// ui: {
// chooseDirectory: true,
// },
// icon: "./src/appicons/icons/win/icon.ico",
// certificateFile: "./keys/certificate.pfx",
// certificatePassword: process.env.WIN_CERTIFICATE_PASSWORD as string,
// },
// ["win32"]
// ),
new MakerSquirrel(
{
name: "FreedomGPT",
description: "FreedomGPT",
authors: process.env.MANUFACTURER_NAME as string,
setupIcon: "./src/appicons/icons/win/icon.ico",
certificateFile: "./keys/certificate.pfx",
certificatePassword: process.env.WIN_CERTIFICATE_PASSWORD as string,
iconUrl:
"https://raw.githubusercontent.com/ohmplatform/FreedomGPT/main/src/appicons/icons/win/icon.ico",
owners: process.env.MANUFACTURER_NAME as string,
title: "FreedomGPT",
copyright: process.env.MANUFACTURER_NAME as string,
},
["win32"]
),
],
plugins: [
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",
},
},
],
},
}),
],
};
export default config;