diff --git a/.github/workflows/python-build.yml b/.github/workflows/python-build.yml index e291a71..d4ec562 100644 --- a/.github/workflows/python-build.yml +++ b/.github/workflows/python-build.yml @@ -120,6 +120,25 @@ jobs: with: path: D:\a\NUSGet\NUSGet\NUSGet.dist name: NUSGet-Windows-bin + + build-windows-onefile: + + runs-on: windows-latest + + steps: + - uses: actions/checkout@v4 + - name: Enable Developer Command Prompt + uses: ilammy/msvc-dev-cmd@v1.13.0 + - name: Set up Python 3.12 + uses: actions/setup-python@v5 + with: + python-version: "3.12" + - name: Install Dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Build Onefile Package + run: .\Build.ps1 build-onefile - name: Upload Onefile Package uses: actions/upload-artifact@v4 with: diff --git a/Build.ps1 b/Build.ps1 index 54edcbf..9129c77 100644 --- a/Build.ps1 +++ b/Build.ps1 @@ -11,6 +11,12 @@ $buildNUSGet = { python -m nuitka --show-progress --assume-yes-for-downloads NUSGet.py } +$buildNUSGetOnefile = { + Write-Host "Building NUSGet in onefile mode..." + python build_translations.py + python -m nuitka --show-progress --assume-yes-for-downloads --onefile NUSGet.py +} + $cleanNUSGet = { Write-Host "Cleaning..." Remove-Item -Recurse -Force NUSGet.exe, ./NUSGet.build/, ./NUSGet.dist/, ./NUSGet.onefile-build/ @@ -21,6 +27,10 @@ switch ($Task.ToLower()) { & $buildNUSGet break } + "build-onefile" { + & $buildNUSGetOnefile + break + } "clean" { & $cleanNUSGet break diff --git a/NUSGet.py b/NUSGet.py index c78122b..643ced1 100644 --- a/NUSGet.py +++ b/NUSGet.py @@ -7,7 +7,7 @@ # nuitka-project: --macos-create-app-bundle # nuitka-project: --macos-app-icon={MAIN_DIRECTORY}/resources/icon.png # nuitka-project-if: {OS} == "Windows": -# nuitka-project: --onefile +# nuitka-project: --standalone # nuitka-project: --windows-icon-from-ico={MAIN_DIRECTORY}/resources/icon.png # nuitka-project: --windows-console-mode=disable # nuitka-project-if: {OS} in ("Linux", "FreeBSD", "OpenBSD"): @@ -38,7 +38,7 @@ from modules.download_batch import run_nus_download_batch from modules.download_wii import run_nus_download_wii from modules.download_dsi import run_nus_download_dsi -nusget_version = "1.4.1" +nusget_version = "1.4.2" regions = {"World": ["41"], "USA/NTSC": ["45"], "Europe/PAL": ["50"], "Japan": ["4A"], "Korea": ["4B"], "China": ["43"], "Australia/NZ": ["55"]} diff --git a/requirements.txt b/requirements.txt index 3446304..a322a59 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ pyside6 -nuitka~=2.6.0 +nuitka git+https://github.com/NinjaCheetah/libWiiPy libTWLPy zstandard