diff --git a/scripts/generate-installers.bat b/scripts/generate-installers.bat
index a294e1f2..4ead99af 100644
--- a/scripts/generate-installers.bat
+++ b/scripts/generate-installers.bat
@@ -88,21 +88,24 @@ if "%SIGN%"=="1" (
)
)
-echo Building installer
-set VCREDIST_INSTALLER=%VCREDIST_PATH%\vcredist_%ARCH%.exe
-msbuild %SOURCE_ROOT%\wix\Moonlight.sln /p:Configuration=%BUILD_CONFIG% /p:Platform=%ARCH%
-if !ERRORLEVEL! NEQ 0 goto Error
-
-echo Building portable package
-rem This must be done after WiX harvesting and signing, since the VCRT dlls are MS signed
-rem and should not be harvested for inclusion in the full installer
-copy "%VCREDIST_PATH%\%ARCH%\Microsoft.VC141.CRT\*.dll" %DEPLOY_FOLDER%
-if !ERRORLEVEL! NEQ 0 goto Error
-7z a %INSTALLER_FOLDER%\MoonlightPortable.zip %DEPLOY_FOLDER%\*
+echo Building MSI
+msbuild %SOURCE_ROOT%\wix\Moonlight\Moonlight.wixproj /p:Configuration=%BUILD_CONFIG% /p:Platform=%ARCH%
if !ERRORLEVEL! NEQ 0 goto Error
if "%SIGN%"=="1" (
- echo Signing installer binary
+ echo Signing MSI
+ signtool %SIGNTOOL_PARAMS% %BUILD_FOLDER%\Moonlight.msi
+ if !ERRORLEVEL! NEQ 0 goto Error
+)
+
+echo Building bundle
+set VCREDIST_INSTALLER=%VCREDIST_PATH%\vcredist_%ARCH%.exe
+rem Bundles are always x86 binaries
+msbuild %SOURCE_ROOT%\wix\MoonlightSetup\MoonlightSetup.wixproj /p:Configuration=%BUILD_CONFIG% /p:Platform=x86
+if !ERRORLEVEL! NEQ 0 goto Error
+
+if "%SIGN%"=="1" (
+ echo Signing bundle
"%WIX%\bin\insignia" -ib %INSTALLER_FOLDER%\MoonlightSetup.exe -o %BUILD_FOLDER%\engine.exe
if !ERRORLEVEL! NEQ 0 goto Error
signtool %SIGNTOOL_PARAMS% %BUILD_FOLDER%\engine.exe
@@ -113,6 +116,14 @@ if "%SIGN%"=="1" (
if !ERRORLEVEL! NEQ 0 goto Error
)
+echo Building portable package
+rem This must be done after WiX harvesting and signing, since the VCRT dlls are MS signed
+rem and should not be harvested for inclusion in the full installer
+copy "%VCREDIST_PATH%\%ARCH%\Microsoft.VC141.CRT\*.dll" %DEPLOY_FOLDER%
+if !ERRORLEVEL! NEQ 0 goto Error
+7z a %INSTALLER_FOLDER%\MoonlightPortable.zip %DEPLOY_FOLDER%\*
+if !ERRORLEVEL! NEQ 0 goto Error
+
if /i "%APPVEYOR%"=="true" (
echo Pushing artifacts
appveyor PushArtifact %INSTALLER_FOLDER%\MoonlightSetup.exe -FileName MoonlightSetup-%ARCH%-%BUILD_CONFIG%.exe
diff --git a/wix/Moonlight/Moonlight.wixproj b/wix/Moonlight/Moonlight.wixproj
index 1ed21498..c8f0553a 100644
--- a/wix/Moonlight/Moonlight.wixproj
+++ b/wix/Moonlight/Moonlight.wixproj
@@ -6,6 +6,7 @@
2.0
Moonlight
Package
+ false
Debug
diff --git a/wix/Moonlight/Product.wxs b/wix/Moonlight/Product.wxs
index ced62513..133a8999 100644
--- a/wix/Moonlight/Product.wxs
+++ b/wix/Moonlight/Product.wxs
@@ -20,7 +20,7 @@
-
+
diff --git a/wix/MoonlightSetup/MoonlightSetup.wixproj b/wix/MoonlightSetup/MoonlightSetup.wixproj
index 5ad1074c..47dc9639 100644
--- a/wix/MoonlightSetup/MoonlightSetup.wixproj
+++ b/wix/MoonlightSetup/MoonlightSetup.wixproj
@@ -6,6 +6,7 @@
2.0
MoonlightSetup
Bundle
+ false
Debug