Fix detecting if dangerzone or dangerzone-container is running in Windows, update docker.exe path, fix Windows build scripts to include to docker-container.exe symlink

This commit is contained in:
Micah Lee 2020-10-29 10:43:23 -07:00
parent 04044a4a33
commit 87be2bbc7d
No known key found for this signature in database
GPG key ID: 403C2657CD994F73
5 changed files with 7 additions and 6 deletions

View file

@ -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 # This is a hack for Windows and Mac to be able to run dangerzone-container, even though
# PyInstaller builds a single binary # 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 main = container_main
else: else:
# If the binary isn't "dangerzone-contatiner", then launch the GUI # If the binary isn't "dangerzone-contatiner", then launch the GUI

View file

@ -10,7 +10,7 @@ import shutil
if platform.system() == "Darwin": if platform.system() == "Darwin":
container_runtime = "/usr/local/bin/docker" container_runtime = "/usr/local/bin/docker"
elif platform.system() == "Windows": 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: else:
container_runtime = shutil.which("docker") container_runtime = shutil.which("docker")

View file

@ -74,7 +74,7 @@ def gui_main(custom_container, filename):
signal.signal(signal.SIGINT, signal.SIG_DFL) 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 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(): if not global_common.ensure_docker_group_preference():
return return
try: try:

View file

@ -7,6 +7,3 @@ pyinstaller install\pyinstaller\pyinstaller.spec
REM code sign dangerzone.exe REM code sign dangerzone.exe
signtool.exe sign /v /d "Dangerzone" /a /tr http://time.certum.pl/ dist\dangerzone\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

View file

@ -1,3 +1,6 @@
REM build the wix file
python install\windows\build-wxs.py > install\windows\Dangerzone.wxs
REM build the msi package REM build the msi package
cd build cd build
mkdir wix mkdir wix