diff --git a/installer/windows/build.cmd b/installer/windows/build.cmd
index 2e210867..2bda8b9e 100644
--- a/installer/windows/build.cmd
+++ b/installer/windows/build.cmd
@@ -1,17 +1,30 @@
@echo off
-:: Set the output MSI and ARCH based on the calling parameter
+:: Output file name
+set MSI=DB.Browser.for.SQLite
+
+:: Set the ARCH based on the first parameter
if "%1"=="" (
- echo ERROR: You must select "Win64" or "Win32"
+ echo ERROR: You must select a build type, either "win64" or "win32"
goto :eof
-) else if "%1"=="Win32" (
- set MSI=DB.Browser.for.SQLite-win32
+) else if "%1"=="win32" (
set ARCH=x86
-) else if "%1"=="Win64" (
- set MSI=DB.Browser.for.SQLite-win64
+) else if "%1"=="win64" (
set ARCH=x64
) else (
- echo ERROR: Unknown ARCH="%1"
+ echo ERROR: Unknown build type="%1"
+ goto :eof
+)
+
+:: Choose between building the application with SQLite (default) or SQLCipher library
+if "%2"=="" (
+ set SQLCIPHER=
+ set MSI=%MSI%-%1
+) else if "%2"=="sqlcipher" (
+ set MSI=%MSI%-sqlcipher-%1
+ set SQLCIPHER=-dSQLCipher=1
+) else (
+ echo ERROR: Second parameter can only be "sqlcipher" or nothing
goto :eof
)
@@ -26,7 +39,7 @@ set ICE=-sice:ICE03 -sice:ICE82 -sice:ICE61 -sice:ICE43 -sice:ICE57
set LIGHT=-sw1104
:: Compile & Link
-"%WIX%\bin\candle.exe" -nologo -pedantic -arch %ARCH% product.wxs
+"%WIX%\bin\candle.exe" -nologo -pedantic -arch %ARCH% %SQLCIPHER% product.wxs
"%WIX%\bin\light.exe" -nologo -pedantic %LIGHT% %ICE% -ext WixUIExtension -ext WixUtilExtension product.wixobj -out %MSI%.msi
:: Cleanup
diff --git a/installer/windows/product.wxs b/installer/windows/product.wxs
index c4546e93..0fedeb14 100644
--- a/installer/windows/product.wxs
+++ b/installer/windows/product.wxs
@@ -78,7 +78,11 @@
-
+
+
+
+
+
-
-
+
+
+
+
+
+
diff --git a/installer/windows/variables.wxi b/installer/windows/variables.wxi
index b8a5c6ea..ca001087 100644
--- a/installer/windows/variables.wxi
+++ b/installer/windows/variables.wxi
@@ -52,10 +52,12 @@
+
+