Skip to content

Commit

Permalink
Windows Installer: Fixed selection of the right MSVC DLL once more
Browse files Browse the repository at this point in the history
The previous method was not working, probably because System32 is some
kind of magic directory, that contains 64-bit DLLs which actually look
like 32-bit DLLs to 32-bit applications (probably including Wix).

Also added an icon to the Install button, indicating the installer will
require adminstrator permissions.

Closes #1338
  • Loading branch information
bjorn committed Jan 23, 2017
1 parent c24916b commit c717d5a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
5 changes: 3 additions & 2 deletions dist/win/installer.qbs
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ WindowsInstallerPackage {
"RootDir=" + project.sourceDirectory
];

if (qbs.toolchain.contains("mingw")) {
if (qbs.toolchain.contains("mingw"))
defs.push("MingwDir=" + FileInfo.joinPaths(cpp.toolchainInstallPath, ".."));
}
else if (qbs.toolchain.contains("msvc"))
defs.push("VcInstallDir=" + FileInfo.joinPaths(cpp.toolchainInstallPath, "../.."));

if (project.sparkleEnabled)
defs.push("Sparkle");
Expand Down
9 changes: 4 additions & 5 deletions dist/win/installer.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@

<?if $(var.Platform) = x64 ?>
<?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
<?define SystemDir = "C:\windows\system32" ?>
<?else ?>
<?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?>
<?define SystemDir = "C:\windows\SysWOW64" ?>
<?endif ?>

<Product Name='$(var.ProductName)' Id="*"
Expand All @@ -36,7 +34,8 @@

<Package Id='*' Keywords='Installer' Description="[ProductName] Installer"
Comments='Windows Installer Package' Manufacturer='[Manufacturer]'
Languages='1033' Compressed='yes' SummaryCodepage='1252' />
Languages='1033' Compressed='yes' SummaryCodepage='1252'
InstallScope='perMachine' />

<MajorUpgrade AllowDowngrades="yes" />

Expand Down Expand Up @@ -94,8 +93,8 @@
<File Id="libstdc___6_dll" Source="$(var.MingwDir)\bin\libstdc++-6.dll"/>
<File Id="libwinpthread_1_dll" Source="$(var.MingwDir)\bin\libwinpthread-1.dll"/>
<?else?>
<File Id="MSVCP120" Source="$(var.SystemDir)\MSVCP120.DLL"/>
<File Id="MSVCR120" Source="$(var.SystemDir)\MSVCR120.DLL"/>
<File Source="$(var.VcInstallDir)\redist\$(var.Platform)\Microsoft.VC120.CRT\msvcp120.dll"/>
<File Source="$(var.VcInstallDir)\redist\$(var.Platform)\Microsoft.VC120.CRT\msvcr120.dll"/>
<?endif?>

<?ifdef Sparkle ?>
Expand Down

0 comments on commit c717d5a

Please sign in to comment.