From fe2f7e06c595a4e7115d83c4cc8a05b28db5002a Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Tue, 4 May 2021 22:45:02 -0700 Subject: Move DirectX.wixext into ext --- src/.editorconfig | 37 ++++++++ src/CSharp.Build.props | 11 --- src/Cpp.Build.props | 86 ------------------ src/Directory.Build.props | 29 ------- src/Directory.Build.targets | 48 ----------- src/ca/directx.cpp | 49 ----------- src/ca/directx.def | 7 -- src/ca/directxca.vcxproj | 70 --------------- src/ca/dllmain.cpp | 26 ------ src/ca/packages.config | 5 -- src/ca/precomp.h | 11 --- src/ext/DirectX/CSharp.Build.props | 11 +++ src/ext/DirectX/Cpp.Build.props | 86 ++++++++++++++++++ src/ext/DirectX/DirectX.wixext.sln | 61 +++++++++++++ src/ext/DirectX/Directory.Build.props | 29 +++++++ src/ext/DirectX/Directory.Build.targets | 48 +++++++++++ src/ext/DirectX/README.md | 2 + src/ext/DirectX/appveyor.cmd | 14 +++ src/ext/DirectX/appveyor.yml | 40 +++++++++ src/ext/DirectX/ca/directx.cpp | 49 +++++++++++ src/ext/DirectX/ca/directx.def | 7 ++ src/ext/DirectX/ca/directxca.vcxproj | 70 +++++++++++++++ src/ext/DirectX/ca/dllmain.cpp | 26 ++++++ src/ext/DirectX/ca/packages.config | 5 ++ src/ext/DirectX/ca/precomp.h | 11 +++ src/ext/DirectX/nuget.config | 17 ++++ .../DirectXExtensionFixture.cs | 32 +++++++ .../UsingPixelShaderVersion/Package.en-us.wxl | 11 +++ .../TestData/UsingPixelShaderVersion/Package.wxs | 15 ++++ .../UsingPixelShaderVersion/PackageComponents.wxs | 11 +++ .../TestData/UsingPixelShaderVersion/example.txt | 1 + .../WixToolsetTest.DirectX.csproj | 41 +++++++++ src/ext/DirectX/wix.snk | Bin 0 -> 596 bytes src/ext/DirectX/wixext/DirectXDecompiler.cs | 72 ++++++++++++++++ src/ext/DirectX/wixext/DirectXExtensionData.cs | 24 ++++++ src/ext/DirectX/wixext/DirectXExtensionFactory.cs | 16 ++++ .../wixext/WixToolset.DirectX.wixext.csproj | 31 +++++++ .../wixext/WixToolset.DirectX.wixext.targets | 11 +++ src/ext/DirectX/wixlib/DirectXExtension.wxs | 33 +++++++ src/ext/DirectX/wixlib/caerr.wxi | 96 +++++++++++++++++++++ src/ext/DirectX/wixlib/directx.wixproj | 13 +++ src/ext/global.json | 5 ++ .../DirectXExtensionFixture.cs | 32 ------- .../UsingPixelShaderVersion/Package.en-us.wxl | 11 --- .../TestData/UsingPixelShaderVersion/Package.wxs | 15 ---- .../UsingPixelShaderVersion/PackageComponents.wxs | 11 --- .../TestData/UsingPixelShaderVersion/example.txt | 1 - .../WixToolsetTest.DirectX.csproj | 41 --------- src/version.json | 11 +++ src/wix.snk | Bin 596 -> 0 bytes src/wixext/DirectXDecompiler.cs | 72 ---------------- src/wixext/DirectXExtensionData.cs | 24 ------ src/wixext/DirectXExtensionFactory.cs | 16 ---- src/wixext/WixToolset.DirectX.wixext.csproj | 31 ------- src/wixext/WixToolset.DirectX.wixext.targets | 11 --- src/wixlib/DirectXExtension.wxs | 33 ------- src/wixlib/caerr.wxi | 96 --------------------- src/wixlib/directx.wixproj | 13 --- 58 files changed, 936 insertions(+), 749 deletions(-) create mode 100644 src/.editorconfig delete mode 100644 src/CSharp.Build.props delete mode 100644 src/Cpp.Build.props delete mode 100644 src/Directory.Build.props delete mode 100644 src/Directory.Build.targets delete mode 100644 src/ca/directx.cpp delete mode 100644 src/ca/directx.def delete mode 100644 src/ca/directxca.vcxproj delete mode 100644 src/ca/dllmain.cpp delete mode 100644 src/ca/packages.config delete mode 100644 src/ca/precomp.h create mode 100644 src/ext/DirectX/CSharp.Build.props create mode 100644 src/ext/DirectX/Cpp.Build.props create mode 100644 src/ext/DirectX/DirectX.wixext.sln create mode 100644 src/ext/DirectX/Directory.Build.props create mode 100644 src/ext/DirectX/Directory.Build.targets create mode 100644 src/ext/DirectX/README.md create mode 100644 src/ext/DirectX/appveyor.cmd create mode 100644 src/ext/DirectX/appveyor.yml create mode 100644 src/ext/DirectX/ca/directx.cpp create mode 100644 src/ext/DirectX/ca/directx.def create mode 100644 src/ext/DirectX/ca/directxca.vcxproj create mode 100644 src/ext/DirectX/ca/dllmain.cpp create mode 100644 src/ext/DirectX/ca/packages.config create mode 100644 src/ext/DirectX/ca/precomp.h create mode 100644 src/ext/DirectX/nuget.config create mode 100644 src/ext/DirectX/test/WixToolsetTest.DirectX/DirectXExtensionFixture.cs create mode 100644 src/ext/DirectX/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/Package.en-us.wxl create mode 100644 src/ext/DirectX/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/Package.wxs create mode 100644 src/ext/DirectX/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/PackageComponents.wxs create mode 100644 src/ext/DirectX/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/example.txt create mode 100644 src/ext/DirectX/test/WixToolsetTest.DirectX/WixToolsetTest.DirectX.csproj create mode 100644 src/ext/DirectX/wix.snk create mode 100644 src/ext/DirectX/wixext/DirectXDecompiler.cs create mode 100644 src/ext/DirectX/wixext/DirectXExtensionData.cs create mode 100644 src/ext/DirectX/wixext/DirectXExtensionFactory.cs create mode 100644 src/ext/DirectX/wixext/WixToolset.DirectX.wixext.csproj create mode 100644 src/ext/DirectX/wixext/WixToolset.DirectX.wixext.targets create mode 100644 src/ext/DirectX/wixlib/DirectXExtension.wxs create mode 100644 src/ext/DirectX/wixlib/caerr.wxi create mode 100644 src/ext/DirectX/wixlib/directx.wixproj create mode 100644 src/ext/global.json delete mode 100644 src/test/WixToolsetTest.DirectX/DirectXExtensionFixture.cs delete mode 100644 src/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/Package.en-us.wxl delete mode 100644 src/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/Package.wxs delete mode 100644 src/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/PackageComponents.wxs delete mode 100644 src/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/example.txt delete mode 100644 src/test/WixToolsetTest.DirectX/WixToolsetTest.DirectX.csproj create mode 100644 src/version.json delete mode 100644 src/wix.snk delete mode 100644 src/wixext/DirectXDecompiler.cs delete mode 100644 src/wixext/DirectXExtensionData.cs delete mode 100644 src/wixext/DirectXExtensionFactory.cs delete mode 100644 src/wixext/WixToolset.DirectX.wixext.csproj delete mode 100644 src/wixext/WixToolset.DirectX.wixext.targets delete mode 100644 src/wixlib/DirectXExtension.wxs delete mode 100644 src/wixlib/caerr.wxi delete mode 100644 src/wixlib/directx.wixproj (limited to 'src') diff --git a/src/.editorconfig b/src/.editorconfig new file mode 100644 index 00000000..1d72e683 --- /dev/null +++ b/src/.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/src/CSharp.Build.props b/src/CSharp.Build.props deleted file mode 100644 index b12f4c6e..00000000 --- a/src/CSharp.Build.props +++ /dev/null @@ -1,11 +0,0 @@ - - - - - true - $([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)wix.snk)) - - diff --git a/src/Cpp.Build.props b/src/Cpp.Build.props deleted file mode 100644 index 9b7a1bb5..00000000 --- a/src/Cpp.Build.props +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - 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 - - - - - MinSpace - NDEBUG;%(PreprocessorDefinitions) - true - true - MultiThreaded - - - true - true - - - diff --git a/src/Directory.Build.props b/src/Directory.Build.props deleted file mode 100644 index f83cc154..00000000 --- a/src/Directory.Build.props +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - 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 deleted file mode 100644 index dac7452a..00000000 --- a/src/Directory.Build.targets +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - 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/ca/directx.cpp b/src/ca/directx.cpp deleted file mode 100644 index 21838262..00000000 --- a/src/ca/directx.cpp +++ /dev/null @@ -1,49 +0,0 @@ -// 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. - -#include "precomp.h" - -/******************************************************************** -WixQueryDirectXCaps - entry point for WixQueryDirectXCaps CA - - Called as Type 1 custom action (DLL from the Binary table) from - Windows Installer to set properties that identify the DirectX - capabilities ("caps") of the system. -********************************************************************/ -extern "C" UINT __stdcall WixQueryDirectXCaps( - __in MSIHANDLE hInstall - ) -{ -#if 0 - ::MessageBoxA(0, "break into debugger now please", "---->> ATTACH TO ME!", MB_ICONEXCLAMATION); -#endif - - HRESULT hr = S_OK; - DWORD er = ERROR_SUCCESS; - LPDIRECT3D9 pD3D = NULL; - - hr = WcaInitialize(hInstall, "WixQueryDirectXCaps"); - ExitOnFailure(hr, "failed to initialize"); - - pD3D = Direct3DCreate9(D3D_SDK_VERSION); - ExitOnNull(pD3D, hr, E_FAIL, "Direct3DCreate9 failed"); - - D3DCAPS9 d3dCaps; - hr = pD3D->GetDeviceCaps( - 0, // first adapter - D3DDEVTYPE_HAL, // fail on non-HAL devices - &d3dCaps - ); - ExitOnFailure(hr, "GetDeviceCaps call failed"); - - int iVertexShaderVersion = D3DSHADER_VERSION_MAJOR(d3dCaps.VertexShaderVersion) * 100 + D3DSHADER_VERSION_MINOR(d3dCaps.VertexShaderVersion); - WcaSetIntProperty(L"WIX_DIRECTX_VERTEXSHADERVERSION", iVertexShaderVersion); - - int iPixelShaderVersion = D3DSHADER_VERSION_MAJOR(d3dCaps.PixelShaderVersion) * 100 + D3DSHADER_VERSION_MINOR(d3dCaps.PixelShaderVersion); - WcaSetIntProperty(L"WIX_DIRECTX_PIXELSHADERVERSION", iPixelShaderVersion); - -LExit: - ReleaseObject(pD3D); - return WcaFinalize(er = FAILED(hr) ? ERROR_INSTALL_FAILURE : er); -} - - diff --git a/src/ca/directx.def b/src/ca/directx.def deleted file mode 100644 index 8f46f9a8..00000000 --- a/src/ca/directx.def +++ /dev/null @@ -1,7 +0,0 @@ -; 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 "directxca" - -EXPORTS - WixQueryDirectXCaps diff --git a/src/ca/directxca.vcxproj b/src/ca/directxca.vcxproj deleted file mode 100644 index e772009a..00000000 --- a/src/ca/directxca.vcxproj +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - Debug - ARM64 - - - Release - ARM64 - - - - - {76542B28-0FFD-47D3-AD6A-D0F20FA875AC} - DynamicLibrary - v142 - 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}. - - - - - \ No newline at end of file diff --git a/src/ca/dllmain.cpp b/src/ca/dllmain.cpp deleted file mode 100644 index df53f872..00000000 --- a/src/ca/dllmain.cpp +++ /dev/null @@ -1,26 +0,0 @@ -// 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. - -#include "precomp.h" - -/******************************************************************** -DllMain - standard entry point for all WiX CustomActions - -********************************************************************/ -extern "C" BOOL WINAPI DllMain( - IN HINSTANCE hInst, - IN ULONG ulReason, - IN LPVOID) -{ - switch(ulReason) - { - case DLL_PROCESS_ATTACH: - WcaGlobalInitialize(hInst); - break; - - case DLL_PROCESS_DETACH: - WcaGlobalFinalize(); - break; - } - - return TRUE; -} diff --git a/src/ca/packages.config b/src/ca/packages.config deleted file mode 100644 index e3dc0e43..00000000 --- a/src/ca/packages.config +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/ca/precomp.h b/src/ca/precomp.h deleted file mode 100644 index 75a15829..00000000 --- a/src/ca/precomp.h +++ /dev/null @@ -1,11 +0,0 @@ -#pragma once -// 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. - - -#include -#include -#include -#include - -#include "wcautil.h" -#include "strutil.h" diff --git a/src/ext/DirectX/CSharp.Build.props b/src/ext/DirectX/CSharp.Build.props new file mode 100644 index 00000000..b12f4c6e --- /dev/null +++ b/src/ext/DirectX/CSharp.Build.props @@ -0,0 +1,11 @@ + + + + + true + $([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)wix.snk)) + + diff --git a/src/ext/DirectX/Cpp.Build.props b/src/ext/DirectX/Cpp.Build.props new file mode 100644 index 00000000..9b7a1bb5 --- /dev/null +++ b/src/ext/DirectX/Cpp.Build.props @@ -0,0 +1,86 @@ + + + + + + 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 + + + + + MinSpace + NDEBUG;%(PreprocessorDefinitions) + true + true + MultiThreaded + + + true + true + + + diff --git a/src/ext/DirectX/DirectX.wixext.sln b/src/ext/DirectX/DirectX.wixext.sln new file mode 100644 index 00000000..2ec5721f --- /dev/null +++ b/src/ext/DirectX/DirectX.wixext.sln @@ -0,0 +1,61 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30204.135 +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/src/ext/DirectX/Directory.Build.props b/src/ext/DirectX/Directory.Build.props new file mode 100644 index 00000000..f83cc154 --- /dev/null +++ b/src/ext/DirectX/Directory.Build.props @@ -0,0 +1,29 @@ + + + + + + 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/ext/DirectX/Directory.Build.targets b/src/ext/DirectX/Directory.Build.targets new file mode 100644 index 00000000..dac7452a --- /dev/null +++ b/src/ext/DirectX/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/ext/DirectX/README.md b/src/ext/DirectX/README.md new file mode 100644 index 00000000..6131cf35 --- /dev/null +++ b/src/ext/DirectX/README.md @@ -0,0 +1,2 @@ +# DirectX.wixext +WixToolset.DirectX.wixext - DirectX WiX Toolset Extension diff --git a/src/ext/DirectX/appveyor.cmd b/src/ext/DirectX/appveyor.cmd new file mode 100644 index 00000000..3a7e2d72 --- /dev/null +++ b/src/ext/DirectX/appveyor.cmd @@ -0,0 +1,14 @@ +@setlocal +@pushd %~dp0 + +nuget restore || exit /b + +msbuild -p:Configuration=Release -t:Restore || exit /b + +msbuild -p:Configuration=Release src\test\WixToolsetTest.DirectX\WixToolsetTest.DirectX.csproj || exit /b +dotnet test -c Release --no-build src\test\WixToolsetTest.DirectX || exit /b + +msbuild -p:Configuration=Release -t:Pack src\wixext\WixToolset.DirectX.wixext.csproj || exit /b + +@popd +@endlocal \ No newline at end of file diff --git a/src/ext/DirectX/appveyor.yml b/src/ext/DirectX/appveyor.yml new file mode 100644 index 00000000..7c686b04 --- /dev/null +++ b/src/ext/DirectX/appveyor.yml @@ -0,0 +1,40 @@ +# 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 2019 + +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 + +notifications: +- provider: Slack + incoming_webhook: + secure: p5xuu+4x2JHfwGDMDe5KcG1k7gZxqYc4jWVwvyNZv5cvkubPD2waJs5yXMAXZNN7Z63/3PWHb7q4KoY/99AjauYa1nZ4c5qYqRPFRBKTHfA= diff --git a/src/ext/DirectX/ca/directx.cpp b/src/ext/DirectX/ca/directx.cpp new file mode 100644 index 00000000..21838262 --- /dev/null +++ b/src/ext/DirectX/ca/directx.cpp @@ -0,0 +1,49 @@ +// 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. + +#include "precomp.h" + +/******************************************************************** +WixQueryDirectXCaps - entry point for WixQueryDirectXCaps CA + + Called as Type 1 custom action (DLL from the Binary table) from + Windows Installer to set properties that identify the DirectX + capabilities ("caps") of the system. +********************************************************************/ +extern "C" UINT __stdcall WixQueryDirectXCaps( + __in MSIHANDLE hInstall + ) +{ +#if 0 + ::MessageBoxA(0, "break into debugger now please", "---->> ATTACH TO ME!", MB_ICONEXCLAMATION); +#endif + + HRESULT hr = S_OK; + DWORD er = ERROR_SUCCESS; + LPDIRECT3D9 pD3D = NULL; + + hr = WcaInitialize(hInstall, "WixQueryDirectXCaps"); + ExitOnFailure(hr, "failed to initialize"); + + pD3D = Direct3DCreate9(D3D_SDK_VERSION); + ExitOnNull(pD3D, hr, E_FAIL, "Direct3DCreate9 failed"); + + D3DCAPS9 d3dCaps; + hr = pD3D->GetDeviceCaps( + 0, // first adapter + D3DDEVTYPE_HAL, // fail on non-HAL devices + &d3dCaps + ); + ExitOnFailure(hr, "GetDeviceCaps call failed"); + + int iVertexShaderVersion = D3DSHADER_VERSION_MAJOR(d3dCaps.VertexShaderVersion) * 100 + D3DSHADER_VERSION_MINOR(d3dCaps.VertexShaderVersion); + WcaSetIntProperty(L"WIX_DIRECTX_VERTEXSHADERVERSION", iVertexShaderVersion); + + int iPixelShaderVersion = D3DSHADER_VERSION_MAJOR(d3dCaps.PixelShaderVersion) * 100 + D3DSHADER_VERSION_MINOR(d3dCaps.PixelShaderVersion); + WcaSetIntProperty(L"WIX_DIRECTX_PIXELSHADERVERSION", iPixelShaderVersion); + +LExit: + ReleaseObject(pD3D); + return WcaFinalize(er = FAILED(hr) ? ERROR_INSTALL_FAILURE : er); +} + + diff --git a/src/ext/DirectX/ca/directx.def b/src/ext/DirectX/ca/directx.def new file mode 100644 index 00000000..8f46f9a8 --- /dev/null +++ b/src/ext/DirectX/ca/directx.def @@ -0,0 +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 "directxca" + +EXPORTS + WixQueryDirectXCaps diff --git a/src/ext/DirectX/ca/directxca.vcxproj b/src/ext/DirectX/ca/directxca.vcxproj new file mode 100644 index 00000000..e772009a --- /dev/null +++ b/src/ext/DirectX/ca/directxca.vcxproj @@ -0,0 +1,70 @@ + + + + + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + Debug + ARM64 + + + Release + ARM64 + + + + + {76542B28-0FFD-47D3-AD6A-D0F20FA875AC} + DynamicLibrary + v142 + 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}. + + + + + \ No newline at end of file diff --git a/src/ext/DirectX/ca/dllmain.cpp b/src/ext/DirectX/ca/dllmain.cpp new file mode 100644 index 00000000..df53f872 --- /dev/null +++ b/src/ext/DirectX/ca/dllmain.cpp @@ -0,0 +1,26 @@ +// 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. + +#include "precomp.h" + +/******************************************************************** +DllMain - standard entry point for all WiX CustomActions + +********************************************************************/ +extern "C" BOOL WINAPI DllMain( + IN HINSTANCE hInst, + IN ULONG ulReason, + IN LPVOID) +{ + switch(ulReason) + { + case DLL_PROCESS_ATTACH: + WcaGlobalInitialize(hInst); + break; + + case DLL_PROCESS_DETACH: + WcaGlobalFinalize(); + break; + } + + return TRUE; +} diff --git a/src/ext/DirectX/ca/packages.config b/src/ext/DirectX/ca/packages.config new file mode 100644 index 00000000..e3dc0e43 --- /dev/null +++ b/src/ext/DirectX/ca/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/src/ext/DirectX/ca/precomp.h b/src/ext/DirectX/ca/precomp.h new file mode 100644 index 00000000..75a15829 --- /dev/null +++ b/src/ext/DirectX/ca/precomp.h @@ -0,0 +1,11 @@ +#pragma once +// 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. + + +#include +#include +#include +#include + +#include "wcautil.h" +#include "strutil.h" diff --git a/src/ext/DirectX/nuget.config b/src/ext/DirectX/nuget.config new file mode 100644 index 00000000..db7aba29 --- /dev/null +++ b/src/ext/DirectX/nuget.config @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ext/DirectX/test/WixToolsetTest.DirectX/DirectXExtensionFixture.cs b/src/ext/DirectX/test/WixToolsetTest.DirectX/DirectXExtensionFixture.cs new file mode 100644 index 00000000..81a5fb00 --- /dev/null +++ b/src/ext/DirectX/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\t", + }, results); + } + + private static void Build(string[] args) + { + var result = WixRunner.Execute(args) + .AssertSuccess(); + } + } +} diff --git a/src/ext/DirectX/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/Package.en-us.wxl b/src/ext/DirectX/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/Package.en-us.wxl new file mode 100644 index 00000000..38c12ac1 --- /dev/null +++ b/src/ext/DirectX/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/ext/DirectX/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/Package.wxs b/src/ext/DirectX/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/Package.wxs new file mode 100644 index 00000000..bd31e81f --- /dev/null +++ b/src/ext/DirectX/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/Package.wxs @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/ext/DirectX/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/PackageComponents.wxs b/src/ext/DirectX/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/PackageComponents.wxs new file mode 100644 index 00000000..f3a2ae92 --- /dev/null +++ b/src/ext/DirectX/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/PackageComponents.wxs @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/ext/DirectX/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/example.txt b/src/ext/DirectX/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/example.txt new file mode 100644 index 00000000..1b4ffe8a --- /dev/null +++ b/src/ext/DirectX/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/example.txt @@ -0,0 +1 @@ +This is example.txt. \ No newline at end of file diff --git a/src/ext/DirectX/test/WixToolsetTest.DirectX/WixToolsetTest.DirectX.csproj b/src/ext/DirectX/test/WixToolsetTest.DirectX/WixToolsetTest.DirectX.csproj new file mode 100644 index 00000000..1722a613 --- /dev/null +++ b/src/ext/DirectX/test/WixToolsetTest.DirectX/WixToolsetTest.DirectX.csproj @@ -0,0 +1,41 @@ + + + + + + netcoreapp3.1 + false + + + + NU1701 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/DirectX/wix.snk b/src/ext/DirectX/wix.snk new file mode 100644 index 00000000..3908a66a Binary files /dev/null and b/src/ext/DirectX/wix.snk differ diff --git a/src/ext/DirectX/wixext/DirectXDecompiler.cs b/src/ext/DirectX/wixext/DirectXDecompiler.cs new file mode 100644 index 00000000..03f90163 --- /dev/null +++ b/src/ext/DirectX/wixext/DirectXDecompiler.cs @@ -0,0 +1,72 @@ +// 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 +{ +#if TODO_CONSIDER_DECOMPILER + using System; + using System.Text; + using WixToolset.Data; + using WixToolset.Extensibility; + using Wix = WixToolset.Data.Serialize; + + /// + /// The WiX Toolset DirectX Extension. + /// + public sealed class DirectXDecompiler : DecompilerExtension + { + /// + /// Get the extensions library to be removed. + /// + /// Table definitions for library. + /// Library to remove from decompiled output. + public override Library GetLibraryToRemove(TableDefinitionCollection tableDefinitions) + { + return DirectXExtensionData.GetExtensionLibrary(tableDefinitions); + } + + /// + /// Called at the beginning of the decompilation of a database. + /// + /// The collection of all tables. + public override void Initialize(TableIndexedCollection tables) + { + Table propertyTable = tables["Property"]; + + if (null != propertyTable) + { + foreach (Row row in propertyTable.Rows) + { + if ("SecureCustomProperties" == row[0].ToString()) + { + // if we've referenced any of the DirectX properties, add + // a PropertyRef to pick up the CA from the extension and then remove + // it from the SecureCustomExtensions property so we don't get duplicates + StringBuilder remainingProperties = new StringBuilder(); + string[] secureCustomProperties = row[1].ToString().Split(';'); + foreach (string property in secureCustomProperties) + { + if (property.StartsWith("WIX_DIRECTX_")) + { + Wix.PropertyRef propertyRef = new Wix.PropertyRef(); + propertyRef.Id = property; + this.Core.RootElement.AddChild(propertyRef); + } + else + { + if (0 < remainingProperties.Length) + { + remainingProperties.Append(";"); + } + remainingProperties.Append(property); + } + } + + row[1] = remainingProperties.ToString(); + break; + } + } + } + } + } +#endif +} diff --git a/src/ext/DirectX/wixext/DirectXExtensionData.cs b/src/ext/DirectX/wixext/DirectXExtensionData.cs new file mode 100644 index 00000000..d61af23f --- /dev/null +++ b/src/ext/DirectX/wixext/DirectXExtensionData.cs @@ -0,0 +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.DirectX +{ + using WixToolset.Data; + using WixToolset.Extensibility; + + /// + /// The WiX Toolset DirectX Extension. + /// + public sealed class DirectXExtensionData : BaseExtensionData + { + /// + /// Gets the default culture. + /// + /// The default culture. + public override string DefaultCulture => "en-US"; + + public override Intermediate GetLibrary(ISymbolDefinitionCreator symbolDefinitions) + { + return Intermediate.Load(typeof(DirectXExtensionData).Assembly, "WixToolset.DirectX.directx.wixlib", symbolDefinitions); + } + } +} diff --git a/src/ext/DirectX/wixext/DirectXExtensionFactory.cs b/src/ext/DirectX/wixext/DirectXExtensionFactory.cs new file mode 100644 index 00000000..fb7f84aa --- /dev/null +++ b/src/ext/DirectX/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 IReadOnlyCollection ExtensionTypes => new[] + { + typeof(DirectXExtensionData), + }; + } +} diff --git a/src/ext/DirectX/wixext/WixToolset.DirectX.wixext.csproj b/src/ext/DirectX/wixext/WixToolset.DirectX.wixext.csproj new file mode 100644 index 00000000..a848ff9a --- /dev/null +++ b/src/ext/DirectX/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/ext/DirectX/wixext/WixToolset.DirectX.wixext.targets b/src/ext/DirectX/wixext/WixToolset.DirectX.wixext.targets new file mode 100644 index 00000000..4e27a6da --- /dev/null +++ b/src/ext/DirectX/wixext/WixToolset.DirectX.wixext.targets @@ -0,0 +1,11 @@ + + + + + + $(MSBuildThisFileDirectory)..\tools\WixToolset.DirectX.wixext.dll + + + + + diff --git a/src/ext/DirectX/wixlib/DirectXExtension.wxs b/src/ext/DirectX/wixlib/DirectXExtension.wxs new file mode 100644 index 00000000..b83dc98d --- /dev/null +++ b/src/ext/DirectX/wixlib/DirectXExtension.wxs @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/DirectX/wixlib/caerr.wxi b/src/ext/DirectX/wixlib/caerr.wxi new file mode 100644 index 00000000..ff7ec121 --- /dev/null +++ b/src/ext/DirectX/wixlib/caerr.wxi @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/ext/DirectX/wixlib/directx.wixproj b/src/ext/DirectX/wixlib/directx.wixproj new file mode 100644 index 00000000..bdad24a4 --- /dev/null +++ b/src/ext/DirectX/wixlib/directx.wixproj @@ -0,0 +1,13 @@ + + + + Library + true + + + + + + + + \ No newline at end of file diff --git a/src/ext/global.json b/src/ext/global.json new file mode 100644 index 00000000..23dd3fa6 --- /dev/null +++ b/src/ext/global.json @@ -0,0 +1,5 @@ +{ + "msbuild-sdks": { + "WixToolset.Sdk": "4.0.0-build-0211" + } +} diff --git a/src/test/WixToolsetTest.DirectX/DirectXExtensionFixture.cs b/src/test/WixToolsetTest.DirectX/DirectXExtensionFixture.cs deleted file mode 100644 index 81a5fb00..00000000 --- a/src/test/WixToolsetTest.DirectX/DirectXExtensionFixture.cs +++ /dev/null @@ -1,32 +0,0 @@ -// 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\t", - }, results); - } - - 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 deleted file mode 100644 index 38c12ac1..00000000 --- a/src/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/Package.en-us.wxl +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - 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 deleted file mode 100644 index bd31e81f..00000000 --- a/src/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/Package.wxs +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/src/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/PackageComponents.wxs b/src/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/PackageComponents.wxs deleted file mode 100644 index f3a2ae92..00000000 --- a/src/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/PackageComponents.wxs +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/src/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/example.txt b/src/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/example.txt deleted file mode 100644 index 1b4ffe8a..00000000 --- a/src/test/WixToolsetTest.DirectX/TestData/UsingPixelShaderVersion/example.txt +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 1722a613..00000000 --- a/src/test/WixToolsetTest.DirectX/WixToolsetTest.DirectX.csproj +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - netcoreapp3.1 - false - - - - NU1701 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/version.json b/src/version.json new file mode 100644 index 00000000..5f857771 --- /dev/null +++ b/src/version.json @@ -0,0 +1,11 @@ +{ + "version": "4.0", + "publicReleaseRefSpec": [ + "^refs/heads/master$" + ], + "cloudBuild": { + "buildNumber": { + "enabled": true + } + } +} diff --git a/src/wix.snk b/src/wix.snk deleted file mode 100644 index 3908a66a..00000000 Binary files a/src/wix.snk and /dev/null differ diff --git a/src/wixext/DirectXDecompiler.cs b/src/wixext/DirectXDecompiler.cs deleted file mode 100644 index 03f90163..00000000 --- a/src/wixext/DirectXDecompiler.cs +++ /dev/null @@ -1,72 +0,0 @@ -// 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 -{ -#if TODO_CONSIDER_DECOMPILER - using System; - using System.Text; - using WixToolset.Data; - using WixToolset.Extensibility; - using Wix = WixToolset.Data.Serialize; - - /// - /// The WiX Toolset DirectX Extension. - /// - public sealed class DirectXDecompiler : DecompilerExtension - { - /// - /// Get the extensions library to be removed. - /// - /// Table definitions for library. - /// Library to remove from decompiled output. - public override Library GetLibraryToRemove(TableDefinitionCollection tableDefinitions) - { - return DirectXExtensionData.GetExtensionLibrary(tableDefinitions); - } - - /// - /// Called at the beginning of the decompilation of a database. - /// - /// The collection of all tables. - public override void Initialize(TableIndexedCollection tables) - { - Table propertyTable = tables["Property"]; - - if (null != propertyTable) - { - foreach (Row row in propertyTable.Rows) - { - if ("SecureCustomProperties" == row[0].ToString()) - { - // if we've referenced any of the DirectX properties, add - // a PropertyRef to pick up the CA from the extension and then remove - // it from the SecureCustomExtensions property so we don't get duplicates - StringBuilder remainingProperties = new StringBuilder(); - string[] secureCustomProperties = row[1].ToString().Split(';'); - foreach (string property in secureCustomProperties) - { - if (property.StartsWith("WIX_DIRECTX_")) - { - Wix.PropertyRef propertyRef = new Wix.PropertyRef(); - propertyRef.Id = property; - this.Core.RootElement.AddChild(propertyRef); - } - else - { - if (0 < remainingProperties.Length) - { - remainingProperties.Append(";"); - } - remainingProperties.Append(property); - } - } - - row[1] = remainingProperties.ToString(); - break; - } - } - } - } - } -#endif -} diff --git a/src/wixext/DirectXExtensionData.cs b/src/wixext/DirectXExtensionData.cs deleted file mode 100644 index d61af23f..00000000 --- a/src/wixext/DirectXExtensionData.cs +++ /dev/null @@ -1,24 +0,0 @@ -// 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 WixToolset.Data; - using WixToolset.Extensibility; - - /// - /// The WiX Toolset DirectX Extension. - /// - public sealed class DirectXExtensionData : BaseExtensionData - { - /// - /// Gets the default culture. - /// - /// The default culture. - public override string DefaultCulture => "en-US"; - - public override Intermediate GetLibrary(ISymbolDefinitionCreator symbolDefinitions) - { - return Intermediate.Load(typeof(DirectXExtensionData).Assembly, "WixToolset.DirectX.directx.wixlib", symbolDefinitions); - } - } -} diff --git a/src/wixext/DirectXExtensionFactory.cs b/src/wixext/DirectXExtensionFactory.cs deleted file mode 100644 index fb7f84aa..00000000 --- a/src/wixext/DirectXExtensionFactory.cs +++ /dev/null @@ -1,16 +0,0 @@ -// 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 IReadOnlyCollection ExtensionTypes => new[] - { - typeof(DirectXExtensionData), - }; - } -} diff --git a/src/wixext/WixToolset.DirectX.wixext.csproj b/src/wixext/WixToolset.DirectX.wixext.csproj deleted file mode 100644 index a848ff9a..00000000 --- a/src/wixext/WixToolset.DirectX.wixext.csproj +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - 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 deleted file mode 100644 index 4e27a6da..00000000 --- a/src/wixext/WixToolset.DirectX.wixext.targets +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - $(MSBuildThisFileDirectory)..\tools\WixToolset.DirectX.wixext.dll - - - - - diff --git a/src/wixlib/DirectXExtension.wxs b/src/wixlib/DirectXExtension.wxs deleted file mode 100644 index b83dc98d..00000000 --- a/src/wixlib/DirectXExtension.wxs +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wixlib/caerr.wxi b/src/wixlib/caerr.wxi deleted file mode 100644 index ff7ec121..00000000 --- a/src/wixlib/caerr.wxi +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/wixlib/directx.wixproj b/src/wixlib/directx.wixproj deleted file mode 100644 index bdad24a4..00000000 --- a/src/wixlib/directx.wixproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - Library - true - - - - - - - - \ No newline at end of file -- cgit v1.2.3-55-g6feb