Added Linux packaging files and added linux-install to Makefile

This commit is contained in:
Campbell 2024-07-21 20:11:14 -04:00
parent bf09f3b18e
commit 439aebbdb8
Signed by: NinjaCheetah
GPG Key ID: B547958AF96ED344
5 changed files with 38 additions and 8 deletions

View File

@ -31,11 +31,10 @@ jobs:
pip install -r requirements.txt pip install -r requirements.txt
- name: Build Package - name: Build Package
run: | run: |
pyside6-project build make 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
- name: Prepare Package for Upload - name: Prepare Package for Upload
run: | run: |
mv NUSGet.bin ~/NUSGet mv NUSGet ~/NUSGet
cd ~ cd ~
tar cvf NUSGet.tar NUSGet tar cvf NUSGet.tar NUSGet
- name: Upload Package - name: Upload Package

View File

@ -1,6 +1,14 @@
CC=python -m nuitka
linux: linux:
pyside6-project build 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: clean:
rm NUSGet.bin rm NUSGet.bin

View File

@ -38,23 +38,37 @@ pip install -r requirements.txt
Then, use the command for your platform to build an executable with Nuitka: Then, use the command for your platform to build an executable with Nuitka:
**Windows** **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 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** **Linux**
``` ```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 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** **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 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. 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? ## 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. 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.

9
packaging/NUSGet.desktop Normal file
View File

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

BIN
packaging/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB