diff options
author | Bob Arnson <bob@firegiant.com> | 2024-09-27 22:09:24 -0400 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2024-12-26 21:46:38 -0800 |
commit | aa2678906191e0535fad5634467f074aae049c09 (patch) | |
tree | d4b4d03a313d12dac0f4ee7f81b1945b1293691e | |
parent | 3986a0b375d5b536f897d6284770baf711afaf86 (diff) | |
download | wix-aa2678906191e0535fad5634467f074aae049c09.tar.gz wix-aa2678906191e0535fad5634467f074aae049c09.tar.bz2 wix-aa2678906191e0535fad5634467f074aae049c09.zip |
Drop CA path validation in WixUI by default.
Add `WixUI/ExtendedPathValidation="yes"` to opt-in.
Removed the WIXUI_DONTVALIDATEPATH runtime opt-out.
Fixes https://github.com/wixtoolset/issues/issues/8718
Relies on https://github.com/wixtoolset/wix/pull/563
12 files changed, 126 insertions, 96 deletions
diff --git a/src/ext/UI/ca/DriveCheck.cpp b/src/ext/UI/ca/DriveCheck.cpp index fafd73c2..75e6ffd1 100644 --- a/src/ext/UI/ca/DriveCheck.cpp +++ b/src/ext/UI/ca/DriveCheck.cpp | |||
@@ -12,21 +12,21 @@ static HRESULT PathIsRemovable(__in LPCWSTR pTargetFolder, __inout BOOL* fPathRe | |||
12 | UINT __stdcall ValidatePath(MSIHANDLE hInstall) | 12 | UINT __stdcall ValidatePath(MSIHANDLE hInstall) |
13 | { | 13 | { |
14 | HRESULT hr = S_OK; | 14 | HRESULT hr = S_OK; |
15 | 15 | ||
16 | LPWSTR pwszWixUIDir = NULL; | 16 | LPWSTR pwszWixUIDir = NULL; |
17 | LPWSTR pwszInstallPath = NULL; | 17 | LPWSTR pwszInstallPath = NULL; |
18 | BOOL fInstallPathIsRemote = TRUE; | 18 | BOOL fInstallPathIsRemote = TRUE; |
19 | BOOL fInstallPathIsRemoveable = TRUE; | 19 | BOOL fInstallPathIsRemoveable = TRUE; |
20 | 20 | ||
21 | hr = WcaInitialize(hInstall, "ValidatePath"); | 21 | hr = WcaInitialize(hInstall, "ValidatePath"); |
22 | ExitOnFailure(hr, "failed to initialize"); | 22 | ExitOnFailure(hr, "failed to initialize"); |
23 | 23 | ||
24 | hr = WcaGetProperty(L"WIXUI_INSTALLDIR", &pwszWixUIDir); | 24 | hr = WcaGetProperty(L"WIXUI_INSTALLDIR", &pwszWixUIDir); |
25 | ExitOnFailure(hr, "failed to get WixUI Installation Directory"); | 25 | ExitOnFailure(hr, "failed to get WixUI Installation Directory"); |
26 | 26 | ||
27 | hr = WcaGetProperty(pwszWixUIDir, &pwszInstallPath); | 27 | hr = WcaGetProperty(pwszWixUIDir, &pwszInstallPath); |
28 | ExitOnFailure(hr, "failed to get Installation Directory"); | 28 | ExitOnFailure(hr, "failed to get Installation Directory"); |
29 | 29 | ||
30 | hr = PathIsRemote(pwszInstallPath, &fInstallPathIsRemote); | 30 | hr = PathIsRemote(pwszInstallPath, &fInstallPathIsRemote); |
31 | if (FAILED(hr)) | 31 | if (FAILED(hr)) |
32 | { | 32 | { |
@@ -34,7 +34,7 @@ UINT __stdcall ValidatePath(MSIHANDLE hInstall) | |||
34 | //reset HR, as we need to continue and find out if is a UNC path | 34 | //reset HR, as we need to continue and find out if is a UNC path |
35 | hr = S_OK; | 35 | hr = S_OK; |
36 | } | 36 | } |
37 | 37 | ||
38 | hr = PathIsRemovable(pwszInstallPath, &fInstallPathIsRemoveable); | 38 | hr = PathIsRemovable(pwszInstallPath, &fInstallPathIsRemoveable); |
39 | if (FAILED(hr)) | 39 | if (FAILED(hr)) |
40 | { | 40 | { |
@@ -45,7 +45,7 @@ UINT __stdcall ValidatePath(MSIHANDLE hInstall) | |||
45 | 45 | ||
46 | // If the path does not point to a network drive, mapped drive, or removable drive, | 46 | // If the path does not point to a network drive, mapped drive, or removable drive, |
47 | // then set WIXUI_INSTALLDIR_VALID to "1" otherwise set it to 0 | 47 | // then set WIXUI_INSTALLDIR_VALID to "1" otherwise set it to 0 |
48 | BOOL fInstallPathIsUnc = PathIsUNCW(pwszInstallPath); | 48 | BOOL fInstallPathIsUnc = ::PathIsUNCW(pwszInstallPath); |
49 | if (!fInstallPathIsUnc && !fInstallPathIsRemote && !fInstallPathIsRemoveable) | 49 | if (!fInstallPathIsUnc && !fInstallPathIsRemote && !fInstallPathIsRemoveable) |
50 | { | 50 | { |
51 | // path is valid | 51 | // path is valid |
@@ -61,7 +61,7 @@ UINT __stdcall ValidatePath(MSIHANDLE hInstall) | |||
61 | hr = WcaSetProperty(L"WIXUI_INSTALLDIR_VALID", L"0"); | 61 | hr = WcaSetProperty(L"WIXUI_INSTALLDIR_VALID", L"0"); |
62 | ExitOnFailure(hr, "failed to set WIXUI_INSTALLDIR_VALID"); | 62 | ExitOnFailure(hr, "failed to set WIXUI_INSTALLDIR_VALID"); |
63 | } | 63 | } |
64 | 64 | ||
65 | LExit: | 65 | LExit: |
66 | ReleaseStr(pwszInstallPath); | 66 | ReleaseStr(pwszInstallPath); |
67 | ReleaseStr(pwszWixUIDir); | 67 | ReleaseStr(pwszWixUIDir); |
@@ -79,22 +79,22 @@ static HRESULT PathIsRemote(__in LPCWSTR pTargetFolder, __inout BOOL* fPathRemot | |||
79 | LPWSTR pStrippedTargetFolder = NULL; | 79 | LPWSTR pStrippedTargetFolder = NULL; |
80 | 80 | ||
81 | hr = StrAllocString(&pStrippedTargetFolder, pTargetFolder, 0); | 81 | hr = StrAllocString(&pStrippedTargetFolder, pTargetFolder, 0); |
82 | 82 | ||
83 | // Terminate the path at the root | 83 | // Terminate the path at the root |
84 | if(!::PathStripToRootW(pStrippedTargetFolder)) | 84 | if (!::PathStripToRootW(pStrippedTargetFolder)) |
85 | { | 85 | { |
86 | hr = HRESULT_FROM_WIN32(ERROR_INVALID_DRIVE); | 86 | hr = HRESULT_FROM_WIN32(ERROR_INVALID_DRIVE); |
87 | ExitOnFailure(hr, "failed to parse target folder"); | 87 | ExitOnFailure(hr, "failed to parse target folder"); |
88 | } | 88 | } |
89 | 89 | ||
90 | UINT uResult = GetDriveTypeW(pStrippedTargetFolder); | 90 | UINT uResult = ::GetDriveTypeW(pStrippedTargetFolder); |
91 | 91 | ||
92 | *fPathRemote = (DRIVE_REMOTE == uResult) ; | 92 | *fPathRemote = (DRIVE_REMOTE == uResult); |
93 | 93 | ||
94 | LExit: | 94 | LExit: |
95 | ReleaseStr(pStrippedTargetFolder); | 95 | ReleaseStr(pStrippedTargetFolder); |
96 | 96 | ||
97 | return hr; | 97 | return hr; |
98 | } | 98 | } |
99 | 99 | ||
100 | /******************************************************************** | 100 | /******************************************************************** |
@@ -107,16 +107,16 @@ static HRESULT PathIsRemovable(__in LPCWSTR pTargetFolder, __inout BOOL* fPathRe | |||
107 | LPWSTR pStrippedTargetFolder = NULL; | 107 | LPWSTR pStrippedTargetFolder = NULL; |
108 | 108 | ||
109 | hr = StrAllocString(&pStrippedTargetFolder, pTargetFolder, 0); | 109 | hr = StrAllocString(&pStrippedTargetFolder, pTargetFolder, 0); |
110 | 110 | ||
111 | // Terminate the path at the root | 111 | // Terminate the path at the root |
112 | if(!::PathStripToRootW(pStrippedTargetFolder)) | 112 | if (!::PathStripToRootW(pStrippedTargetFolder)) |
113 | { | 113 | { |
114 | hr = HRESULT_FROM_WIN32(ERROR_INVALID_DRIVE); | 114 | hr = HRESULT_FROM_WIN32(ERROR_INVALID_DRIVE); |
115 | ExitOnFailure(hr, "failed to parse target folder"); | 115 | ExitOnFailure(hr, "failed to parse target folder"); |
116 | } | 116 | } |
117 | 117 | ||
118 | UINT uResult = GetDriveTypeW(pStrippedTargetFolder); | 118 | UINT uResult = ::GetDriveTypeW(pStrippedTargetFolder); |
119 | 119 | ||
120 | *fPathRemovable = ((DRIVE_CDROM == uResult) || (DRIVE_REMOVABLE == uResult) || (DRIVE_RAMDISK == uResult) || (DRIVE_UNKNOWN == uResult)); | 120 | *fPathRemovable = ((DRIVE_CDROM == uResult) || (DRIVE_REMOVABLE == uResult) || (DRIVE_RAMDISK == uResult) || (DRIVE_UNKNOWN == uResult)); |
121 | 121 | ||
122 | LExit: | 122 | LExit: |
diff --git a/src/ext/UI/test/WixToolsetTest.UI/TestData/InstallDir_NoLicense/Package.wxs b/src/ext/UI/test/WixToolsetTest.UI/TestData/InstallDir_NoLicense/Package.wxs index 86b7453e..0c9fd195 100644 --- a/src/ext/UI/test/WixToolsetTest.UI/TestData/InstallDir_NoLicense/Package.wxs +++ b/src/ext/UI/test/WixToolsetTest.UI/TestData/InstallDir_NoLicense/Package.wxs | |||
@@ -24,8 +24,8 @@ | |||
24 | <?foreach WIXUIARCH in X86;X64;A64 ?> | 24 | <?foreach WIXUIARCH in X86;X64;A64 ?> |
25 | <Fragment> | 25 | <Fragment> |
26 | <UI Id="InstallDir_NoLicense_$(WIXUIARCH)"> | 26 | <UI Id="InstallDir_NoLicense_$(WIXUIARCH)"> |
27 | <Publish Dialog="BrowseDlg" Control="OK" Event="DoAction" Value="WixUIValidatePath_$(WIXUIARCH)" Order="3" Condition="NOT WIXUI_DONTVALIDATEPATH" /> | 27 | <Publish Dialog="BrowseDlg" Control="OK" Event="DoAction" Value="WixUIValidatePath_$(WIXUIARCH)" Order="3" /> |
28 | <Publish Dialog="InstallDirDlg" Control="Next" Event="DoAction" Value="WixUIValidatePath_$(WIXUIARCH)" Order="2" Condition="NOT WIXUI_DONTVALIDATEPATH" /> | 28 | <Publish Dialog="InstallDirDlg" Control="Next" Event="DoAction" Value="WixUIValidatePath_$(WIXUIARCH)" Order="2" /> |
29 | </UI> | 29 | </UI> |
30 | 30 | ||
31 | <UIRef Id="InstallDir_NoLicense" /> | 31 | <UIRef Id="InstallDir_NoLicense" /> |
@@ -50,8 +50,6 @@ | |||
50 | <DialogRef Id="ProgressDlg" /> | 50 | <DialogRef Id="ProgressDlg" /> |
51 | <DialogRef Id="ResumeDlg" /> | 51 | <DialogRef Id="ResumeDlg" /> |
52 | <DialogRef Id="UserExit" /> | 52 | <DialogRef Id="UserExit" /> |
53 | |||
54 | <Publish Dialog="BrowseDlg" Control="OK" Event="SpawnDialog" Value="InvalidDirDlg" Order="4" Condition="NOT WIXUI_DONTVALIDATEPATH AND WIXUI_INSTALLDIR_VALID<>"1"" /> | ||
55 | 53 | ||
56 | <Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999" /> | 54 | <Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999" /> |
57 | 55 | ||
@@ -59,11 +57,14 @@ | |||
59 | <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Condition="Installed AND PATCH" /> | 57 | <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Condition="Installed AND PATCH" /> |
60 | 58 | ||
61 | <Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" /> | 59 | <Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" /> |
62 | <Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1" /> | 60 | <Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="3" /> |
63 | <Publish Dialog="InstallDirDlg" Control="Next" Event="SpawnDialog" Value="InvalidDirDlg" Order="3" Condition="NOT WIXUI_DONTVALIDATEPATH AND WIXUI_INSTALLDIR_VALID<>"1"" /> | 61 | <Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="4" /> |
64 | <Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="4" Condition="WIXUI_DONTVALIDATEPATH OR WIXUI_INSTALLDIR_VALID="1"" /> | ||
65 | <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1" /> | 62 | <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1" /> |
66 | <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2" /> | 63 | <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2" /> |
64 | |||
65 | <Publish Dialog="BrowseDlg" Control="OK" Event="SetTargetPath" Value="[_BrowseProperty]" Order="3" /> | ||
66 | <Publish Dialog="BrowseDlg" Control="OK" Event="EndDialog" Value="Return" Order="4" /> | ||
67 | |||
67 | <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="InstallDirDlg" Order="1" Condition="NOT Installed" /> | 68 | <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="InstallDirDlg" Order="1" Condition="NOT Installed" /> |
68 | <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2" Condition="Installed AND NOT PATCH" /> | 69 | <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2" Condition="Installed AND NOT PATCH" /> |
69 | <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="2" Condition="Installed AND PATCH" /> | 70 | <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="2" Condition="Installed AND PATCH" /> |
diff --git a/src/ext/UI/test/WixToolsetTest.UI/TestData/InstallDir_SpecialDlg/Package.wxs b/src/ext/UI/test/WixToolsetTest.UI/TestData/InstallDir_SpecialDlg/Package.wxs index eeb44833..de179240 100644 --- a/src/ext/UI/test/WixToolsetTest.UI/TestData/InstallDir_SpecialDlg/Package.wxs +++ b/src/ext/UI/test/WixToolsetTest.UI/TestData/InstallDir_SpecialDlg/Package.wxs | |||
@@ -42,10 +42,7 @@ | |||
42 | 42 | ||
43 | <?foreach WIXUIARCH in X86;X64;A64 ?> | 43 | <?foreach WIXUIARCH in X86;X64;A64 ?> |
44 | <Fragment> | 44 | <Fragment> |
45 | <UI Id="InstallDir_SpecialDlg_$(WIXUIARCH)"> | 45 | <UI Id="InstallDir_SpecialDlg_$(WIXUIARCH)" /> |
46 | <Publish Dialog="BrowseDlg" Control="OK" Event="DoAction" Value="WixUIValidatePath_$(WIXUIARCH)" Order="3" Condition="NOT WIXUI_DONTVALIDATEPATH" /> | ||
47 | <Publish Dialog="InstallDirDlg" Control="Next" Event="DoAction" Value="WixUIValidatePath_$(WIXUIARCH)" Order="2" Condition="NOT WIXUI_DONTVALIDATEPATH" /> | ||
48 | </UI> | ||
49 | 46 | ||
50 | <UIRef Id="InstallDir_SpecialDlg" /> | 47 | <UIRef Id="InstallDir_SpecialDlg" /> |
51 | </Fragment> | 48 | </Fragment> |
@@ -70,7 +67,7 @@ | |||
70 | <DialogRef Id="ResumeDlg" /> | 67 | <DialogRef Id="ResumeDlg" /> |
71 | <DialogRef Id="UserExit" /> | 68 | <DialogRef Id="UserExit" /> |
72 | 69 | ||
73 | <Publish Dialog="BrowseDlg" Control="OK" Event="SpawnDialog" Value="InvalidDirDlg" Order="4" Condition="NOT WIXUI_DONTVALIDATEPATH AND WIXUI_INSTALLDIR_VALID<>"1"" /> | 70 | <Publish Dialog="BrowseDlg" Control="OK" Event="SpawnDialog" Value="InvalidDirDlg" Order="4" Condition="WIXUI_INSTALLDIR_VALID<>"1"" /> |
74 | 71 | ||
75 | <Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999" /> | 72 | <Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999" /> |
76 | 73 | ||
@@ -85,8 +82,8 @@ | |||
85 | 82 | ||
86 | <Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementDlg" /> | 83 | <Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementDlg" /> |
87 | <Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1" /> | 84 | <Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1" /> |
88 | <Publish Dialog="InstallDirDlg" Control="Next" Event="SpawnDialog" Value="InvalidDirDlg" Order="3" Condition="NOT WIXUI_DONTVALIDATEPATH AND WIXUI_INSTALLDIR_VALID<>"1"" /> | 85 | <Publish Dialog="InstallDirDlg" Control="Next" Event="SpawnDialog" Value="InvalidDirDlg" Order="3" Condition="WIXUI_INSTALLDIR_VALID<>"1"" /> |
89 | <Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="4" Condition="WIXUI_DONTVALIDATEPATH OR WIXUI_INSTALLDIR_VALID="1"" /> | 86 | <Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="4" Condition="WIXUI_INSTALLDIR_VALID="1"" /> |
90 | <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1" /> | 87 | <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1" /> |
91 | <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2" /> | 88 | <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2" /> |
92 | <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="InstallDirDlg" Order="1" Condition="NOT Installed" /> | 89 | <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="InstallDirDlg" Order="1" Condition="NOT Installed" /> |
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 c22328e6..095a4546 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,12 +1,12 @@ | |||
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="MsiPackage" 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 | <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." /> |
4 | 4 | ||
5 | <Feature Id="ProductFeature" Title="MsiPackage"> | 5 | <Feature Id="ProductFeature" Title="MsiPackage"> |
6 | <ComponentGroupRef Id="ProductComponents" /> | 6 | <ComponentGroupRef Id="ProductComponents" /> |
7 | </Feature> | 7 | </Feature> |
8 | 8 | ||
9 | <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"> | 9 | <ComponentGroup Id="ProductComponents" Directory="APPLICATIONFOLDER"> |
10 | <Component> | 10 | <Component> |
11 | <File Source="example.txt" /> | 11 | <File Source="example.txt" /> |
12 | </Component> | 12 | </Component> |
diff --git a/src/ext/UI/test/WixToolsetTest.UI/TestData/WixUI_InstallDir/Package.wxs b/src/ext/UI/test/WixToolsetTest.UI/TestData/WixUI_InstallDir/Package.wxs index 68e1177d..8a6556a9 100644 --- a/src/ext/UI/test/WixToolsetTest.UI/TestData/WixUI_InstallDir/Package.wxs +++ b/src/ext/UI/test/WixToolsetTest.UI/TestData/WixUI_InstallDir/Package.wxs | |||
@@ -1,5 +1,5 @@ | |||
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="MsiPackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a" InstallerVersion="200"> | 2 | <Package Name="WixUI_InstallDir" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a" InstallerVersion="200"> |
3 | <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." /> | 3 | <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." /> |
4 | 4 | ||
5 | <Feature Id="ProductFeature" Title="MsiPackage"> | 5 | <Feature Id="ProductFeature" Title="MsiPackage"> |
@@ -12,7 +12,7 @@ | |||
12 | </Component> | 12 | </Component> |
13 | </ComponentGroup> | 13 | </ComponentGroup> |
14 | 14 | ||
15 | <ui:WixUI Id="WixUI_InstallDir" InstallDirectory="INSTALLFOLDER" /> | 15 | <ui:WixUI Id="WixUI_InstallDir" InstallDirectory="INSTALLFOLDER" ExtendedPathValidation="yes" /> |
16 | </Package> | 16 | </Package> |
17 | 17 | ||
18 | <Fragment> | 18 | <Fragment> |
diff --git a/src/ext/UI/test/WixToolsetTest.UI/TestData/WixUI_Mondo/Package.wxs b/src/ext/UI/test/WixToolsetTest.UI/TestData/WixUI_Mondo/Package.wxs index 5bb7fa1a..24f18c1e 100644 --- a/src/ext/UI/test/WixToolsetTest.UI/TestData/WixUI_Mondo/Package.wxs +++ b/src/ext/UI/test/WixToolsetTest.UI/TestData/WixUI_Mondo/Package.wxs | |||
@@ -1,8 +1,8 @@ | |||
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="MsiPackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a" InstallerVersion="200"> | 2 | <Package Name="WixUI_Mondo" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a" InstallerVersion="200"> |
3 | <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." /> | 3 | <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." /> |
4 | 4 | ||
5 | <Feature Id="ProductFeature" Title="MsiPackage"> | 5 | <Feature Id="ProductFeature" Title="MsiPackage" ConfigurableDirectory="INSTALLFOLDER"> |
6 | <ComponentGroupRef Id="ProductComponents" /> | 6 | <ComponentGroupRef Id="ProductComponents" /> |
7 | </Feature> | 7 | </Feature> |
8 | 8 | ||
@@ -12,7 +12,7 @@ | |||
12 | </Component> | 12 | </Component> |
13 | </ComponentGroup> | 13 | </ComponentGroup> |
14 | 14 | ||
15 | <ui:WixUI Id="WixUI_Mondo" /> | 15 | <ui:WixUI Id="WixUI_Mondo" ExtendedPathValidation="yes" /> |
16 | <WixVariable Id="WixUILicenseRtf" Value="bpl.rtf" /> | 16 | <WixVariable Id="WixUILicenseRtf" Value="bpl.rtf" /> |
17 | </Package> | 17 | </Package> |
18 | 18 | ||
diff --git a/src/ext/UI/test/WixToolsetTest.UI/UIExtensionFixture.cs b/src/ext/UI/test/WixToolsetTest.UI/UIExtensionFixture.cs index eb5e3687..bb20f087 100644 --- a/src/ext/UI/test/WixToolsetTest.UI/UIExtensionFixture.cs +++ b/src/ext/UI/test/WixToolsetTest.UI/UIExtensionFixture.cs | |||
@@ -29,7 +29,6 @@ namespace WixToolsetTest.UI | |||
29 | "Binary:WixUI_Bmp_Up\t[Binary data]", | 29 | "Binary:WixUI_Bmp_Up\t[Binary data]", |
30 | "Binary:WixUI_Ico_Exclam\t[Binary data]", | 30 | "Binary:WixUI_Ico_Exclam\t[Binary data]", |
31 | "Binary:WixUI_Ico_Info\t[Binary data]", | 31 | "Binary:WixUI_Ico_Info\t[Binary data]", |
32 | "Binary:WixUiCa_X86\t[Binary data]", | ||
33 | }, results.Where(r => r.StartsWith("Binary:")).ToArray()); | 32 | }, results.Where(r => r.StartsWith("Binary:")).ToArray()); |
34 | WixAssert.CompareLineByLine(new[] | 33 | WixAssert.CompareLineByLine(new[] |
35 | { | 34 | { |
@@ -37,13 +36,8 @@ namespace WixToolsetTest.UI | |||
37 | "CustomAction:WixSetDefaultPerUserFolder\t51\tWixPerUserFolder\t[LocalAppDataFolder]Apps\\[ApplicationFolderName]\t", | 36 | "CustomAction:WixSetDefaultPerUserFolder\t51\tWixPerUserFolder\t[LocalAppDataFolder]Apps\\[ApplicationFolderName]\t", |
38 | "CustomAction:WixSetPerMachineFolder\t51\tAPPLICATIONFOLDER\t[WixPerMachineFolder]\t", | 37 | "CustomAction:WixSetPerMachineFolder\t51\tAPPLICATIONFOLDER\t[WixPerMachineFolder]\t", |
39 | "CustomAction:WixSetPerUserFolder\t51\tAPPLICATIONFOLDER\t[WixPerUserFolder]\t", | 38 | "CustomAction:WixSetPerUserFolder\t51\tAPPLICATIONFOLDER\t[WixPerUserFolder]\t", |
40 | "CustomAction:WixUIValidatePath_X86\t65\tWixUiCa_X86\tValidatePath\t", | ||
41 | }, results.Where(r => r.StartsWith("CustomAction:")).ToArray()); | 39 | }, results.Where(r => r.StartsWith("CustomAction:")).ToArray()); |
42 | WixAssert.CompareLineByLine(new[] | 40 | Assert.Empty(results.Where(result => result.StartsWith("ControlEvent:") && result.Contains("DoAction")).ToArray()); |
43 | { | ||
44 | "ControlEvent:BrowseDlg\tOK\tDoAction\tWixUIValidatePath_X86\tNOT WIXUI_DONTVALIDATEPATH\t1", | ||
45 | "ControlEvent:InstallDirDlg\tNext\tDoAction\tWixUIValidatePath_X86\tNOT WIXUI_DONTVALIDATEPATH\t2", | ||
46 | }, results.Where(result => result.StartsWith("ControlEvent:") && result.Contains("DoAction")).ToArray()); | ||
47 | WixAssert.CompareLineByLine(new[] | 41 | WixAssert.CompareLineByLine(new[] |
48 | { | 42 | { |
49 | "InstallUISequence:AdvancedWelcomeEulaDlg\tNOT Installed\t1297", | 43 | "InstallUISequence:AdvancedWelcomeEulaDlg\tNOT Installed\t1297", |
@@ -68,7 +62,6 @@ namespace WixToolsetTest.UI | |||
68 | "Binary:WixUI_Bmp_Up\t[Binary data]", | 62 | "Binary:WixUI_Bmp_Up\t[Binary data]", |
69 | "Binary:WixUI_Ico_Exclam\t[Binary data]", | 63 | "Binary:WixUI_Ico_Exclam\t[Binary data]", |
70 | "Binary:WixUI_Ico_Info\t[Binary data]", | 64 | "Binary:WixUI_Ico_Info\t[Binary data]", |
71 | "Binary:WixUiCa_X64\t[Binary data]", | ||
72 | }, results.Where(r => r.StartsWith("Binary:")).ToArray()); | 65 | }, results.Where(r => r.StartsWith("Binary:")).ToArray()); |
73 | WixAssert.CompareLineByLine(new[] | 66 | WixAssert.CompareLineByLine(new[] |
74 | { | 67 | { |
@@ -76,13 +69,8 @@ namespace WixToolsetTest.UI | |||
76 | "CustomAction:WixSetDefaultPerUserFolder\t51\tWixPerUserFolder\t[LocalAppDataFolder]Apps\\[ApplicationFolderName]\t", | 69 | "CustomAction:WixSetDefaultPerUserFolder\t51\tWixPerUserFolder\t[LocalAppDataFolder]Apps\\[ApplicationFolderName]\t", |
77 | "CustomAction:WixSetPerMachineFolder\t51\tAPPLICATIONFOLDER\t[WixPerMachineFolder]\t", | 70 | "CustomAction:WixSetPerMachineFolder\t51\tAPPLICATIONFOLDER\t[WixPerMachineFolder]\t", |
78 | "CustomAction:WixSetPerUserFolder\t51\tAPPLICATIONFOLDER\t[WixPerUserFolder]\t", | 71 | "CustomAction:WixSetPerUserFolder\t51\tAPPLICATIONFOLDER\t[WixPerUserFolder]\t", |
79 | "CustomAction:WixUIValidatePath_X64\t65\tWixUiCa_X64\tValidatePath\t", | ||
80 | }, results.Where(r => r.StartsWith("CustomAction:")).ToArray()); | 72 | }, results.Where(r => r.StartsWith("CustomAction:")).ToArray()); |
81 | WixAssert.CompareLineByLine(new[] | 73 | Assert.Empty(results.Where(result => result.StartsWith("ControlEvent:") && result.Contains("DoAction")).ToArray()); |
82 | { | ||
83 | "ControlEvent:BrowseDlg\tOK\tDoAction\tWixUIValidatePath_X64\tNOT WIXUI_DONTVALIDATEPATH\t1", | ||
84 | "ControlEvent:InstallDirDlg\tNext\tDoAction\tWixUIValidatePath_X64\tNOT WIXUI_DONTVALIDATEPATH\t2", | ||
85 | }, results.Where(result => result.StartsWith("ControlEvent:") && result.Contains("DoAction")).ToArray()); | ||
86 | } | 74 | } |
87 | 75 | ||
88 | [Fact] | 76 | [Fact] |
@@ -102,7 +90,6 @@ namespace WixToolsetTest.UI | |||
102 | "Binary:WixUI_Bmp_Up\t[Binary data]", | 90 | "Binary:WixUI_Bmp_Up\t[Binary data]", |
103 | "Binary:WixUI_Ico_Exclam\t[Binary data]", | 91 | "Binary:WixUI_Ico_Exclam\t[Binary data]", |
104 | "Binary:WixUI_Ico_Info\t[Binary data]", | 92 | "Binary:WixUI_Ico_Info\t[Binary data]", |
105 | "Binary:WixUiCa_A64\t[Binary data]", | ||
106 | }, results.Where(r => r.StartsWith("Binary:")).ToArray()); | 93 | }, results.Where(r => r.StartsWith("Binary:")).ToArray()); |
107 | WixAssert.CompareLineByLine(new[] | 94 | WixAssert.CompareLineByLine(new[] |
108 | { | 95 | { |
@@ -110,13 +97,8 @@ namespace WixToolsetTest.UI | |||
110 | "CustomAction:WixSetDefaultPerUserFolder\t51\tWixPerUserFolder\t[LocalAppDataFolder]Apps\\[ApplicationFolderName]\t", | 97 | "CustomAction:WixSetDefaultPerUserFolder\t51\tWixPerUserFolder\t[LocalAppDataFolder]Apps\\[ApplicationFolderName]\t", |
111 | "CustomAction:WixSetPerMachineFolder\t51\tAPPLICATIONFOLDER\t[WixPerMachineFolder]\t", | 98 | "CustomAction:WixSetPerMachineFolder\t51\tAPPLICATIONFOLDER\t[WixPerMachineFolder]\t", |
112 | "CustomAction:WixSetPerUserFolder\t51\tAPPLICATIONFOLDER\t[WixPerUserFolder]\t", | 99 | "CustomAction:WixSetPerUserFolder\t51\tAPPLICATIONFOLDER\t[WixPerUserFolder]\t", |
113 | "CustomAction:WixUIValidatePath_A64\t65\tWixUiCa_A64\tValidatePath\t", | ||
114 | }, results.Where(r => r.StartsWith("CustomAction:")).ToArray()); | 100 | }, results.Where(r => r.StartsWith("CustomAction:")).ToArray()); |
115 | WixAssert.CompareLineByLine(new[] | 101 | Assert.Empty(results.Where(result => result.StartsWith("ControlEvent:") && result.Contains("DoAction")).ToArray()); |
116 | { | ||
117 | "ControlEvent:BrowseDlg\tOK\tDoAction\tWixUIValidatePath_A64\tNOT WIXUI_DONTVALIDATEPATH\t1", | ||
118 | "ControlEvent:InstallDirDlg\tNext\tDoAction\tWixUIValidatePath_A64\tNOT WIXUI_DONTVALIDATEPATH\t2", | ||
119 | }, results.Where(result => result.StartsWith("ControlEvent:") && result.Contains("DoAction")).ToArray()); | ||
120 | } | 102 | } |
121 | 103 | ||
122 | [Fact] | 104 | [Fact] |
@@ -180,8 +162,8 @@ namespace WixToolsetTest.UI | |||
180 | }, results.Where(r => r.StartsWith("Property:WIXUI")).ToArray()); | 162 | }, results.Where(r => r.StartsWith("Property:WIXUI")).ToArray()); |
181 | WixAssert.CompareLineByLine(new[] | 163 | WixAssert.CompareLineByLine(new[] |
182 | { | 164 | { |
183 | "ControlEvent:BrowseDlg\tOK\tDoAction\tWixUIValidatePath_X86\tNOT WIXUI_DONTVALIDATEPATH\t3", | 165 | "ControlEvent:BrowseDlg\tOK\tDoAction\tWixUIValidatePath_X86\t1\t1", |
184 | "ControlEvent:InstallDirDlg\tNext\tDoAction\tWixUIValidatePath_X86\tNOT WIXUI_DONTVALIDATEPATH\t2", | 166 | "ControlEvent:InstallDirDlg\tNext\tDoAction\tWixUIValidatePath_X86\t1\t1", |
185 | }, results.Where(result => result.StartsWith("ControlEvent:") && result.Contains("DoAction")).OrderBy(s => s).ToArray()); | 167 | }, results.Where(result => result.StartsWith("ControlEvent:") && result.Contains("DoAction")).OrderBy(s => s).ToArray()); |
186 | WixAssert.CompareLineByLine(new[] | 168 | WixAssert.CompareLineByLine(new[] |
187 | { | 169 | { |
@@ -281,7 +263,7 @@ namespace WixToolsetTest.UI | |||
281 | }, results.Where(r => r.StartsWith("CustomAction:")).ToArray()); | 263 | }, results.Where(r => r.StartsWith("CustomAction:")).ToArray()); |
282 | WixAssert.CompareLineByLine(new[] | 264 | WixAssert.CompareLineByLine(new[] |
283 | { | 265 | { |
284 | "ControlEvent:BrowseDlg\tOK\tDoAction\tWixUIValidatePath_X86\tNOT WIXUI_DONTVALIDATEPATH\t3", | 266 | "ControlEvent:BrowseDlg\tOK\tDoAction\tWixUIValidatePath_X86\t1\t1", |
285 | }, results.Where(result => result.StartsWith("ControlEvent:") && result.Contains("DoAction")).ToArray()); | 267 | }, results.Where(result => result.StartsWith("ControlEvent:") && result.Contains("DoAction")).ToArray()); |
286 | WixAssert.CompareLineByLine(new[] | 268 | WixAssert.CompareLineByLine(new[] |
287 | { | 269 | { |
@@ -332,8 +314,8 @@ namespace WixToolsetTest.UI | |||
332 | }, results.Where(r => r.StartsWith("Property:WIXUI")).ToArray()); | 314 | }, results.Where(r => r.StartsWith("Property:WIXUI")).ToArray()); |
333 | WixAssert.CompareLineByLine(new[] | 315 | WixAssert.CompareLineByLine(new[] |
334 | { | 316 | { |
335 | "ControlEvent:BrowseDlg\tOK\tDoAction\tWixUIValidatePath_X86\tNOT WIXUI_DONTVALIDATEPATH\t3", | 317 | "ControlEvent:BrowseDlg\tOK\tDoAction\tWixUIValidatePath_X86\t1\t3", |
336 | "ControlEvent:InstallDirDlg\tNext\tDoAction\tWixUIValidatePath_X86\tNOT WIXUI_DONTVALIDATEPATH\t2", | 318 | "ControlEvent:InstallDirDlg\tNext\tDoAction\tWixUIValidatePath_X86\t1\t2", |
337 | }, results.Where(result => result.StartsWith("ControlEvent:") && result.Contains("DoAction")).OrderBy(s => s).ToArray()); | 319 | }, results.Where(result => result.StartsWith("ControlEvent:") && result.Contains("DoAction")).OrderBy(s => s).ToArray()); |
338 | 320 | ||
339 | Assert.Empty(results.Where(result => result.Contains("LicenseAgreementDlg")).ToArray()); | 321 | Assert.Empty(results.Where(result => result.Contains("LicenseAgreementDlg")).ToArray()); |
@@ -361,21 +343,13 @@ namespace WixToolsetTest.UI | |||
361 | "Binary:WixUI_Bmp_Up\t[Binary data]", | 343 | "Binary:WixUI_Bmp_Up\t[Binary data]", |
362 | "Binary:WixUI_Ico_Exclam\t[Binary data]", | 344 | "Binary:WixUI_Ico_Exclam\t[Binary data]", |
363 | "Binary:WixUI_Ico_Info\t[Binary data]", | 345 | "Binary:WixUI_Ico_Info\t[Binary data]", |
364 | "Binary:WixUiCa_X64\t[Binary data]", | ||
365 | }, results.Where(r => r.StartsWith("Binary:")).ToArray()); | 346 | }, results.Where(r => r.StartsWith("Binary:")).ToArray()); |
366 | WixAssert.CompareLineByLine(new[] | 347 | Assert.Empty(results.Where(r => r.StartsWith("CustomAction:")).ToArray()); |
367 | { | ||
368 | "CustomAction:WixUIValidatePath_X64\t65\tWixUiCa_X64\tValidatePath\t", | ||
369 | }, results.Where(r => r.StartsWith("CustomAction:")).ToArray()); | ||
370 | WixAssert.CompareLineByLine(new[] | 348 | WixAssert.CompareLineByLine(new[] |
371 | { | 349 | { |
372 | "Property:WIXUI_INSTALLDIR\tINSTALLFOLDER", | 350 | "Property:WIXUI_INSTALLDIR\tINSTALLFOLDER", |
373 | }, results.Where(r => r.StartsWith("Property:WIXUI")).ToArray()); | 351 | }, results.Where(r => r.StartsWith("Property:WIXUI")).ToArray()); |
374 | WixAssert.CompareLineByLine(new[] | 352 | Assert.Empty(results.Where(result => result.StartsWith("ControlEvent:") && result.Contains("DoAction")).OrderBy(s => s).ToArray()); |
375 | { | ||
376 | "ControlEvent:BrowseDlg\tOK\tDoAction\tWixUIValidatePath_X64\tNOT WIXUI_DONTVALIDATEPATH\t3", | ||
377 | "ControlEvent:InstallDirDlg\tNext\tDoAction\tWixUIValidatePath_X64\tNOT WIXUI_DONTVALIDATEPATH\t2", | ||
378 | }, results.Where(result => result.StartsWith("ControlEvent:") && result.Contains("DoAction")).OrderBy(s => s).ToArray()); | ||
379 | WixAssert.CompareLineByLine(new[] | 353 | WixAssert.CompareLineByLine(new[] |
380 | { | 354 | { |
381 | "InstallUISequence:WelcomeDlg\tNOT Installed OR PATCH\t1297", | 355 | "InstallUISequence:WelcomeDlg\tNOT Installed OR PATCH\t1297", |
diff --git a/src/ext/UI/wixext/UICompiler.cs b/src/ext/UI/wixext/UICompiler.cs index 5f2751c9..57a0dc16 100644 --- a/src/ext/UI/wixext/UICompiler.cs +++ b/src/ext/UI/wixext/UICompiler.cs | |||
@@ -56,6 +56,7 @@ namespace WixToolset.UI | |||
56 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); | 56 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); |
57 | string id = null; | 57 | string id = null; |
58 | string installDirectory = null; | 58 | string installDirectory = null; |
59 | YesNoType extendedPathValidation = YesNoType.No; | ||
59 | 60 | ||
60 | foreach (var attrib in element.Attributes()) | 61 | foreach (var attrib in element.Attributes()) |
61 | { | 62 | { |
@@ -69,6 +70,9 @@ namespace WixToolset.UI | |||
69 | case "InstallDirectory": | 70 | case "InstallDirectory": |
70 | installDirectory = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | 71 | installDirectory = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); |
71 | break; | 72 | break; |
73 | case "ExtendedPathValidation": | ||
74 | extendedPathValidation = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); | ||
75 | break; | ||
72 | default: | 76 | default: |
73 | this.ParseHelper.UnexpectedAttribute(element, attrib); | 77 | this.ParseHelper.UnexpectedAttribute(element, attrib); |
74 | break; | 78 | break; |
@@ -87,7 +91,15 @@ namespace WixToolset.UI | |||
87 | else | 91 | else |
88 | { | 92 | { |
89 | var platform = this.Context.Platform == Platform.ARM64 ? "A64" : this.Context.Platform.ToString(); | 93 | var platform = this.Context.Platform == Platform.ARM64 ? "A64" : this.Context.Platform.ToString(); |
90 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.WixUI, $"{id}_{platform}"); | 94 | |
95 | if (extendedPathValidation == YesNoType.No) | ||
96 | { | ||
97 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.WixUI, $"{id}_{platform}"); | ||
98 | } | ||
99 | else | ||
100 | { | ||
101 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.WixUI, $"{id}_ExtendedPathValidation_{platform}"); | ||
102 | } | ||
91 | 103 | ||
92 | if (installDirectory != null) | 104 | if (installDirectory != null) |
93 | { | 105 | { |
diff --git a/src/ext/UI/wixlib/BrowseDlg.wxs b/src/ext/UI/wixlib/BrowseDlg.wxs index dbb104fe..67b07864 100644 --- a/src/ext/UI/wixlib/BrowseDlg.wxs +++ b/src/ext/UI/wixlib/BrowseDlg.wxs | |||
@@ -6,10 +6,7 @@ | |||
6 | <UI> | 6 | <UI> |
7 | <Dialog Id="BrowseDlg" Width="370" Height="270" Title="!(loc.BrowseDlg_Title)"> | 7 | <Dialog Id="BrowseDlg" Width="370" Height="270" Title="!(loc.BrowseDlg_Title)"> |
8 | <Control Id="PathEdit" Type="PathEdit" X="25" Y="202" Width="320" Height="18" Property="_BrowseProperty" Indirect="yes" /> | 8 | <Control Id="PathEdit" Type="PathEdit" X="25" Y="202" Width="320" Height="18" Property="_BrowseProperty" Indirect="yes" /> |
9 | <Control Id="OK" Type="PushButton" X="240" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUIOK)"> | 9 | <Control Id="OK" Type="PushButton" X="240" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUIOK)" /> |
10 | <Publish Event="SetTargetPath" Value="[_BrowseProperty]" /> | ||
11 | <Publish Event="EndDialog" Value="Return" /> | ||
12 | </Control> | ||
13 | <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)"> | 10 | <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)"> |
14 | <Publish Event="Reset" Value="0" /> | 11 | <Publish Event="Reset" Value="0" /> |
15 | <Publish Event="EndDialog" Value="Return" /> | 12 | <Publish Event="EndDialog" Value="Return" /> |
diff --git a/src/ext/UI/wixlib/WixUI_Advanced.wxs b/src/ext/UI/wixlib/WixUI_Advanced.wxs index 2050dc24..35955a1a 100644 --- a/src/ext/UI/wixlib/WixUI_Advanced.wxs +++ b/src/ext/UI/wixlib/WixUI_Advanced.wxs | |||
@@ -23,8 +23,25 @@ Todo: | |||
23 | <?foreach WIXUIARCH in X86;X64;A64 ?> | 23 | <?foreach WIXUIARCH in X86;X64;A64 ?> |
24 | <Fragment> | 24 | <Fragment> |
25 | <UI Id="WixUI_Advanced_$(WIXUIARCH)"> | 25 | <UI Id="WixUI_Advanced_$(WIXUIARCH)"> |
26 | <Publish Dialog="BrowseDlg" Control="OK" Event="DoAction" Value="WixUIValidatePath_$(WIXUIARCH)" Order="1" Condition="NOT WIXUI_DONTVALIDATEPATH" /> | 26 | <Publish Dialog="BrowseDlg" Control="OK" Event="CheckTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1" /> |
27 | <Publish Dialog="InstallDirDlg" Control="Next" Event="DoAction" Value="WixUIValidatePath_$(WIXUIARCH)" Order="2" Condition="NOT WIXUI_DONTVALIDATEPATH" /> | 27 | |
28 | <Publish Dialog="InstallDirDlg" Control="Next" Event="CheckTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1" /> | ||
29 | <Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="FeaturesDlg" Order="4" /> | ||
30 | </UI> | ||
31 | |||
32 | <UIRef Id="WixUI_Advanced" /> | ||
33 | </Fragment> | ||
34 | <?endforeach?> | ||
35 | |||
36 | <?foreach WIXUIARCH in X86;X64;A64 ?> | ||
37 | <Fragment> | ||
38 | <UI Id="WixUI_Advanced_ExtendedPathValidation_$(WIXUIARCH)"> | ||
39 | <Publish Dialog="BrowseDlg" Control="OK" Event="DoAction" Value="WixUIValidatePath_$(WIXUIARCH)" Order="1" /> | ||
40 | <Publish Dialog="BrowseDlg" Control="OK" Event="SpawnDialog" Value="InvalidDirDlg" Order="2" Condition="WIXUI_INSTALLDIR_VALID<>"1"" /> | ||
41 | |||
42 | <Publish Dialog="InstallDirDlg" Control="Next" Event="DoAction" Value="WixUIValidatePath_$(WIXUIARCH)" Order="1" /> | ||
43 | <Publish Dialog="InstallDirDlg" Control="Next" Event="SpawnDialog" Value="InvalidDirDlg" Order="2" Condition="WIXUI_INSTALLDIR_VALID<>"1"" /> | ||
44 | <Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="FeaturesDlg" Order="4" Condition="WIXUI_INSTALLDIR_VALID="1"" /> | ||
28 | </UI> | 45 | </UI> |
29 | 46 | ||
30 | <UIRef Id="WixUI_Advanced" /> | 47 | <UIRef Id="WixUI_Advanced" /> |
@@ -76,7 +93,6 @@ Todo: | |||
76 | <DialogRef Id="WelcomeDlg" /> | 93 | <DialogRef Id="WelcomeDlg" /> |
77 | 94 | ||
78 | <Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999" /> | 95 | <Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999" /> |
79 | <Publish Dialog="BrowseDlg" Control="OK" Event="SpawnDialog" Value="InvalidDirDlg" Order="2" Condition="WIXUI_INSTALLDIR_VALID<>"1"" /> | ||
80 | 96 | ||
81 | <Publish Dialog="AdvancedWelcomeEulaDlg" Control="Advanced" Event="NewDialog" Value="InstallScopeDlg" Order="1" Condition="!(wix.WixUISupportPerMachine) AND !(wix.WixUISupportPerUser)" /> | 97 | <Publish Dialog="AdvancedWelcomeEulaDlg" Control="Advanced" Event="NewDialog" Value="InstallScopeDlg" Order="1" Condition="!(wix.WixUISupportPerMachine) AND !(wix.WixUISupportPerUser)" /> |
82 | <Publish Dialog="AdvancedWelcomeEulaDlg" Control="Advanced" Event="NewDialog" Value="FeaturesDlg" Order="2" Condition="NOT !(wix.WixUISupportPerMachine)" /> | 98 | <Publish Dialog="AdvancedWelcomeEulaDlg" Control="Advanced" Event="NewDialog" Value="FeaturesDlg" Order="2" Condition="NOT !(wix.WixUISupportPerMachine)" /> |
@@ -94,12 +110,13 @@ Todo: | |||
94 | 110 | ||
95 | <Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="InstallScopeDlg" Condition="!(wix.WixUISupportPerUser)" /> | 111 | <Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="InstallScopeDlg" Condition="!(wix.WixUISupportPerUser)" /> |
96 | <Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="AdvancedWelcomeEulaDlg" Condition="NOT !(wix.WixUISupportPerUser)" /> | 112 | <Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="AdvancedWelcomeEulaDlg" Condition="NOT !(wix.WixUISupportPerUser)" /> |
97 | <Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1" /> | 113 | <Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="3" /> |
98 | <Publish Dialog="InstallDirDlg" Control="Next" Event="SpawnDialog" Value="InvalidDirDlg" Order="3" Condition="NOT WIXUI_DONTVALIDATEPATH AND WIXUI_INSTALLDIR_VALID<>"1"" /> | ||
99 | <Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="FeaturesDlg" Order="4" Condition="WIXUI_DONTVALIDATEPATH OR WIXUI_INSTALLDIR_VALID="1"" /> | ||
100 | <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1" /> | 114 | <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1" /> |
101 | <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2" /> | 115 | <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2" /> |
102 | 116 | ||
117 | <Publish Dialog="BrowseDlg" Control="OK" Event="SetTargetPath" Value="[_BrowseProperty]" Order="3" /> | ||
118 | <Publish Dialog="BrowseDlg" Control="OK" Event="EndDialog" Value="Return" Order="4" /> | ||
119 | |||
103 | <Publish Dialog="FeaturesDlg" Control="Back" Event="NewDialog" Value="InstallScopeDlg" Condition="NOT Installed AND WixAppFolder = "WixPerUserFolder"" /> | 120 | <Publish Dialog="FeaturesDlg" Control="Back" Event="NewDialog" Value="InstallScopeDlg" Condition="NOT Installed AND WixAppFolder = "WixPerUserFolder"" /> |
104 | <Publish Dialog="FeaturesDlg" Control="Back" Event="NewDialog" Value="InstallDirDlg" Condition="NOT Installed AND WixAppFolder = "WixPerMachineFolder"" /> | 121 | <Publish Dialog="FeaturesDlg" Control="Back" Event="NewDialog" Value="InstallDirDlg" Condition="NOT Installed AND WixAppFolder = "WixPerMachineFolder"" /> |
105 | <Publish Dialog="FeaturesDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Condition="Installed" /> | 122 | <Publish Dialog="FeaturesDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Condition="Installed" /> |
diff --git a/src/ext/UI/wixlib/WixUI_InstallDir.wxs b/src/ext/UI/wixlib/WixUI_InstallDir.wxs index bbe806bd..3bbe320f 100644 --- a/src/ext/UI/wixlib/WixUI_InstallDir.wxs +++ b/src/ext/UI/wixlib/WixUI_InstallDir.wxs | |||
@@ -24,8 +24,25 @@ Patch dialog sequence: | |||
24 | <?foreach WIXUIARCH in X86;X64;A64 ?> | 24 | <?foreach WIXUIARCH in X86;X64;A64 ?> |
25 | <Fragment> | 25 | <Fragment> |
26 | <UI Id="WixUI_InstallDir_$(WIXUIARCH)"> | 26 | <UI Id="WixUI_InstallDir_$(WIXUIARCH)"> |
27 | <Publish Dialog="BrowseDlg" Control="OK" Event="DoAction" Value="WixUIValidatePath_$(WIXUIARCH)" Order="3" Condition="NOT WIXUI_DONTVALIDATEPATH" /> | 27 | <Publish Dialog="BrowseDlg" Control="OK" Event="CheckTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1" /> |
28 | <Publish Dialog="InstallDirDlg" Control="Next" Event="DoAction" Value="WixUIValidatePath_$(WIXUIARCH)" Order="2" Condition="NOT WIXUI_DONTVALIDATEPATH" /> | 28 | |
29 | <Publish Dialog="InstallDirDlg" Control="Next" Event="CheckTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1" /> | ||
30 | <Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="4" /> | ||
31 | </UI> | ||
32 | |||
33 | <UIRef Id="WixUI_InstallDir" /> | ||
34 | </Fragment> | ||
35 | <?endforeach?> | ||
36 | |||
37 | <?foreach WIXUIARCH in X86;X64;A64 ?> | ||
38 | <Fragment> | ||
39 | <UI Id="WixUI_InstallDir_ExtendedPathValidation_$(WIXUIARCH)"> | ||
40 | <Publish Dialog="BrowseDlg" Control="OK" Event="DoAction" Value="WixUIValidatePath_$(WIXUIARCH)" Order="1" /> | ||
41 | <Publish Dialog="BrowseDlg" Control="OK" Event="SpawnDialog" Value="InvalidDirDlg" Order="2" Condition="WIXUI_INSTALLDIR_VALID<>"1"" /> | ||
42 | |||
43 | <Publish Dialog="InstallDirDlg" Control="Next" Event="DoAction" Value="WixUIValidatePath_$(WIXUIARCH)" Order="1" /> | ||
44 | <Publish Dialog="InstallDirDlg" Control="Next" Event="SpawnDialog" Value="InvalidDirDlg" Order="2" Condition="WIXUI_INSTALLDIR_VALID<>"1"" /> | ||
45 | <Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="4" Condition="WIXUI_INSTALLDIR_VALID="1"" /> | ||
29 | </UI> | 46 | </UI> |
30 | 47 | ||
31 | <UIRef Id="WixUI_InstallDir" /> | 48 | <UIRef Id="WixUI_InstallDir" /> |
@@ -50,7 +67,6 @@ Patch dialog sequence: | |||
50 | <DialogRef Id="ProgressDlg" /> | 67 | <DialogRef Id="ProgressDlg" /> |
51 | <DialogRef Id="ResumeDlg" /> | 68 | <DialogRef Id="ResumeDlg" /> |
52 | <DialogRef Id="UserExit" /> | 69 | <DialogRef Id="UserExit" /> |
53 | <Publish Dialog="BrowseDlg" Control="OK" Event="SpawnDialog" Value="InvalidDirDlg" Order="4" Condition="NOT WIXUI_DONTVALIDATEPATH AND WIXUI_INSTALLDIR_VALID<>"1"" /> | ||
54 | 70 | ||
55 | <Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999" /> | 71 | <Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999" /> |
56 | 72 | ||
@@ -61,11 +77,13 @@ Patch dialog sequence: | |||
61 | <Publish Dialog="LicenseAgreementDlg" Control="Next" Event="NewDialog" Value="InstallDirDlg" Condition="LicenseAccepted = "1"" /> | 77 | <Publish Dialog="LicenseAgreementDlg" Control="Next" Event="NewDialog" Value="InstallDirDlg" Condition="LicenseAccepted = "1"" /> |
62 | 78 | ||
63 | <Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementDlg" /> | 79 | <Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementDlg" /> |
64 | <Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1" /> | 80 | <Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="3" /> |
65 | <Publish Dialog="InstallDirDlg" Control="Next" Event="SpawnDialog" Value="InvalidDirDlg" Order="3" Condition="NOT WIXUI_DONTVALIDATEPATH AND WIXUI_INSTALLDIR_VALID<>"1"" /> | ||
66 | <Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="4" Condition="WIXUI_DONTVALIDATEPATH OR WIXUI_INSTALLDIR_VALID="1"" /> | ||
67 | <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1" /> | 81 | <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1" /> |
68 | <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2" /> | 82 | <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2" /> |
83 | |||
84 | <Publish Dialog="BrowseDlg" Control="OK" Event="SetTargetPath" Value="[_BrowseProperty]" Order="3" /> | ||
85 | <Publish Dialog="BrowseDlg" Control="OK" Event="EndDialog" Value="Return" Order="4" /> | ||
86 | |||
69 | <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="InstallDirDlg" Order="1" Condition="NOT Installed" /> | 87 | <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="InstallDirDlg" Order="1" Condition="NOT Installed" /> |
70 | <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2" Condition="Installed AND NOT PATCH" /> | 88 | <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2" Condition="Installed AND NOT PATCH" /> |
71 | <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="2" Condition="Installed AND PATCH" /> | 89 | <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="2" Condition="Installed AND PATCH" /> |
diff --git a/src/ext/UI/wixlib/WixUI_Mondo.wxs b/src/ext/UI/wixlib/WixUI_Mondo.wxs index 4dd1148d..f0cb67f2 100644 --- a/src/ext/UI/wixlib/WixUI_Mondo.wxs +++ b/src/ext/UI/wixlib/WixUI_Mondo.wxs | |||
@@ -25,7 +25,18 @@ Patch dialog sequence: | |||
25 | <?foreach WIXUIARCH in X86;X64;A64 ?> | 25 | <?foreach WIXUIARCH in X86;X64;A64 ?> |
26 | <Fragment> | 26 | <Fragment> |
27 | <UI Id="WixUI_Mondo_$(WIXUIARCH)"> | 27 | <UI Id="WixUI_Mondo_$(WIXUIARCH)"> |
28 | <Publish Dialog="BrowseDlg" Control="OK" Event="DoAction" Value="WixUIValidatePath_$(WIXUIARCH)" Order="3" Condition="NOT WIXUI_DONTVALIDATEPATH" /> | 28 | <Publish Dialog="BrowseDlg" Control="OK" Event="CheckTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1" /> |
29 | </UI> | ||
30 | |||
31 | <UIRef Id="WixUI_Mondo" /> | ||
32 | </Fragment> | ||
33 | <?endforeach?> | ||
34 | |||
35 | <?foreach WIXUIARCH in X86;X64;A64 ?> | ||
36 | <Fragment> | ||
37 | <UI Id="WixUI_Mondo_ExtendedPathValidation_$(WIXUIARCH)"> | ||
38 | <Publish Dialog="BrowseDlg" Control="OK" Event="DoAction" Value="WixUIValidatePath_$(WIXUIARCH)" Order="1" /> | ||
39 | <Publish Dialog="BrowseDlg" Control="OK" Event="SpawnDialog" Value="InvalidDirDlg" Order="2" Condition="WIXUI_INSTALLDIR_VALID<>"1"" /> | ||
29 | </UI> | 40 | </UI> |
30 | 41 | ||
31 | <UIRef Id="WixUI_Mondo" /> | 42 | <UIRef Id="WixUI_Mondo" /> |
@@ -66,6 +77,9 @@ Patch dialog sequence: | |||
66 | <Publish Dialog="CustomizeDlg" Control="Back" Event="NewDialog" Value="SetupTypeDlg" Order="2" Condition="WixUI_InstallMode = "InstallCustom"" /> | 77 | <Publish Dialog="CustomizeDlg" Control="Back" Event="NewDialog" Value="SetupTypeDlg" Order="2" Condition="WixUI_InstallMode = "InstallCustom"" /> |
67 | <Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" /> | 78 | <Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" /> |
68 | 79 | ||
80 | <Publish Dialog="BrowseDlg" Control="OK" Event="SetTargetPath" Value="[_BrowseProperty]" Order="3" /> | ||
81 | <Publish Dialog="BrowseDlg" Control="OK" Event="EndDialog" Value="Return" Order="4" /> | ||
82 | |||
69 | <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="CustomizeDlg" Order="1" Condition="WixUI_InstallMode = "InstallCustom"" /> | 83 | <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="CustomizeDlg" Order="1" Condition="WixUI_InstallMode = "InstallCustom"" /> |
70 | <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="SetupTypeDlg" Order="2" Condition="WixUI_InstallMode = "InstallTypical" OR WixUI_InstallMode = "InstallComplete"" /> | 84 | <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="SetupTypeDlg" Order="2" Condition="WixUI_InstallMode = "InstallTypical" OR WixUI_InstallMode = "InstallComplete"" /> |
71 | <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="CustomizeDlg" Order="3" Condition="WixUI_InstallMode = "Change"" /> | 85 | <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="CustomizeDlg" Order="3" Condition="WixUI_InstallMode = "Change"" /> |