diff options
Diffstat (limited to 'src/api/burn/mbanative')
| -rw-r--r-- | src/api/burn/mbanative/mbanative.cpp | 29 | ||||
| -rw-r--r-- | src/api/burn/mbanative/mbanative.def | 12 | ||||
| -rw-r--r-- | src/api/burn/mbanative/mbanative.vcxproj | 102 | ||||
| -rw-r--r-- | src/api/burn/mbanative/packages.config | 9 | ||||
| -rw-r--r-- | src/api/burn/mbanative/precomp.cpp | 3 | ||||
| -rw-r--r-- | src/api/burn/mbanative/precomp.h | 16 |
6 files changed, 171 insertions, 0 deletions
diff --git a/src/api/burn/mbanative/mbanative.cpp b/src/api/burn/mbanative/mbanative.cpp new file mode 100644 index 00000000..98ea3c30 --- /dev/null +++ b/src/api/burn/mbanative/mbanative.cpp | |||
| @@ -0,0 +1,29 @@ | |||
| 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 "BalBaseBootstrapperApplicationProc.h" | ||
| 5 | |||
| 6 | extern "C" HRESULT WINAPI InitializeFromCreateArgs( | ||
| 7 | __in const BOOTSTRAPPER_CREATE_ARGS* pArgs, | ||
| 8 | __inout BOOTSTRAPPER_COMMAND* pCommand, | ||
| 9 | __out IBootstrapperEngine** ppEngine | ||
| 10 | ) | ||
| 11 | { | ||
| 12 | HRESULT hr = S_OK; | ||
| 13 | |||
| 14 | hr = BalInitializeFromCreateArgs(pArgs, ppEngine); | ||
| 15 | ExitOnFailure(hr, "Failed to initialize Bal."); | ||
| 16 | |||
| 17 | memcpy_s(pCommand, pCommand->cbSize, pArgs->pCommand, min(pArgs->pCommand->cbSize, pCommand->cbSize)); | ||
| 18 | LExit: | ||
| 19 | return hr; | ||
| 20 | } | ||
| 21 | |||
| 22 | extern "C" void WINAPI StoreBAInCreateResults( | ||
| 23 | __inout BOOTSTRAPPER_CREATE_RESULTS* pResults, | ||
| 24 | __in IBootstrapperApplication* pBA | ||
| 25 | ) | ||
| 26 | { | ||
| 27 | pResults->pfnBootstrapperApplicationProc = BalBaseBootstrapperApplicationProc; | ||
| 28 | pResults->pvBootstrapperApplicationProcContext = pBA; | ||
| 29 | } | ||
diff --git a/src/api/burn/mbanative/mbanative.def b/src/api/burn/mbanative/mbanative.def new file mode 100644 index 00000000..28e923b6 --- /dev/null +++ b/src/api/burn/mbanative/mbanative.def | |||
| @@ -0,0 +1,12 @@ | |||
| 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 | |||
| 4 | EXPORTS | ||
| 5 | InitializeFromCreateArgs | ||
| 6 | StoreBAInCreateResults | ||
| 7 | VerCompareParsedVersions | ||
| 8 | VerCompareStringVersions | ||
| 9 | VerCopyVersion | ||
| 10 | VerFreeVersion | ||
| 11 | VerParseVersion | ||
| 12 | VerVersionFromQword | ||
diff --git a/src/api/burn/mbanative/mbanative.vcxproj b/src/api/burn/mbanative/mbanative.vcxproj new file mode 100644 index 00000000..f91fe3be --- /dev/null +++ b/src/api/burn/mbanative/mbanative.vcxproj | |||
| @@ -0,0 +1,102 @@ | |||
| 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 | <Import Project="..\..\packages\WixToolset.BootstrapperCore.Native.4.0.141\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.141\build\WixToolset.BootstrapperCore.Native.props')" /> | ||
| 6 | <Import Project="..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props" Condition="Exists('..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props')" /> | ||
| 7 | <Import Project="..\..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.props" Condition="Exists('..\..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.props')" /> | ||
| 8 | <Import Project="..\..\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.props" Condition="Exists('..\..\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.props')" /> | ||
| 9 | <Import Project="..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props')" /> | ||
| 10 | |||
| 11 | <ItemGroup Label="ProjectConfigurations"> | ||
| 12 | <ProjectConfiguration Include="Debug|ARM64"> | ||
| 13 | <Configuration>Debug</Configuration> | ||
| 14 | <Platform>ARM64</Platform> | ||
| 15 | </ProjectConfiguration> | ||
| 16 | <ProjectConfiguration Include="Release|ARM64"> | ||
| 17 | <Configuration>Release</Configuration> | ||
| 18 | <Platform>ARM64</Platform> | ||
| 19 | </ProjectConfiguration> | ||
| 20 | <ProjectConfiguration Include="Debug|Win32"> | ||
| 21 | <Configuration>Debug</Configuration> | ||
| 22 | <Platform>Win32</Platform> | ||
| 23 | </ProjectConfiguration> | ||
| 24 | <ProjectConfiguration Include="Release|Win32"> | ||
| 25 | <Configuration>Release</Configuration> | ||
| 26 | <Platform>Win32</Platform> | ||
| 27 | </ProjectConfiguration> | ||
| 28 | <ProjectConfiguration Include="Debug|x64"> | ||
| 29 | <Configuration>Debug</Configuration> | ||
| 30 | <Platform>x64</Platform> | ||
| 31 | </ProjectConfiguration> | ||
| 32 | <ProjectConfiguration Include="Release|x64"> | ||
| 33 | <Configuration>Release</Configuration> | ||
| 34 | <Platform>x64</Platform> | ||
| 35 | </ProjectConfiguration> | ||
| 36 | </ItemGroup> | ||
| 37 | |||
| 38 | <PropertyGroup Label="Globals"> | ||
| 39 | <ProjectGuid>{665E0441-17F9-4105-B202-EDF274657F6E}</ProjectGuid> | ||
| 40 | <ConfigurationType>DynamicLibrary</ConfigurationType> | ||
| 41 | <PlatformToolset>v142</PlatformToolset> | ||
| 42 | <CharacterSet>Unicode</CharacterSet> | ||
| 43 | <TargetName>mbanative</TargetName> | ||
| 44 | <ProjectModuleDefinitionFile>mbanative.def</ProjectModuleDefinitionFile> | ||
| 45 | <EnableSourceLink Condition=" '$(PlatformToolset)'=='v140' ">false</EnableSourceLink> | ||
| 46 | </PropertyGroup> | ||
| 47 | |||
| 48 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | ||
| 49 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | ||
| 50 | <Import Project="..\NativeMultiTargeting.Build.props" /> | ||
| 51 | |||
| 52 | <ImportGroup Label="Shared"> | ||
| 53 | <Import Project="..\..\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.targets" Condition="Exists('..\..\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.targets')" /> | ||
| 54 | <Import Project="..\..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.targets" Condition="Exists('..\..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.targets')" /> | ||
| 55 | <Import Project="..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.targets" Condition="Exists('..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.targets')" /> | ||
| 56 | <Import Project="..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets" Condition="Exists('..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets')" /> | ||
| 57 | </ImportGroup> | ||
| 58 | |||
| 59 | <PropertyGroup> | ||
| 60 | <ProjectAdditionalIncludeDirectories>..\balutil\inc</ProjectAdditionalIncludeDirectories> | ||
| 61 | <ProjectAdditionalLinkLibraries>balutil.lib</ProjectAdditionalLinkLibraries> | ||
| 62 | </PropertyGroup> | ||
| 63 | |||
| 64 | <ItemGroup> | ||
| 65 | <ClCompile Include="mbanative.cpp" /> | ||
| 66 | <ClCompile Include="precomp.cpp"> | ||
| 67 | <PrecompiledHeader>Create</PrecompiledHeader> | ||
| 68 | </ClCompile> | ||
| 69 | </ItemGroup> | ||
| 70 | <ItemGroup> | ||
| 71 | <ClInclude Include="precomp.h" /> | ||
| 72 | </ItemGroup> | ||
| 73 | <ItemGroup> | ||
| 74 | <None Include="mbanative.def" /> | ||
| 75 | </ItemGroup> | ||
| 76 | |||
| 77 | <ItemGroup> | ||
| 78 | <None Include="packages.config" /> | ||
| 79 | </ItemGroup> | ||
| 80 | |||
| 81 | <ItemGroup> | ||
| 82 | <ProjectReference Include="..\balutil\balutil.vcxproj"> | ||
| 83 | <Project>{EDCB8095-0E6A-43E0-BC33-C4F762FC5CDB}</Project> | ||
| 84 | </ProjectReference> | ||
| 85 | </ItemGroup> | ||
| 86 | |||
| 87 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | ||
| 88 | <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> | ||
| 89 | <PropertyGroup> | ||
| 90 | <ErrorText>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}.</ErrorText> | ||
| 91 | </PropertyGroup> | ||
| 92 | <Error Condition="!Exists('..\..\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.props'))" /> | ||
| 93 | <Error Condition="!Exists('..\..\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.targets'))" /> | ||
| 94 | <Error Condition="!Exists('..\..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.props'))" /> | ||
| 95 | <Error Condition="!Exists('..\..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.targets'))" /> | ||
| 96 | <Error Condition="!Exists('..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props'))" /> | ||
| 97 | <Error Condition="!Exists('..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.targets'))" /> | ||
| 98 | <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets'))" /> | ||
| 99 | <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props'))" /> | ||
| 100 | <Error Condition="!Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.141\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.BootstrapperCore.Native.4.0.141\build\WixToolset.BootstrapperCore.Native.props'))" /> | ||
| 101 | </Target> | ||
| 102 | </Project> \ No newline at end of file | ||
diff --git a/src/api/burn/mbanative/packages.config b/src/api/burn/mbanative/packages.config new file mode 100644 index 00000000..745fcae9 --- /dev/null +++ b/src/api/burn/mbanative/packages.config | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <packages> | ||
| 3 | <package id="Microsoft.Build.Tasks.Git" version="1.0.0" targetFramework="native" developmentDependency="true" /> | ||
| 4 | <package id="Microsoft.SourceLink.Common" version="1.0.0" targetFramework="native" developmentDependency="true" /> | ||
| 5 | <package id="Microsoft.SourceLink.GitHub" version="1.0.0" targetFramework="native" developmentDependency="true" /> | ||
| 6 | <package id="Nerdbank.GitVersioning" version="3.3.37" targetFramework="native" developmentDependency="true" /> | ||
| 7 | <package id="WixToolset.BootstrapperCore.Native" version="4.0.141" targetFramework="native" /> | ||
| 8 | <package id="WixToolset.DUtil" version="4.0.72" targetFramework="native" /> | ||
| 9 | </packages> \ No newline at end of file | ||
diff --git a/src/api/burn/mbanative/precomp.cpp b/src/api/burn/mbanative/precomp.cpp new file mode 100644 index 00000000..37664a1c --- /dev/null +++ b/src/api/burn/mbanative/precomp.cpp | |||
| @@ -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" | ||
diff --git a/src/api/burn/mbanative/precomp.h b/src/api/burn/mbanative/precomp.h new file mode 100644 index 00000000..2e2f3ff8 --- /dev/null +++ b/src/api/burn/mbanative/precomp.h | |||
| @@ -0,0 +1,16 @@ | |||
| 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 <msiquery.h> | ||
| 7 | |||
| 8 | #include <dutil.h> | ||
| 9 | #include <verutil.h> | ||
| 10 | |||
| 11 | #include <BootstrapperEngine.h> | ||
| 12 | #include <BootstrapperApplication.h> | ||
| 13 | |||
| 14 | #include <IBootstrapperEngine.h> | ||
| 15 | #include <IBootstrapperApplication.h> | ||
| 16 | #include <balutil.h> | ||
