From 88114dcfe6ecca546cd268f2d794a2da1729213d Mon Sep 17 00:00:00 2001 From: GabiZar Date: Thu, 26 Feb 2026 20:49:19 +0100 Subject: [PATCH] Remove broken Forge MSI user build configuration. --- README.MD | 4 ++-- forge.config.cjs | 23 +++++++---------------- package.json | 3 +-- 3 files changed, 10 insertions(+), 20 deletions(-) diff --git a/README.MD b/README.MD index b07778f..28b559f 100644 --- a/README.MD +++ b/README.MD @@ -55,11 +55,11 @@ Built with Electron, it provides a clean UI, secure Nexus API integration, and s ## 🚀 Installation & Usage -1. Download the app in your desired format from the [GitHub Releases](https://github.com/Gabi-Zar/Silk-Fly-Launcher/releases) page or build it from [source](#how-to-build). +1. Download the app in your desired format from the [GitHub Releases](https://github.com/Gabi-Zar/Silk-Fly-Launcher/releases) page or build it from [source](#how-to-build) to have the latest features. 2. Install it and follow the in-app guide -## How to build +## ⚙️ How to build 1. Install [Git](https://git-scm.com/) and [Node JS](https://nodejs.org) 2. Clone the repo `git clone https://github.com/Gabi-Zar/Silk-Fly-Launcher ` diff --git a/forge.config.cjs b/forge.config.cjs index 5748f5d..a047259 100644 --- a/forge.config.cjs +++ b/forge.config.cjs @@ -4,15 +4,13 @@ const fs = require("fs/promises"); const path = require("path"); const buildTarget = process.env.BUILD_TARGET || "all"; -let isPerMachine = buildTarget.includes("system") ? true : false; const makers = []; -if (buildTarget.includes("msi") || buildTarget == "all") { +if (buildTarget == "msi" || buildTarget == "all") { makers.push({ name: "@electron-forge/maker-wix", config: { icon: "./assets/icon.ico", - perMachine: isPerMachine, ui: { enabled: true, chooseDirectory: true }, }, }); @@ -75,22 +73,15 @@ module.exports = { } }, postMake: async (forgeConfig, makeResults) => { - if (buildTarget.includes("msi") || buildTarget == "all") { - const outDir = path.join(__dirname, "out", "make", "wix"); - const customTag = buildTarget.includes("system") ? "system" : "user"; - const newDir = outDir.replace("wix", `wix-${customTag}`); - if (await fileExists(newDir)) { - await fs.rm(newDir, { recursive: true }); - } - await fs.rename(outDir, newDir); - - const files = await fs.readdir(newDir, { recursive: true }); + if (buildTarget == "msi" || buildTarget == "all") { + const outDir = path.join(__dirname, "out", "make", "wix", "x64"); + const files = await fs.readdir(outDir, { recursive: true }); const msiFile = path.join( - newDir, + outDir, files.find((file) => file.endsWith(".msi")), ); - const newName = `${makeResults[0].packageJSON.productName}-${makeResults[0].platform}-${makeResults[0].arch}-${makeResults[0].packageJSON.version}-${customTag}.msi`; - const newMsiFile = path.join(newDir, "x64", newName); + const newName = `${makeResults[0].packageJSON.productName}-${makeResults[0].platform}-${makeResults[0].arch}-${makeResults[0].packageJSON.version}.msi`; + const newMsiFile = path.join(outDir, newName); await fs.rename(msiFile, newMsiFile); } diff --git a/package.json b/package.json index 789dabe..4708ce8 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,7 @@ "start": "electron-forge start", "package": "electron-forge package", "make": "electron-forge make", - "make:msi-system": "cross-env BUILD_TARGET=msi-system electron-forge make", - "make:msi-user": "cross-env BUILD_TARGET=msi-user electron-forge make", + "make:msi": "cross-env BUILD_TARGET=msi electron-forge make", "make:zip": "cross-env BUILD_TARGET=zip electron-forge make" }, "author": "GabiZar",