2 Commits

Author SHA1 Message Date
6cb89711f7 Fix database encoding issue 2025-09-16 22:50:44 -04:00
bb93248b62 Separate standalone and onefile packages on Windows 2025-07-04 12:49:51 -04:00
4 changed files with 35 additions and 6 deletions

View File

@@ -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:

View File

@@ -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

View File

@@ -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.3"
regions = {"World": ["41"], "USA/NTSC": ["45"], "Europe/PAL": ["50"], "Japan": ["4A"], "Korea": ["4B"], "China": ["43"],
"Australia/NZ": ["55"]}
@@ -676,11 +676,11 @@ class MainWindow(QMainWindow, Ui_MainWindow):
if __name__ == "__main__":
app = QApplication(sys.argv)
# Load the database files, this will work for both the raw Python file and compiled standalone/onefile binaries.
database_file = open(os.path.join(os.path.dirname(__file__), "data", "wii-database.json"))
database_file = open(os.path.join(os.path.dirname(__file__), "data", "wii-database.json"), encoding="utf-8")
wii_database = json.load(database_file)
database_file = open(os.path.join(os.path.dirname(__file__), "data", "vwii-database.json"))
database_file = open(os.path.join(os.path.dirname(__file__), "data", "vwii-database.json"), encoding="utf-8")
vwii_database = json.load(database_file)
database_file = open(os.path.join(os.path.dirname(__file__), "data", "dsi-database.json"))
database_file = open(os.path.join(os.path.dirname(__file__), "data", "dsi-database.json"), encoding="utf-8")
dsi_database = json.load(database_file)
# Load the user's Downloads directory, which of course requires different steps on Windows vs macOS/Linux.
if os.name == 'nt':

View File

@@ -1,5 +1,5 @@
pyside6
nuitka~=2.6.0
nuitka
git+https://github.com/NinjaCheetah/libWiiPy
libTWLPy
zstandard