Skip to content

Commit

Permalink
fix: try to fix linux appImage icon
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <tukon479@gmail.com>
  • Loading branch information
Innei committed Dec 10, 2024
1 parent bb529c4 commit c8db70b
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 8 deletions.
10 changes: 7 additions & 3 deletions forge.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,13 @@ const config: ForgeConfig = {
iconUrl: "https://app.follow.is/favicon.ico",
}),
new MakerAppImage({
options: {
icon: "resources/icon.png",
mimeType: ["x-scheme-handler/follow"],
config: {
icons: [
{
file: "resources/icon.png",
size: 256,
},
],
},
}),
],
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@
"daisyui": "patches/daisyui.patch",
"jsonpointer": "patches/jsonpointer.patch",
"workbox-precaching": "patches/workbox-precaching.patch",
"@tanstack/react-virtual": "patches/@tanstack__react-virtual.patch"
"@tanstack/react-virtual": "patches/@tanstack__react-virtual.patch",
"@pengx17/electron-forge-maker-appimage": "patches/@pengx17__electron-forge-maker-appimage.patch"
},
"overrides": {
"@types/react": "npm:@types/react@^18.3.12",
Expand Down
55 changes: 55 additions & 0 deletions patches/@pengx17__electron-forge-maker-appimage.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
diff --git a/dist/src/MakerAppimage.d.ts b/dist/src/MakerAppimage.d.ts
index 389100d510dd90c10b28d3f3ee0996c01a7714d9..7fa2bfd46bbf7b7d10e4b0190fda6a3fae053c37 100644
--- a/dist/src/MakerAppimage.d.ts
+++ b/dist/src/MakerAppimage.d.ts
@@ -1,14 +1,28 @@
-import MakerBase, { MakerOptions } from "@electron-forge/maker-base";
-import { ForgePlatform } from "@electron-forge/shared-types";
-import { MakerAppImageConfig } from "./Config";
+import MakerBase, { MakerOptions } from "@electron-forge/maker-base"
+import { ForgePlatform } from "@electron-forge/shared-types"
+import { MakerAppImageConfig } from "./Config"
+
+export interface AppImageForgeConfig {
+ template?: string
+ chmodChromeSandbox?: string
+ icons?: { file: string; size: number }[]
+}
+
export default class MakerAppImage extends MakerBase<MakerAppImageConfig> {
- name: string;
- defaultPlatforms: ForgePlatform[];
- isSupportedOnCurrentPlatform(): boolean;
- make({ dir, // '/home/build/Software/monorepo/packages/electron/out/canary/name-linux-x64'
+ constructor(private config: { config: AppImageForgeConfig }) {
+ super()
+ }
+
+ name: string
+ defaultPlatforms: ForgePlatform[]
+ isSupportedOnCurrentPlatform(): boolean
+ make({
+ dir, // '/home/build/Software/monorepo/packages/electron/out/canary/name-linux-x64'
appName, // 'name'
makeDir, // '/home/build/Software/monorepo/packages/electron/out/canary/make',
targetArch, // 'x64'
- packageJSON, targetPlatform, //'linux',
- forgeConfig, }: MakerOptions): Promise<string[]>;
+ packageJSON,
+ targetPlatform, //'linux',
+ forgeConfig,
+ }: MakerOptions): Promise<string[]>
}
diff --git a/dist/src/MakerAppimage.js b/dist/src/MakerAppimage.js
index a57b183ad759c91aa36691a430e87c385ba63f62..a0bce031399f4dbc7cefab9a5c4460ee4cd88518 100644
--- a/dist/src/MakerAppimage.js
+++ b/dist/src/MakerAppimage.js
@@ -48,7 +48,7 @@ const isIForgeResolvableMaker = (maker) => {
class MakerAppImage extends maker_base_1.default {
constructor() {
super(...arguments);
- this.name = "appImage";
+ this.name = makerPackageName;
this.defaultPlatforms = ["linux"];
}
isSupportedOnCurrentPlatform() {
11 changes: 7 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c8db70b

Please sign in to comment.