From d5b89ecb2ba931cd5429e00a78b9457f8a63c6d2 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Mon, 30 Mar 2020 19:25:36 +1000 Subject: Upgrade to latest dependencies. Stop skipping CanBuildUsingWixStdBa. Fix memory leak in wixstdba. --- src/Samples/bafunctions/bafunctions.vcxproj | 8 ++++---- src/Samples/bafunctions/packages.config | 4 ++-- src/WixToolset.Mba.Host/WixToolset.Mba.Host.csproj | 2 +- src/WixToolset.Mba.Host/packages.config | 2 +- src/mbahost/mbahost.vcxproj | 8 ++++---- src/mbahost/packages.config | 4 ++-- src/test/WixToolsetTest.Bal/BalExtensionFixture.cs | 4 +++- .../examples/FullFramework2MBA/Example.FullFramework2MBA.csproj | 6 +++--- src/test/examples/FullFramework2MBA/packages.config | 2 +- .../examples/FullFramework4MBA/Example.FullFramework4MBA.csproj | 2 +- src/test/examples/TestEngine/Example.TestEngine.vcxproj | 8 ++++---- src/test/examples/TestEngine/packages.config | 4 ++-- src/wixext/BalWindowsInstallerBackendBinderExtension.cs | 6 +++--- src/wixlib/bal.wixproj | 4 ++-- src/wixlib/packages.config | 2 +- src/wixstdba/WixStandardBootstrapperApplication.cpp | 4 +++- src/wixstdba/packages.config | 4 ++-- src/wixstdba/precomp.h | 3 ++- src/wixstdba/wixstdba.cpp | 7 +++++-- src/wixstdba/wixstdba.vcxproj | 8 ++++---- 20 files changed, 50 insertions(+), 42 deletions(-) (limited to 'src') diff --git a/src/Samples/bafunctions/bafunctions.vcxproj b/src/Samples/bafunctions/bafunctions.vcxproj index 469bb33b..a7b0c11a 100644 --- a/src/Samples/bafunctions/bafunctions.vcxproj +++ b/src/Samples/bafunctions/bafunctions.vcxproj @@ -2,8 +2,8 @@ - - + + @@ -57,8 +57,8 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - + + diff --git a/src/Samples/bafunctions/packages.config b/src/Samples/bafunctions/packages.config index fbcb6700..56b68f10 100644 --- a/src/Samples/bafunctions/packages.config +++ b/src/Samples/bafunctions/packages.config @@ -1,7 +1,7 @@  - - + + \ No newline at end of file diff --git a/src/WixToolset.Mba.Host/WixToolset.Mba.Host.csproj b/src/WixToolset.Mba.Host/WixToolset.Mba.Host.csproj index 00e3bb88..1bc39813 100644 --- a/src/WixToolset.Mba.Host/WixToolset.Mba.Host.csproj +++ b/src/WixToolset.Mba.Host/WixToolset.Mba.Host.csproj @@ -44,7 +44,7 @@ - ..\..\packages\WixToolset.Mba.Core.4.0.13\lib\net20\WixToolset.Mba.Core.dll + ..\..\packages\WixToolset.Mba.Core.4.0.16\lib\net20\WixToolset.Mba.Core.dll diff --git a/src/WixToolset.Mba.Host/packages.config b/src/WixToolset.Mba.Host/packages.config index 3e954e88..9123df31 100644 --- a/src/WixToolset.Mba.Host/packages.config +++ b/src/WixToolset.Mba.Host/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/src/mbahost/mbahost.vcxproj b/src/mbahost/mbahost.vcxproj index c3bde6aa..6dd6298f 100644 --- a/src/mbahost/mbahost.vcxproj +++ b/src/mbahost/mbahost.vcxproj @@ -2,8 +2,8 @@ - - + + @@ -68,8 +68,8 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - + + diff --git a/src/mbahost/packages.config b/src/mbahost/packages.config index fbcb6700..56b68f10 100644 --- a/src/mbahost/packages.config +++ b/src/mbahost/packages.config @@ -1,7 +1,7 @@  - - + + \ No newline at end of file diff --git a/src/test/WixToolsetTest.Bal/BalExtensionFixture.cs b/src/test/WixToolsetTest.Bal/BalExtensionFixture.cs index c5a25948..06727afd 100644 --- a/src/test/WixToolsetTest.Bal/BalExtensionFixture.cs +++ b/src/test/WixToolsetTest.Bal/BalExtensionFixture.cs @@ -9,7 +9,7 @@ namespace WixToolsetTest.Bal public class BalExtensionFixture { - [Fact(Skip = "Test demonstrates failure")] + [Fact] public void CanBuildUsingWixStdBa() { using (var fs = new DisposableFileSystem()) @@ -17,12 +17,14 @@ namespace WixToolsetTest.Bal var baseFolder = fs.GetFolder(); var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); var bundleSourceFolder = TestData.Get(@"TestData\WixStdBa"); + var intermediateFolder = Path.Combine(baseFolder, "obj"); var compileResult = WixRunner.Execute(new[] { "build", Path.Combine(bundleSourceFolder, "Bundle.wxs"), "-ext", TestData.Get(@"WixToolset.Bal.wixext.dll"), + "-intermediateFolder", intermediateFolder, "-burnStub", TestData.Get(@"runtimes\win-x86\native\burn.x86.exe"), "-o", bundleFile, }); diff --git a/src/test/examples/FullFramework2MBA/Example.FullFramework2MBA.csproj b/src/test/examples/FullFramework2MBA/Example.FullFramework2MBA.csproj index 3a884020..09348ac8 100644 --- a/src/test/examples/FullFramework2MBA/Example.FullFramework2MBA.csproj +++ b/src/test/examples/FullFramework2MBA/Example.FullFramework2MBA.csproj @@ -3,7 +3,7 @@ - + {CC4236FC-226E-4232-AB50-24CBEC4D314D} Example.FullFramework2MBA @@ -40,7 +40,7 @@ - ..\..\..\..\packages\WixToolset.Mba.Core.4.0.13\lib\net20\WixToolset.Mba.Core.dll + ..\..\..\..\packages\WixToolset.Mba.Core.4.0.16\lib\net20\WixToolset.Mba.Core.dll @@ -67,7 +67,7 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + diff --git a/src/test/examples/FullFramework2MBA/packages.config b/src/test/examples/FullFramework2MBA/packages.config index 6a2328ef..9950b1b6 100644 --- a/src/test/examples/FullFramework2MBA/packages.config +++ b/src/test/examples/FullFramework2MBA/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/src/test/examples/FullFramework4MBA/Example.FullFramework4MBA.csproj b/src/test/examples/FullFramework4MBA/Example.FullFramework4MBA.csproj index 04553354..549e096e 100644 --- a/src/test/examples/FullFramework4MBA/Example.FullFramework4MBA.csproj +++ b/src/test/examples/FullFramework4MBA/Example.FullFramework4MBA.csproj @@ -7,7 +7,7 @@ - + diff --git a/src/test/examples/TestEngine/Example.TestEngine.vcxproj b/src/test/examples/TestEngine/Example.TestEngine.vcxproj index 90002795..44ba2c9b 100644 --- a/src/test/examples/TestEngine/Example.TestEngine.vcxproj +++ b/src/test/examples/TestEngine/Example.TestEngine.vcxproj @@ -1,8 +1,8 @@ - - + + @@ -63,8 +63,8 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - + + \ No newline at end of file diff --git a/src/test/examples/TestEngine/packages.config b/src/test/examples/TestEngine/packages.config index fbcb6700..56b68f10 100644 --- a/src/test/examples/TestEngine/packages.config +++ b/src/test/examples/TestEngine/packages.config @@ -1,7 +1,7 @@  - - + + \ No newline at end of file diff --git a/src/wixext/BalWindowsInstallerBackendBinderExtension.cs b/src/wixext/BalWindowsInstallerBackendBinderExtension.cs index e53087b7..3c116329 100644 --- a/src/wixext/BalWindowsInstallerBackendBinderExtension.cs +++ b/src/wixext/BalWindowsInstallerBackendBinderExtension.cs @@ -29,11 +29,11 @@ namespace WixToolset.Bal } } - public override void PostBackendBind(IBindResult result, WixOutput wixout) + public override void PostBackendBind(IBindResult result) { - base.PostBackendBind(result, wixout); + base.PostBackendBind(result); - var output = WindowsInstallerData.Load(wixout.Uri.AbsoluteUri, false); + var output = WindowsInstallerData.Load(result.Wixout, false); // Only process Bundles. if (OutputType.Bundle != output.Type) diff --git a/src/wixlib/bal.wixproj b/src/wixlib/bal.wixproj index fbac3baa..8594c9e7 100644 --- a/src/wixlib/bal.wixproj +++ b/src/wixlib/bal.wixproj @@ -1,7 +1,7 @@ - + {3444D952-F21C-496F-AB6B-56435BFD0787} @@ -59,7 +59,7 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + diff --git a/src/wixlib/packages.config b/src/wixlib/packages.config index 3ba2b904..25b4e6a9 100644 --- a/src/wixlib/packages.config +++ b/src/wixlib/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/src/wixstdba/WixStandardBootstrapperApplication.cpp b/src/wixstdba/WixStandardBootstrapperApplication.cpp index 6d2fd3e2..afc6a3ee 100644 --- a/src/wixstdba/WixStandardBootstrapperApplication.cpp +++ b/src/wixstdba/WixStandardBootstrapperApplication.cpp @@ -3726,7 +3726,8 @@ HRESULT CreateBootstrapperApplication( __in HRESULT hrHostInitialization, __in IBootstrapperEngine* pEngine, __in const BOOTSTRAPPER_CREATE_ARGS* pArgs, - __inout BOOTSTRAPPER_CREATE_RESULTS* pResults + __inout BOOTSTRAPPER_CREATE_RESULTS* pResults, + __out IBootstrapperApplication** ppApplication ) { HRESULT hr = S_OK; @@ -3737,6 +3738,7 @@ HRESULT CreateBootstrapperApplication( pResults->pfnBootstrapperApplicationProc = BalBaseBootstrapperApplicationProc; pResults->pvBootstrapperApplicationProcContext = pApplication; + *ppApplication = pApplication; pApplication = NULL; LExit: diff --git a/src/wixstdba/packages.config b/src/wixstdba/packages.config index fbcb6700..56b68f10 100644 --- a/src/wixstdba/packages.config +++ b/src/wixstdba/packages.config @@ -1,7 +1,7 @@  - - + + \ No newline at end of file diff --git a/src/wixstdba/precomp.h b/src/wixstdba/precomp.h index 925a80ce..9c2b9f6a 100644 --- a/src/wixstdba/precomp.h +++ b/src/wixstdba/precomp.h @@ -52,5 +52,6 @@ HRESULT CreateBootstrapperApplication( __in HRESULT hrHostInitialization, __in IBootstrapperEngine* pEngine, __in const BOOTSTRAPPER_CREATE_ARGS* pArgs, - __inout BOOTSTRAPPER_CREATE_RESULTS* pResults + __inout BOOTSTRAPPER_CREATE_RESULTS* pResults, + __out IBootstrapperApplication** ppApplication ); diff --git a/src/wixstdba/wixstdba.cpp b/src/wixstdba/wixstdba.cpp index f47c1f4e..2767c74e 100644 --- a/src/wixstdba/wixstdba.cpp +++ b/src/wixstdba/wixstdba.cpp @@ -3,6 +3,7 @@ #include "precomp.h" static HINSTANCE vhInstance = NULL; +static IBootstrapperApplication* vpApplication = NULL; extern "C" BOOL WINAPI DllMain( IN HINSTANCE hInstance, @@ -37,7 +38,7 @@ extern "C" HRESULT WINAPI BootstrapperApplicationCreate( hr = BalInitializeFromCreateArgs(pArgs, &pEngine); ExitOnFailure(hr, "Failed to initialize Bal."); - hr = CreateBootstrapperApplication(vhInstance, FALSE, S_OK, pEngine, pArgs, pResults); + hr = CreateBootstrapperApplication(vhInstance, FALSE, S_OK, pEngine, pArgs, pResults, &vpApplication); BalExitOnFailure(hr, "Failed to create bootstrapper application interface."); LExit: @@ -49,6 +50,7 @@ LExit: extern "C" void WINAPI BootstrapperApplicationDestroy() { + ReleaseNullObject(vpApplication); BalUninitialize(); } @@ -64,7 +66,7 @@ extern "C" HRESULT WINAPI MbaPrereqBootstrapperApplicationCreate( BalInitialize(pEngine); - hr = CreateBootstrapperApplication(vhInstance, TRUE, hrHostInitialization, pEngine, pArgs, pResults); + hr = CreateBootstrapperApplication(vhInstance, TRUE, hrHostInitialization, pEngine, pArgs, pResults, &vpApplication); BalExitOnFailure(hr, "Failed to create managed prerequisite bootstrapper application interface."); LExit: @@ -74,5 +76,6 @@ LExit: extern "C" void WINAPI MbaPrereqBootstrapperApplicationDestroy() { + ReleaseNullObject(vpApplication); BalUninitialize(); } diff --git a/src/wixstdba/wixstdba.vcxproj b/src/wixstdba/wixstdba.vcxproj index b6c3ebc0..009bdb54 100644 --- a/src/wixstdba/wixstdba.vcxproj +++ b/src/wixstdba/wixstdba.vcxproj @@ -2,8 +2,8 @@ - - + + @@ -107,8 +107,8 @@ rc.exe -fo "$(OutDir)wixstdba.res" "$(IntDir)wixstdba.messages.rc" This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - + + -- cgit v1.2.3-55-g6feb