aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.cpp59
-rw-r--r--src/test/burn/TestData/Manual/BundleA/BundleA.wixproj2
-rw-r--r--src/test/burn/TestData/Manual/BundleA/BundleA.wxs3
-rw-r--r--src/test/burn/TestData/Manual/BundleA/CustomHyperlinkTheme.xml107
4 files changed, 161 insertions, 10 deletions
diff --git a/src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.cpp b/src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.cpp
index 8b49cab6..b35b4e02 100644
--- a/src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.cpp
+++ b/src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.cpp
@@ -6,6 +6,11 @@
6 6
7static const LPCWSTR BAFTHMUTILTESTING_WINDOW_CLASS = L"BafThmUtilTesting"; 7static const LPCWSTR BAFTHMUTILTESTING_WINDOW_CLASS = L"BafThmUtilTesting";
8 8
9enum BAF_CONTROL
10{
11 BAF_CONTROL_INSTALL_TEST_BUTTON = BAFUNCTIONS_FIRST_ASSIGN_CONTROL_ID,
12};
13
9enum BAFTHMUTILTESTING_CONTROL 14enum BAFTHMUTILTESTING_CONTROL
10{ 15{
11 BAFTHMUTILTESTING_CONTROL_LISTVIEW_TOP_LEFT = THEME_FIRST_ASSIGN_CONTROL_ID, 16 BAFTHMUTILTESTING_CONTROL_LISTVIEW_TOP_LEFT = THEME_FIRST_ASSIGN_CONTROL_ID,
@@ -59,24 +64,41 @@ public: // IBAFunctions
59 __inout LRESULT* plRes 64 __inout LRESULT* plRes
60 ) 65 )
61 { 66 {
62 HRESULT hr = S_OK;
63
64 __super::WndProc(pTheme, hWnd, uMsg, wParam, lParam, plRes);
65
66 // Show our window when any button is clicked.
67 switch (uMsg) 67 switch (uMsg)
68 { 68 {
69 case WM_COMMAND: 69 case WM_COMMAND:
70 switch (HIWORD(wParam)) 70 switch (HIWORD(wParam))
71 { 71 {
72 case BN_CLICKED: 72 case BN_CLICKED:
73 OnShowTheme(); 73 switch (LOWORD(wParam))
74 {
75 case BAF_CONTROL_INSTALL_TEST_BUTTON:
76 OnShowTheme();
77 *plRes = 0;
78 return S_OK;
79 }
80
74 break; 81 break;
75 } 82 }
76 break; 83 break;
77 } 84 }
78 85
79 return hr; 86 return __super::WndProc(pTheme, hWnd, uMsg, wParam, lParam, plRes);
87 }
88
89 virtual STDMETHODIMP OnThemeControlLoading(
90 __in LPCWSTR wzName,
91 __inout BOOL* pfProcessed,
92 __inout WORD* pwId
93 )
94 {
95 if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, wzName, -1, L"InstallTestButton", -1))
96 {
97 *pfProcessed = TRUE;
98 *pwId = BAF_CONTROL_INSTALL_TEST_BUTTON;
99 }
100
101 return S_OK;
80 } 102 }
81 103
82private: 104private:
@@ -229,6 +251,9 @@ private:
229 } 251 }
230 break; 252 break;
231 253
254 case WM_THMUTIL_LOADING_CONTROL:
255 return pBaf->OnThemeLoadingControl(reinterpret_cast<THEME_LOADINGCONTROL_ARGS*>(wParam), reinterpret_cast<THEME_LOADINGCONTROL_RESULTS*>(lParam));
256
232 case WM_TIMER: 257 case WM_TIMER:
233 if (!lParam && pBaf) 258 if (!lParam && pBaf)
234 { 259 {
@@ -255,7 +280,7 @@ private:
255 HWND hwndBottomLeft = NULL; 280 HWND hwndBottomLeft = NULL;
256 HWND hwndBottomRight = NULL; 281 HWND hwndBottomRight = NULL;
257 282
258 hr = ThemeLoadControls(m_pBafTheme, vrgInitControls, countof(vrgInitControls)); 283 hr = ThemeLoadControls(m_pBafTheme);
259 BalExitOnFailure(hr, "Failed to load theme controls."); 284 BalExitOnFailure(hr, "Failed to load theme controls.");
260 285
261 hwndTopLeft = ::GetDlgItem(m_pBafTheme->hwndParent, BAFTHMUTILTESTING_CONTROL_LISTVIEW_TOP_LEFT); 286 hwndTopLeft = ::GetDlgItem(m_pBafTheme->hwndParent, BAFTHMUTILTESTING_CONTROL_LISTVIEW_TOP_LEFT);
@@ -333,6 +358,24 @@ private:
333 return SUCCEEDED(hr); 358 return SUCCEEDED(hr);
334 } 359 }
335 360
361 BOOL OnThemeLoadingControl(
362 __in const THEME_LOADINGCONTROL_ARGS* pArgs,
363 __in THEME_LOADINGCONTROL_RESULTS* pResults
364 )
365 {
366 for (DWORD iAssignControl = 0; iAssignControl < countof(vrgInitControls); ++iAssignControl)
367 {
368 if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, pArgs->pThemeControl->sczName, -1, vrgInitControls[iAssignControl].wzName, -1))
369 {
370 pResults->wId = vrgInitControls[iAssignControl].wId;
371 break;
372 }
373 }
374
375 pResults->hr = S_OK;
376 return TRUE;
377 }
378
336 void UpdateProgressBarProgress() 379 void UpdateProgressBarProgress()
337 { 380 {
338 static DWORD dwProgress = 0; 381 static DWORD dwProgress = 0;
diff --git a/src/test/burn/TestData/Manual/BundleA/BundleA.wixproj b/src/test/burn/TestData/Manual/BundleA/BundleA.wixproj
index dcfd3b7e..907b85c9 100644
--- a/src/test/burn/TestData/Manual/BundleA/BundleA.wixproj
+++ b/src/test/burn/TestData/Manual/BundleA/BundleA.wixproj
@@ -2,7 +2,7 @@
2<Project Sdk="WixToolset.Sdk"> 2<Project Sdk="WixToolset.Sdk">
3 <PropertyGroup> 3 <PropertyGroup>
4 <OutputType>Bundle</OutputType> 4 <OutputType>Bundle</OutputType>
5 <BA>hyperlinkLicense</BA> 5 <BA>customHyperlinkLicense</BA>
6 <UpgradeCode>{98ACBCF6-B54A-46AF-8990-DFB8795B965B}</UpgradeCode> 6 <UpgradeCode>{98ACBCF6-B54A-46AF-8990-DFB8795B965B}</UpgradeCode>
7 </PropertyGroup> 7 </PropertyGroup>
8 <ItemGroup> 8 <ItemGroup>
diff --git a/src/test/burn/TestData/Manual/BundleA/BundleA.wxs b/src/test/burn/TestData/Manual/BundleA/BundleA.wxs
index 1706f4e8..20706b6a 100644
--- a/src/test/burn/TestData/Manual/BundleA/BundleA.wxs
+++ b/src/test/burn/TestData/Manual/BundleA/BundleA.wxs
@@ -3,7 +3,8 @@
3 3
4<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> 4<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal">
5 <Fragment> 5 <Fragment>
6 <BootstrapperApplication> 6 <BootstrapperApplication Id="customHyperlinkLicense">
7 <bal:WixStandardBootstrapperApplication LicenseUrl="" Theme="hyperlinkLicense" ThemeFile="CustomHyperlinkTheme.xml" />
7 <Payload SourceFile="$(var.BafThmUtilTesting.TargetPath)" bal:BAFunctions="yes" /> 8 <Payload SourceFile="$(var.BafThmUtilTesting.TargetPath)" bal:BAFunctions="yes" />
8 </BootstrapperApplication> 9 </BootstrapperApplication>
9 <PackageGroup Id="BundlePackages"> 10 <PackageGroup Id="BundlePackages">
diff --git a/src/test/burn/TestData/Manual/BundleA/CustomHyperlinkTheme.xml b/src/test/burn/TestData/Manual/BundleA/CustomHyperlinkTheme.xml
new file mode 100644
index 00000000..b8157193
--- /dev/null
+++ b/src/test/burn/TestData/Manual/BundleA/CustomHyperlinkTheme.xml
@@ -0,0 +1,107 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
4
5<Theme xmlns="http://wixtoolset.org/schemas/v4/thmutil">
6 <Font Id="0" Height="-12" Weight="500" Foreground="windowtext" Background="window">Segoe UI</Font>
7 <Font Id="1" Height="-24" Weight="500" Foreground="windowtext">Segoe UI</Font>
8 <Font Id="2" Height="-22" Weight="500" Foreground="graytext">Segoe UI</Font>
9 <Font Id="3" Height="-12" Weight="500" Foreground="windowtext" Background="window">Segoe UI</Font>
10
11 <Window Width="485" Height="300" HexStyle="100a0000" FontId="0" Caption="#(loc.Caption)">
12 <ImageControl X="11" Y="11" Width="64" Height="64" ImageFile="logo.png" Visible="yes"/>
13 <Label X="80" Y="11" Width="-11" Height="64" FontId="1" Visible="yes" DisablePrefix="yes">#(loc.Title)</Label>
14
15 <Page Name="Help">
16 <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.HelpHeader)</Label>
17 <Label X="11" Y="112" Width="-11" Height="-35" FontId="3" DisablePrefix="yes">#(loc.HelpText)</Label>
18 <Button Name="HelpCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
19 <Text>#(loc.HelpCloseButton)</Text>
20 <CloseWindowAction />
21 </Button>
22 </Page>
23 <Page Name="Install">
24 <Hypertext Name="EulaHyperlink" X="11" Y="121" Width="-11" Height="51" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.InstallLicenseLinkText)</Hypertext>
25 <Checkbox Name="EulaAcceptCheckbox" X="-11" Y="-41" Width="260" Height="17" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.InstallAcceptCheckbox)</Checkbox>
26 <Button Name="InstallTestButton" X="-251" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">Test</Button>
27 <Button Name="OptionsButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" VisibleCondition="NOT WixStdBASuppressOptionsUI">
28 <Text>#(loc.InstallOptionsButton)</Text>
29 <ChangePageAction Page="Options" />
30 </Button>
31 <Button Name="InstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.InstallInstallButton)</Button>
32 <Button Name="InstallCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
33 <Text>#(loc.InstallCancelButton)</Text>
34 <CloseWindowAction />
35 </Button>
36 </Page>
37 <Page Name="Options">
38 <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.OptionsHeader)</Label>
39 <Label X="11" Y="121" Width="-11" Height="17" FontId="3" DisablePrefix="yes">#(loc.OptionsLocationLabel)</Label>
40 <Editbox Name="InstallFolder" X="11" Y="143" Width="-91" Height="21" TabStop="yes" FontId="3" FileSystemAutoComplete="yes" />
41 <Button Name="BrowseButton" X="-11" Y="142" Width="75" Height="23" TabStop="yes" FontId="3">
42 <Text>#(loc.OptionsBrowseButton)</Text>
43 <BrowseDirectoryAction VariableName="InstallFolder" />
44 </Button>
45 <Button Name="OptionsOkButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
46 <Text>#(loc.OptionsOkButton)</Text>
47 <ChangePageAction Page="Install" />
48 </Button>
49 <Button Name="OptionsCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
50 <Text>#(loc.OptionsCancelButton)</Text>
51 <ChangePageAction Page="Install" Cancel="yes" />
52 </Button>
53 </Page>
54 <Page Name="Progress">
55 <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ProgressHeader)</Label>
56 <Label X="11" Y="121" Width="70" Height="17" FontId="3" DisablePrefix="yes">#(loc.ProgressLabel)</Label>
57 <Label Name="OverallProgressPackageText" X="85" Y="121" Width="-11" Height="17" FontId="3" DisablePrefix="yes">#(loc.OverallProgressPackageText)</Label>
58 <Progressbar Name="OverallCalculatedProgressbar" X="11" Y="143" Width="-11" Height="15" />
59 <Button Name="ProgressCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ProgressCancelButton)</Button>
60 </Page>
61 <Page Name="Modify">
62 <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ModifyHeader)</Label>
63 <Button Name="RepairButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.ModifyRepairButton)</Button>
64 <Button Name="UninstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ModifyUninstallButton)</Button>
65 <Button Name="ModifyCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
66 <Text>#(loc.ModifyCancelButton)</Text>
67 <CloseWindowAction />
68 </Button>
69 </Page>
70 <Page Name="Success">
71 <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">
72 <Text>#(loc.SuccessHeader)</Text>
73 <Text Condition="WixBundleAction = 2">#(loc.SuccessLayoutHeader)</Text>
74 <Text Condition="WixBundleAction = 3">#(loc.SuccessUninstallHeader)</Text>
75 <Text Condition="WixBundleAction = 5">#(loc.SuccessInstallHeader)</Text>
76 <Text Condition="WixBundleAction = 7">#(loc.SuccessRepairHeader)</Text>
77 </Label>
78 <Button Name="LaunchButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessLaunchButton)</Button>
79 <Label X="-11" Y="-51" Width="400" Height="34" FontId="3" DisablePrefix="yes" VisibleCondition="WixStdBARestartRequired">
80 <Text>#(loc.SuccessRestartText)</Text>
81 <Text Condition="WixBundleAction = 3">#(loc.SuccessUninstallRestartText)</Text>
82 </Label>
83 <Button Name="SuccessRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessRestartButton)</Button>
84 <Button Name="SuccessCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
85 <Text>#(loc.SuccessCloseButton)</Text>
86 <CloseWindowAction />
87 </Button>
88 </Page>
89 <Page Name="Failure">
90 <Label X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">
91 <Text>#(loc.FailureHeader)</Text>
92 <Text Condition="WixBundleAction = 2">#(loc.FailureLayoutHeader)</Text>
93 <Text Condition="WixBundleAction = 3">#(loc.FailureUninstallHeader)</Text>
94 <Text Condition="WixBundleAction = 5">#(loc.FailureInstallHeader)</Text>
95 <Text Condition="WixBundleAction = 7">#(loc.FailureRepairHeader)</Text>
96 </Label>
97 <Hypertext Name="FailureLogFileLink" X="11" Y="121" Width="-11" Height="42" FontId="3" TabStop="yes" HideWhenDisabled="yes">#(loc.FailureHyperlinkLogText)</Hypertext>
98 <Hypertext Name="FailureMessageText" X="22" Y="163" Width="-11" Height="51" FontId="3" TabStop="yes" HideWhenDisabled="yes" />
99 <Label X="-11" Y="-51" Width="400" Height="34" FontId="3" DisablePrefix="yes" VisibleCondition="WixStdBARestartRequired">#(loc.FailureRestartText)</Label>
100 <Button Name="FailureRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.FailureRestartButton)</Button>
101 <Button Name="FailureCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">
102 <Text>#(loc.FailureCloseButton)</Text>
103 <CloseWindowAction />
104 </Button>
105 </Page>
106 </Window>
107</Theme>