Skip to content

Commit

Permalink
oups
Browse files Browse the repository at this point in the history
  • Loading branch information
aethernet committed Dec 6, 2023
1 parent a8fdb71 commit 75e8394
Showing 1 changed file with 43 additions and 43 deletions.
86 changes: 43 additions & 43 deletions forge.config.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
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 { MakerDMG } from "@electron-forge/maker-dmg";
import { MakerAppImage } from "@reforged/maker-appimage";
import { AutoUnpackNativesPlugin } from "@electron-forge/plugin-auto-unpack-natives";
import { WebpackPlugin } from "@electron-forge/plugin-webpack";
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 { MakerDMG } from '@electron-forge/maker-dmg';
import { MakerAppImage } from '@reforged/maker-appimage';
import { AutoUnpackNativesPlugin } from '@electron-forge/plugin-auto-unpack-natives';
import { WebpackPlugin } from '@electron-forge/plugin-webpack';

import { mainConfig, rendererConfig } from "./webpack.config";
import * as sidecar from "./forge.sidecar";
import { mainConfig, rendererConfig } from './webpack.config';
import * as sidecar from './forge.sidecar';

import { hostDependencies, productDescription } from "./package.json";
import { hostDependencies, productDescription } from './package.json';

const osxSigningConfig: any = {};
let winSigningConfig: any = {};

if (process.env.NODE_ENV === "production") {
if (process.env.NODE_ENV === 'production') {
osxSigningConfig.osxNotarize = {
tool: "notarytool",
tool: 'notarytool',
appleId: process.env.XCODE_APP_LOADER_EMAIL,
appleIdPassword: process.env.XCODE_APP_LOADER_PASSWORD,
teamId: process.env.XCODE_APP_LOADER_TEAM_ID,
Expand All @@ -33,21 +33,21 @@ if (process.env.NODE_ENV === "production") {
const config: ForgeConfig = {
packagerConfig: {
asar: true,
icon: "./assets/icon",
icon: './assets/icon',
executableName:
process.platform === "linux" ? "balena-etcher" : "balenaEtcher",
appBundleId: "io.balena.etcher",
appCategoryType: "public.app-category.developer-tools",
appCopyright: "Copyright 2016-2023 Balena Ltd",
process.platform === 'linux' ? 'balena-etcher' : 'balenaEtcher',
appBundleId: 'io.balena.etcher',
appCategoryType: 'public.app-category.developer-tools',
appCopyright: 'Copyright 2016-2023 Balena Ltd',
darwinDarkModeSupport: true,
protocols: [{ name: "etcher", schemes: ["etcher"] }],
protocols: [{ name: 'etcher', schemes: ['etcher'] }],
extraResource: [
"lib/shared/catalina-sudo/sudo-askpass.osascript-zh.js",
"lib/shared/catalina-sudo/sudo-askpass.osascript-en.js",
"lib/shared/catalina-sudo/sudo-askpass.osascript-en.js"
],
osxSign: {
optionsForFile: () => ({
entitlements: "./entitlements.mac.plist",
entitlements: './entitlements.mac.plist',
hardenedRuntime: true,
}),
},
Expand All @@ -57,17 +57,17 @@ const config: ForgeConfig = {
makers: [
new MakerZIP(),
new MakerSquirrel({
setupIcon: "assets/icon.ico",
setupIcon: 'assets/icon.ico',
...winSigningConfig,
}),
new MakerDMG({
background: "./assets/dmg/background.tiff",
icon: "./assets/icon.icns",
background: './assets/dmg/background.tiff',
icon: './assets/icon.icns',
iconSize: 110,
contents: ((opts: { appPath: string }) => {
return [
{ x: 140, y: 250, type: "file", path: opts.appPath },
{ x: 415, y: 250, type: "link", path: "/Applications" },
{ x: 140, y: 250, type: 'file', path: opts.appPath },
{ x: 415, y: 250, type: 'link', path: '/Applications' },
];
}) as any, // type of MakerDMGConfig omits `appPath`
additionalDMGOptions: {
Expand All @@ -85,29 +85,29 @@ const config: ForgeConfig = {
}),
new MakerAppImage({
options: {
icon: "./assets/icon.png",
categories: ["Utility"],
icon: './assets/icon.png',
categories: ['Utility'],
},
}),
new MakerRpm({
options: {
icon: "./assets/icon.png",
categories: ["Utility"],
icon: './assets/icon.png',
categories: ['Utility'],
productDescription,
requires: ["util-linux"],
requires: ['util-linux'],
},
}),
new MakerDeb({
options: {
icon: "./assets/icon.png",
categories: ["Utility"],
section: "utils",
priority: "optional",
icon: './assets/icon.png',
categories: ['Utility'],
section: 'utils',
priority: 'optional',
productDescription,
scripts: {
postinst: "./after-install.tpl",
postinst: './after-install.tpl',
},
depends: hostDependencies["debian"],
depends: hostDependencies['debian'],
},
}),
],
Expand All @@ -120,11 +120,11 @@ const config: ForgeConfig = {
nodeIntegration: true,
entryPoints: [
{
html: "./lib/gui/app/index.html",
js: "./lib/gui/app/renderer.ts",
name: "main_window",
html: './lib/gui/app/index.html',
js: './lib/gui/app/renderer.ts',
name: 'main_window',
preload: {
js: "./lib/gui/app/preload.ts",
js: './lib/gui/app/preload.ts',
},
},
],
Expand All @@ -144,7 +144,7 @@ const config: ForgeConfig = {

if (process.env.AMPLITUDE_TOKEN) {
packageJson.analytics.amplitude = {
token: "balena-etcher",
token: 'balena-etcher',
};
}

Expand Down

0 comments on commit 75e8394

Please sign in to comment.