diff --git a/dangerzone/common.py b/dangerzone/common.py
index 34327a8..4600316 100644
--- a/dangerzone/common.py
+++ b/dangerzone/common.py
@@ -250,17 +250,25 @@ class Common(object):
)
else:
if platform.system() == "Darwin":
- # macOS
prefix = os.path.join(
os.path.dirname(os.path.dirname(sys.executable)), "Resources/share"
)
+ elif platform.system() == "Linux":
+ prefix = os.path.join(sys.prefix, "share", "dangerzone")
else:
- # Linux
- prefix = os.path.join(sys.prefix, "share/dangerzone")
+ # Windows
+ prefix = os.path.join(os.path.dirname(sys.executable), "share")
resource_path = os.path.join(prefix, filename)
return resource_path
+ def get_window_icon(self):
+ if platform.system() == "Windows":
+ path = self.get_resource_path("dangerzone.ico")
+ else:
+ path = self.get_resource_path("logo.png")
+ return QtGui.QIcon(path)
+
def open_find_viewer(self, filename):
if self.settings.get("open_app") in self.pdf_viewers:
if platform.system() == "Darwin":
diff --git a/dangerzone/docker_installer.py b/dangerzone/docker_installer.py
index d546546..fb263f9 100644
--- a/dangerzone/docker_installer.py
+++ b/dangerzone/docker_installer.py
@@ -51,7 +51,7 @@ class DockerInstaller(QtWidgets.QDialog):
self.common = common
self.setWindowTitle("dangerzone")
- self.setWindowIcon(QtGui.QIcon(self.common.get_resource_path("logo.png")))
+ self.setWindowIcon(self.common.get_window_icon())
label = QtWidgets.QLabel()
if platform.system() == "Darwin":
diff --git a/dangerzone/main_window.py b/dangerzone/main_window.py
index 8ca2100..4d6e231 100644
--- a/dangerzone/main_window.py
+++ b/dangerzone/main_window.py
@@ -13,7 +13,7 @@ class MainWindow(QtWidgets.QMainWindow):
self.common = common
self.setWindowTitle("dangerzone")
- self.setWindowIcon(QtGui.QIcon(self.common.get_resource_path("logo.png")))
+ self.setWindowIcon(self.common.get_window_icon())
self.setMinimumWidth(600)
self.setMinimumHeight(400)
diff --git a/install/pyinstaller/pyinstaller.spec b/install/pyinstaller/pyinstaller.spec
index 4b14d42..425c592 100644
--- a/install/pyinstaller/pyinstaller.spec
+++ b/install/pyinstaller/pyinstaller.spec
@@ -24,7 +24,7 @@ else:
datas = [("../../share", "share")]
if p == "Windows":
- icon = os.path.join(root, "install", "windows", "dangerzone.ico")
+ icon = os.path.join(root, "share", "dangerzone.ico")
else:
icon = None
diff --git a/install/windows/Dangerzone.wxs b/install/windows/Dangerzone.wxs
index d6f855b..6663ebd 100644
--- a/install/windows/Dangerzone.wxs
+++ b/install/windows/Dangerzone.wxs
@@ -6,7 +6,7 @@
-
+
diff --git a/install/windows/dangerzone.ico b/share/dangerzone.ico
similarity index 100%
rename from install/windows/dangerzone.ico
rename to share/dangerzone.ico