mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00
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:
parent
04044a4a33
commit
87be2bbc7d
5 changed files with 7 additions and 6 deletions
|
@ -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
|
||||||
|
|
|
@ -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")
|
||||||
|
|
||||||
|
|
|
@ -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:
|
||||||
|
|
|
@ -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
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue