Fix get_resource_path for Mac app bundle

This commit is contained in:
Micah Lee 2020-02-07 12:07:55 -08:00
parent 13aac3348a
commit 329fa4639b
No known key found for this signature in database
GPG key ID: 403C2657CD994F73
2 changed files with 10 additions and 2 deletions

View file

@ -239,8 +239,14 @@ class Common(object):
"share", "share",
) )
else: else:
# In linux... if platform.system() == "Darwin":
prefix = os.path.join(sys.prefix, "share/dangerzone") # macOS
prefix = os.path.join(
os.path.dirname(os.path.dirname(sys.executable)), "Resources/share"
)
else:
# Linux
prefix = os.path.join(sys.prefix, "share/dangerzone")
resource_path = os.path.join(prefix, filename) resource_path = os.path.join(prefix, filename)
return resource_path return resource_path

View file

@ -123,10 +123,12 @@ class DockerInstaller(QtWidgets.QDialog):
print(f"Install failed: {exception}") print(f"Install failed: {exception}")
self.task_label.setText(f"Install failed: {exception}") self.task_label.setText(f"Install failed: {exception}")
self.install_t = None self.install_t = None
self.progress.hide()
self.cancel_button.setEnabled(True) self.cancel_button.setEnabled(True)
def install_clicked(self): def install_clicked(self):
self.task_label.setText("Installing Docker") self.task_label.setText("Installing Docker")
self.progress.show()
self.install_button.hide() self.install_button.hide()
self.cancel_button.setEnabled(False) self.cancel_button.setEnabled(False)