mirror of
https://github.com/Gabi-Zar/Silk-Fly-Launcher.git
synced 2026-04-17 05:26:04 +02:00
Remove broken Forge MSI user build configuration.
This commit is contained in:
@@ -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 `
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user