diff --git a/.github/workflows/python-build.yml b/.github/workflows/python-build.yml index 4443b58..f1b3c4e 100644 --- a/.github/workflows/python-build.yml +++ b/.github/workflows/python-build.yml @@ -31,11 +31,10 @@ jobs: pip install -r requirements.txt - name: Build Package run: | - pyside6-project build - python -m nuitka --show-progress --include-data-dir=data=data --include-data-dir=resources=resources --assume-yes-for-downloads --onefile --plugin-enable=pyside6 NUSGet.py + make linux - name: Prepare Package for Upload run: | - mv NUSGet.bin ~/NUSGet + mv NUSGet ~/NUSGet cd ~ tar cvf NUSGet.tar NUSGet - name: Upload Package diff --git a/Makefile b/Makefile index d7bf9f9..03beb9a 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,14 @@ +CC=python -m nuitka + linux: pyside6-project build - nuitka3 --show-progress --include-data-dir=data=data --include-data-dir=resources=resources --assume-yes-for-downloads --onefile --plugin-enable=pyside6 NUSGet.py + $(CC) --show-progress --include-data-dir=data=data --include-data-dir=resources=resources --assume-yes-for-downloads --onefile --plugin-enable=pyside6 NUSGet.py -o NUSGet + +linux-install: + install -d /opt/NUSGet + install NUSGet /opt/NUSGet/ + install ./packaging/icon.png /opt/NUSGet/NUSGet.png + install ./packaging/NUSGet.desktop /usr/share/applications clean: rm NUSGet.bin diff --git a/README.md b/README.md index 3b316c9..5cc599d 100644 --- a/README.md +++ b/README.md @@ -38,23 +38,37 @@ pip install -r requirements.txt Then, use the command for your platform to build an executable with Nuitka: **Windows** -``` +```shell python -m nuitka --show-progress --include-data-dir=data=data --include-data-dir=resources=resources --assume-yes-for-downloads --onefile --windows-icon-from-ico=resources/icon.png --plugin-enable=pyside6 NUSGet.py --windows-console-mode=disable ``` **Linux** -``` -python -m nuitka --show-progress --include-data-dir=data=data --include-data-dir=resources=resources --assume-yes-for-downloads --onefile --plugin-enable=pyside6 NUSGet.py +```shell +python -m nuitka --show-progress --include-data-dir=data=data --include-data-dir=resources=resources --assume-yes-for-downloads --onefile --plugin-enable=pyside6 NUSGet.py -o NUSGet ``` **macOS** -``` +```shell python -m nuitka --show-progress --include-data-dir=data=data --include-data-dir=resources=resources --assume-yes-for-downloads --onefile --plugin-enable=pyside6 NUSGet.py --macos-create-app-bundle --macos-app-icon=resources/icon.png ``` The result will be a single binary named `NUSGet` that contains everything required to run NUSGet. No dependencies are needed on the target system. +### For Linux Users: +A Makefile has been included to both build and install NUSGet on Linux. This will automatically set up NUSGet under `/opt/` and install a .desktop file to `/usr/share/applications/` so you can use it like any other application. + +First, use make to build NUSGet (this automates the step above): +```shell +make linux +``` + +Then, run the install command with `sudo` (or your favorite alternative): +```shell +sudo make linux-install +``` + + ## Why this and not NUSD? NUS Downloader (Nintendo Update Server Downloader), is an old tool for downloading titles from the Nintendo Update Servers for the Wii and DSi. Originally released in 2009, and effectively last updated in 2011, it stills works today, however it definitely shows its age, and is in need of a refresh. One of the major shortcomings of NUSD is that it only supports Windows, as most of the tools for the Wii from that era are written in C# and use the .NET Framework, especially since they tend to rely on the C# library libWiiSharp. NUSD also has far more limited support for DSi titles, and no support whatsoever for vWii titles. diff --git a/packaging/NUSGet.desktop b/packaging/NUSGet.desktop new file mode 100644 index 0000000..602c8b5 --- /dev/null +++ b/packaging/NUSGet.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=NUSGet +Exec=/opt/NUSGet/NUSGet %U +Terminal=false +Type=Application +Icon=/opt/NUSGet/NUSGet.png +StartupWMClass=NUSGet +Comment=A modern and supercharged NUS downloader built with Python and Qt6. +Categories=Utility; diff --git a/packaging/icon.png b/packaging/icon.png new file mode 100644 index 0000000..b6ebe42 Binary files /dev/null and b/packaging/icon.png differ