mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-04 17:59:43 +02:00
# This is a combination of 9 commits.
# This is the 1st commit message: fix: update Python version to 3.12 and switch from PyInstaller to Nuitka for building executables # This is the commit message #2: fix: correct UPX path for Windows installation in CI workflow # This is the commit message #3: fix: update UPX installation path handling for Windows and Linux in CI workflow # This is the commit message #4: fix: enhance UPX installation by setting UPX_BINARY environment variable for better compatibility # This is the commit message #5: fix: add --assume-yes-for-downloads option to Nuitka build commands for improved automation # This is the commit message #6: fix: update asset path handling in MainWindow for improved compatibility with frozen applications # This is the commit message #7: fix: update Nuitka build options and refine PySide6 dependency for improved compatibility # This is the commit message #8: fix: add Windows icon conversion step and update Nuitka build options for improved compatibility # This is the commit message #9: fix: refactor Nuitka and UPX installation steps for improved clarity and compatibility
This commit is contained in:
@@ -73,15 +73,16 @@ class MainWindow(QtWidgets.QMainWindow, QWidget):
|
||||
self.log_signal.connect(self._on_log_signal)
|
||||
|
||||
def get_asset_path(filename):
|
||||
if getattr(sys, 'frozen', False):
|
||||
base_path = sys._MEIPASS
|
||||
else:
|
||||
base_path = os.path.dirname(__file__)
|
||||
|
||||
asset_path = os.path.join(base_path, 'core', 'interface', 'assets', filename)
|
||||
base_path = os.path.dirname(os.path.abspath(__file__))
|
||||
asset_path = os.path.join(base_path, 'assets', filename)
|
||||
if os.path.exists(asset_path):
|
||||
return asset_path
|
||||
|
||||
if getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS'):
|
||||
asset_path = os.path.join(sys._MEIPASS, 'core', 'interface', 'assets', filename)
|
||||
if os.path.exists(asset_path):
|
||||
return asset_path
|
||||
|
||||
return os.path.join('core', 'interface', 'assets', filename)
|
||||
|
||||
self.setWindowIcon(QIcon(get_asset_path("logo.png")))
|
||||
|
||||
Reference in New Issue
Block a user