From fd67f5bbe4297ff7ca2fc17c07643e6f46ce488e Mon Sep 17 00:00:00 2001 From: xgui4 <134389196+xgui4@users.noreply.github.com> Date: Fri, 29 May 2026 02:33:29 -0400 Subject: [PATCH] better windows build system hook , and added appimage workflow to nightly --- .github/workflows/nightly.yml | 37 ++++++++++++++++++++++++++++----- hatch_build.py | 4 ++-- packages.py | 2 +- packages/linux/nigthly/PKGBUILD | 2 +- scripts/build.cmd | 29 -------------------------- scripts/build.ps1 | 18 ++++++++++++++++ scripts/clean.cmd | 2 -- scripts/clean.ps1 | 4 ++-- scripts/packages.cmd | 4 ---- 9 files changed, 56 insertions(+), 46 deletions(-) delete mode 100644 scripts/build.cmd create mode 100644 scripts/build.ps1 delete mode 100644 scripts/clean.cmd delete mode 100644 scripts/packages.cmd diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 5c6df37..2a8b310 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -90,8 +90,34 @@ jobs: # !packages/linux/nigthly/pkg/ # !packages/linux/nigthly/src/ # !packages/linux/nigthly/lce-qt-launcher-git/ + + # --- JOB 4 : Making AppImage --- + build_appimage: + name: Build GNU/Linx AppImage + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v6.0.2 + - uses: actions/setup-python@v6.2.0 + with: + python-version: "3.12" + cache: 'pip' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pyproject-appimage + pip -m pyproject-appimage + - name: Upload Artifact + uses: actions/upload-artifact@v7.0.1 + with: + name: binaries-${{ matrix.os }} + path: | + *. - # --- JOB 4 : Publish the Nightly Release --- + # --- JOB 5 : Publish the Nightly Release --- release: name: Create Nightly Release needs: [build] @@ -122,7 +148,8 @@ jobs: The nigthly build are experimental nuitka compilation from the dev branch \n Now includes installers (NOTE : currently, Automatic installer workflow is broken)." files: | - ./artifacts/****.exe - ./artifacts/****.zip - ./artifacts/****.pkg.tar.zst - ./artifacts/****.tar.gz + ./artifacts/*.exe + ./artifacts/*.zip + ./artifacts/*.AppImage + ./artifacts/*.pkg.tar.zst + ./artifacts/*.tar.gz diff --git a/hatch_build.py b/hatch_build.py index d554afa..c8937d5 100644 --- a/hatch_build.py +++ b/hatch_build.py @@ -9,12 +9,12 @@ class CustomBuildHook(BuildHookInterface): # pyright: ignore[reportMissingTypeA if os.name == "posix": _ = subprocess.run("./scripts/clean.sh", check=True) if os.name == "nt": - _ = subprocess.run("scripts\\clean.cmd", check=True, shell=True) + _ = subprocess.run(["powershell", "-ExecutionPolicy", "Bypass", "-File", "\"scripts\\clean.ps1\""], check=True, shell=True) return super().clean(versions) def initialize(self, version, build_data) -> None: # pyright: ignore[reportMissingParameterType] if os.name == "posix": _ = subprocess.run("./scripts/build.sh", check=True) if os.name == "nt": - _ = subprocess.run("scripts\\build.cmd", check=True, shell=True) + _ = subprocess.run(["powershell", "ExecutionPolicy", "Bypass", "-File", "\"scripts\\build.ps1\""], check=True, shell=True) return super().initialize(version, build_data) diff --git a/packages.py b/packages.py index f2546ae..e97ecfc 100644 --- a/packages.py +++ b/packages.py @@ -4,4 +4,4 @@ import subprocess if os.name == "posix": _ = subprocess.run("./scripts/packages.sh", check=True) if os.name == "nt": - _ = subprocess.run("scripts\\packages.cmd", check=True, shell=True) + _ = subprocess.run(["powershell", "-ExecutionPolicy", "Bypass", "-File", "\"scripts\\packages.ps1\""], check=True, shell=True) diff --git a/packages/linux/nigthly/PKGBUILD b/packages/linux/nigthly/PKGBUILD index 64ed680..c59cdda 100644 --- a/packages/linux/nigthly/PKGBUILD +++ b/packages/linux/nigthly/PKGBUILD @@ -1,6 +1,6 @@ # Maintainer: Xgui4 pkgname=lce-qt-launcher-git -pkgver=nightly.r0.ga42d4f2 +pkgver=nightly.r1.g7dcbd09 pkgrel=1 pkgdesc="A custom Minecraft LCE Launcher written with PySide6 with GNU/Linux support in mind. (Nightly/Git Build)" arch=('any') diff --git a/scripts/build.cmd b/scripts/build.cmd deleted file mode 100644 index 15fad95..0000000 --- a/scripts/build.cmd +++ /dev/null @@ -1,29 +0,0 @@ -@echo off - -echo "Starting Compilaton of Qt Ressource" -pyside6-rcc "res.qrc" -o "src\lce_qt_launcher\res_rc.py" || exit /b 1 -echo "done" - -setlocal enabledelayedexpansion - -echo "Compilation of Qt ui files" - -set ui[0]="form" -set ui[1]="system_info" -set ui[2]="instance" -set ui[3]="settingDialog" -set ui[4]="about" -set ui[5]="contentInstaller" - -for /L %%i in (0,1,5) do ( - set "filename=!ui[%%i]!" - - echo "Compiling !filename!.ui Qt UI file" - pyside6-uic "src/!filename!.ui" -o "src\lce_qt_launcher\ui_!filename!.py" || ( - echo Error compiling !filename!.ui - exit /b 1 - ) - echo "done" -) - -echo "Compilation of all Qt ui files finished" \ No newline at end of file diff --git a/scripts/build.ps1 b/scripts/build.ps1 new file mode 100644 index 0000000..e218c61 --- /dev/null +++ b/scripts/build.ps1 @@ -0,0 +1,18 @@ +$ErrorActionPreference = 'Stop' + +Write-Output "Starting Compilaton of Qt Ressource" +pyside6-rcc "res.qrc" -o "src\lce_qt_launcher\res_rc.py" || exit /b 1 +Write-Output "done" + +Write-Output "Compilation of Qt ui files" + +$QT_UI_ARRAY="system_info","form","instance","settingDialog","about", "contentInstaller" + +foreach ($QT_UI in $QT_UI_ARRAY) +{ + Write-Output "Compiling $QT_UI.ui Qt UI file" + pyside6-uic "src/$T_UI..ui" -o "src\lce_qt_launcher\ui_$Qt_UI.py" + Write-Output "done" +} + +Write-Output "Compilation of all Qt ui files finished" \ No newline at end of file diff --git a/scripts/clean.cmd b/scripts/clean.cmd deleted file mode 100644 index 810851b..0000000 --- a/scripts/clean.cmd +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -powershell.exe -ExecutionPolicy Bypass -File "clean.ps1" \ No newline at end of file diff --git a/scripts/clean.ps1 b/scripts/clean.ps1 index efe058f..4e481c9 100644 --- a/scripts/clean.ps1 +++ b/scripts/clean.ps1 @@ -17,11 +17,11 @@ Write-Output "done" foreach ($QT_UI in $QT_UI_ARRAY) { - Write-Output "Removing the compilated ui_$QT_UI.py Qt UI file" + Write-Output "Compiling $QT_UI.ui Qt UI file" Remove-Item -Path "src\lce_qt_launcher\ui_$QT_UI.py" Write-Output "done" } Write-Output "Removing every pycaches filed" Get-ChildItem -Path . -Recurse -Include '__pycache__', '*.pyc' | Remove-Item -Recurse -Force -Write-Output "done" +Write-Output "done" \ No newline at end of file diff --git a/scripts/packages.cmd b/scripts/packages.cmd deleted file mode 100644 index f28adfb..0000000 --- a/scripts/packages.cmd +++ /dev/null @@ -1,4 +0,0 @@ -@echo off -cd /d "%~dp0" - -powershell.exe -ExecutionPolicy Bypass -File "..\packages.ps1" \ No newline at end of file