diff --git a/dangerzone/__init__.py b/dangerzone/__init__.py index 6f08518..c3a8ce0 100644 --- a/dangerzone/__init__.py +++ b/dangerzone/__init__.py @@ -6,7 +6,8 @@ dangerzone_version = "0.1.4" # This is a hack for Windows and Mac to be able to run dangerzone-container, even though # PyInstaller builds a single binary -if os.path.basename(sys.argv[0]) == "dangerzone-container": +basename = os.path.basename(sys.argv[0]) +if basename == "dangerzone-container" or basename == "dangerzone-container.exe": main = container_main else: # If the binary isn't "dangerzone-contatiner", then launch the GUI diff --git a/dangerzone/container.py b/dangerzone/container.py index a47f5b6..3a745fd 100644 --- a/dangerzone/container.py +++ b/dangerzone/container.py @@ -10,7 +10,7 @@ import shutil if platform.system() == "Darwin": container_runtime = "/usr/local/bin/docker" elif platform.system() == "Windows": - container_runtime = "C:\\Program Files\\Docker\\Docker\\resources\\bin\\docker.exe" + container_runtime = "C:\\Program Files\\Docker\\Docker\\resources\\docker.exe" else: container_runtime = shutil.which("docker") diff --git a/dangerzone/gui.py b/dangerzone/gui.py index 60602b7..69ffc0d 100644 --- a/dangerzone/gui.py +++ b/dangerzone/gui.py @@ -74,7 +74,7 @@ def gui_main(custom_container, filename): signal.signal(signal.SIGINT, signal.SIG_DFL) # If we're using Linux and docker, see if we need to add the user to the docker group or if the user prefers typing their password - if platform.system() == "Linux" and container_runtime == "/usr/bin/docker": + if platform.system() == "Linux": if not global_common.ensure_docker_group_preference(): return try: diff --git a/install/windows/step1-build-exe.bat b/install/windows/step1-build-exe.bat index b92ac8b..dacc95a 100644 --- a/install/windows/step1-build-exe.bat +++ b/install/windows/step1-build-exe.bat @@ -7,6 +7,3 @@ pyinstaller install\pyinstaller\pyinstaller.spec REM code sign dangerzone.exe signtool.exe sign /v /d "Dangerzone" /a /tr http://time.certum.pl/ dist\dangerzone\dangerzone.exe - -REM build the wix file -python install\windows\build-wxs.py > install\windows\Dangerzone.wxs diff --git a/install/windows/step3-build-installer.bat b/install/windows/step3-build-installer.bat index c62f24e..70463c7 100644 --- a/install/windows/step3-build-installer.bat +++ b/install/windows/step3-build-installer.bat @@ -1,3 +1,6 @@ +REM build the wix file +python install\windows\build-wxs.py > install\windows\Dangerzone.wxs + REM build the msi package cd build mkdir wix