aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBob Arnson <bob@firegiant.com>2025-11-28 21:06:01 -0500
committerBob Arnson <github@bobs.org>2025-11-29 14:37:30 -0500
commitd4adc03c4fc9bf4eeef5ad44ec586f2151612617 (patch)
tree5ce29651e27c5ebd8887cfbc5f903b9ce4dc4560 /src
parentd2ef95ff2b492d8794613ed913a74c1b5f5b7762 (diff)
downloadwix-d4adc03c4fc9bf4eeef5ad44ec586f2151612617.tar.gz
wix-d4adc03c4fc9bf4eeef5ad44ec586f2151612617.tar.bz2
wix-d4adc03c4fc9bf4eeef5ad44ec586f2151612617.zip
Support 64-bit install directory in WixUI_Advanced
Fixes https://github.com/wixtoolset/issues/issues/2165
Diffstat (limited to 'src')
-rw-r--r--src/ext/UI/test/WixToolsetTest.UI/TestData/WixUI_Advanced/Package.wxs20
-rw-r--r--src/ext/UI/test/WixToolsetTest.UI/UIExtensionFixture.cs3
-rw-r--r--src/ext/UI/wixlib/WixUI_Advanced.wxs13
3 files changed, 16 insertions, 20 deletions
diff --git a/src/ext/UI/test/WixToolsetTest.UI/TestData/WixUI_Advanced/Package.wxs b/src/ext/UI/test/WixToolsetTest.UI/TestData/WixUI_Advanced/Package.wxs
index 095a4546..5595e8af 100644
--- a/src/ext/UI/test/WixToolsetTest.UI/TestData/WixUI_Advanced/Package.wxs
+++ b/src/ext/UI/test/WixToolsetTest.UI/TestData/WixUI_Advanced/Package.wxs
@@ -1,16 +1,6 @@
1<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:ui="http://wixtoolset.org/schemas/v4/wxs/ui"> 1<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:ui="http://wixtoolset.org/schemas/v4/wxs/ui">
2 <Package Name="WixUI_Advanced" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a"> 2 <Package Name="WixUI_Advanced" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a">
3 <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." /> 3 <File Source="example.txt" Directory="APPLICATIONFOLDER" />
4
5 <Feature Id="ProductFeature" Title="MsiPackage">
6 <ComponentGroupRef Id="ProductComponents" />
7 </Feature>
8
9 <ComponentGroup Id="ProductComponents" Directory="APPLICATIONFOLDER">
10 <Component>
11 <File Source="example.txt" />
12 </Component>
13 </ComponentGroup>
14 4
15 <ui:WixUI Id="WixUI_Advanced" /> 5 <ui:WixUI Id="WixUI_Advanced" />
16 <Property Id="ApplicationFolderName" Value="MyProgram" /> 6 <Property Id="ApplicationFolderName" Value="MyProgram" />
@@ -18,10 +8,8 @@
18 </Package> 8 </Package>
19 9
20 <Fragment> 10 <Fragment>
21 <StandardDirectory Id="ProgramFilesFolder"> 11 <DirectoryRef Id="INSTALLFOLDER">
22 <Directory Id="INSTALLFOLDER" Name="MsiPackage"> 12 <Directory Id="APPLICATIONFOLDER" />
23 <Directory Id="APPLICATIONFOLDER" /> 13 </DirectoryRef>
24 </Directory>
25 </StandardDirectory>
26 </Fragment> 14 </Fragment>
27</Wix> 15</Wix>
diff --git a/src/ext/UI/test/WixToolsetTest.UI/UIExtensionFixture.cs b/src/ext/UI/test/WixToolsetTest.UI/UIExtensionFixture.cs
index 9bc82fcf..59b4a01e 100644
--- a/src/ext/UI/test/WixToolsetTest.UI/UIExtensionFixture.cs
+++ b/src/ext/UI/test/WixToolsetTest.UI/UIExtensionFixture.cs
@@ -37,6 +37,7 @@ namespace WixToolsetTest.UI
37 }, results.Where(r => r.StartsWith("Binary:")).ToArray()); 37 }, results.Where(r => r.StartsWith("Binary:")).ToArray());
38 WixAssert.CompareLineByLine(new[] 38 WixAssert.CompareLineByLine(new[]
39 { 39 {
40 "CustomAction:WixSetDefaultPerMachine64Folder\t51\tWixPerMachineFolder\t[ProgramFiles64Folder][ApplicationFolderName]\t",
40 "CustomAction:WixSetDefaultPerMachineFolder\t51\tWixPerMachineFolder\t[ProgramFilesFolder][ApplicationFolderName]\t", 41 "CustomAction:WixSetDefaultPerMachineFolder\t51\tWixPerMachineFolder\t[ProgramFilesFolder][ApplicationFolderName]\t",
41 "CustomAction:WixSetDefaultPerUserFolder\t51\tWixPerUserFolder\t[LocalAppDataFolder]Apps\\[ApplicationFolderName]\t", 42 "CustomAction:WixSetDefaultPerUserFolder\t51\tWixPerUserFolder\t[LocalAppDataFolder]Apps\\[ApplicationFolderName]\t",
42 "CustomAction:WixSetPerMachineFolder\t51\tAPPLICATIONFOLDER\t[WixPerMachineFolder]\t", 43 "CustomAction:WixSetPerMachineFolder\t51\tAPPLICATIONFOLDER\t[WixPerMachineFolder]\t",
@@ -70,6 +71,7 @@ namespace WixToolsetTest.UI
70 }, results.Where(r => r.StartsWith("Binary:")).ToArray()); 71 }, results.Where(r => r.StartsWith("Binary:")).ToArray());
71 WixAssert.CompareLineByLine(new[] 72 WixAssert.CompareLineByLine(new[]
72 { 73 {
74 "CustomAction:WixSetDefaultPerMachine64Folder\t51\tWixPerMachineFolder\t[ProgramFiles64Folder][ApplicationFolderName]\t",
73 "CustomAction:WixSetDefaultPerMachineFolder\t51\tWixPerMachineFolder\t[ProgramFilesFolder][ApplicationFolderName]\t", 75 "CustomAction:WixSetDefaultPerMachineFolder\t51\tWixPerMachineFolder\t[ProgramFilesFolder][ApplicationFolderName]\t",
74 "CustomAction:WixSetDefaultPerUserFolder\t51\tWixPerUserFolder\t[LocalAppDataFolder]Apps\\[ApplicationFolderName]\t", 76 "CustomAction:WixSetDefaultPerUserFolder\t51\tWixPerUserFolder\t[LocalAppDataFolder]Apps\\[ApplicationFolderName]\t",
75 "CustomAction:WixSetPerMachineFolder\t51\tAPPLICATIONFOLDER\t[WixPerMachineFolder]\t", 77 "CustomAction:WixSetPerMachineFolder\t51\tAPPLICATIONFOLDER\t[WixPerMachineFolder]\t",
@@ -98,6 +100,7 @@ namespace WixToolsetTest.UI
98 }, results.Where(r => r.StartsWith("Binary:")).ToArray()); 100 }, results.Where(r => r.StartsWith("Binary:")).ToArray());
99 WixAssert.CompareLineByLine(new[] 101 WixAssert.CompareLineByLine(new[]
100 { 102 {
103 "CustomAction:WixSetDefaultPerMachine64Folder\t51\tWixPerMachineFolder\t[ProgramFiles64Folder][ApplicationFolderName]\t",
101 "CustomAction:WixSetDefaultPerMachineFolder\t51\tWixPerMachineFolder\t[ProgramFilesFolder][ApplicationFolderName]\t", 104 "CustomAction:WixSetDefaultPerMachineFolder\t51\tWixPerMachineFolder\t[ProgramFilesFolder][ApplicationFolderName]\t",
102 "CustomAction:WixSetDefaultPerUserFolder\t51\tWixPerUserFolder\t[LocalAppDataFolder]Apps\\[ApplicationFolderName]\t", 105 "CustomAction:WixSetDefaultPerUserFolder\t51\tWixPerUserFolder\t[LocalAppDataFolder]Apps\\[ApplicationFolderName]\t",
103 "CustomAction:WixSetPerMachineFolder\t51\tAPPLICATIONFOLDER\t[WixPerMachineFolder]\t", 106 "CustomAction:WixSetPerMachineFolder\t51\tAPPLICATIONFOLDER\t[WixPerMachineFolder]\t",
diff --git a/src/ext/UI/wixlib/WixUI_Advanced.wxs b/src/ext/UI/wixlib/WixUI_Advanced.wxs
index 35955a1a..6eb05949 100644
--- a/src/ext/UI/wixlib/WixUI_Advanced.wxs
+++ b/src/ext/UI/wixlib/WixUI_Advanced.wxs
@@ -22,6 +22,8 @@ Todo:
22<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> 22<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
23 <?foreach WIXUIARCH in X86;X64;A64 ?> 23 <?foreach WIXUIARCH in X86;X64;A64 ?>
24 <Fragment> 24 <Fragment>
25 <WixVariable Id="WixUIAdvancedArch" Value="$(WIXUIARCH)" />
26
25 <UI Id="WixUI_Advanced_$(WIXUIARCH)"> 27 <UI Id="WixUI_Advanced_$(WIXUIARCH)">
26 <Publish Dialog="BrowseDlg" Control="OK" Event="CheckTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1" /> 28 <Publish Dialog="BrowseDlg" Control="OK" Event="CheckTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1" />
27 29
@@ -56,19 +58,22 @@ Todo:
56 58
57 <CustomAction Id="WixSetDefaultPerUserFolder" Property="WixPerUserFolder" Value="[LocalAppDataFolder]Apps\[ApplicationFolderName]" Execute="immediate" /> 59 <CustomAction Id="WixSetDefaultPerUserFolder" Property="WixPerUserFolder" Value="[LocalAppDataFolder]Apps\[ApplicationFolderName]" Execute="immediate" />
58 <CustomAction Id="WixSetDefaultPerMachineFolder" Property="WixPerMachineFolder" Value="[ProgramFilesFolder][ApplicationFolderName]" Execute="immediate" /> 60 <CustomAction Id="WixSetDefaultPerMachineFolder" Property="WixPerMachineFolder" Value="[ProgramFilesFolder][ApplicationFolderName]" Execute="immediate" />
61 <CustomAction Id="WixSetDefaultPerMachine64Folder" Property="WixPerMachineFolder" Value="[ProgramFiles64Folder][ApplicationFolderName]" Execute="immediate" />
59 <CustomAction Id="WixSetPerUserFolder" Property="APPLICATIONFOLDER" Value="[WixPerUserFolder]" Execute="immediate" /> 62 <CustomAction Id="WixSetPerUserFolder" Property="APPLICATIONFOLDER" Value="[WixPerUserFolder]" Execute="immediate" />
60 <CustomAction Id="WixSetPerMachineFolder" Property="APPLICATIONFOLDER" Value="[WixPerMachineFolder]" Execute="immediate" /> 63 <CustomAction Id="WixSetPerMachineFolder" Property="APPLICATIONFOLDER" Value="[WixPerMachineFolder]" Execute="immediate" />
61 64
62 <InstallExecuteSequence> 65 <InstallExecuteSequence>
63 <Custom Action="WixSetDefaultPerUserFolder" Before="CostFinalize" /> 66 <Custom Action="WixSetDefaultPerUserFolder" Before="CostFinalize" />
64 <Custom Action="WixSetDefaultPerMachineFolder" After="WixSetDefaultPerUserFolder" /> 67 <Custom Action="WixSetDefaultPerMachineFolder" After="WixSetDefaultPerUserFolder" Condition="&quot;!(wix.WixUIAdvancedArch)&quot;=&quot;X86&quot;" />
65 <Custom Action="WixSetPerUserFolder" After="WixSetDefaultPerMachineFolder" Condition="ACTION=&quot;INSTALL&quot; AND APPLICATIONFOLDER=&quot;&quot; AND (ALLUSERS=&quot;&quot; OR (ALLUSERS=2 AND (NOT Privileged)))" /> 68 <Custom Action="WixSetDefaultPerMachine64Folder" After="WixSetDefaultPerMachineFolder" Condition="&quot;!(wix.WixUIAdvancedArch)&quot;=&quot;X64&quot; OR &quot;!(wix.WixUIAdvancedArch)&quot;=&quot;A64&quot;" />
69 <Custom Action="WixSetPerUserFolder" After="WixSetDefaultPerMachine64Folder" Condition="ACTION=&quot;INSTALL&quot; AND APPLICATIONFOLDER=&quot;&quot; AND (ALLUSERS=&quot;&quot; OR (ALLUSERS=2 AND (NOT Privileged)))" />
66 <Custom Action="WixSetPerMachineFolder" After="WixSetPerUserFolder" Condition="ACTION=&quot;INSTALL&quot; AND APPLICATIONFOLDER=&quot;&quot; AND (ALLUSERS=1 OR (ALLUSERS=2 AND Privileged))" /> 70 <Custom Action="WixSetPerMachineFolder" After="WixSetPerUserFolder" Condition="ACTION=&quot;INSTALL&quot; AND APPLICATIONFOLDER=&quot;&quot; AND (ALLUSERS=1 OR (ALLUSERS=2 AND Privileged))" />
67 </InstallExecuteSequence> 71 </InstallExecuteSequence>
68 <InstallUISequence> 72 <InstallUISequence>
69 <Custom Action="WixSetDefaultPerUserFolder" Before="CostFinalize" /> 73 <Custom Action="WixSetDefaultPerUserFolder" Before="CostFinalize" />
70 <Custom Action="WixSetDefaultPerMachineFolder" After="WixSetDefaultPerUserFolder" /> 74 <Custom Action="WixSetDefaultPerMachineFolder" After="WixSetDefaultPerUserFolder" Condition="&quot;!(wix.WixUIAdvancedArch)&quot;=&quot;X86&quot;" />
71 <Custom Action="WixSetPerUserFolder" After="WixSetDefaultPerMachineFolder" Condition="ACTION=&quot;INSTALL&quot; AND APPLICATIONFOLDER=&quot;&quot; AND (ALLUSERS=&quot;&quot; OR (ALLUSERS=2 AND (NOT Privileged)))" /> 75 <Custom Action="WixSetDefaultPerMachine64Folder" After="WixSetDefaultPerMachineFolder" Condition="&quot;!(wix.WixUIAdvancedArch)&quot;=&quot;X64&quot; OR &quot;!(wix.WixUIAdvancedArch)&quot;=&quot;A64&quot;" />
76 <Custom Action="WixSetPerUserFolder" After="WixSetDefaultPerMachine64Folder" Condition="ACTION=&quot;INSTALL&quot; AND APPLICATIONFOLDER=&quot;&quot; AND (ALLUSERS=&quot;&quot; OR (ALLUSERS=2 AND (NOT Privileged)))" />
72 <Custom Action="WixSetPerMachineFolder" After="WixSetPerUserFolder" Condition="ACTION=&quot;INSTALL&quot; AND APPLICATIONFOLDER=&quot;&quot; AND (ALLUSERS=1 OR (ALLUSERS=2 AND Privileged))" /> 77 <Custom Action="WixSetPerMachineFolder" After="WixSetPerUserFolder" Condition="ACTION=&quot;INSTALL&quot; AND APPLICATIONFOLDER=&quot;&quot; AND (ALLUSERS=1 OR (ALLUSERS=2 AND Privileged))" />
73 </InstallUISequence> 78 </InstallUISequence>
74 79