1
0
mirror of https://github.com/Minionguyjpro/Inno-Setup-Action synced 2026-02-18 17:41:18 +01:00

Add functionality to download Inno Setup through WinGet, to workaround removal of Inno Setup from future GitHub Actions Windows Server runner images

This commit is contained in:
Minionguyjpro
2025-08-21 17:56:24 +02:00
parent e3458b1272
commit 4cae520566

View File

@@ -1,5 +1,6 @@
import * as core from "@actions/core";
import { promises as fs } from "fs";
import { exec } from "child_process";
import { execFile } from "child_process";
const workspacePath = process.env.GITHUB_WORKSPACE;
@@ -27,6 +28,17 @@ async function run() {
str.replace(/(["'])/g, "$1"),
);
exec(
`winget install --id JRSoftware.InnoSetup -e -s winget -h`,
(execError, stdout, stderr) => {
console.log(stdout,stderr);
if (execError) {
core.setFailed(`Failed to install Inno Setup: ${stderr}`);
process.exit(execError.code || 1);
}
},
);
execFile(
`${process.env["ProgramFiles(x86)"]}\\Inno Setup 6\\iscc.exe`,
[...escapedOptions, `${workspacePath}\\${path}`],