From 73e6559b809f5f5ae2041d22ec81479df0fe91f9 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sat, 2 Feb 2019 14:07:55 -0600 Subject: Integrate into latest v4. --- .editorconfig | 37 ++++++++ DirectX.wixext.sln | 61 ++++++++++++ appveyor.cmd | 13 +++ appveyor.yml | 42 +++++++++ nuget.config | 16 ++++ src/Cpp.Build.props | 104 +++++++++++++++++++++ src/Directory.Build.props | 28 ++++++ src/Directory.Build.targets | 48 ++++++++++ src/FindLocalWix.props | 8 ++ src/ca/directx.def | 2 +- src/ca/directx.vcxproj | 47 ---------- src/ca/directxca.vcxproj | 61 ++++++++++++ src/ca/packages.config | 5 + src/ca/precomp.h | 3 - .../DirectXExtensionFixture.cs | 32 +++++++ .../UsingPixelShaderVersion/Package.en-us.wxl | 11 +++ .../TestData/UsingPixelShaderVersion/Package.wxs | 22 +++++ .../UsingPixelShaderVersion/PackageComponents.wxs | 11 +++ .../TestData/UsingPixelShaderVersion/example.txt | 1 + .../WixToolsetTest.DirectX.csproj | 38 ++++++++ src/wixext/DirectXDecompiler.cs | 4 +- src/wixext/DirectXExtensionData.cs | 24 ++--- src/wixext/DirectXExtensionFactory.cs | 16 ++++ src/wixext/WixDirectXExtension.csproj | 31 ------ src/wixext/WixToolset.DirectX.wixext.csproj | 31 ++++++ src/wixext/WixToolset.DirectX.wixext.targets | 11 +++ src/wixlib/DirectXExtension.wixproj | 24 ----- src/wixlib/DirectXExtension.wxs | 4 +- src/wixlib/caerr.wxi | 96 +++++++++++++++++++ src/wixlib/directx.wixproj | 40 ++++++++ src/wixlib/packages.config | 5 + version.json | 11 +++ 32 files changed, 761 insertions(+), 126 deletions(-) create mode 100644 .editorconfig create mode 100644 DirectX.wixext.sln create mode 100644 appveyor.cmd create mode 100644 appveyor.yml create mode 100644 nuget.config create mode 100644 src/Cpp.Build.props create mode 100644 src/Directory.Build.props create mode 100644 src/Directory.Build.targets create mode 100644 src/FindLocalWix.props delete mode 100644 src/ca/directx.vcxproj create mode 100644 src/ca/directxca.vcxproj create mode 100644 src/ca/packages.config create mode 100644 src/test/WixToolsetTest.DirectX/DirectXExtensionFixture.cs create mode 100644 src/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/Package.en-us.wxl create mode 100644 src/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/Package.wxs create mode 100644 src/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/PackageComponents.wxs create mode 100644 src/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/example.txt create mode 100644 src/test/WixToolsetTest.DirectX/WixToolsetTest.DirectX.csproj create mode 100644 src/wixext/DirectXExtensionFactory.cs delete mode 100644 src/wixext/WixDirectXExtension.csproj create mode 100644 src/wixext/WixToolset.DirectX.wixext.csproj create mode 100644 src/wixext/WixToolset.DirectX.wixext.targets delete mode 100644 src/wixlib/DirectXExtension.wixproj create mode 100644 src/wixlib/caerr.wxi create mode 100644 src/wixlib/directx.wixproj create mode 100644 src/wixlib/packages.config create mode 100644 version.json diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..1d72e683 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,37 @@ +# 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. +# +# Do NOT modify this file. Update the canonical version in Home\repo-template\src\.editorconfig +# then update all of the repos. + +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 4 +trim_trailing_whitespace = true + +[*.{cs,vb}] +dotnet_sort_system_directives_first = true + +[*.cs] +csharp_indent_case_contents = true : error +csharp_indent_switch_labels = true : error +csharp_new_line_before_open_brace = all +csharp_prefer_braces = true : error +csharp_style_expression_bodied_methods = when_on_single_line : suggestion +csharp_style_expression_bodied_constructors = when_on_single_line : suggestion +csharp_style_expression_bodied_operators = when_on_single_line : suggestion +csharp_style_expression_bodied_properties = when_on_single_line : suggestion +csharp_style_expression_bodied_indexers = when_on_single_line : suggestion +csharp_style_expression_bodied_accessors = when_on_single_line : suggestion +csharp_style_var_elsewhere = true : suggestion +csharp_style_var_for_built_in_types = true : suggestion +csharp_style_var_when_type_is_apparent = true : suggestion +dotnet_style_qualification_for_event = true : error +dotnet_style_qualification_for_field = true : error +dotnet_style_qualification_for_method = true : error +dotnet_style_qualification_for_property = true : error + +[*.targets] +indent_size = 2 diff --git a/DirectX.wixext.sln b/DirectX.wixext.sln new file mode 100644 index 00000000..31a91b99 --- /dev/null +++ b/DirectX.wixext.sln @@ -0,0 +1,61 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28010.2016 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "directxca", "src\ca\directxca.vcxproj", "{76542B28-0FFD-47D3-AD6A-D0F20FA875AC}" +EndProject +Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "directx", "src\wixlib\directx.wixproj", "{4D8DDEC7-AAAC-4A32-87D0-5992FE382ED9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.DirectX.wixext", "src\wixext\WixToolset.DirectX.wixext.csproj", "{6182DBCA-146A-4F37-8406-3139BBE04636}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.DirectX", "src\test\WixToolsetTest.DirectX\WixToolsetTest.DirectX.csproj", "{508A3DD0-FE58-4150-A1F6-A803A377012A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {76542B28-0FFD-47D3-AD6A-D0F20FA875AC}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {76542B28-0FFD-47D3-AD6A-D0F20FA875AC}.Debug|Any CPU.Build.0 = Debug|Win32 + {76542B28-0FFD-47D3-AD6A-D0F20FA875AC}.Debug|x86.ActiveCfg = Debug|Win32 + {76542B28-0FFD-47D3-AD6A-D0F20FA875AC}.Debug|x86.Build.0 = Debug|Win32 + {76542B28-0FFD-47D3-AD6A-D0F20FA875AC}.Release|Any CPU.ActiveCfg = Release|Win32 + {76542B28-0FFD-47D3-AD6A-D0F20FA875AC}.Release|Any CPU.Build.0 = Release|Win32 + {76542B28-0FFD-47D3-AD6A-D0F20FA875AC}.Release|x86.ActiveCfg = Release|Win32 + {76542B28-0FFD-47D3-AD6A-D0F20FA875AC}.Release|x86.Build.0 = Release|Win32 + {4D8DDEC7-AAAC-4A32-87D0-5992FE382ED9}.Debug|Any CPU.ActiveCfg = Debug|x86 + {4D8DDEC7-AAAC-4A32-87D0-5992FE382ED9}.Debug|Any CPU.Build.0 = Debug|x86 + {4D8DDEC7-AAAC-4A32-87D0-5992FE382ED9}.Debug|x86.ActiveCfg = Debug|x86 + {4D8DDEC7-AAAC-4A32-87D0-5992FE382ED9}.Debug|x86.Build.0 = Debug|x86 + {4D8DDEC7-AAAC-4A32-87D0-5992FE382ED9}.Release|Any CPU.ActiveCfg = Release|x86 + {4D8DDEC7-AAAC-4A32-87D0-5992FE382ED9}.Release|Any CPU.Build.0 = Release|x86 + {4D8DDEC7-AAAC-4A32-87D0-5992FE382ED9}.Release|x86.ActiveCfg = Release|x86 + {4D8DDEC7-AAAC-4A32-87D0-5992FE382ED9}.Release|x86.Build.0 = Release|x86 + {6182DBCA-146A-4F37-8406-3139BBE04636}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6182DBCA-146A-4F37-8406-3139BBE04636}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6182DBCA-146A-4F37-8406-3139BBE04636}.Debug|x86.ActiveCfg = Debug|Any CPU + {6182DBCA-146A-4F37-8406-3139BBE04636}.Debug|x86.Build.0 = Debug|Any CPU + {6182DBCA-146A-4F37-8406-3139BBE04636}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6182DBCA-146A-4F37-8406-3139BBE04636}.Release|Any CPU.Build.0 = Release|Any CPU + {6182DBCA-146A-4F37-8406-3139BBE04636}.Release|x86.ActiveCfg = Release|Any CPU + {6182DBCA-146A-4F37-8406-3139BBE04636}.Release|x86.Build.0 = Release|Any CPU + {508A3DD0-FE58-4150-A1F6-A803A377012A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {508A3DD0-FE58-4150-A1F6-A803A377012A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {508A3DD0-FE58-4150-A1F6-A803A377012A}.Debug|x86.ActiveCfg = Debug|Any CPU + {508A3DD0-FE58-4150-A1F6-A803A377012A}.Debug|x86.Build.0 = Debug|Any CPU + {508A3DD0-FE58-4150-A1F6-A803A377012A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {508A3DD0-FE58-4150-A1F6-A803A377012A}.Release|Any CPU.Build.0 = Release|Any CPU + {508A3DD0-FE58-4150-A1F6-A803A377012A}.Release|x86.ActiveCfg = Release|Any CPU + {508A3DD0-FE58-4150-A1F6-A803A377012A}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A32D323A-3843-410E-BB3A-A97ABA6E4107} + EndGlobalSection +EndGlobal diff --git a/appveyor.cmd b/appveyor.cmd new file mode 100644 index 00000000..79950868 --- /dev/null +++ b/appveyor.cmd @@ -0,0 +1,13 @@ +@setlocal +@pushd %~dp0 + +nuget restore + +msbuild -p:Configuration=Release -t:Restore + +msbuild -p:Configuration=Release src\test\WixToolsetTest.DirectX\WixToolsetTest.DirectX.csproj + +msbuild -p:Configuration=Release -t:Pack src\wixext\WixToolset.DirectX.wixext.csproj + +@popd +@endlocal \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 00000000..8d80c6af --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,42 @@ +# 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. +# +# Do NOT modify this file. Update the canonical version in Home\repo-template\src\appveyor.yml +# then update all of the repos. + +branches: + only: + - master + - develop + +image: Visual Studio 2017 + +version: 0.0.0.{build} +configuration: Release + +environment: + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + NUGET_XMLDOC_MODE: skip + +build_script: + - appveyor.cmd + +pull_requests: + do_not_increment_build_number: true + +nuget: + disable_publish_on_pr: true + +skip_branch_with_pr: true +skip_tags: true + +artifacts: +- path: build\Release\**\*.nupkg + name: nuget +- path: build\Release\**\*.msi + name: msi + +notifications: +- provider: Slack + incoming_webhook: + secure: p5xuu+4x2JHfwGDMDe5KcG1k7gZxqYc4jWVwvyNZv5cvkubPD2waJs5yXMAXZNN7Z63/3PWHb7q4KoY/99AjauYa1nZ4c5qYqRPFRBKTHfA= diff --git a/nuget.config b/nuget.config new file mode 100644 index 00000000..aaee3228 --- /dev/null +++ b/nuget.config @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Cpp.Build.props b/src/Cpp.Build.props new file mode 100644 index 00000000..0e00132b --- /dev/null +++ b/src/Cpp.Build.props @@ -0,0 +1,104 @@ + + + + + + Win32 + $(BaseIntermediateOutputPath)$(Configuration)\$(Platform)\ + $(OutputPath)$(Platform)\ + + + + $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) + + + + + $(DisableSpecificCompilerWarnings) + Level4 + $(ProjectDir)inc;$(MSBuildProjectDirectory);$(IntDir);$(SqlCESdkIncludePath);$(ProjectAdditionalIncludeDirectories);%(AdditionalIncludeDirectories) + WIN32;_WINDOWS;_WIN32_MSI=500;_WIN32_WINNT=0x0501;$(ArmPreprocessorDefinitions);$(UnicodePreprocessorDefinitions);_CRT_STDIO_LEGACY_WIDE_SPECIFIERS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions) + Use + precomp.h + StdCall + true + false + -YlprecompDefine + /Zc:threadSafeInit- %(AdditionalOptions) + true + + + $(ArmPreprocessorDefinitions);%(PreprocessorDefinitions) + $(ProjectAdditionalResourceIncludeDirectories);%(AdditionalIncludeDirectories) + + + $(OutDir);$(AdditionalMultiTargetLibraryPath);$(ProjectAdditionalLibraryDirectories);%(AdditionalLibraryDirectories) + + + $(ProjectSubSystem) + $(ProjectModuleDefinitionFile) + $(ResourceOnlyDll) + true + $(ProjectAdditionalLinkLibraries);advapi32.lib;comdlg32.lib;user32.lib;oleaut32.lib;gdi32.lib;shell32.lib;ole32.lib;version.lib;%(AdditionalDependencies) + $(OutDir);$(AdditionalMultiTargetLibraryPath);$(ArmLibraryDirectories);$(ProjectAdditionalLinkLibraryDirectories);%(AdditionalLibraryDirectories) + /IGNORE:4099 %(AdditionalOptions) + + + + + + NoExtensions + + + + + CDecl + + + + + OldStyle + true + true + + + + + Disabled + EnableFastChecks + _DEBUG;DEBUG;%(PreprocessorDefinitions) + MultiThreadedDebug + + + + + + MultiThreadedDebugDll + + + + + MinSpace + NDEBUG;%(PreprocessorDefinitions) + true + true + MultiThreaded + + + true + true + + + + + + MultiThreadedDll + + + + + $(LinkKeyFile) + $(LinkDelaySign) + + + diff --git a/src/Directory.Build.props b/src/Directory.Build.props new file mode 100644 index 00000000..a22f4470 --- /dev/null +++ b/src/Directory.Build.props @@ -0,0 +1,28 @@ + + + + + + Debug + false + MSB3246 + + $(MSBuildProjectName) + $([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\build\)) + $(BaseOutputPath)obj\$(ProjectName)\ + $(BaseOutputPath)$(Configuration)\ + + WiX Toolset Team + WiX Toolset + Copyright (c) .NET Foundation and contributors. All rights reserved. + MS-RL + WiX Toolset + + + + + + diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets new file mode 100644 index 00000000..dac7452a --- /dev/null +++ b/src/Directory.Build.targets @@ -0,0 +1,48 @@ + + + + + + + true + $(SolutionPath) + $(NCrunchOriginalSolutionPath) + + + + + + + $([System.IO.File]::ReadAllText($(TheSolutionPath))) + $([System.IO.Path]::GetDirectoryName( $(TheSolutionPath) )) + (?<="[PackageName]", ")(.*)(?=", ") + + + + + + %(Identity) + $(SolutionFileContent.Contains('\%(Identity).csproj')) + + + + + $(RegexPattern.Replace('[PackageName]','%(PackageName)') ) + $([System.Text.RegularExpressions.Regex]::Match('$(SolutionFileContent)', '%(Pattern)')) + + + + + + + + + + + diff --git a/src/FindLocalWix.props b/src/FindLocalWix.props new file mode 100644 index 00000000..a784e352 --- /dev/null +++ b/src/FindLocalWix.props @@ -0,0 +1,8 @@ + + + + + + $(MSBuildThisFileDirectory)..\..\Tools\build\Debug\net461\wix.targets + + diff --git a/src/ca/directx.def b/src/ca/directx.def index 5841db88..8f46f9a8 100644 --- a/src/ca/directx.def +++ b/src/ca/directx.def @@ -1,7 +1,7 @@ ; 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. -LIBRARY "directx" +LIBRARY "directxca" EXPORTS WixQueryDirectXCaps diff --git a/src/ca/directx.vcxproj b/src/ca/directx.vcxproj deleted file mode 100644 index e4020bcc..00000000 --- a/src/ca/directx.vcxproj +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - Debug - Win32 - - - Release - Win32 - - - - - {F72D34CA-48DA-4DFD-91A9-A0C78BEF6981} - DynamicLibrary - Unicode - directx - directx.def - - - - - - $(WixRoot)src\libs\dutil\inc;$(WixRoot)src\libs\wcautil - d3d9.lib;msi.lib;dutil.lib;wcautil.lib - - - - - - - - - - - - - - - - - - diff --git a/src/ca/directxca.vcxproj b/src/ca/directxca.vcxproj new file mode 100644 index 00000000..f3fb07a8 --- /dev/null +++ b/src/ca/directxca.vcxproj @@ -0,0 +1,61 @@ + + + + + + + + + + Debug + Win32 + + + Release + Win32 + + + + + {76542B28-0FFD-47D3-AD6A-D0F20FA875AC} + DynamicLibrary + v141 + Unicode + directxca + directx.def + WiX Toolset DirectX CustomAction + + + + + + + d3d9.lib;msi.lib + + + + + + Create + + + + + + + + + + + + + + + + + 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/ca/packages.config b/src/ca/packages.config new file mode 100644 index 00000000..b87f9ab4 --- /dev/null +++ b/src/ca/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/src/ca/precomp.h b/src/ca/precomp.h index 8480f2b2..75a15829 100644 --- a/src/ca/precomp.h +++ b/src/ca/precomp.h @@ -7,8 +7,5 @@ #include #include -#include "wixstrsafe.h" #include "wcautil.h" #include "strutil.h" - -#include "CustomMsiErrors.h" diff --git a/src/test/WixToolsetTest.DirectX/DirectXExtensionFixture.cs b/src/test/WixToolsetTest.DirectX/DirectXExtensionFixture.cs new file mode 100644 index 00000000..b11cb7fc --- /dev/null +++ b/src/test/WixToolsetTest.DirectX/DirectXExtensionFixture.cs @@ -0,0 +1,32 @@ +// 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. + +namespace WixToolsetTest.DirectX +{ + using System.Linq; + using WixBuildTools.TestSupport; + using WixToolset.Core.TestPackage; + using WixToolset.DirectX; + using Xunit; + + public class DirectXExtensionFixture + { + [Fact] + public void CanBuildUsingPixelShaderVersion() + { + var folder = TestData.Get(@"TestData\UsingPixelShaderVersion"); + var build = new Builder(folder, typeof(DirectXExtensionFactory), new[] { folder }); + + var results = build.BuildAndQuery(Build, "CustomAction"); + Assert.Equal(new[] + { + "CustomAction:WixQueryDirectXCaps\t65\tDirectXCA\tWixQueryDirectXCaps\t0", + }, results.OrderBy(s => s).ToArray()); + } + + private static void Build(string[] args) + { + var result = WixRunner.Execute(args) + .AssertSuccess(); + } + } +} diff --git a/src/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/Package.en-us.wxl b/src/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/Package.en-us.wxl new file mode 100644 index 00000000..38c12ac1 --- /dev/null +++ b/src/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/Package.en-us.wxl @@ -0,0 +1,11 @@ + + + + + + A newer version of [ProductName] is already installed. + MsiPackage + + diff --git a/src/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/Package.wxs b/src/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/Package.wxs new file mode 100644 index 00000000..68ff98fd --- /dev/null +++ b/src/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/Package.wxs @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/PackageComponents.wxs b/src/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/PackageComponents.wxs new file mode 100644 index 00000000..f3a2ae92 --- /dev/null +++ b/src/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/PackageComponents.wxs @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/example.txt b/src/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/example.txt new file mode 100644 index 00000000..1b4ffe8a --- /dev/null +++ b/src/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/example.txt @@ -0,0 +1 @@ +This is example.txt. \ No newline at end of file diff --git a/src/test/WixToolsetTest.DirectX/WixToolsetTest.DirectX.csproj b/src/test/WixToolsetTest.DirectX/WixToolsetTest.DirectX.csproj new file mode 100644 index 00000000..8edce963 --- /dev/null +++ b/src/test/WixToolsetTest.DirectX/WixToolsetTest.DirectX.csproj @@ -0,0 +1,38 @@ + + + + + + netcoreapp2.1 + false + + + + NU1701 + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixext/DirectXDecompiler.cs b/src/wixext/DirectXDecompiler.cs index c8056c12..03f90163 100644 --- a/src/wixext/DirectXDecompiler.cs +++ b/src/wixext/DirectXDecompiler.cs @@ -1,7 +1,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. -namespace WixToolset.Extensions +namespace WixToolset.DirectX { +#if TODO_CONSIDER_DECOMPILER using System; using System.Text; using WixToolset.Data; @@ -67,4 +68,5 @@ namespace WixToolset.Extensions } } } +#endif } diff --git a/src/wixext/DirectXExtensionData.cs b/src/wixext/DirectXExtensionData.cs index 828b087d..0221d104 100644 --- a/src/wixext/DirectXExtensionData.cs +++ b/src/wixext/DirectXExtensionData.cs @@ -1,34 +1,24 @@ // 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. -namespace WixToolset.Extensions +namespace WixToolset.DirectX { - using System; - using System.Reflection; using WixToolset.Data; using WixToolset.Extensibility; /// /// The WiX Toolset DirectX Extension. /// - public sealed class DirectXExtensionData : ExtensionData + public sealed class DirectXExtensionData : BaseExtensionData { /// - /// Gets the library associated with this extension. + /// Gets the default culture. /// - /// The table definitions to use while loading the library. - /// The loaded library. - public override Library GetLibrary(TableDefinitionCollection tableDefinitions) - { - return DirectXExtensionData.GetExtensionLibrary(tableDefinitions); - } + /// The default culture. + public override string DefaultCulture => "en-US"; - /// - /// Internal mechanism to access the extension's library. - /// - /// Extension's library. - internal static Library GetExtensionLibrary(TableDefinitionCollection tableDefinitions) + public override Intermediate GetLibrary(ITupleDefinitionCreator tupleDefinitions) { - return ExtensionData.LoadLibraryHelper(Assembly.GetExecutingAssembly(), "WixToolset.Extensions.Data.DirectX.wixlib", tableDefinitions); + return Intermediate.Load(typeof(DirectXExtensionData).Assembly, "WixToolset.DirectX.directx.wixlib", tupleDefinitions); } } } diff --git a/src/wixext/DirectXExtensionFactory.cs b/src/wixext/DirectXExtensionFactory.cs new file mode 100644 index 00000000..b3755ee9 --- /dev/null +++ b/src/wixext/DirectXExtensionFactory.cs @@ -0,0 +1,16 @@ +// 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. + +namespace WixToolset.DirectX +{ + using System; + using System.Collections.Generic; + using WixToolset.Extensibility; + + public class DirectXExtensionFactory : BaseExtensionFactory + { + protected override IEnumerable ExtensionTypes => new[] + { + typeof(DirectXExtensionData), + }; + } +} diff --git a/src/wixext/WixDirectXExtension.csproj b/src/wixext/WixDirectXExtension.csproj deleted file mode 100644 index 577d36f3..00000000 --- a/src/wixext/WixDirectXExtension.csproj +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - {6182DBCA-146A-4F37-8406-3139BBE04636} - WixDirectXExtension - Library - WixToolset.Extensions - - - - - - - Data\DirectX.wixlib - - - - - - - - - - false - - - - diff --git a/src/wixext/WixToolset.DirectX.wixext.csproj b/src/wixext/WixToolset.DirectX.wixext.csproj new file mode 100644 index 00000000..a848ff9a --- /dev/null +++ b/src/wixext/WixToolset.DirectX.wixext.csproj @@ -0,0 +1,31 @@ + + + + + + netstandard2.0 + WixToolset.DirectX + WiX Toolset DirectX Extension + WiX Toolset DirectX Extension + true + build + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixext/WixToolset.DirectX.wixext.targets b/src/wixext/WixToolset.DirectX.wixext.targets new file mode 100644 index 00000000..4e27a6da --- /dev/null +++ b/src/wixext/WixToolset.DirectX.wixext.targets @@ -0,0 +1,11 @@ + + + + + + $(MSBuildThisFileDirectory)..\tools\WixToolset.DirectX.wixext.dll + + + + + diff --git a/src/wixlib/DirectXExtension.wixproj b/src/wixlib/DirectXExtension.wixproj deleted file mode 100644 index e98970e9..00000000 --- a/src/wixlib/DirectXExtension.wixproj +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - {4D8DDEC7-AAAC-4A32-87D0-5992FE382ED9} - directx - Library - true - true - en-us - - - - - - - - - - - - diff --git a/src/wixlib/DirectXExtension.wxs b/src/wixlib/DirectXExtension.wxs index 022ea5a5..12a8bbb6 100644 --- a/src/wixlib/DirectXExtension.wxs +++ b/src/wixlib/DirectXExtension.wxs @@ -7,11 +7,11 @@ - + - + VersionNT > 400 diff --git a/src/wixlib/caerr.wxi b/src/wixlib/caerr.wxi new file mode 100644 index 00000000..141942f2 --- /dev/null +++ b/src/wixlib/caerr.wxi @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/wixlib/directx.wixproj b/src/wixlib/directx.wixproj new file mode 100644 index 00000000..4516133d --- /dev/null +++ b/src/wixlib/directx.wixproj @@ -0,0 +1,40 @@ + + + + + + + {4D8DDEC7-AAAC-4A32-87D0-5992FE382ED9} + directx + Library + true + true + en-us + + + + + + + + + + + directxca + {76542B28-0FFD-47D3-AD6A-D0F20FA875AC} + + + + + + + + + + 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 new file mode 100644 index 00000000..f3d424e1 --- /dev/null +++ b/src/wixlib/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/version.json b/version.json new file mode 100644 index 00000000..5f857771 --- /dev/null +++ b/version.json @@ -0,0 +1,11 @@ +{ + "version": "4.0", + "publicReleaseRefSpec": [ + "^refs/heads/master$" + ], + "cloudBuild": { + "buildNumber": { + "enabled": true + } + } +} -- cgit v1.2.3-55-g6feb