diff --git a/.github/workflows/python-build.yml b/.github/workflows/python-build.yml index 7568c0b..499c60f 100644 --- a/.github/workflows/python-build.yml +++ b/.github/workflows/python-build.yml @@ -31,7 +31,7 @@ jobs: pip install -r requirements.txt - name: Build Package 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 run: | mv NUSGet.bin ~/NUSGet.bin @@ -59,7 +59,7 @@ jobs: pip install -r requirements.txt - name: Build Package 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 run: | mv NUSGet.app ~/NUSGet.app @@ -89,7 +89,7 @@ jobs: pip install -r requirements.txt - name: Build Package 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 uses: actions/upload-artifact@v4.3.0 with: diff --git a/NUSGet.py b/NUSGet.py index 2d9ebac..f5017be 100644 --- a/NUSGet.py +++ b/NUSGet.py @@ -10,6 +10,8 @@ from importlib.metadata import version import libWiiPy import libTWLPy +from PySide6.QtGui import QIcon + from PySide6.QtWidgets import (QApplication, QMainWindow, QMessageBox, QTreeWidgetItem, QHeaderView, QStyle, QStyleFactory) from PySide6.QtCore import QRunnable, Slot, QThreadPool, Signal, QObject @@ -600,12 +602,13 @@ if __name__ == "__main__": if os.path.isdir("/usr/lib/qt6/plugins"): app.addLibraryPath("/usr/lib/qt6/plugins") if "Breeze" in QStyleFactory.keys(): - app.setStyle(QStyleFactory.create("breeze")) + app.setStyle("Breeze") elif "kvantum" in QStyleFactory.keys(): app.setStyle("kvantum") window = MainWindow() window.setWindowTitle("NUSGet") + window.setWindowIcon(QIcon(os.path.join(os.path.dirname(__file__), "resources/icon.png"))) window.show() sys.exit(app.exec()) diff --git a/README.md b/README.md index c9d3c4c..7ab825e 100644 --- a/README.md +++ b/README.md @@ -39,17 +39,17 @@ Then, use the command for your platform to build an executable with Nuitka: **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** ``` -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** ``` -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. diff --git a/resources/icon.png b/resources/icon.png new file mode 100644 index 0000000..b6ebe42 Binary files /dev/null and b/resources/icon.png differ