Fix py2app (#69)

* Initial commit of py2app code

* Use environment variable RESOURCE_PATH when running as a bundle

* Move config files to system config location
This commit is contained in:
2023-12-16 22:20:24 -06:00
committed by GitHub
parent 525fd99a58
commit f663430984
28 changed files with 93 additions and 25 deletions

View File

@@ -34,7 +34,7 @@ class StatusBar(QStatusBar):
while True:
new_status = proxy.status()
new_image_name = image_names.get(new_status, 'Synchronize.png')
image_path = os.path.join(resources_dir(), 'icons', new_image_name)
image_path = os.path.join(resources_dir(), new_image_name)
self.label.setPixmap((QPixmap(image_path).scaled(16, 16, Qt.AspectRatioMode.KeepAspectRatio)))
# add download status
@@ -54,7 +54,7 @@ class StatusBar(QStatusBar):
# Create a label that holds an image
self.label = QLabel()
image_path = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), 'resources', 'icons',
image_path = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), 'resources',
'RedSquare.png')
pixmap = (QPixmap(image_path).scaled(16, 16, Qt.AspectRatioMode.KeepAspectRatio))
self.label.setPixmap(pixmap)