From 04f0e639ac978b33d0271a0e7adfe4f376df2cf6 Mon Sep 17 00:00:00 2001 From: Alejandro Parcet Date: Thu, 5 Sep 2024 15:38:28 +0200 Subject: [PATCH] feat: added Flatpak compilation support Signed-off-by: Alejandro Parcet --- forge.config.ts | 22 ++++++++++++++++++++++ package.json | 1 + yarn.lock | 25 ++++++++++++++++++++++++- 3 files changed, 47 insertions(+), 1 deletion(-) diff --git a/forge.config.ts b/forge.config.ts index eaab353a..aa9984d3 100644 --- a/forge.config.ts +++ b/forge.config.ts @@ -1,6 +1,7 @@ import type { ForgeConfig, ForgePackagerOptions } from "@electron-forge/shared-types"; import { MakerSquirrel } from "@electron-forge/maker-squirrel"; import { MakerZIP } from "@electron-forge/maker-zip"; +import { MakerFlatpak } from "@electron-forge/maker-flatpak" import { WebpackPlugin } from "@electron-forge/plugin-webpack"; import fs from "fs"; import path from "path"; @@ -64,6 +65,27 @@ const config: ForgeConfig = { }, }, }, + new MakerFlatpak({ options: { + id: "io.github.Dygmalab.Bazecor", + genericName: "Graphical configurator for Dygma products", + categories: ["Utility"], + runtimeVersion: "21.08", + baseVersion: "21.08", + files: [], + modules: [ + { + name: "zypak", + sources: [ + { + type: "git", + url: "https://github.com/refi64/zypak", + tag: "v2022.04" + } + ] + } + ], + icon: `./build/logo.png` + }}) ], plugins: [ new WebpackPlugin({ diff --git a/package.json b/package.json index 6e6c9ea9..bb792f02 100644 --- a/package.json +++ b/package.json @@ -59,6 +59,7 @@ "@babel/preset-typescript": "^7.21.5", "@electron-forge/cli": "^7.4.0", "@electron-forge/maker-dmg": "^7.4.0", + "@electron-forge/maker-flatpak": "^7.4.0", "@electron-forge/maker-rpm": "^7.4.0", "@electron-forge/maker-squirrel": "^7.4.0", "@electron-forge/maker-zip": "^7.4.0", diff --git a/yarn.lock b/yarn.lock index d115981a..e523f2ce 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1182,6 +1182,17 @@ optionalDependencies: electron-installer-dmg "^4.0.0" +"@electron-forge/maker-flatpak@^7.4.0": + version "7.4.0" + resolved "https://registry.yarnpkg.com/@electron-forge/maker-flatpak/-/maker-flatpak-7.4.0.tgz#1397e9549276878a970ecfa9e2fd03dbf6a9ec3f" + integrity sha512-YWmPBr8bbzEMD4Drar8KXE0A7phopcWWo/i1br44Aeg5soygmcWgatUYe1a5jKDPOgXiV7TfJUwhXbljYAhlFw== + dependencies: + "@electron-forge/maker-base" "7.4.0" + "@electron-forge/shared-types" "7.4.0" + fs-extra "^10.0.0" + optionalDependencies: + "@malept/electron-installer-flatpak" "^0.11.4" + "@electron-forge/maker-rpm@^7.4.0": version "7.4.0" resolved "https://registry.npmjs.org/@electron-forge/maker-rpm/-/maker-rpm-7.4.0.tgz" @@ -1933,6 +1944,18 @@ dependencies: cross-spawn "^7.0.1" +"@malept/electron-installer-flatpak@^0.11.4": + version "0.11.4" + resolved "https://registry.yarnpkg.com/@malept/electron-installer-flatpak/-/electron-installer-flatpak-0.11.4.tgz#420bce6a71ffbeafaf134ef8ee2ba0e0db62f133" + integrity sha512-ZdwhT4WeeJWdnsmALUtQ7bn4pzYVh0Vg+4NnF1S3n3OACc9IWg+B+LxI5gT3XSXIrxogouqkjM6gD8S592awyA== + dependencies: + "@malept/flatpak-bundler" "^0.4.0" + debug "^4.1.1" + electron-installer-common "^0.10.0" + lodash "^4.17.15" + semver "^7.1.1" + yargs "^16.0.0" + "@malept/flatpak-bundler@^0.4.0": version "0.4.0" resolved "https://registry.npmjs.org/@malept/flatpak-bundler/-/flatpak-bundler-0.4.0.tgz" @@ -6133,7 +6156,7 @@ electron-forge-maker-appimage@^24.13.3: dependencies: app-builder-lib "24.13.3" -electron-installer-common@^0.10.2: +electron-installer-common@^0.10.0, electron-installer-common@^0.10.2: version "0.10.3" resolved "https://registry.yarnpkg.com/electron-installer-common/-/electron-installer-common-0.10.3.tgz#40f9db644ca60eb28673d545b67ee0113aef4444" integrity sha512-mYbP+6i+nHMIm0WZHXgGdmmXMe+KXncl6jZYQNcCF9C1WsNA9C5SZ2VP4TLQMSIoFO+X4ugkMEA5uld1bmyEvA==