]> git.sesse.net Git - vlc/commitdiff
msi: improve 64-bit support
authorLudovic Fauvet <etix@videolan.org>
Wed, 13 Feb 2013 17:24:30 +0000 (18:24 +0100)
committerRafaël Carré <funman@videolan.org>
Thu, 14 Feb 2013 12:46:54 +0000 (13:46 +0100)
Signed-off-by: Rafaël Carré <funman@videolan.org>
extras/package/win32/msi/config.wxi.in
extras/package/win32/msi/product.wxs

index 0baa9a5a9e7fe2c48aba200877a602a1d536ed9a..5139ecce22a9dcdc95ab7f7b8b0bdc9b25c43fcc 100644 (file)
     <?if $(var.Platform) = "x64" ?>
         <?define Win64 = "yes" ?>
         <?define PlatformString = "64-bit"?>
+        <?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
     <?else ?>
         <?define Win64 = "no" ?>
         <?define PlatformString = "32-bit"?>
+        <?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?>
     <?endif ?>
 
     <?define AppFolder = "VLC" ?>
index 149e72c670859025dbae914e442690c457a9e055..14e10ad5308ea11df4fca2603dba1e69f66f8efa 100644 (file)
@@ -36,7 +36,8 @@
             InstallPrivileges='elevated'
             InstallScope='perMachine'
             InstallerVersion='200'
-            Compressed='yes'/>
+            Compressed='yes'
+            Platforms='$(var.Platform)'/>
 
         <MajorUpgrade Schedule="afterInstallInitialize" DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit."/>
 
@@ -55,7 +56,7 @@
         <Property Id="ApplicationFolderName" Value="$(var.Manufacturer)\$(var.AppFolder)" />
         <Property Id="WixAppFolder" Value="WixPerMachineFolder" />
         <Property Id="APPLICATIONFOLDER">
-            <RegistrySearch Id="FindInstallRegDir" Type="raw" Root="HKLM" Key="Software\VideoLAN\VLC" Name="InstallDir" />
+            <RegistrySearch Id="FindInstallRegDir" Type="raw" Root="HKLM" Win64="$(var.Win64)" Key="Software\VideoLAN\VLC" Name="InstallDir" />
         </Property>
 
         <WixVariable Id="WixUISupportPerUser" Value="0" />
@@ -65,7 +66,7 @@
         <Media Id='1' Cabinet='product.cab' EmbedCab='yes' CompressionLevel="high" />
 
         <Directory Id='TARGETDIR' Name='SourceDir'>
-            <Directory Id='ProgramFilesFolder' Name='PFiles'>
+            <Directory Id='$(var.PlatformProgramFilesFolder)' Name='PFiles'>
                 <Directory Id='VideoLANFolder' Name='$(var.Manufacturer)'>
                     <Directory Id='APPLICATIONFOLDER' Name='$(var.AppFolder)' FileSource="$(var.SourceDir)">