@joebigelow / wix / commits / dea25ba9

Move wixstdba functions to Bal.wixext build

Rob Mensching committed Mar 7, 2024 at 01:44 UTC dea25ba9bcfd65200b60339c2e4bc060cdf20723
40 files changed +397 -57
src/api/burn/balutil/balutil.vcxproj
-5
@@ -52,7 +52,6 @@
52 </PropertyGroup>
53
54 <ItemGroup>
55 - <ClCompile Include="BalBaseBAFunctionsProc.cpp" />
55 <ClCompile Include="BalBootstrapperEngine.cpp" />
56 <ClCompile Include="balcondition.cpp" />
57 <ClCompile Include="balinfo.cpp" />
@@ -64,15 +63,11 @@
63 <ClCompile Include="msg.cpp" />
64 </ItemGroup>
65 <ItemGroup>
67 - <ClInclude Include="inc\BAFunctions.h" />
68 - <ClInclude Include="inc\BalBaseBAFunctions.h" />
69 - <ClInclude Include="inc\BalBaseBAFunctionsProc.h" />
66 <ClInclude Include="inc\BalBaseBootstrapperApplication.h" />
67 <ClInclude Include="inc\balcondition.h" />
68 <ClInclude Include="inc\balinfo.h" />
69 <ClInclude Include="inc\balretry.h" />
70 <ClInclude Include="inc\balutil.h" />
75 - <ClInclude Include="inc\IBAFunctions.h" />
71 <ClInclude Include="inc\IBootstrapperApplication.h" />
72 <ClInclude Include="inc\IBootstrapperEngine.h" />
73 <ClInclude Include="BalBootstrapperEngine.h" />
src/api/burn/balutil/precomp.h
+1 -3
@@ -30,13 +30,11 @@
30 #include <thmutil.h>
31 #include <xmlutil.h>
32
33 -#include "IBAFunctions.h"
33 +#include "IBootstrapperApplication.h"
34
35 #include "balutil.h"
36 #include "BalBootstrapperEngine.h"
37 #include "balcondition.h"
38 #include "balinfo.h"
39 #include "balretry.h"
40 -
41 -#include "BalBaseBAFunctionsProc.h"
40 #include "msg.h"
src/api/burn/inc/BootstrapperApplication.h
-15
@@ -729,21 +729,6 @@ struct BA_ONCREATE_ARGS
729 {
730 DWORD dwApiVersion;
731 BOOTSTRAPPER_COMMAND command;
732 - // BOOTSTRAPPER_ACTION action;
733 - // BOOTSTRAPPER_DISPLAY display;
734 -
735 - // LPWSTR wzCommandLine;
736 - // INT32 nCmdShow;
737 -
738 - // BOOTSTRAPPER_RESUME_TYPE resumeType;
739 - // HWND hwndSplashScreen;
740 -
741 - // BOOTSTRAPPER_RELATION_TYPE relationType;
742 - // BOOL fPassthrough;
743 -
744 - // LPWSTR wzLayoutDirectory;
745 - // LPWSTR wzBootstrapperWorkingFolder;
746 - // LPWSTR wzBootstrapperApplicationDataPath;
732 };
733
734 struct BA_ONCREATE_RESULTS
src/api/burn/test/BalUtilUnitTest/BalUtilUnitTest.vcxproj
-3
@@ -37,20 +37,17 @@
37 </PropertyGroup>
38
39 <ItemGroup>
40 - <ClCompile Include="BAFunctionsTests.cpp" />
40 <ClCompile Include="BootstrapperApplicationTests.cpp" />
41 <ClCompile Include="precomp.cpp">
42 <PrecompiledHeader>Create</PrecompiledHeader>
43 <!-- Warnings from referencing netstandard dlls -->
44 <DisableSpecificWarnings>4564;4691</DisableSpecificWarnings>
45 </ClCompile>
47 - <ClCompile Include="TestBAFunctions.cpp" />
46 <ClCompile Include="TestBootstrapperApplication.cpp" />
47 </ItemGroup>
48
49 <ItemGroup>
50 <ClInclude Include="precomp.h" />
53 - <ClInclude Include="TestBAFunctions.h" />
51 <ClInclude Include="TestBootstrapperApplication.h" />
52 </ItemGroup>
53
src/api/burn/test/BalUtilUnitTest/precomp.h
-2
@@ -16,11 +16,9 @@
16 #include <dictutil.h>
17
18 #include <IBootstrapperApplication.h>
19 -#include <IBAFunctions.h>
19 #include <balutil.h>
20 #include <balretry.h>
21
23 -#include "TestBAFunctions.h"
22 #include "TestBootstrapperApplication.h"
23
24 #pragma managed
src/ext/Bal/Bal.wixext.sln
+18
@@ -17,6 +17,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wixiuiba", "wixiuiba\wixiui
17 EndProject
18 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stdbas", "stdbas\stdbas.vcxproj", "{DBBF5F32-BAEA-46A8-99A0-17277A906456}"
19 EndProject
20 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WixStdFnUnitTest", "test\WixStdFnUnitTest\WixStdFnUnitTest.vcxproj", "{9B507AF9-035E-4DB6-8C0C-5DCC3FEF2631}"
21 +EndProject
22 Global
23 GlobalSection(SolutionConfigurationPlatforms) = preSolution
24 Debug|Any CPU = Debug|Any CPU
@@ -137,6 +139,22 @@ Global
139 {DBBF5F32-BAEA-46A8-99A0-17277A906456}.Release|x64.Build.0 = Release|x64
140 {DBBF5F32-BAEA-46A8-99A0-17277A906456}.Release|x86.ActiveCfg = Release|Win32
141 {DBBF5F32-BAEA-46A8-99A0-17277A906456}.Release|x86.Build.0 = Release|Win32
142 + {9B507AF9-035E-4DB6-8C0C-5DCC3FEF2631}.Debug|Any CPU.ActiveCfg = Debug|Win32
143 + {9B507AF9-035E-4DB6-8C0C-5DCC3FEF2631}.Debug|Any CPU.Build.0 = Debug|Win32
144 + {9B507AF9-035E-4DB6-8C0C-5DCC3FEF2631}.Debug|ARM64.ActiveCfg = Debug|Win32
145 + {9B507AF9-035E-4DB6-8C0C-5DCC3FEF2631}.Debug|ARM64.Build.0 = Debug|Win32
146 + {9B507AF9-035E-4DB6-8C0C-5DCC3FEF2631}.Debug|x64.ActiveCfg = Debug|Win32
147 + {9B507AF9-035E-4DB6-8C0C-5DCC3FEF2631}.Debug|x64.Build.0 = Debug|Win32
148 + {9B507AF9-035E-4DB6-8C0C-5DCC3FEF2631}.Debug|x86.ActiveCfg = Debug|Win32
149 + {9B507AF9-035E-4DB6-8C0C-5DCC3FEF2631}.Debug|x86.Build.0 = Debug|Win32
150 + {9B507AF9-035E-4DB6-8C0C-5DCC3FEF2631}.Release|Any CPU.ActiveCfg = Release|Win32
151 + {9B507AF9-035E-4DB6-8C0C-5DCC3FEF2631}.Release|Any CPU.Build.0 = Release|Win32
152 + {9B507AF9-035E-4DB6-8C0C-5DCC3FEF2631}.Release|ARM64.ActiveCfg = Release|Win32
153 + {9B507AF9-035E-4DB6-8C0C-5DCC3FEF2631}.Release|ARM64.Build.0 = Release|Win32
154 + {9B507AF9-035E-4DB6-8C0C-5DCC3FEF2631}.Release|x64.ActiveCfg = Release|Win32
155 + {9B507AF9-035E-4DB6-8C0C-5DCC3FEF2631}.Release|x64.Build.0 = Release|Win32
156 + {9B507AF9-035E-4DB6-8C0C-5DCC3FEF2631}.Release|x86.ActiveCfg = Release|Win32
157 + {9B507AF9-035E-4DB6-8C0C-5DCC3FEF2631}.Release|x86.Build.0 = Release|Win32
158 EndGlobalSection
159 GlobalSection(SolutionProperties) = preSolution
160 HideSolutionNode = FALSE
src/ext/Bal/Samples/bafunctions/WixSampleBAFunctions.cpp
-3
@@ -74,9 +74,6 @@ HRESULT WINAPI CreateBAFunctions(
74 HRESULT hr = S_OK;
75 CWixSampleBAFunctions* pBAFunctions = NULL;
76
77 - // This is required to enable logging functions.
78 - BalInitialize(pArgs->pEngine);
79 -
77 pBAFunctions = new CWixSampleBAFunctions(hModule);
78 ExitOnNull(pBAFunctions, hr, E_OUTOFMEMORY, "Failed to create new CWixSampleBAFunctions object.");
79
src/ext/Bal/Samples/bafunctions/bafunctions.cpp
+7 -4
@@ -26,13 +26,16 @@ extern "C" BOOL WINAPI DllMain(
26 }
27
28 extern "C" HRESULT WINAPI BAFunctionsCreate(
29 - __in const BA_FUNCTIONS_CREATE_ARGS* /*pArgs*/,
30 - __inout BA_FUNCTIONS_CREATE_RESULTS* /*pResults*/
29 + __in const BA_FUNCTIONS_CREATE_ARGS* pArgs,
30 + __inout BA_FUNCTIONS_CREATE_RESULTS* pResults
31 )
32 {
33 HRESULT hr = S_OK;
34 -
35 - //hr = CreateBAFunctions(vhInstance, pArgs, pResults);
34 +
35 + // This is required to enable logging functions.
36 + BalInitialize(pArgs->pEngine);
37 +
38 + hr = CreateBAFunctions(vhInstance, pArgs, pResults);
39 BalExitOnFailure(hr, "Failed to create BAFunctions interface.");
40
41 LExit:
src/ext/Bal/bal.cmd
+10 -7
@@ -17,34 +17,37 @@
17 @if "%_INC%"=="" call :clean
18 @if NOT "%_CLEAN%"=="" goto :end
19
20 -@echo Building ext\BootstrapperApplications %_C% using %_N%
20 +@echo Building ext\Bal %_C% using %_N%
21
22 :: Restore
23 -
23 :: Build
24 +:: Pack
25 +:: Note: This test project must be restored and built directly to get all its support files laid out correctly.
26 +:: Everything else is built by the traversal project.
27 msbuild -Restore -p:Configuration=%_C% -tl -nologo -m -warnaserror test\WixToolsetTest.BootstrapperApplications\WixToolsetTest.BootstrapperApplications.csproj -bl:%_L%\ext_bal_build.binlog || exit /b
28
27 -msbuild -Restore -p:Configuration=%_C% -tl -nologo -m -warnaserror test\examples\examples.proj -bl:%_L%\bal_examples_build.binlog || exit /b
29 +msbuild bal_t.proj -p:Configuration=%_C% -tl -nologo -warnaserror -bl:%_L%\bal_build.binlog || exit /b
30
31 :: Test
32 dotnet test ^
33 + %_B%\x86\WixStdFnUnitTest.dll ^
34 %_B%\net6.0\WixToolsetTest.BootstrapperApplications.dll ^
35 --nologo -l "trx;LogFileName=%_L%\TestResults\bal.wixext.trx" || exit /b
36
34 -:: Pack
35 -msbuild -t:Pack -p:Configuration=%_C% -tl -nologo -warnaserror -p:NoBuild=true wixext\WixToolset.BootstrapperApplications.wixext.csproj || exit /b
36 -msbuild -t:Pack -Restore -p:Configuration=%_C% -tl -nologo -warnaserror wixext-backward-compatible\WixToolset.Bal.wixext.csproj || exit /b
37 -
37 @goto :end
38
39 :clean
40 @rd /s/q "..\..\..\build\Bal.wixext" 2> nul
41 @del "..\..\..\build\artifacts\WixToolset.Bal.wixext.*.nupkg" 2> nul
42 @del "..\..\..\build\artifacts\WixToolset.BootstrapperApplications.wixext.*.nupkg" 2> nul
43 +@del "..\..\..\build\artifacts\WixToolset.WixStandardBootstrapperApplicationFunctionApi.*.nupkg" 2> nul
44 @del "%_L%\ext_bal_build.binlog" 2> nul
45 +@del "%_L%\bal_fnsapi_build.binlog" 2> nul
46 +@del "%_L%\bal_examples_build.binlog" 2> nul
47 @del "%_L%\TestResults\bal.wixext.trx" 2> nul
48 @rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.bal.wixext" 2> nul
49 @rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.bootstrapperapplications.wixext" 2> nul
50 +@rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.wixstandardbootstrapperapplicationfunctionapi" 2> nul
51 @exit /b
52
53 :end
src/ext/Bal/bal_t.proj new
+27
@@ -0,0 +1,27 @@
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 +<Project Sdk="Microsoft.Build.Traversal">
5 + <ItemGroup>
6 + <!-- Restore: Explicitly restore the test projects, which need some hand-holding. -->
7 + <ProjectReference Include="test\WixStdFnUnitTest\WixStdFnUnitTest.vcxproj" Targets="Restore" BuildInParallel="false" />
8 + <ProjectReference Include="test\examples\examples.proj" Targets="Restore" />
9 + <ProjectReference Include="wixext-backward-compatible\WixToolset.Bal.wixext.csproj" Targets="Restore" />
10 +
11 + <!-- Build -->
12 +
13 + <!-- C++/CLI projects will try to build their dependent projects in parallel with others, so they must be built first. -->
14 + <ProjectReference Include="test\WixStdFnUnitTest\WixStdFnUnitTest.vcxproj" Properties="Platform=x86" BuildInParallel="false" />
15 +
16 + <!-- wixstdfn x86 is built by WixStdFnUnitTest -->
17 + <ProjectReference Include="wixstdfn\wixstdfn.vcxproj" Properties="Platform=x64" />
18 + <ProjectReference Include="wixstdfn\wixstdfn.vcxproj" Properties="Platform=ARM64" />
19 +
20 + <ProjectReference Include="test\examples\examples.proj" />
21 +
22 + <!-- Pack -->
23 + <ProjectReference Include="wixstdfn\wixstdfn.vcxproj" Properties="NoBuild=true" Targets="PackNative" />
24 + <ProjectReference Include="wixext\WixToolset.BootstrapperApplications.wixext.csproj" Properties="NoBuild=true" Targets="Pack" />
25 + <ProjectReference Include="wixext-backward-compatible\WixToolset.Bal.wixext.csproj" Targets="Pack" />
26 + </ItemGroup>
27 +</Project>
src/ext/Bal/stdbas/stdbas.vcxproj
+4
@@ -47,6 +47,10 @@
47 <ImportGroup Label="Shared">
48 </ImportGroup>
49
50 + <PropertyGroup>
51 + <ProjectAdditionalIncludeDirectories>inc;..\wixstdfn\inc</ProjectAdditionalIncludeDirectories>
52 + </PropertyGroup>
53 +
54 <ItemGroup>
55 <ClInclude Include="inc\WixInternalUIBootstrapperApplication.h" />
56 <ClInclude Include="inc\WixStandardBootstrapperApplication.h" />
src/ext/Bal/test/WixStdFnUnitTest/BAFunctionsTests.cpp renamed
src/ext/Bal/test/WixStdFnUnitTest/TestBAFunctions.cpp renamed
src/ext/Bal/test/WixStdFnUnitTest/TestBAFunctions.h renamed
src/ext/Bal/test/WixStdFnUnitTest/TestBootstrapperApplication.cpp new
+30
@@ -0,0 +1,30 @@
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 +
3 +#include "precomp.h"
4 +#include "BalBaseBootstrapperApplication.h"
5 +
6 +class CTestBootstrapperApplication : public CBalBaseBootstrapperApplication
7 +{
8 +public:
9 + CTestBootstrapperApplication() : CBalBaseBootstrapperApplication()
10 + {
11 + }
12 +};
13 +
14 +HRESULT CreateBootstrapperApplication(
15 + __out IBootstrapperApplication** ppApplication
16 + )
17 +{
18 + HRESULT hr = S_OK;
19 + CTestBootstrapperApplication* pApplication = NULL;
20 +
21 + pApplication = new CTestBootstrapperApplication();
22 + ExitOnNull(pApplication, hr, E_OUTOFMEMORY, "Failed to create new test bootstrapper application object.");
23 +
24 + *ppApplication = pApplication;
25 + pApplication = NULL;
26 +
27 +LExit:
28 + ReleaseObject(pApplication);
29 + return hr;
30 +}
src/ext/Bal/test/WixStdFnUnitTest/TestBootstrapperApplication.h new
+6
@@ -0,0 +1,6 @@
1 +#pragma once
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 +HRESULT CreateBootstrapperApplication(
5 + __out IBootstrapperApplication** ppApplication
6 + );
src/ext/Bal/test/WixStdFnUnitTest/WixStdFnUnitTest.filters new
+45
@@ -0,0 +1,45 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 + <ItemGroup>
4 + <Filter Include="Source Files">
5 + <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
6 + <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
7 + </Filter>
8 + <Filter Include="Header Files">
9 + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
10 + <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
11 + </Filter>
12 + <Filter Include="Resource Files">
13 + <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
14 + <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
15 + </Filter>
16 + </ItemGroup>
17 + <ItemGroup>
18 + <ClCompile Include="BAFunctionsTests.cpp">
19 + <Filter>Source Files</Filter>
20 + </ClCompile>
21 + <ClCompile Include="BootstrapperApplicationTests.cpp">
22 + <Filter>Source Files</Filter>
23 + </ClCompile>
24 + <ClCompile Include="precomp.cpp">
25 + <Filter>Source Files</Filter>
26 + </ClCompile>
27 + <ClCompile Include="TestBAFunctions.cpp">
28 + <Filter>Source Files</Filter>
29 + </ClCompile>
30 + <ClCompile Include="TestBootstrapperApplication.cpp">
31 + <Filter>Source Files</Filter>
32 + </ClCompile>
33 + </ItemGroup>
34 + <ItemGroup>
35 + <ClInclude Include="precomp.h">
36 + <Filter>Header Files</Filter>
37 + </ClInclude>
38 + <ClInclude Include="TestBAFunctions.h">
39 + <Filter>Header Files</Filter>
40 + </ClInclude>
41 + <ClInclude Include="TestBootstrapperApplication.h">
42 + <Filter>Header Files</Filter>
43 + </ClInclude>
44 + </ItemGroup>
45 +</Project>
\ No newline at end of file
src/ext/Bal/test/WixStdFnUnitTest/WixStdFnUnitTest.vcxproj new
+62
@@ -0,0 +1,62 @@
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 +<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
6 + <Import Project="..\..\..\..\internal\WixInternal.TestSupport.Native\build\WixInternal.TestSupport.Native.props" />
7 +
8 + <ItemGroup Label="ProjectConfigurations">
9 + <ProjectConfiguration Include="Debug|Win32">
10 + <Configuration>Debug</Configuration>
11 + <Platform>Win32</Platform>
12 + </ProjectConfiguration>
13 + <ProjectConfiguration Include="Release|Win32">
14 + <Configuration>Release</Configuration>
15 + <Platform>Win32</Platform>
16 + </ProjectConfiguration>
17 + </ItemGroup>
18 +
19 + <PropertyGroup Label="Globals">
20 + <ProjectTypes>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}</ProjectTypes>
21 + <ProjectGuid>{9B507AF9-035E-4DB6-8C0C-5DCC3FEF2631}</ProjectGuid>
22 + <RootNamespace>UnitTest</RootNamespace>
23 + <Keyword>ManagedCProj</Keyword>
24 + <ConfigurationType>DynamicLibrary</ConfigurationType>
25 + <CharacterSet>Unicode</CharacterSet>
26 + <CLRSupport>true</CLRSupport>
27 + <SignOutput>false</SignOutput>
28 + <IsWixTestProject>true</IsWixTestProject>
29 + </PropertyGroup>
30 +
31 + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
32 + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
33 +
34 + <PropertyGroup>
35 + <ProjectAdditionalIncludeDirectories>..\..\..\..\api\burn\inc;..\..\..\..\api\burn\balutil\inc;..\..\wixstdfn\inc;..\..\..\..\libs\dutil\WixToolset.Dutil\inc</ProjectAdditionalIncludeDirectories>
36 + <ProjectAdditionalLinkLibraries>comctl32.lib;gdiplus.lib;msimg32.lib;shlwapi.lib;$(RootBuildFolder)libs\$(Configuration)\$(WixNativeSdkLibraryToolset)\$(PlatformTarget)\dutil.lib;$(RootBuildFolder)api\$(Configuration)\$(WixNativeSdkLibraryToolset)\$(PlatformTarget)\balutil.lib</ProjectAdditionalLinkLibraries>
37 + </PropertyGroup>
38 +
39 + <ItemGroup>
40 + <ClCompile Include="BAFunctionsTests.cpp" />
41 + <ClCompile Include="precomp.cpp">
42 + <PrecompiledHeader>Create</PrecompiledHeader>
43 + <!-- Warnings from referencing netstandard dlls -->
44 + <DisableSpecificWarnings>4564;4691</DisableSpecificWarnings>
45 + </ClCompile>
46 + <ClCompile Include="TestBAFunctions.cpp" />
47 + </ItemGroup>
48 +
49 + <ItemGroup>
50 + <ClInclude Include="precomp.h" />
51 + <ClInclude Include="TestBAFunctions.h" />
52 + </ItemGroup>
53 +
54 + <ItemGroup>
55 + <ProjectReference Include="..\..\wixstdfn\wixstdfn.vcxproj">
56 + <Project>{D786C02F-9488-421F-A5A5-D1D31E8E648B}</Project>
57 + </ProjectReference>
58 + </ItemGroup>
59 +
60 + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
61 + <Import Project="..\..\..\..\internal\WixInternal.TestSupport.Native\build\WixInternal.TestSupport.Native.targets" />
62 +</Project>
src/ext/Bal/test/WixStdFnUnitTest/precomp.cpp new
+3
@@ -0,0 +1,3 @@
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 +
3 +#include "precomp.h"
src/ext/Bal/test/WixStdFnUnitTest/precomp.h new
+27
@@ -0,0 +1,27 @@
1 +#pragma once
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 +#include <windows.h>
6 +
7 +#pragma warning(push)
8 +#pragma warning(disable:4458) // declaration of 'xxx' hides class member
9 +#include <gdiplus.h>
10 +#pragma warning(pop)
11 +
12 +#include <msiquery.h>
13 +#include <CommCtrl.h>
14 +
15 +#include <dutil.h>
16 +#include <dictutil.h>
17 +
18 +#include <IBootstrapperApplication.h>
19 +#include <IBAFunctions.h>
20 +#include <balutil.h>
21 +#include <balretry.h>
22 +
23 +#include "TestBAFunctions.h"
24 +#include "TestBootstrapperApplication.h"
25 +
26 +#pragma managed
27 +#include <vcclr.h>
src/ext/Bal/wixprqba/wixprqba.vcxproj
+1 -1
@@ -48,7 +48,7 @@
48 </ImportGroup>
49
50 <PropertyGroup>
51 - <ProjectAdditionalIncludeDirectories>$(ProjectDir)..\stdbas\inc</ProjectAdditionalIncludeDirectories>
51 + <ProjectAdditionalIncludeDirectories>$(ProjectDir)..\stdbas\inc;$(ProjectDir)..\wixstdfn\inc</ProjectAdditionalIncludeDirectories>
52 <ProjectAdditionalLinkLibraries>comctl32.lib;gdiplus.lib;rpcrt4.lib;shlwapi.lib;wininet.lib;stdbas.res</ProjectAdditionalLinkLibraries>
53 </PropertyGroup>
54
src/ext/Bal/wixstdba/wixstdba.vcxproj
+1 -1
@@ -48,7 +48,7 @@
48 </ImportGroup>
49
50 <PropertyGroup>
51 - <ProjectAdditionalIncludeDirectories>$(ProjectDir)..\stdbas\inc</ProjectAdditionalIncludeDirectories>
51 + <ProjectAdditionalIncludeDirectories>$(ProjectDir)..\stdbas\inc;$(ProjectDir)..\wixstdfn\inc</ProjectAdditionalIncludeDirectories>
52 <ProjectAdditionalLinkLibraries>comctl32.lib;gdiplus.lib;rpcrt4.lib;shlwapi.lib;wininet.lib;stdbas.res</ProjectAdditionalLinkLibraries>
53 </PropertyGroup>
54
src/ext/Bal/wixstdfn/BalBaseBAFunctionsProc.cpp renamed
src/ext/Bal/wixstdfn/build/WixToolset.WixStandardBootstrapperApplicationFunctionApi.props new
+18
@@ -0,0 +1,18 @@
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 +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
5 + <ItemDefinitionGroup>
6 + <ClCompile>
7 + <AdditionalIncludeDirectories>$(MSBuildThisFileDirectory)..\lib\native\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
8 + </ClCompile>
9 + <ResourceCompile>
10 + <AdditionalIncludeDirectories>$(MSBuildThisFileDirectory)..\lib\native\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
11 + </ResourceCompile>
12 + </ItemDefinitionGroup>
13 + <ItemDefinitionGroup Condition=" $(PlatformToolset.ToLower().StartsWith('v14')) ">
14 + <Link>
15 + <AdditionalDependencies>$(MSBuildThisFileDirectory)..\lib\native\v14\$(PlatformTarget)\wixstdfn.lib;%(AdditionalDependencies)</AdditionalDependencies>
16 + </Link>
17 + </ItemDefinitionGroup>
18 +</Project>
src/ext/Bal/wixstdfn/inc/BAFunctions.h renamed
src/ext/Bal/wixstdfn/inc/BalBaseBAFunctions.h renamed
+1 -3
@@ -4,9 +4,7 @@
4 #include <windows.h>
5 #include <msiquery.h>
6
7 -#include <BootstrapperApplication.h>
8 -
9 -#include "IBAFunctions.h"
7 +#include <IBAFunctions.h>
8
9 class CBalBaseBAFunctions : public IBAFunctions
10 {
src/ext/Bal/wixstdfn/inc/BalBaseBAFunctionsProc.h renamed
src/ext/Bal/wixstdfn/inc/IBAFunctions.h renamed
+2 -2
@@ -2,8 +2,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 -#include "IBootstrapperApplication.h"
6 -#include "BAFunctions.h"
5 +#include <IBootstrapperApplication.h>
6 +#include <BAFunctions.h>
7
8 DECLARE_INTERFACE_IID_(IBAFunctions, IBootstrapperApplication, "0FB445ED-17BD-49C7-BE19-479776F8AE96")
9 {
src/ext/Bal/wixstdfn/precomp.cpp new
+3
@@ -0,0 +1,3 @@
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 +
3 +#include "precomp.h"
src/ext/Bal/wixstdfn/precomp.h new
+11
@@ -0,0 +1,11 @@
1 +#pragma once
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 +#include <windows.h>
6 +#include <msi.h>
7 +
8 +#include <dutil.h>
9 +
10 +#include "IBAFunctions.h"
11 +#include "BalBaseBAFunctionsProc.h"
src/ext/Bal/wixstdfn/wixstdfn.nuspec new
+31
@@ -0,0 +1,31 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
3 + <metadata minClientVersion="4.0">
4 + <id>$id$</id>
5 + <version>$version$</version>
6 + <title>$title$</title>
7 + <description>$description$</description>
8 + <authors>$authors$</authors>
9 + <icon>wix.png</icon>
10 + <license type="expression">MS-RL</license>
11 + <requireLicenseAcceptance>false</requireLicenseAcceptance>
12 + <copyright>$copyright$</copyright>
13 + <projectUrl>$projectUrl$</projectUrl>
14 + <repository type="$repositorytype$" url="$repositoryurl$" commit="$repositorycommit$" />
15 + <dependencies>
16 + <group targetFramework="Native">
17 + <dependency id="WixToolset.BootstrapperApplicationApi" version="[$version$,5)" />
18 + <dependency id="WixToolset.DUtil" version="[$version$,5)" />
19 + </group>
20 + </dependencies>
21 + </metadata>
22 +
23 + <files>
24 + <file src="$projectFolder$\build\$id$.props" target="build\" />
25 + <file src="$projectFolder$\..\..\..\internal\images\wix.png" />
26 + <file src="$projectFolder$\inc\*" target="lib\native\include" />
27 + <file src="..\..\v141\x86\wixstdfn.lib" target="lib\native\v14\x86" />
28 + <file src="..\..\v141\x64\wixstdfn.lib" target="lib\native\v14\x64" />
29 + <file src="..\..\v141\ARM64\wixstdfn.lib" target="lib\native\v14\ARM64" />
30 + </files>
31 +</package>
src/ext/Bal/wixstdfn/wixstdfn.vcxproj new
+76
@@ -0,0 +1,76 @@
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 +<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
5 + <ItemGroup Label="ProjectConfigurations">
6 + <ProjectConfiguration Include="Debug|ARM64">
7 + <Configuration>Debug</Configuration>
8 + <Platform>ARM64</Platform>
9 + </ProjectConfiguration>
10 + <ProjectConfiguration Include="Release|ARM64">
11 + <Configuration>Release</Configuration>
12 + <Platform>ARM64</Platform>
13 + </ProjectConfiguration>
14 + <ProjectConfiguration Include="Debug|Win32">
15 + <Configuration>Debug</Configuration>
16 + <Platform>Win32</Platform>
17 + </ProjectConfiguration>
18 + <ProjectConfiguration Include="Release|Win32">
19 + <Configuration>Release</Configuration>
20 + <Platform>Win32</Platform>
21 + </ProjectConfiguration>
22 + <ProjectConfiguration Include="Debug|x64">
23 + <Configuration>Debug</Configuration>
24 + <Platform>x64</Platform>
25 + </ProjectConfiguration>
26 + <ProjectConfiguration Include="Release|x64">
27 + <Configuration>Release</Configuration>
28 + <Platform>x64</Platform>
29 + </ProjectConfiguration>
30 + </ItemGroup>
31 +
32 + <PropertyGroup Label="Globals">
33 + <ProjectGuid>{D786C02F-9488-421F-A5A5-D1D31E8E648B}</ProjectGuid>
34 + <ConfigurationType>StaticLibrary</ConfigurationType>
35 + <TargetName>wixstdfn</TargetName>
36 + <CharacterSet>MultiByte</CharacterSet>
37 + <Description>WiX Toolset Standard BootstrapperApplication Functions API</Description>
38 + <PackageId>WixToolset.WixStandardBootstrapperApplicationFunctionApi</PackageId>
39 + </PropertyGroup>
40 +
41 + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
42 + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
43 + <Import Project="..\..\..\NativeMultiTargeting.Build.props" />
44 +
45 + <ImportGroup Label="ExtensionSettings">
46 + </ImportGroup>
47 +
48 + <ImportGroup Label="Shared">
49 + </ImportGroup>
50 +
51 + <PropertyGroup>
52 + <ProjectAdditionalIncludeDirectories>inc</ProjectAdditionalIncludeDirectories>
53 + </PropertyGroup>
54 +
55 + <ItemGroup>
56 + <ClCompile Include="BalBaseBAFunctionsProc.cpp" />
57 + <ClCompile Include="precomp.cpp">
58 + <PrecompiledHeader>Create</PrecompiledHeader>
59 + </ClCompile>
60 + </ItemGroup>
61 + <ItemGroup>
62 + <ClInclude Include="inc\BAFunctions.h" />
63 + <ClInclude Include="inc\BalBaseBAFunctions.h" />
64 + <ClInclude Include="inc\BalBaseBAFunctionsProc.h" />
65 + <ClInclude Include="inc\IBAFunctions.h" />
66 + <ClInclude Include="precomp.h" />
67 + </ItemGroup>
68 +
69 + <ItemGroup>
70 + <PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
71 +
72 + <PackageReference Include="WixToolset.BootstrapperApplicationApi" />
73 + </ItemGroup>
74 +
75 + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
76 +</Project>
src/internal/SetBuildNumber/Directory.Packages.props.pp
+1
@@ -15,6 +15,7 @@
15
16 <PackageVersion Include="WixToolset.BextUtil" Version="{packageversion}" />
17 <PackageVersion Include="WixToolset.BootstrapperApplicationApi" Version="{packageversion}" />
18 + <PackageVersion Include="WixToolset.WixStandardBootstrapperApplicationFunctionApi" Version="{packageversion}" />
19
20 <PackageVersion Include="WixToolset.Data" Version="{packageversion}" />
21 <PackageVersion Include="WixToolset.Extensibility" Version="{packageversion}" />
src/test/burn/TestData/BAFunctionsTests/BafRelatedBundleVariableTesting/BafRelatedBundleVariableTesting.vcxproj
+1 -1
@@ -59,7 +59,7 @@
59 </ItemGroup>
60
61 <ItemGroup>
62 - <PackageReference Include="WixToolset.BootstrapperApplicationApi" />
62 + <PackageReference Include="WixToolset.WixStandardBootstrapperApplicationFunctionApi" />
63 </ItemGroup>
64
65 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
src/test/burn/TestData/BAFunctionsTests/BafRelatedBundleVariableTesting/precomp.cpp
+3 -1
@@ -31,7 +31,9 @@ extern "C" HRESULT WINAPI BAFunctionsCreate(
31 )
32 {
33 HRESULT hr = S_OK;
34 -
34 +
35 + BalInitialize(pArgs->pEngine);
36 +
37 hr = CreateBAFunctions(vhInstance, pArgs, pResults);
38 BalExitOnFailure(hr, "Failed to create BAFunctions interface.");
39
src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.vcxproj
+1 -1
@@ -62,7 +62,7 @@
62 </ItemGroup>
63
64 <ItemGroup>
65 - <PackageReference Include="WixToolset.BootstrapperApplicationApi" />
65 + <PackageReference Include="WixToolset.WixStandardBootstrapperApplicationFunctionApi" />
66 </ItemGroup>
67
68 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
src/test/burn/TestData/Manual/BafThmutilTesting/precomp.cpp
+3 -1
@@ -31,7 +31,9 @@ extern "C" HRESULT WINAPI BAFunctionsCreate(
31 )
32 {
33 HRESULT hr = S_OK;
34 -
34 +
35 + BalInitialize(pArgs->pEngine);
36 +
37 hr = CreateBAFunctions(vhInstance, pArgs, pResults);
38 BalExitOnFailure(hr, "Failed to create BAFunctions interface.");
39
src/test/burn/TestData/PrereqBaTests/PrereqBaf/PrereqBaf.cpp
-2
@@ -77,8 +77,6 @@ HRESULT WINAPI CreateBAFunctions(
77 HRESULT hr = S_OK;
78 CPrereqBaf* pBAFunctions = NULL;
79
80 - BalInitialize(pArgs->pEngine);
81 -
80 pBAFunctions = new CPrereqBaf(hModule);
81 ExitOnNull(pBAFunctions, hr, E_OUTOFMEMORY, "Failed to create new CPrereqBaf object.");
82
src/test/burn/TestData/PrereqBaTests/PrereqBaf/PrereqBaf.vcxproj
+1 -1
@@ -59,7 +59,7 @@
59 </ItemGroup>
60
61 <ItemGroup>
62 - <PackageReference Include="WixToolset.BootstrapperApplicationApi" />
62 + <PackageReference Include="WixToolset.WixStandardBootstrapperApplicationFunctionApi" />
63 </ItemGroup>
64
65 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
src/test/burn/TestData/PrereqBaTests/PrereqBaf/precomp.cpp
+3 -1
@@ -31,7 +31,9 @@ extern "C" HRESULT WINAPI BAFunctionsCreate(
31 )
32 {
33 HRESULT hr = S_OK;
34 -
34 +
35 + BalInitialize(pArgs->pEngine);
36 +
37 hr = CreateBAFunctions(vhInstance, pArgs, pResults);
38 BalExitOnFailure(hr, "Failed to create BAFunctions interface.");
39