Skip to content

Commit

Permalink
Include native .pdbs in .wixext.nupkg and refine build process
Browse files Browse the repository at this point in the history
  • Loading branch information
robmen committed Feb 27, 2021
1 parent 3fae69c commit 1550b30
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 37 deletions.
17 changes: 11 additions & 6 deletions appveyor.cmd
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
@setlocal
@pushd %~dp0
@set _C=Release
@if /i "%1"=="debug" set _C=Debug

nuget restore || exit /b
:: Restore
msbuild -p:Configuration=%_C% -t:Restore || exit /b

msbuild -p:Configuration=Release -t:Restore || exit /b
:: Build
msbuild -p:Configuration=%_C% src\test\WixToolsetTest.Dependency\WixToolsetTest.Dependency.csproj || exit /b

msbuild -p:Configuration=Release src\test\WixToolsetTest.Dependency\WixToolsetTest.Dependency.csproj || exit /b
dotnet test -c Release --no-build src\test\WixToolsetTest.Dependency || exit /b
:: Test
dotnet test -c %_C% --no-build src\test\WixToolsetTest.Dependency || exit /b

msbuild -p:Configuration=Release -t:Pack src\wixext\WixToolset.Dependency.wixext.csproj || exit /b
:: Pack
msbuild -p:Configuration=%_C% -p:NoBuild=true -t:Pack src\wixext\WixToolset.Dependency.wixext.csproj || exit /b

@popd
@endlocal
@endlocal
2 changes: 2 additions & 0 deletions src/Cpp.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<Platform Condition=" '$(Platform)' == '' OR '$(Platform)' == 'AnyCPU' ">Win32</Platform>
<IntDir>$(BaseIntermediateOutputPath)$(Configuration)\$(Platform)\</IntDir>
<OutDir>$(OutputPath)$(Platform)\</OutDir>
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
<NuGetTargetMoniker>native,Version=v0.0</NuGetTargetMoniker>
</PropertyGroup>

<PropertyGroup Condition="'$(WindowsTargetPlatformVersion)'=='' AND '$(VisualStudioVersion)'>='15.0'">
Expand Down
8 changes: 0 additions & 8 deletions src/FindLocalWix.props

This file was deleted.

35 changes: 24 additions & 11 deletions src/ca/dependencyca.vcxproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 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. -->

<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\packages\WixToolset.DUtil.4.0.56\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.56\build\WixToolset.DUtil.props')" />
<Import Project="..\..\packages\WixToolset.WcaUtil.4.0.17\build\WixToolset.WcaUtil.props" Condition="Exists('..\..\packages\WixToolset.WcaUtil.4.0.17\build\WixToolset.WcaUtil.props')" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
Expand All @@ -29,6 +28,7 @@
<Platform>ARM64</Platform>
</ProjectConfiguration>
</ItemGroup>

<PropertyGroup Label="Globals">
<ProjectGuid>{B86AF46C-0F90-49CC-923F-A800B088D015}</ProjectGuid>
<ConfigurationType>DynamicLibrary</ConfigurationType>
Expand All @@ -39,30 +39,43 @@
<Description>WiX Toolset Dependency CustomAction</Description>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>

<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />

<PropertyGroup>
<ProjectAdditionalLinkLibraries>msi.lib</ProjectAdditionalLinkLibraries>
</PropertyGroup>

<ItemGroup>
<ClCompile Include="dllmain.cpp">
<PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="wixdepca.cpp" />
</ItemGroup>

<ItemGroup>
<ClInclude Include="precomp.h" />
</ItemGroup>

<ItemGroup>
<None Include="packages.config" />
<None Include="wixdepca.def" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="WixToolset.Dutil">
<Version>4.0.62</Version>
</PackageReference>
<PackageReference Include="WixToolset.WcaUtil">
<Version>4.0.18</Version>
</PackageReference>
<PackageReference Include="Microsoft.SourceLink.GitHub">
<Version>1.0.0</Version>
</PackageReference>
<PackageReference Include="Nerdbank.GitVersioning">
<Version>3.3.37</Version>
</PackageReference>
</ItemGroup>

<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<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>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.56\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.56\build\WixToolset.DUtil.props'))" />
<Error Condition="!Exists('..\..\packages\WixToolset.WcaUtil.4.0.17\build\WixToolset.WcaUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.WcaUtil.4.0.17\build\WixToolset.WcaUtil.props'))" />
</Target>
</Project>
</Project>
5 changes: 0 additions & 5 deletions src/ca/packages.config

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<DebugType>embedded</DebugType>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand Down
15 changes: 11 additions & 4 deletions src/wixext/WixToolset.Dependency.wixext.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,35 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<DebugType>embedded</DebugType>
<RootNamespace>WixToolset.Dependency</RootNamespace>
<Description>WiX Toolset Dependency Extension</Description>
<Title>WiX Toolset Dependency Extension</Title>
<IsTool>true</IsTool>
<ContentTargetFolders>build</ContentTargetFolders>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
</PropertyGroup>

<ItemGroup>
<Content Include="$(MSBuildThisFileName).targets" />
<EmbeddedResource Include="$(OutputPath)..\dependency.wixlib" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="WixToolset.Data" Version="4.0.*" PrivateAssets="all" />
<PackageReference Include="WixToolset.Extensibility" Version="4.0.*" PrivateAssets="all" />
<Content Include="$(MSBuildThisFileName).targets" PackagePath="build" />
<Content Include="$(OutputPath)..\**\*.pdb" PackagePath="pdbs\%(RelativeFolder)" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\wixlib\dependency.wixproj" ReferenceOutputAssembly="false" Condition=" '$(NCrunch)'=='' " />
</ItemGroup>

<ItemGroup>
<PackageReference Include="WixToolset.Data" Version="4.0.*" PrivateAssets="all" />
<PackageReference Include="WixToolset.Extensibility" Version="4.0.*" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="all" />
<PackageReference Include="Nerdbank.GitVersioning" Version="3.3.37" PrivateAssets="all" />
</ItemGroup>
</Project>
8 changes: 5 additions & 3 deletions src/wixlib/dependency.wixproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- 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. -->

<Project Sdk="WixToolset.Sdk">

<PropertyGroup>
Expand All @@ -16,9 +18,9 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\ca\dependencyca.vcxproj" Properties="Platform=ARM64" />
<ProjectReference Include="..\ca\dependencyca.vcxproj" Properties="Platform=x86" />
<ProjectReference Include="..\ca\dependencyca.vcxproj" Properties="Platform=x64" />
<ProjectReference Include="..\ca\dependencyca.vcxproj" Properties="Platform=ARM64" ReferenceOutputAssembly="false" />
<ProjectReference Include="..\ca\dependencyca.vcxproj" Properties="Platform=x86" ReferenceOutputAssembly="false" />
<ProjectReference Include="..\ca\dependencyca.vcxproj" Properties="Platform=x64" ReferenceOutputAssembly="false" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 1550b30

Please sign in to comment.