diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 441a518..a8347f4 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -26,14 +26,30 @@ jobs: - name: Install System and Cross-Compilation Build Dependencies run: | if command -v apt-get >/dev/null 2>&1; then - echo "[*] Installing Python shared libraries, headers, and build dependencies..." + echo "[*] Installing Python shared libraries, headers, Wine, and build dependencies..." SUDO="" if [ "$(id -u)" -ne 0 ] && command -v sudo >/dev/null 2>&1; then SUDO="sudo" fi + $SUDO dpkg --add-architecture i386 || true $SUDO apt-get update && $SUDO apt-get install -y --no-install-recommends \ python3-dev libpython3-dev python3-all-dev "libpython3.*" \ - innosetup wine wine64 || true + wine wine64 innoextract curl tar gzip || true + + # Setup Inno Setup compiler under Wine if not present + if ! command -v iscc >/dev/null 2>&1 && command -v innoextract >/dev/null 2>&1; then + echo "[*] Setting up portable Inno Setup 6 compiler for Wine..." + mkdir -p /tmp/inno_setup + curl -fsSL https://files.jrsoftware.org/is/6/innosetup-6.2.2.exe -o /tmp/inno_setup/innosetup.exe || true + if [ -f /tmp/inno_setup/innosetup.exe ]; then + $SUDO innoextract -d /opt/innosetup /tmp/inno_setup/innosetup.exe || true + if [ -f /opt/innosetup/app/ISCC.exe ]; then + $SUDO sh -c 'printf "#!/bin/sh\nWINEDEBUG=-all wine /opt/innosetup/app/ISCC.exe \"\$@\"\n" > /usr/local/bin/iscc' + $SUDO chmod +x /usr/local/bin/iscc + echo "[+] Inno Setup compiler iscc configured successfully at /usr/local/bin/iscc" + fi + fi + fi fi python3 compilation/ensure_pip.py python3 -m pip install --upgrade pip --break-system-packages 2>/dev/null || python3 -m pip install --upgrade pip 2>/dev/null || true diff --git a/compilation/package_dist.py b/compilation/package_dist.py index 7b1e6f0..7d93fdc 100644 --- a/compilation/package_dist.py +++ b/compilation/package_dist.py @@ -150,6 +150,8 @@ def compile_inno_setup_installers(): iscc_cmd = ["C:\\Program Files (x86)\\Inno Setup 6\\ISCC.exe"] elif os.path.exists("C:\\Program Files\\Inno Setup 6\\ISCC.exe"): iscc_cmd = ["C:\\Program Files\\Inno Setup 6\\ISCC.exe"] + elif shutil.which("wine") and os.path.exists("/opt/innosetup/app/ISCC.exe"): + iscc_cmd = ["wine", "/opt/innosetup/app/ISCC.exe"] elif shutil.which("wine"): wine_iscc = os.path.expanduser("~/.wine/drive_c/Program Files (x86)/Inno Setup 6/ISCC.exe") if os.path.exists(wine_iscc):