Add icon made by @DamiDoop, should be built with it on macOS and Windows now

This commit is contained in:
Campbell 2024-06-26 19:26:39 -04:00
parent 1404d083f4
commit f891965812
Signed by: NinjaCheetah
GPG Key ID: B547958AF96ED344
4 changed files with 10 additions and 7 deletions

View File

@ -31,7 +31,7 @@ jobs:
pip install -r requirements.txt pip install -r requirements.txt
- name: Build Package - name: Build Package
run: | run: |
nuitka3 --show-progress --include-data-dir=data=data --assume-yes-for-downloads --onefile --plugin-enable=pyside6 NUSGet.py nuitka3 --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.bin mv NUSGet.bin ~/NUSGet.bin
@ -59,7 +59,7 @@ jobs:
pip install -r requirements.txt pip install -r requirements.txt
- name: Build Package - name: Build Package
run: | run: |
nuitka3 --show-progress --include-data-dir=data=data --assume-yes-for-downloads --standalone --plugin-enable=pyside6 NUSGet.py --macos-create-app-bundle --disable-console nuitka3 --show-progress --include-data-dir=data=data --include-data-dir=resources=resources --assume-yes-for-downloads --standalone --plugin-enable=pyside6 NUSGet.py --macos-create-app-bundle --macos-app-icon=resources/icon.png --disable-console
- name: Prepare Package for Upload - name: Prepare Package for Upload
run: | run: |
mv NUSGet.app ~/NUSGet.app mv NUSGet.app ~/NUSGet.app
@ -89,7 +89,7 @@ jobs:
pip install -r requirements.txt pip install -r requirements.txt
- name: Build Package - name: Build Package
run: | run: |
nuitka --show-progress --include-data-dir=data=data --assume-yes-for-downloads --onefile --plugin-enable=pyside6 NUSGet.py --disable-console 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 --disable-console
- name: Upload Package - name: Upload Package
uses: actions/upload-artifact@v4.3.0 uses: actions/upload-artifact@v4.3.0
with: with:

View File

@ -10,6 +10,8 @@ from importlib.metadata import version
import libWiiPy import libWiiPy
import libTWLPy import libTWLPy
from PySide6.QtGui import QIcon
from PySide6.QtWidgets import (QApplication, QMainWindow, QMessageBox, QTreeWidgetItem, QHeaderView, QStyle, from PySide6.QtWidgets import (QApplication, QMainWindow, QMessageBox, QTreeWidgetItem, QHeaderView, QStyle,
QStyleFactory) QStyleFactory)
from PySide6.QtCore import QRunnable, Slot, QThreadPool, Signal, QObject from PySide6.QtCore import QRunnable, Slot, QThreadPool, Signal, QObject
@ -600,12 +602,13 @@ if __name__ == "__main__":
if os.path.isdir("/usr/lib/qt6/plugins"): if os.path.isdir("/usr/lib/qt6/plugins"):
app.addLibraryPath("/usr/lib/qt6/plugins") app.addLibraryPath("/usr/lib/qt6/plugins")
if "Breeze" in QStyleFactory.keys(): if "Breeze" in QStyleFactory.keys():
app.setStyle(QStyleFactory.create("breeze")) app.setStyle("Breeze")
elif "kvantum" in QStyleFactory.keys(): elif "kvantum" in QStyleFactory.keys():
app.setStyle("kvantum") app.setStyle("kvantum")
window = MainWindow() window = MainWindow()
window.setWindowTitle("NUSGet") window.setWindowTitle("NUSGet")
window.setWindowIcon(QIcon(os.path.join(os.path.dirname(__file__), "resources/icon.png")))
window.show() window.show()
sys.exit(app.exec()) sys.exit(app.exec())

View File

@ -39,17 +39,17 @@ Then, use the command for your platform to build an executable with Nuitka:
**Windows** **Windows**
``` ```
nuitka --show-progress --include-data-dir=data=data --assume-yes-for-downloads --onefile --plugin-enable=pyside6 NUSGet.py --disable-console 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 --disable-console
``` ```
**Linux** **Linux**
``` ```
nuitka3 --show-progress --include-data-dir=data=data --assume-yes-for-downloads --onefile --plugin-enable=pyside6 NUSGet.py nuitka3 --show-progress --include-data-dir=data=data --include-data-dir=resources=resources --assume-yes-for-downloads --onefile --plugin-enable=pyside6 NUSGet.py
``` ```
**macOS** **macOS**
``` ```
nuitka3 --show-progress --include-data-dir=data=data --assume-yes-for-downloads --onefile --plugin-enable=pyside6 NUSGet.py --macos-create-app-bundle --disable-console nuitka3 --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 --disable-console
``` ```
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.

BIN
resources/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB