summaryrefslogtreecommitdiff
path: root/src/test/burn/TestData/Manual
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2024-01-11 18:26:20 -0800
committerRob Mensching <rob@firegiant.com>2024-03-06 18:03:38 -0800
commit0d3d54992104288e9ee0c834d0b96e8502fd2d42 (patch)
tree9efa49c4983cd2ba1becab64bd1f2faccac88acf /src/test/burn/TestData/Manual
parent2824298d9dd817a47527c920363556b54ead5d5d (diff)
downloadwix-0d3d54992104288e9ee0c834d0b96e8502fd2d42.tar.gz
wix-0d3d54992104288e9ee0c834d0b96e8502fd2d42.tar.bz2
wix-0d3d54992104288e9ee0c834d0b96e8502fd2d42.zip
Move the BootstrapperApplication out of proc
Diffstat (limited to 'src/test/burn/TestData/Manual')
-rw-r--r--src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.cpp36
-rw-r--r--src/test/burn/TestData/Manual/BundleB/Bundle.wxs5
-rw-r--r--src/test/burn/TestData/Manual/BundleB/BundleB.wixproj7
-rw-r--r--src/test/burn/TestData/Manual/BundleB/BundleB.wxs4
-rw-r--r--src/test/burn/TestData/Manual/PackageA/PackageA.wixproj2
5 files changed, 35 insertions, 19 deletions
diff --git a/src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.cpp b/src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.cpp
index a2b8e041..29a5d7d5 100644
--- a/src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.cpp
+++ b/src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.cpp
@@ -44,6 +44,16 @@ static void CALLBACK BafThmUtilTestingTraceError(
44class CBafThmUtilTesting : public CBalBaseBAFunctions 44class CBafThmUtilTesting : public CBalBaseBAFunctions
45{ 45{
46public: // IBAFunctions 46public: // IBAFunctions
47 virtual STDMETHODIMP OnCreate(
48 __in IBootstrapperEngine* pEngine,
49 __in BOOTSTRAPPER_COMMAND* pCommand
50 )
51 {
52 m_commandDisplay = pCommand->display;
53
54 return __super::OnCreate(pEngine, pCommand);
55 }
56
47 virtual STDMETHODIMP OnThemeControlLoading( 57 virtual STDMETHODIMP OnThemeControlLoading(
48 __in LPCWSTR wzName, 58 __in LPCWSTR wzName,
49 __inout BOOL* pfProcessed, 59 __inout BOOL* pfProcessed,
@@ -95,7 +105,7 @@ public: //IBootstrapperApplication
95 __inout BOOL* pfCancel 105 __inout BOOL* pfCancel
96 ) 106 )
97 { 107 {
98 if (BOOTSTRAPPER_DISPLAY_FULL <= m_command.display) 108 if (BOOTSTRAPPER_DISPLAY_FULL <= m_commandDisplay)
99 { 109 {
100 if (IDCANCEL == ::MessageBoxW(m_hwndParent, L"Shutdown requests should be denied right now.", L"OnExecuteBegin", MB_OKCANCEL)) 110 if (IDCANCEL == ::MessageBoxW(m_hwndParent, L"Shutdown requests should be denied right now.", L"OnExecuteBegin", MB_OKCANCEL))
101 { 111 {
@@ -184,7 +194,7 @@ private:
184 } 194 }
185 195
186 hr = ThemeCreateParentWindow(m_pBafTheme, 0, wc.lpszClassName, m_pBafTheme->sczCaption, m_pBafTheme->dwStyle, x, y, m_hwndParent, m_hModule, this, THEME_WINDOW_INITIAL_POSITION_CENTER_MONITOR_FROM_COORDINATES, &m_hWndBaf); 196 hr = ThemeCreateParentWindow(m_pBafTheme, 0, wc.lpszClassName, m_pBafTheme->sczCaption, m_pBafTheme->dwStyle, x, y, m_hwndParent, m_hModule, this, THEME_WINDOW_INITIAL_POSITION_CENTER_MONITOR_FROM_COORDINATES, &m_hWndBaf);
187 ExitOnFailure(hr, "Failed to create window."); 197 ExitOnFailure(hr, "Failed to create baf testing window.");
188 198
189 hr = S_OK; 199 hr = S_OK;
190 200
@@ -330,7 +340,7 @@ private:
330 { 340 {
331 HRESULT hr = S_OK; 341 HRESULT hr = S_OK;
332 BOOL fProcessed = FALSE; 342 BOOL fProcessed = FALSE;
333 343
334 for (DWORD iAssignControl = 0; iAssignControl < countof(vrgInitControls); ++iAssignControl) 344 for (DWORD iAssignControl = 0; iAssignControl < countof(vrgInitControls); ++iAssignControl)
335 { 345 {
336 if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, pArgs->pThemeControl->sczName, -1, vrgInitControls[iAssignControl].wzName, -1)) 346 if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, pArgs->pThemeControl->sczName, -1, vrgInitControls[iAssignControl].wzName, -1))
@@ -371,7 +381,7 @@ private:
371 } 381 }
372 382
373 break; 383 break;
374 384
375 case BAFTHMUTILTESTING_CONTROL_PROGRESSBAR_STANDARD: 385 case BAFTHMUTILTESTING_CONTROL_PROGRESSBAR_STANDARD:
376 fProcessed = TRUE; 386 fProcessed = TRUE;
377 387
@@ -410,11 +420,10 @@ public:
410 // Constructor - initialize member variables. 420 // Constructor - initialize member variables.
411 // 421 //
412 CBafThmUtilTesting( 422 CBafThmUtilTesting(
413 __in HMODULE hModule, 423 __in HMODULE hModule
414 __in IBootstrapperEngine* pEngine, 424 ) : CBalBaseBAFunctions(hModule)
415 __in const BA_FUNCTIONS_CREATE_ARGS* pArgs
416 ) : CBalBaseBAFunctions(hModule, pEngine, pArgs)
417 { 425 {
426 m_commandDisplay = BOOTSTRAPPER_DISPLAY_UNKNOWN;
418 m_pBafTheme = NULL; 427 m_pBafTheme = NULL;
419 m_fRegistered = FALSE; 428 m_fRegistered = FALSE;
420 m_hWndBaf = NULL; 429 m_hWndBaf = NULL;
@@ -434,12 +443,12 @@ public:
434 } 443 }
435 444
436private: 445private:
446 BOOTSTRAPPER_DISPLAY m_commandDisplay;
437 THEME* m_pBafTheme; 447 THEME* m_pBafTheme;
438 BOOL m_fRegistered; 448 BOOL m_fRegistered;
439 HWND m_hWndBaf; 449 HWND m_hWndBaf;
440}; 450};
441 451
442
443HRESULT WINAPI CreateBAFunctions( 452HRESULT WINAPI CreateBAFunctions(
444 __in HMODULE hModule, 453 __in HMODULE hModule,
445 __in const BA_FUNCTIONS_CREATE_ARGS* pArgs, 454 __in const BA_FUNCTIONS_CREATE_ARGS* pArgs,
@@ -448,16 +457,20 @@ HRESULT WINAPI CreateBAFunctions(
448{ 457{
449 HRESULT hr = S_OK; 458 HRESULT hr = S_OK;
450 CBafThmUtilTesting* pBAFunctions = NULL; 459 CBafThmUtilTesting* pBAFunctions = NULL;
451 IBootstrapperEngine* pEngine = NULL;
452 460
453 DutilInitialize(&BafThmUtilTestingTraceError); 461 DutilInitialize(&BafThmUtilTestingTraceError);
454 462
463#if TODO_REWRITE
455 hr = BalInitializeFromCreateArgs(pArgs->pBootstrapperCreateArgs, &pEngine); 464 hr = BalInitializeFromCreateArgs(pArgs->pBootstrapperCreateArgs, &pEngine);
456 ExitOnFailure(hr, "Failed to initialize Bal."); 465 ExitOnFailure(hr, "Failed to initialize Bal.");
466#endif
457 467
458 pBAFunctions = new CBafThmUtilTesting(hModule, pEngine, pArgs); 468 pBAFunctions = new CBafThmUtilTesting(hModule);
459 ExitOnNull(pBAFunctions, hr, E_OUTOFMEMORY, "Failed to create new CBafThmUtilTesting object."); 469 ExitOnNull(pBAFunctions, hr, E_OUTOFMEMORY, "Failed to create new CBafThmUtilTesting object.");
460 470
471 hr = pBAFunctions->OnCreate(pArgs->pEngine, pArgs->pCommand);
472 ExitOnFailure(hr, "Failed to call OnCreate CPrereqBaf.");
473
461 pResults->pfnBAFunctionsProc = BalBaseBAFunctionsProc; 474 pResults->pfnBAFunctionsProc = BalBaseBAFunctionsProc;
462 pResults->pvBAFunctionsProcContext = pBAFunctions; 475 pResults->pvBAFunctionsProcContext = pBAFunctions;
463 pBAFunctions = NULL; 476 pBAFunctions = NULL;
@@ -466,7 +479,6 @@ HRESULT WINAPI CreateBAFunctions(
466 479
467LExit: 480LExit:
468 ReleaseObject(pBAFunctions); 481 ReleaseObject(pBAFunctions);
469 ReleaseObject(pEngine);
470 482
471 return hr; 483 return hr;
472} 484}
diff --git a/src/test/burn/TestData/Manual/BundleB/Bundle.wxs b/src/test/burn/TestData/Manual/BundleB/Bundle.wxs
index 615d4b1d..eea96895 100644
--- a/src/test/burn/TestData/Manual/BundleB/Bundle.wxs
+++ b/src/test/burn/TestData/Manual/BundleB/Bundle.wxs
@@ -30,9 +30,12 @@
30 <?elseif $(var.BA) = "hyperlinkLicense"?> 30 <?elseif $(var.BA) = "hyperlinkLicense"?>
31 <BootstrapperApplication> 31 <BootstrapperApplication>
32 <bal:WixStandardBootstrapperApplication LicenseUrl="" Theme="hyperlinkLicense" /> 32 <bal:WixStandardBootstrapperApplication LicenseUrl="" Theme="hyperlinkLicense" />
33 <PayloadGroupRef Id="BAPayloads" />
33 </BootstrapperApplication> 34 </BootstrapperApplication>
34 <?else?> 35 <?else?>
35 <BootstrapperApplicationRef Id="$(var.BA)" /> 36 <BootstrapperApplicationRef Id="$(var.BA)">
37 <PayloadGroupRef Id="BAPayloads" />
38 </BootstrapperApplicationRef>
36 <?endif?> 39 <?endif?>
37 40
38 <Chain> 41 <Chain>
diff --git a/src/test/burn/TestData/Manual/BundleB/BundleB.wixproj b/src/test/burn/TestData/Manual/BundleB/BundleB.wixproj
index c092f1fd..e7d029a3 100644
--- a/src/test/burn/TestData/Manual/BundleB/BundleB.wixproj
+++ b/src/test/burn/TestData/Manual/BundleB/BundleB.wixproj
@@ -6,6 +6,7 @@
6 <UpgradeCode>{5DE2F206-3C37-4265-81F7-095284E16B08}</UpgradeCode> 6 <UpgradeCode>{5DE2F206-3C37-4265-81F7-095284E16B08}</UpgradeCode>
7 <HarvestDirectoryAdditionalOptions>-generate payloadgroup</HarvestDirectoryAdditionalOptions> 7 <HarvestDirectoryAdditionalOptions>-generate payloadgroup</HarvestDirectoryAdditionalOptions>
8 </PropertyGroup> 8 </PropertyGroup>
9
9 <ItemGroup> 10 <ItemGroup>
10 <HarvestDirectory Include="BAPayloads"> 11 <HarvestDirectory Include="BAPayloads">
11 <ComponentGroupName>BAPayloads</ComponentGroupName> 12 <ComponentGroupName>BAPayloads</ComponentGroupName>
@@ -18,20 +19,24 @@
18 <Transforms>package.xslt</Transforms> 19 <Transforms>package.xslt</Transforms>
19 </HarvestDirectory> 20 </HarvestDirectory>
20 </ItemGroup> 21 </ItemGroup>
22
21 <ItemGroup> 23 <ItemGroup>
22 <ProjectReference Include="..\PackageA\PackageA.wixproj" /> 24 <ProjectReference Include="..\PackageA\PackageA.wixproj" />
23 </ItemGroup> 25 </ItemGroup>
26
24 <ItemGroup> 27 <ItemGroup>
25 <PackageReference Include="WixToolset.Heat" /> 28 <PackageReference Include="WixToolset.Heat" />
26 <PackageReference Include="WixToolset.Bal.wixext" /> 29 <PackageReference Include="WixToolset.Bal.wixext" />
27 </ItemGroup> 30 </ItemGroup>
31
28 <!-- We do this dynamically to avoid committing so many files to source control. --> 32 <!-- We do this dynamically to avoid committing so many files to source control. -->
29 <Target Name="CreateThousandsOfFiles" AfterTargets="BeforeBuild"> 33 <Target Name="CreateThousandsOfFiles" AfterTargets="BeforeBuild">
30 <Exec Command='"$(BaseOutputPath)$(Configuration)\net6.0\win-x86\testexe.exe" /gf "BAPayloads|10000' WorkingDirectory="$(MSBuildProjectDirectory)" /> 34 <Exec Command='"$(BaseOutputPath)$(Configuration)\net6.0\win-x86\testexe.exe" /gf "BAPayloads|10000' WorkingDirectory="$(MSBuildProjectDirectory)" />
31 <Exec Command='"$(BaseOutputPath)$(Configuration)\net6.0\win-x86\testexe.exe" /gf "PackagePayloads|10000' WorkingDirectory="$(MSBuildProjectDirectory)" /> 35 <Exec Command='"$(BaseOutputPath)$(Configuration)\net6.0\win-x86\testexe.exe" /gf "PackagePayloads|10000' WorkingDirectory="$(MSBuildProjectDirectory)" />
32 </Target> 36 </Target>
37
33 <Target Name="DeleteThousandsOfFiles" AfterTargets="AfterBuild"> 38 <Target Name="DeleteThousandsOfFiles" AfterTargets="AfterBuild">
34 <RemoveDir Directories="$(MSBuildProjectDirectory)\BAPayloads" /> 39 <RemoveDir Directories="$(MSBuildProjectDirectory)\BAPayloads" />
35 <RemoveDir Directories="$(MSBuildProjectDirectory)\PackagePayloads" /> 40 <RemoveDir Directories="$(MSBuildProjectDirectory)\PackagePayloads" />
36 </Target> 41 </Target>
37</Project> \ No newline at end of file 42</Project>
diff --git a/src/test/burn/TestData/Manual/BundleB/BundleB.wxs b/src/test/burn/TestData/Manual/BundleB/BundleB.wxs
index 3b189b15..54082131 100644
--- a/src/test/burn/TestData/Manual/BundleB/BundleB.wxs
+++ b/src/test/burn/TestData/Manual/BundleB/BundleB.wxs
@@ -1,11 +1,7 @@
1<!-- 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. --> 1<!-- 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. -->
2 2
3
4<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> 3<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal">
5 <Fragment> 4 <Fragment>
6 <BootstrapperApplication>
7 <PayloadGroupRef Id="BAPayloads" />
8 </BootstrapperApplication>
9 <PackageGroup Id="BundlePackages"> 5 <PackageGroup Id="BundlePackages">
10 <MsiPackage Id="PackageA" SourceFile="$(var.PackageA.TargetPath)"> 6 <MsiPackage Id="PackageA" SourceFile="$(var.PackageA.TargetPath)">
11 <PayloadGroupRef Id="PackagePayloads" /> 7 <PayloadGroupRef Id="PackagePayloads" />
diff --git a/src/test/burn/TestData/Manual/PackageA/PackageA.wixproj b/src/test/burn/TestData/Manual/PackageA/PackageA.wixproj
index 61dc27ab..f16c2038 100644
--- a/src/test/burn/TestData/Manual/PackageA/PackageA.wixproj
+++ b/src/test/burn/TestData/Manual/PackageA/PackageA.wixproj
@@ -10,4 +10,4 @@
10 <ItemGroup> 10 <ItemGroup>
11 <PackageReference Include="WixToolset.Util.wixext" /> 11 <PackageReference Include="WixToolset.Util.wixext" />
12 </ItemGroup> 12 </ItemGroup>
13</Project> \ No newline at end of file 13</Project>