diff --git a/.gitignore b/.gitignore
index 9237339..0302e4b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -131,7 +131,4 @@ dmypy.json
.vscode
*.tar.gz
deb_dist
-.DS_Store
-install/windows/Dangerzone.msi
-install/windows/Dangerzone.wixobj
-install/windows/Dangerzone.wixpdb
\ No newline at end of file
+.DS_Store
\ No newline at end of file
diff --git a/install/pyinstaller/pyinstaller.spec b/install/pyinstaller/pyinstaller.spec
index 41944fa..4b14d42 100644
--- a/install/pyinstaller/pyinstaller.spec
+++ b/install/pyinstaller/pyinstaller.spec
@@ -23,6 +23,11 @@ if p == "Darwin":
else:
datas = [("../../share", "share")]
+if p == "Windows":
+ icon = os.path.join(root, "install", "windows", "dangerzone.ico")
+else:
+ icon = None
+
a = Analysis(
["dangerzone"],
pathex=["."],
@@ -48,6 +53,7 @@ exe = EXE(
strip=False,
upx=True,
console=False,
+ icon=icon,
)
coll = COLLECT(
diff --git a/install/windows/Dangerzone.wxs b/install/windows/Dangerzone.wxs
index eb8417b..fff47d3 100644
--- a/install/windows/Dangerzone.wxs
+++ b/install/windows/Dangerzone.wxs
@@ -6,7 +6,7 @@
-
+
diff --git a/install/windows/make_installer.bat b/install/windows/make_installer.bat
index d5487ad..34814c1 100644
--- a/install/windows/make_installer.bat
+++ b/install/windows/make_installer.bat
@@ -1,3 +1,21 @@
-candle Dangerzone.wxs
-light Dangerzone.wixobj
-@pause
\ No newline at end of file
+REM delete old dist and build files
+rmdir /s /q dist
+rmdir /s /q build
+
+REM build the exe with pyinstaller
+pyinstaller install\pyinstaller\pyinstaller.spec
+
+REM TODO: code sign dangerzone.exe
+
+REM build the msi package
+cd build
+mkdir wix
+cd wix
+candle.exe ..\..\install\windows\Dangerzone.wxs
+light.exe -ext WixUIExtension Dangerzone.wixobj
+
+REM TODO: code sign dangerzone.msi
+
+REM moving dangerzone.msi to dist
+cd ..\..
+move build/wix/Dangerzone.msi dist