From 2a72f06449431b326c671cf59811b9cefb73a2c8 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Sun, 3 Sep 2017 15:30:10 -0700 Subject: Initialize repo --- src/Directory.Build.props | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/Directory.Build.props (limited to 'src/Directory.Build.props') diff --git a/src/Directory.Build.props b/src/Directory.Build.props new file mode 100644 index 00000000..48ba462d --- /dev/null +++ b/src/Directory.Build.props @@ -0,0 +1,21 @@ + + + + + + Debug + $(MSBuildThisFileDirectory)..\build\obj\$(MSBuildProjectName)\ + $(MSBuildThisFileDirectory)..\build\$(Configuration)\ + + WiX Toolset Team + WiX Toolset + Copyright (c) .NET Foundation and contributors. All rights reserved. + + + + $(MSBuildThisFileDirectory)..\..\ + + + + + -- cgit v1.2.3-55-g6feb From 088dc648a3478e2cacdbdab1cb1782556642ee69 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Sun, 3 Sep 2017 16:51:39 -0700 Subject: Initial commit --- WixToolset.Core.Native.sln | 42 +++ appveyor.cmd | 5 + src/Cpp.Build.props | 1 + src/Directory.Build.props | 1 + src/WixToolset.Core.Native/CabInterop.cs | 312 +++++++++++++++++++++ .../WixToolset.Core.Native.csproj | 23 ++ .../WixToolset.Core.Native.nuspec | 24 ++ src/winterop/packages.config | 5 + src/winterop/precomp.h | 12 + .../runtime.win-xxx.WixToolset.Core.Native.nuspec | 19 ++ src/winterop/winterop.cpp | 216 ++++++++++++++ src/winterop/winterop.def | 18 ++ src/winterop/winterop.vcxproj | 79 ++++++ 13 files changed, 757 insertions(+) create mode 100644 WixToolset.Core.Native.sln create mode 100644 src/WixToolset.Core.Native/CabInterop.cs create mode 100644 src/WixToolset.Core.Native/WixToolset.Core.Native.csproj create mode 100644 src/WixToolset.Core.Native/WixToolset.Core.Native.nuspec create mode 100644 src/winterop/packages.config create mode 100644 src/winterop/precomp.h create mode 100644 src/winterop/runtime.win-xxx.WixToolset.Core.Native.nuspec create mode 100644 src/winterop/winterop.cpp create mode 100644 src/winterop/winterop.def create mode 100644 src/winterop/winterop.vcxproj (limited to 'src/Directory.Build.props') diff --git a/WixToolset.Core.Native.sln b/WixToolset.Core.Native.sln new file mode 100644 index 00000000..2252fdf1 --- /dev/null +++ b/WixToolset.Core.Native.sln @@ -0,0 +1,42 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.26730.12 +MinimumVisualStudioVersion = 15.0.26124.0 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winterop", "src\winterop\winterop.vcxproj", "{26D45E58-E703-431D-B67E-493C72C9DA0B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Core.Native", "src\WixToolset.Core.Native\WixToolset.Core.Native.csproj", "{C1F36B7C-6A5B-44CB-BD05-3C9CDEC2DD63}" + ProjectSection(ProjectDependencies) = postProject + {26D45E58-E703-431D-B67E-493C72C9DA0B} = {26D45E58-E703-431D-B67E-493C72C9DA0B} + EndProjectSection +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 + {26D45E58-E703-431D-B67E-493C72C9DA0B}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {26D45E58-E703-431D-B67E-493C72C9DA0B}.Debug|x86.ActiveCfg = Debug|Win32 + {26D45E58-E703-431D-B67E-493C72C9DA0B}.Debug|x86.Build.0 = Debug|Win32 + {26D45E58-E703-431D-B67E-493C72C9DA0B}.Release|Any CPU.ActiveCfg = Release|Win32 + {26D45E58-E703-431D-B67E-493C72C9DA0B}.Release|x86.ActiveCfg = Release|Win32 + {26D45E58-E703-431D-B67E-493C72C9DA0B}.Release|x86.Build.0 = Release|Win32 + {C1F36B7C-6A5B-44CB-BD05-3C9CDEC2DD63}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C1F36B7C-6A5B-44CB-BD05-3C9CDEC2DD63}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C1F36B7C-6A5B-44CB-BD05-3C9CDEC2DD63}.Debug|x86.ActiveCfg = Debug|Any CPU + {C1F36B7C-6A5B-44CB-BD05-3C9CDEC2DD63}.Debug|x86.Build.0 = Debug|Any CPU + {C1F36B7C-6A5B-44CB-BD05-3C9CDEC2DD63}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C1F36B7C-6A5B-44CB-BD05-3C9CDEC2DD63}.Release|Any CPU.Build.0 = Release|Any CPU + {C1F36B7C-6A5B-44CB-BD05-3C9CDEC2DD63}.Release|x86.ActiveCfg = Release|Any CPU + {C1F36B7C-6A5B-44CB-BD05-3C9CDEC2DD63}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {1E952530-A3ED-4E65-AF39-9025EFB85322} + EndGlobalSection +EndGlobal diff --git a/appveyor.cmd b/appveyor.cmd index bb3accd1..364d2ccd 100644 --- a/appveyor.cmd +++ b/appveyor.cmd @@ -1,5 +1,10 @@ @setlocal @pushd %~dp0 +msbuild -p:Configuration=Release;Platform=Win32 -t:PackNativeNuget src\winterop\winterop.vcxproj +msbuild -p:Configuration=Release;Platform=x64 -t:PackNativeNuget src\winterop\winterop.vcxproj + +dotnet pack -c Release .\src\WixToolset.Core.Native\WixToolset.Core.Native.csproj + @popd @endlocal \ No newline at end of file diff --git a/src/Cpp.Build.props b/src/Cpp.Build.props index 1e4d4cbc..453aa442 100644 --- a/src/Cpp.Build.props +++ b/src/Cpp.Build.props @@ -3,6 +3,7 @@ + Win32 $(OutputPath) $(BaseIntermediateOutputPath)$(Platform)\ $(OutputPath)$(Platform)\ diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 48ba462d..63ad5d6e 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -4,6 +4,7 @@ Debug + AnyCPU $(MSBuildThisFileDirectory)..\build\obj\$(MSBuildProjectName)\ $(MSBuildThisFileDirectory)..\build\$(Configuration)\ diff --git a/src/WixToolset.Core.Native/CabInterop.cs b/src/WixToolset.Core.Native/CabInterop.cs new file mode 100644 index 00000000..6ad11c67 --- /dev/null +++ b/src/WixToolset.Core.Native/CabInterop.cs @@ -0,0 +1,312 @@ +// 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.Core.Native +{ + using System; + using System.Diagnostics.CodeAnalysis; + using System.Text; + using System.Runtime.InteropServices; + // using WixToolset.Msi; + // using WixToolset.Msi.Interop; + + /// + /// The native methods. + /// + public sealed class NativeMethods + { + /// + /// Starts creating a cabinet. + /// + /// Name of cabinet to create. + /// Directory to create cabinet in. + /// Maximum number of files that will be added to cabinet. + /// Maximum size of the cabinet. + /// Maximum threshold in the cabinet. + /// Type of compression to use in the cabinet. + /// Handle to opened cabinet. + [DllImport("winterop.dll", EntryPoint = "CreateCabBegin", CharSet = CharSet.Unicode, ExactSpelling = true, PreserveSig = false)] + public static extern void CreateCabBegin(string cabinetName, string cabinetDirectory, uint maxFiles, uint maxSize, uint maxThreshold, uint compressionType, out IntPtr contextHandle); + + /// + /// Adds a file to an open cabinet. + /// + /// Full path to file to add to cabinet. + /// Name of file in cabinet. + /// Handle to open cabinet. + // [DllImport("winterop.dll", EntryPoint = "CreateCabAddFile", CharSet = CharSet.Unicode, ExactSpelling = true, PreserveSig = false)] + // public static extern void CreateCabAddFile(string file, string token, MsiInterop.MSIFILEHASHINFO fileHash, IntPtr contextHandle); + + /// + /// Closes a cabinet. + /// + /// Handle to open cabinet to close. + /// Address of Binder's cabinet split callback + [DllImport("winterop.dll", EntryPoint = "CreateCabFinish", CharSet = CharSet.Unicode, ExactSpelling = true, PreserveSig = false)] + public static extern void CreateCabFinish(IntPtr contextHandle, IntPtr newCabNamesCallBackAddress); + + /// + /// Cancels cabinet creation. + /// + /// Handle to open cabinet to cancel. + [DllImport("winterop.dll", EntryPoint = "CreateCabCancel", CharSet = CharSet.Unicode, ExactSpelling = true, PreserveSig = false)] + public static extern void CreateCabCancel(IntPtr contextHandle); + + /// + /// Initializes cabinet extraction. + /// + [DllImport("winterop.dll", EntryPoint = "ExtractCabBegin", CharSet = CharSet.Unicode, ExactSpelling = true, PreserveSig = false)] + public static extern void ExtractCabBegin(); + + /// + /// Extracts files from cabinet. + /// + /// Path to cabinet to extract files from. + /// Directory to extract files to. + [DllImport("winterop.dll", EntryPoint = "ExtractCab", CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true, PreserveSig = false)] + public static extern void ExtractCab(string cabinet, string extractDirectory); + + /// + /// Cleans up after cabinet extraction. + /// + [DllImport("winterop.dll", EntryPoint = "ExtractCabFinish", CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)] + public static extern void ExtractCabFinish(); + + /// + /// Initializes cabinet enumeration. + /// + [DllImport("winterop.dll", EntryPoint = "EnumerateCabBegin", CharSet = CharSet.Unicode, ExactSpelling = true, PreserveSig = false)] + public static extern void EnumerateCabBegin(); + + /// + /// Enumerates files from cabinet. + /// + /// Path to cabinet to enumerate files from. + /// callback that gets each file. + [DllImport("winterop.dll", EntryPoint = "EnumerateCab", CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true, PreserveSig = false)] + public static extern void EnumerateCab(string cabinet, CabInterop.PFNNOTIFY notify); + + /// + /// Cleans up after cabinet enumeration. + /// + [DllImport("winterop.dll", EntryPoint = "EnumerateCabFinish", CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)] + public static extern void EnumerateCabFinish(); + + /// + /// Resets the DACL on an array of files to "empty". + /// + /// Array of file reset ACL to "empty". + /// Number of file paths in array. + [DllImport("winterop.dll", EntryPoint = "ResetAcls", CharSet = CharSet.Unicode, ExactSpelling = true, PreserveSig = false)] + public static extern void ResetAcls(string[] files, uint fileCount); + + /// + /// Gets the hash of the pCertContext->pCertInfo->SubjectPublicKeyInfo using ::CryptHashPublicKeyInfo() which does not seem + /// to be exposed by .NET Frameowkr. + /// + /// Pointer to a CERT_CONTEXT struct with public key information to hash. + /// Number of file paths in array. + [DllImport("winterop.dll", EntryPoint = "HashPublicKeyInfo", CharSet = CharSet.Unicode, ExactSpelling = true, PreserveSig = false)] + public static extern void HashPublicKeyInfo(IntPtr certContext, byte[] publicKeyInfoHashed, ref uint sizePublicKeyInfoHashed); + + /// + /// Converts file time to a local file time. + /// + /// file time + /// local file time + /// true if successful, false otherwise + [DllImport("kernel32.dll", SetLastError = true)] + [return: MarshalAs(UnmanagedType.Bool)] + public static extern bool FileTimeToLocalFileTime(ref long fileTime, ref long localTime); + + /// + /// Converts file time to a MS-DOS time. + /// + /// file time + /// MS-DOS date + /// MS-DOS time + /// true if successful, false otherwise + [DllImport("kernel32.dll", SetLastError = true)] + [return: MarshalAs(UnmanagedType.Bool)] + public static extern bool FileTimeToDosDateTime(ref long fileTime, out ushort wFatDate, out ushort wFatTime); + } + + /// + /// Interop class for the winterop.dll. + /// + public static class CabInterop + { + /// + /// Delegate type that's called by cabinet api for every file in cabinet. + /// + /// NOTIFICATIONTYPE + /// NOTIFICATION + /// 0 for success, -1 otherwise + public delegate Int32 PFNNOTIFY(NOTIFICATIONTYPE fdint, NOTIFICATION pfdin); + + /// + /// Wraps FDINOTIFICATIONTYPE. + /// + public enum NOTIFICATIONTYPE : int + { + /// Info about the cabinet. + CABINET_INFO, + /// One or more files are continued. + PARTIAL_FILE, + /// Called for each file in cabinet. + COPY_FILE, + /// Called after all of the data has been written to a target file. + CLOSE_FILE_INFO, + /// A file is continued to the next cabinet. + NEXT_CABINET, + /// Called once after a call to FDICopy() starts scanning a CAB's CFFILE entries, and again when there are no more CFFILE entries. + ENUMERATE, + } + + /// + /// Converts DateTime to MS-DOS date and time which cabinet uses. + /// + /// DateTime + /// MS-DOS date + /// MS-DOS time + public static void DateTimeToCabDateAndTime(DateTime dateTime, out ushort cabDate, out ushort cabTime) + { + // dateTime.ToLocalTime() does not match FileTimeToLocalFileTime() for some reason. + // so we need to call FileTimeToLocalFileTime() from kernel32.dll. + long filetime = dateTime.ToFileTime(); + long localTime = 0; + NativeMethods.FileTimeToLocalFileTime(ref filetime, ref localTime); + NativeMethods.FileTimeToDosDateTime(ref localTime, out cabDate, out cabTime); + } + + /// + /// Wraps FDINOTIFICATION. + /// + [SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses")] + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] + public class NOTIFICATION + { + private int cb; + [MarshalAs(UnmanagedType.LPStr)] + private string psz1; + [MarshalAs(UnmanagedType.LPStr)] + private string psz2; + [MarshalAs(UnmanagedType.LPStr)] + private string psz3; + private IntPtr pv; + + private IntPtr hf; + + private ushort date; + private ushort time; + private ushort attribs; + private ushort setID; + private ushort cabinet; + private ushort folder; + private int fdie; + + /// + /// Uncompressed size of file. + /// + public int Cb + { + get { return this.cb; } + } + + /// + /// File name in cabinet. + /// + public String Psz1 + { + get { return this.psz1; } + } + + /// + /// Name of next disk. + /// + public string Psz2 + { + get { return this.psz2; } + } + + /// + /// Points to a 256 character buffer. + /// + public string Psz3 + { + get { return this.psz3; } + } + + /// + /// Value for client. + /// + public IntPtr Pv + { + get { return this.pv; } + } + + /// + /// Not used. + /// + public Int32 Hf + { + get { return (Int32)this.hf; } + } + + /// + /// Last modified MS-DOS date. + /// + public ushort Date + { + get { return this.date; } + } + + /// + /// Last modified MS-DOS time. + /// + public ushort Time + { + get { return this.time; } + } + + /// + /// File attributes. + /// + public ushort Attribs + { + get { return this.attribs; } + } + + /// + /// Cabinet set ID (a random 16-bit number). + /// + public ushort SetID + { + get { return this.setID; } + } + + /// + /// Cabinet number within cabinet set (0-based). + /// + public ushort Cabinet + { + get { return this.cabinet; } + } + + /// + /// File's folder index. + /// + public ushort Folder + { + get { return this.folder; } + } + + /// + /// Error code. + /// + public int Fdie + { + get { return this.fdie; } + } + } + } +} diff --git a/src/WixToolset.Core.Native/WixToolset.Core.Native.csproj b/src/WixToolset.Core.Native/WixToolset.Core.Native.csproj new file mode 100644 index 00000000..858b9be2 --- /dev/null +++ b/src/WixToolset.Core.Native/WixToolset.Core.Native.csproj @@ -0,0 +1,23 @@ + + + + netstandard2.0 + $(MSBuildThisFileName).nuspec + + + + + + + + + + + $(OutputPath) + Configuration=$(Configuration);Id=$(MSBuildThisFileName);Version=$(BuildVersionSimple);Authors=$(Authors);Copyright=$(Copyright);Description=$(Description) + + + diff --git a/src/WixToolset.Core.Native/WixToolset.Core.Native.nuspec b/src/WixToolset.Core.Native/WixToolset.Core.Native.nuspec new file mode 100644 index 00000000..68d154c8 --- /dev/null +++ b/src/WixToolset.Core.Native/WixToolset.Core.Native.nuspec @@ -0,0 +1,24 @@ + + + + $id$ + $version$ + $authors$ + $authors$ + https://github.com/wixtoolset/Core.Native/blob/master/LICENSE.TXT + https://github.com/wixtoolset/Core.Native + false + $description$ + $copyright$ + + + + + + + + + + + + diff --git a/src/winterop/packages.config b/src/winterop/packages.config new file mode 100644 index 00000000..b11fe210 --- /dev/null +++ b/src/winterop/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/src/winterop/precomp.h b/src/winterop/precomp.h new file mode 100644 index 00000000..eba996c7 --- /dev/null +++ b/src/winterop/precomp.h @@ -0,0 +1,12 @@ +#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 "dutil.h" +#include "fileutil.h" +#include "memutil.h" +#include "strutil.h" +#include "cabcutil.h" +#include "cabutil.h" diff --git a/src/winterop/runtime.win-xxx.WixToolset.Core.Native.nuspec b/src/winterop/runtime.win-xxx.WixToolset.Core.Native.nuspec new file mode 100644 index 00000000..87cf0919 --- /dev/null +++ b/src/winterop/runtime.win-xxx.WixToolset.Core.Native.nuspec @@ -0,0 +1,19 @@ + + + + $id$ + $version$ + $authors$ + $authors$ + https://github.com/wixtoolset/Core.Native/blob/master/LICENSE.TXT + https://github.com/wixtoolset/Core.Native + false + $description$ + $copyright$ + + + + + + + diff --git a/src/winterop/winterop.cpp b/src/winterop/winterop.cpp new file mode 100644 index 00000000..12d8ca3f --- /dev/null +++ b/src/winterop/winterop.cpp @@ -0,0 +1,216 @@ +// 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" + + +HRESULT HashPublicKeyInfo( + __in PCERT_CONTEXT pCertContext, + __in_ecount(*pcbSubjectKeyIndentifier) BYTE* rgbSubjectKeyIdentifier, + __inout DWORD* pcbSubjectKeyIndentifier + ) +{ + HRESULT hr = S_OK; + + if (!::CryptHashPublicKeyInfo(NULL, CALG_SHA1, 0, X509_ASN_ENCODING, &pCertContext->pCertInfo->SubjectPublicKeyInfo, rgbSubjectKeyIdentifier, pcbSubjectKeyIndentifier)) + { + ExitWithLastError(hr, "Failed to hash public key information."); + } + +LExit: + return hr; +} + +HRESULT ResetAcls( + __in LPCWSTR pwzFiles[], + __in DWORD cFiles + ) +{ + HRESULT hr = S_OK; + ACL* pacl = NULL; + DWORD cbAcl = sizeof(ACL); + + OSVERSIONINFO osvi; + + osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + if (!::GetVersionExA(&osvi)) + { + ExitOnLastError(hr, "failed to get OS version"); + } + + // If we're running on NT 4 or earlier, or ME or earlier, don't reset ACLs. + if (4 >= osvi.dwMajorVersion) + { + ExitFunction1(hr = S_FALSE); + } + + // create an empty (not NULL!) ACL to use on all the files + pacl = static_cast(MemAlloc(cbAcl, FALSE)); + ExitOnNull(pacl, hr, E_OUTOFMEMORY, "failed to allocate ACL"); + +#pragma prefast(push) +#pragma prefast(disable:25029) + if (!::InitializeAcl(pacl, cbAcl, ACL_REVISION)) +#pragma prefast(op) + { + ExitOnLastError(hr, "failed to initialize ACL"); + } + + // reset the existing security permissions on each file + for (DWORD i = 0; i < cFiles; ++i) + { + hr = ::SetNamedSecurityInfoW(const_cast(pwzFiles[i]), SE_FILE_OBJECT, DACL_SECURITY_INFORMATION | UNPROTECTED_DACL_SECURITY_INFORMATION, NULL, NULL, pacl, NULL); + if (ERROR_FILE_NOT_FOUND != hr && ERROR_PATH_NOT_FOUND != hr) + { + ExitOnFailure(hr = HRESULT_FROM_WIN32(hr), "failed to set security descriptor for file: %S", pwzFiles[i]); + } + } + + // Setting to S_OK because we could end with ERROR_FILE_NOT_FOUND or ERROR_PATH_NOT_FOUND as valid return values. + hr = S_OK; + + AssertSz(::IsValidAcl(pacl), "ResetAcls() - created invalid ACL"); + +LExit: + if (pacl) + { + MemFree(pacl); + } + + return hr; +} + + +HRESULT CreateCabBegin( + __in LPCWSTR wzCab, + __in LPCWSTR wzCabDir, + __in DWORD dwMaxFiles, + __in DWORD dwMaxSize, + __in DWORD dwMaxThresh, + __in COMPRESSION_TYPE ct, + __out HANDLE *phContext + ) +{ + return CabCBegin(wzCab, wzCabDir, dwMaxFiles, dwMaxSize, dwMaxThresh, ct, phContext); +} + + +HRESULT CreateCabAddFile( + __in LPCWSTR wzFile, + __in_opt LPCWSTR wzToken, + __in_opt PMSIFILEHASHINFO pmfHash, + __in HANDLE hContext + ) +{ + return CabCAddFile(wzFile, wzToken, pmfHash, hContext); +} + + +HRESULT CreateCabAddFiles( + __in LPCWSTR pwzFiles[], + __in LPCWSTR pwzTokens[], + __in PMSIFILEHASHINFO pmfHash[], + __in DWORD cFiles, + __in HANDLE hContext + ) +{ + HRESULT hr = S_OK; + DWORD i; + + Assert(pwzFiles); + Assert(hContext); + + for (i = 0; i < cFiles; i++) + { + hr = CreateCabAddFile( + pwzFiles[i], + pwzTokens ? pwzTokens[i] : NULL, + pmfHash[i], + hContext + ); + ExitOnFailure(hr, "Failed to add file %S to cab", pwzFiles[i]); + } + +LExit: + return hr; +} + + +HRESULT CreateCabFinish( + __in HANDLE hContext, + __in_opt FileSplitCabNamesCallback newCabNamesCallBackAddress + ) +{ + // Convert address into Binder callback function + return CabCFinish(hContext, newCabNamesCallBackAddress); +} + + +void CreateCabCancel( + __in HANDLE hContext + ) +{ + CabCCancel(hContext); +} + + +HRESULT ExtractCabBegin() +{ + return CabInitialize(FALSE); +} + + +HRESULT ExtractCab( + __in LPCWSTR wzCabinet, + __in LPCWSTR wzExtractDir + ) +{ + return CabExtract(wzCabinet, L"*", wzExtractDir, NULL, NULL, 0); +} + + +void ExtractCabFinish() +{ + CabUninitialize(); + return; +} + + +HRESULT EnumerateCabBegin() +{ + return CabInitialize(FALSE); +} + + +HRESULT EnumerateCab( + __in LPCWSTR wzCabinet, + __in STDCALL_PFNFDINOTIFY pfnNotify + ) +{ + return CabEnumerate(wzCabinet, L"*", pfnNotify, 0); +} + + +void EnumerateCabFinish() +{ + CabUninitialize(); + return; +} + + +BOOL WINAPI DllMain( + __in HINSTANCE /*hInstance*/, + __in DWORD dwReason, + __in LPVOID /*lpvReserved*/ + ) +{ + switch(dwReason) + { + case DLL_PROCESS_ATTACH: + case DLL_PROCESS_DETACH: + case DLL_THREAD_ATTACH: + case DLL_THREAD_DETACH: + break; + } + + return TRUE; +} diff --git a/src/winterop/winterop.def b/src/winterop/winterop.def new file mode 100644 index 00000000..dffa6268 --- /dev/null +++ b/src/winterop/winterop.def @@ -0,0 +1,18 @@ +; 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 "winterop.dll" + +EXPORTS + CreateCabBegin + CreateCabCancel + CreateCabAddFile + CreateCabAddFiles + CreateCabFinish + EnumerateCabBegin + EnumerateCab + EnumerateCabFinish + ExtractCabBegin + ExtractCab + ExtractCabFinish + ResetAcls + HashPublicKeyInfo diff --git a/src/winterop/winterop.vcxproj b/src/winterop/winterop.vcxproj new file mode 100644 index 00000000..6274a063 --- /dev/null +++ b/src/winterop/winterop.vcxproj @@ -0,0 +1,79 @@ + + + + + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + + {26D45E58-E703-431D-B67E-493C72C9DA0B} + DynamicLibrary + winterop + v141 + MultiByte + winterop.def + Native component of WixToolset.Core + + + + + + + + + + + + + crypt32.lib;cabinet.lib;msi.lib + + + + + + 4996 + 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}. + + + + + -- cgit v1.2.3-55-g6feb From 77b1c956e6037717f98ae01c2ff4e989c0252db8 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Fri, 10 Aug 2018 23:32:23 -0700 Subject: Enable use of NCrunch --- .gitignore | 58 ++++++++++++++++++---- src/Cpp.Build.props | 5 +- src/Directory.Build.props | 15 ++++-- .../WixToolset.Core.Native.csproj | 27 +++++++++- .../WixToolset.Core.Native.v3.ncrunchproject | 10 ++++ src/wixnative/wixnative.vcxproj | 2 +- 6 files changed, 98 insertions(+), 19 deletions(-) create mode 100644 src/WixToolset.Core.Native/WixToolset.Core.Native.v3.ncrunchproject (limited to 'src/Directory.Build.props') diff --git a/.gitignore b/.gitignore index 3c6208a8..efc59600 100644 --- a/.gitignore +++ b/.gitignore @@ -19,16 +19,20 @@ [Rr]eleases/ x64/ x86/ +[Ww]in32/ bld/ [Bb]in/ [Oo]bj/ [Ll]og/ -# Visual Studio 2015 cache/options directory +# Visual Studio 2015/2017 cache/options directory .vs/ # Uncomment if you have tasks that create the project's static files in wwwroot #wwwroot/ +# Visual Studio 2017 auto generated files +Generated\ Files/ + # MSTest test Results [Tt]est[Rr]esult*/ [Bb]uild[Ll]og.* @@ -49,16 +53,21 @@ BenchmarkDotNet.Artifacts/ project.lock.json project.fragment.lock.json artifacts/ -**/Properties/launchSettings.json +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio *_i.c *_p.c -*_i.h +*_h.h *.ilk *.meta *.obj +*.iobj *.pch *.pdb +*.ipdb *.pgc *.pgd *.rsp @@ -96,6 +105,9 @@ ipch/ *.vspx *.sap +# Visual Studio Trace Files +*.e2e + # TFS 2012 Local Workspace $tf/ @@ -116,6 +128,10 @@ _TeamCity* # DotCover is a Code Coverage Tool *.dotCover +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + # Visual Studio code coverage results *.coverage *.coveragexml @@ -164,11 +180,11 @@ PublishScripts/ # NuGet Packages *.nupkg # The packages folder can be ignored because of Package Restore -**/packages/* +**/[Pp]ackages/* # except build/, which is used as an MSBuild target. -!**/packages/build/ +!**/[Pp]ackages/build/ # Uncomment if necessary however generally it will be regenerated when needed -#!**/packages/repositories.config +#!**/[Pp]ackages/repositories.config # NuGet v3's project.json files produces more ignorable files *.nuget.props *.nuget.targets @@ -205,6 +221,10 @@ ClientBin/ *.publishsettings orleans.codegen.cs +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + # Since there are multiple workflows, uncomment next line to ignore bower_components # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) #bower_components/ @@ -219,6 +239,8 @@ _UpgradeReport_Files/ Backup*/ UpgradeLog*.XML UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak # SQL Server files *.mdf @@ -229,6 +251,7 @@ UpgradeLog*.htm *.rdl.data *.bim.layout *.bim_*.settings +*.rptproj.rsuser # Microsoft Fakes FakesAssemblies/ @@ -240,9 +263,6 @@ FakesAssemblies/ .ntvs_analysis.dat node_modules/ -# Typescript v1 declaration files -typings/ - # Visual Studio 6 build log *.plg @@ -292,4 +312,22 @@ __pycache__/ *.btp.cs *.btm.cs *.odx.cs -*.xsd.cs \ No newline at end of file +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ diff --git a/src/Cpp.Build.props b/src/Cpp.Build.props index 453aa442..296b36ca 100644 --- a/src/Cpp.Build.props +++ b/src/Cpp.Build.props @@ -3,9 +3,8 @@ - Win32 - $(OutputPath) - $(BaseIntermediateOutputPath)$(Platform)\ + Win32 + $(BaseIntermediateOutputPath)$(Configuration)\$(Platform)\ $(OutputPath)$(Platform)\ diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 63ad5d6e..9eacf3f5 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,16 +1,23 @@ - + Debug - AnyCPU - $(MSBuildThisFileDirectory)..\build\obj\$(MSBuildProjectName)\ - $(MSBuildThisFileDirectory)..\build\$(Configuration)\ + false + + $(MSBuildProjectName) + $(MSBuildThisFileDirectory)..\build\ + $(BaseOutputPath)obj\$(ProjectName)\ + $(BaseOutputPath)$(Configuration)\ WiX Toolset Team WiX Toolset Copyright (c) .NET Foundation and contributors. All rights reserved. + WiX Toolset diff --git a/src/WixToolset.Core.Native/WixToolset.Core.Native.csproj b/src/WixToolset.Core.Native/WixToolset.Core.Native.csproj index b02c00ad..e2431fef 100644 --- a/src/WixToolset.Core.Native/WixToolset.Core.Native.csproj +++ b/src/WixToolset.Core.Native/WixToolset.Core.Native.csproj @@ -13,7 +13,12 @@ - + + $(MSBuildProjectDir)..\..\build\obj\$(ProjectName)\$(Configuration)\NativeFileList.txt + $(NCrunchOriginalProjectDir)..\..\build\obj\$(ProjectName)\$(Configuration)\NativeFileList.txt + + + @@ -21,7 +26,11 @@ + + + + PreserveNewest %(Filename)%(Extension) @@ -29,6 +38,22 @@ + + + + + + + + + + + + + + + + $(OutputPath) diff --git a/src/WixToolset.Core.Native/WixToolset.Core.Native.v3.ncrunchproject b/src/WixToolset.Core.Native/WixToolset.Core.Native.v3.ncrunchproject new file mode 100644 index 00000000..0da1f42d --- /dev/null +++ b/src/WixToolset.Core.Native/WixToolset.Core.Native.v3.ncrunchproject @@ -0,0 +1,10 @@ + + + + ..\..\build\Debug\Win32\wixnative.x86.exe + ..\..\build\Debug\Win32\wixnative.x86.pdb + ..\..\build\Debug\x64\wixnative.amd64.exe + ..\..\build\Debug\x64\wixnative.amd64.pdb + + + \ No newline at end of file diff --git a/src/wixnative/wixnative.vcxproj b/src/wixnative/wixnative.vcxproj index d4b31fd8..420615ed 100644 --- a/src/wixnative/wixnative.vcxproj +++ b/src/wixnative/wixnative.vcxproj @@ -75,7 +75,7 @@ - + -- cgit v1.2.3-55-g6feb From c90ae13f242350786cf9103330c28e660d35eeb8 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Sat, 22 Dec 2018 09:10:56 -0800 Subject: Update to latest Home\repo-template --- .editorconfig | 37 +++++++++++++++++ .gitignore | 16 ++++++-- appveyor.yml | 6 +++ src/Directory.Build.props | 9 ++-- src/Directory.Build.targets | 48 ++++++++++++++++++++++ .../WixToolset.Core.Native.nuspec | 3 +- .../runtime.win-xxx.WixToolset.Core.Native.nuspec | 3 +- .../runtime.win.WixToolset.Core.Native.nuspec | 3 +- 8 files changed, 112 insertions(+), 13 deletions(-) create mode 100644 .editorconfig create mode 100644 src/Directory.Build.targets (limited to 'src/Directory.Build.props') 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/.gitignore b/.gitignore index efc59600..3e8a1553 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore # User-specific files +*.rsuser *.suo *.user *.userosscache @@ -19,7 +20,8 @@ [Rr]eleases/ x64/ x86/ -[Ww]in32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ bld/ [Bb]in/ [Oo]bj/ @@ -77,6 +79,7 @@ StyleCopReport.xml *.tlh *.tmp *.tmp_proj +*_wpftmp.csproj *.log *.vspscc *.vssscc @@ -208,7 +211,7 @@ _pkginfo.txt # files ending in .cache can be ignored *.[Cc]ache # but keep track of directories ending in .cache -!*.[Cc]ache/ +!?*.[Cc]ache/ # Others ClientBin/ @@ -228,6 +231,8 @@ orleans.codegen.cs # Since there are multiple workflows, uncomment next line to ignore bower_components # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) #bower_components/ +# ASP.NET Core default setup: bower directory is configured as wwwroot/lib/ and bower restore is true +**/wwwroot/lib/ # RIA/Silverlight projects Generated_Code/ @@ -291,8 +296,8 @@ paket-files/ .idea/ *.sln.iml -# CodeRush -.cr/ +# CodeRush personal settings +.cr/personal # Python Tools for Visual Studio (PTVS) __pycache__/ @@ -331,3 +336,6 @@ ASALocalRun/ # Local History for Visual Studio .localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb diff --git a/appveyor.yml b/appveyor.yml index 0c74d54b..d55322da 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,3 +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. +# +# Do NOT modify this file. Update the canonical version in Home\repo-template\src\appveyor.yml +# then update all of the repos. + image: Visual Studio 2017 version: 0.0.0.{build} @@ -17,6 +22,7 @@ pull_requests: nuget: disable_publish_on_pr: true +skip_branch_with_pr: true skip_tags: true artifacts: diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 9eacf3f5..e853e22d 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,7 +1,7 @@ @@ -10,20 +10,17 @@ false $(MSBuildProjectName) - $(MSBuildThisFileDirectory)..\build\ + $([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 - - $(MSBuildThisFileDirectory)..\..\ - - 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/WixToolset.Core.Native/WixToolset.Core.Native.nuspec b/src/WixToolset.Core.Native/WixToolset.Core.Native.nuspec index 3394f8ab..25034078 100644 --- a/src/WixToolset.Core.Native/WixToolset.Core.Native.nuspec +++ b/src/WixToolset.Core.Native/WixToolset.Core.Native.nuspec @@ -5,7 +5,8 @@ $version$ $authors$ $authors$ - https://github.com/wixtoolset/Core.Native/blob/master/LICENSE.TXT + + https://licenses.nuget.org/MS-RL https://github.com/wixtoolset/Core.Native false $description$ diff --git a/src/winterop/runtime.win-xxx.WixToolset.Core.Native.nuspec b/src/winterop/runtime.win-xxx.WixToolset.Core.Native.nuspec index 87cf0919..18676197 100644 --- a/src/winterop/runtime.win-xxx.WixToolset.Core.Native.nuspec +++ b/src/winterop/runtime.win-xxx.WixToolset.Core.Native.nuspec @@ -5,7 +5,8 @@ $version$ $authors$ $authors$ - https://github.com/wixtoolset/Core.Native/blob/master/LICENSE.TXT + + https://licenses.nuget.org/MS-RL https://github.com/wixtoolset/Core.Native false $description$ diff --git a/src/wixnative/runtime.win.WixToolset.Core.Native.nuspec b/src/wixnative/runtime.win.WixToolset.Core.Native.nuspec index d2b9c1e7..f7697694 100644 --- a/src/wixnative/runtime.win.WixToolset.Core.Native.nuspec +++ b/src/wixnative/runtime.win.WixToolset.Core.Native.nuspec @@ -5,7 +5,8 @@ $version$ $authors$ $authors$ - https://github.com/wixtoolset/Core.Native/blob/master/LICENSE.TXT + + https://licenses.nuget.org/MS-RL https://github.com/wixtoolset/Core.Native false $description$ -- cgit v1.2.3-55-g6feb From 2761d399bf45825f7c3c13ac74cd630dfa7c7717 Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Wed, 28 Oct 2020 19:13:52 -0400 Subject: Strong-name sign WiX assemblies. --- src/CSharp.Build.props | 11 +++++++++++ src/Directory.Build.props | 5 ++++- src/wix.snk | Bin 0 -> 596 bytes 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 src/CSharp.Build.props create mode 100644 src/wix.snk (limited to 'src/Directory.Build.props') diff --git a/src/CSharp.Build.props b/src/CSharp.Build.props new file mode 100644 index 00000000..b12f4c6e --- /dev/null +++ b/src/CSharp.Build.props @@ -0,0 +1,11 @@ + + + + + true + $([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)wix.snk)) + + diff --git a/src/Directory.Build.props b/src/Directory.Build.props index e853e22d..f83cc154 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -8,6 +8,7 @@ Debug false + MSB3246 $(MSBuildProjectName) $([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\build\)) @@ -21,6 +22,8 @@ WiX Toolset - + + + diff --git a/src/wix.snk b/src/wix.snk new file mode 100644 index 00000000..3908a66a Binary files /dev/null and b/src/wix.snk differ -- cgit v1.2.3-55-g6feb From 533fb3c24290f5c9684a661e2576d857fbee9fb6 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Mon, 15 Mar 2021 15:46:44 -0700 Subject: Modernize build system --- .gitignore | 43 ++++++-- appveyor.cmd | 12 ++- appveyor.yml | 6 +- src/CSharp.Build.props | 13 --- src/Cpp.Build.props | 86 ---------------- src/Directory.Build.props | 4 +- src/Directory.Build.targets | 9 +- src/Directory.csproj.props | 13 +++ src/Directory.csproj.targets | 26 +++++ src/Directory.vcxproj.props | 111 +++++++++++++++++++++ .../WixToolset.Core.Native.csproj | 83 ++++----------- .../WixToolset.Core.Native.nuspec | 14 +-- .../WixToolsetTest.Core.Native.csproj | 7 +- src/wixnative/wixnative.vcxproj | 49 +++------ 14 files changed, 237 insertions(+), 239 deletions(-) delete mode 100644 src/CSharp.Build.props delete mode 100644 src/Cpp.Build.props create mode 100644 src/Directory.csproj.props create mode 100644 src/Directory.csproj.targets create mode 100644 src/Directory.vcxproj.props (limited to 'src/Directory.Build.props') diff --git a/.gitignore b/.gitignore index 3e8a1553..1ee53850 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,9 @@ # User-specific files (MonoDevelop/Xamarin Studio) *.userprefs +# Mono auto generated files +mono_crash.* + # Build results [Dd]ebug/ [Dd]ebugPublic/ @@ -20,12 +23,14 @@ [Rr]eleases/ x64/ x86/ +[Ww][Ii][Nn]32/ [Aa][Rr][Mm]/ [Aa][Rr][Mm]64/ bld/ [Bb]in/ [Oo]bj/ [Ll]og/ +[Ll]ogs/ # Visual Studio 2015/2017 cache/options directory .vs/ @@ -39,9 +44,10 @@ Generated\ Files/ [Tt]est[Rr]esult*/ [Bb]uild[Ll]og.* -# NUNIT +# NUnit *.VisualState.xml TestResult.xml +nunit-*.xml # Build Results of an ATL Project [Dd]ebugPS/ @@ -56,6 +62,9 @@ project.lock.json project.fragment.lock.json artifacts/ +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + # StyleCop StyleCopReport.xml @@ -122,9 +131,6 @@ _ReSharper*/ *.[Rr]e[Ss]harper *.DotSettings.user -# JustCode is a .NET coding add-in -.JustCode - # TeamCity is a build add-in _TeamCity* @@ -135,6 +141,11 @@ _TeamCity* .axoCover/* !.axoCover/settings.json +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + # Visual Studio code coverage results *.coverage *.coveragexml @@ -182,6 +193,8 @@ PublishScripts/ # NuGet Packages *.nupkg +# NuGet Symbol Packages +*.snupkg # The packages folder can be ignored because of Package Restore **/[Pp]ackages/* # except build/, which is used as an MSBuild target. @@ -206,6 +219,8 @@ BundleArtifacts/ Package.StoreAssociation.xml _pkginfo.txt *.appx +*.appxbundle +*.appxupload # Visual Studio cache files # files ending in .cache can be ignored @@ -231,8 +246,6 @@ orleans.codegen.cs # Since there are multiple workflows, uncomment next line to ignore bower_components # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) #bower_components/ -# ASP.NET Core default setup: bower directory is configured as wwwroot/lib/ and bower restore is true -**/wwwroot/lib/ # RIA/Silverlight projects Generated_Code/ @@ -257,6 +270,9 @@ ServiceFabricBackup/ *.bim.layout *.bim_*.settings *.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl # Microsoft Fakes FakesAssemblies/ @@ -292,10 +308,6 @@ paket-files/ # FAKE - F# Make .fake/ -# JetBrains Rider -.idea/ -*.sln.iml - # CodeRush personal settings .cr/personal @@ -337,5 +349,14 @@ ASALocalRun/ # Local History for Visual Studio .localhistory/ -# BeatPulse healthcheck temp database +# BeatPulse healthcheck temp database healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd diff --git a/appveyor.cmd b/appveyor.cmd index 6de09dad..d9691a42 100644 --- a/appveyor.cmd +++ b/appveyor.cmd @@ -1,13 +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 +:: Build msbuild -p:Configuration=%_C% src\test\WixToolsetTest.Core.Native\WixToolsetTest.Core.Native.csproj || exit /b + +:: Test dotnet test -c %_C% --no-build src\test\WixToolsetTest.Core.Native\WixToolsetTest.Core.Native.csproj || exit /b -msbuild -t:Pack -p:Configuration=%_C% src\WixToolset.Core.Native\WixToolset.Core.Native.csproj || exit /b +:: Pack +msbuild -p:Configuration=%_C% -p:NoBuild=true -t:Pack src\WixToolset.Core.Native\WixToolset.Core.Native.csproj || exit /b @popd -@endlocal \ No newline at end of file +@endlocal diff --git a/appveyor.yml b/appveyor.yml index e4d25586..dccc2071 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -21,8 +21,6 @@ environment: build_script: - appveyor.cmd -test: off - pull_requests: do_not_increment_build_number: true @@ -32,9 +30,13 @@ nuget: skip_branch_with_pr: true skip_tags: true +test: off + artifacts: - path: build\Release\**\*.nupkg name: nuget +- path: build\Release\**\*.snupkg + name: snupkg notifications: - provider: Slack diff --git a/src/CSharp.Build.props b/src/CSharp.Build.props deleted file mode 100644 index 81d24ad1..00000000 --- a/src/CSharp.Build.props +++ /dev/null @@ -1,13 +0,0 @@ - - - - - true - true - $([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)wix.snk)) - false - - 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 index f83cc154..b3c6287c 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -22,8 +22,6 @@ WiX Toolset - - - + diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index cb988931..2fcc765a 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets @@ -9,11 +9,6 @@ See the original here: https://github.com/dotnet/sdk/issues/1151#issuecomment-385133284 --> - - false - $(OutputPath)\$(AssemblyName).xml - - true $(SolutionPath) @@ -45,12 +40,12 @@ - + - + diff --git a/src/Directory.csproj.props b/src/Directory.csproj.props new file mode 100644 index 00000000..81d24ad1 --- /dev/null +++ b/src/Directory.csproj.props @@ -0,0 +1,13 @@ + + + + + true + true + $([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)wix.snk)) + false + + diff --git a/src/Directory.csproj.targets b/src/Directory.csproj.targets new file mode 100644 index 00000000..c3270426 --- /dev/null +++ b/src/Directory.csproj.targets @@ -0,0 +1,26 @@ + + + + + false + $(OutputPath)\$(AssemblyName).xml + + + + + $(PrivateRepositoryUrl.Replace('.git','')) + + $(MSBuildProjectName).nuspec + $(OutputPath)..\ + $(NuspecProperties);Id=$(PackageId);Authors=$(Authors);Copyright=$(Copyright);Description=$(Description);Title=$(Title) + $(NuspecProperties);Version=$(PackageVersion);RepositoryCommit=$(SourceRevisionId);RepositoryType=$(RepositoryType);RepositoryUrl=$(PrivateRepositoryUrl);ProjectFolder=$(MSBuildProjectDirectory)\;ProjectUrl=$(ProjectUrl) + true + snupkg + + + + diff --git a/src/Directory.vcxproj.props b/src/Directory.vcxproj.props new file mode 100644 index 00000000..bcf26c57 --- /dev/null +++ b/src/Directory.vcxproj.props @@ -0,0 +1,111 @@ + + + + + + Win32 + $(BaseIntermediateOutputPath)$(Configuration)\$(Platform)\ + $(OutputPath)$(Platform)\ + + + $(Company) + $(Copyright) + + win-x86;win-x64;win-arm64 + native,Version=v0.0 + + + + $([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/WixToolset.Core.Native/WixToolset.Core.Native.csproj b/src/WixToolset.Core.Native/WixToolset.Core.Native.csproj index 2c118d51..41e75f99 100644 --- a/src/WixToolset.Core.Native/WixToolset.Core.Native.csproj +++ b/src/WixToolset.Core.Native/WixToolset.Core.Native.csproj @@ -5,82 +5,35 @@ netstandard2.0 - $(MSBuildThisFileName).nuspec - Core Native embedded + WiX Toolset Native Processing true true - - - All - Platform=ARM64 - - - All - Platform=Win32 - - - All - Platform=x64 - + + + + + + + + + + + + + + + - + - + - - - $(MSBuildProjectDir)..\..\build\obj\$(ProjectName)\$(Configuration)\NativeFileList.txt - $(NCrunchOriginalProjectDir)..\..\build\obj\$(ProjectName)\$(Configuration)\NativeFileList.txt - $(MSBuildThisFileDirectory)..\wixnative\ - - - - - <_NativeProjectOutput Include="$(MergeModDirectory)x64\mergemod.dll" /> - <_NativeProjectOutput Include="$(OutputPath)..\x64\wixnative.exe" /> - <_NativeProjectOutput Include="$(OutputPath)..\x64\wixnative.pdb" /> - - - - - - - - - PreserveNewest - %(Filename)%(Extension) - - - - - - - - - - - - - - - - - - - - - - - $(OutputPath)..\ - Id=$(MSBuildThisFileName);Version=$(BuildVersionSimple);Authors=$(Authors);Copyright=$(Copyright);Description=$(Description);RepositoryCommit=$(SourceRevisionId);RepositoryType=$(RepositoryType);RepositoryUrl=$(PrivateRepositoryUrl);MergeModDir=$(MergeModDirectory) - - diff --git a/src/WixToolset.Core.Native/WixToolset.Core.Native.nuspec b/src/WixToolset.Core.Native/WixToolset.Core.Native.nuspec index 33b19bc1..b6fd9790 100644 --- a/src/WixToolset.Core.Native/WixToolset.Core.Native.nuspec +++ b/src/WixToolset.Core.Native/WixToolset.Core.Native.nuspec @@ -3,16 +3,16 @@ $id$ $version$ + $title$ + $description$ $authors$ - $authors$ MS-RL - https://github.com/wixtoolset/Core.Native false - $description$ $copyright$ + $projectUrl$ - + @@ -20,13 +20,13 @@ - + - + - + diff --git a/src/test/WixToolsetTest.Core.Native/WixToolsetTest.Core.Native.csproj b/src/test/WixToolsetTest.Core.Native/WixToolsetTest.Core.Native.csproj index 9c493d84..77a53c29 100644 --- a/src/test/WixToolsetTest.Core.Native/WixToolsetTest.Core.Native.csproj +++ b/src/test/WixToolsetTest.Core.Native/WixToolsetTest.Core.Native.csproj @@ -9,18 +9,13 @@ - - + - - - - diff --git a/src/wixnative/wixnative.vcxproj b/src/wixnative/wixnative.vcxproj index 681b2e1e..64c2e7d0 100644 --- a/src/wixnative/wixnative.vcxproj +++ b/src/wixnative/wixnative.vcxproj @@ -2,11 +2,6 @@ - - - - - Debug @@ -37,34 +32,23 @@ {8497EC72-B8D0-4272-A9D0-7E9D871CEFBF} Application - Console - wixnative v142 Unicode + Console + wixnative + WiX Native Processing + 10.0 - - - - - - - - - - crypt32.lib;cabinet.lib;msi.lib - - - 4996 - + Create @@ -79,21 +63,14 @@ - + + + + + + + - - - This project references NuGet package(s) that are missing on this computer. Enable 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 + -- cgit v1.2.3-55-g6feb From a2f0de28fc0f1ab71d4685c77f0b21d946f3e702 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Fri, 16 Apr 2021 23:35:06 -0700 Subject: Introduce new versioning system based on GitInfo --- appveyor.yml | 4 +- signing.json | 13 +++ src/Directory.Build.props | 5 +- src/Directory.Build.targets | 120 +++++++++++++++------ src/Directory.csproj.targets | 15 +-- src/Directory.vcxproj.props | 9 +- src/Directory.vcxproj.targets | 45 ++++++++ .../WixToolset.Core.Native.csproj | 3 +- .../WixToolsetTest.Core.Native.csproj | 2 + src/test/version.txt | 1 + src/ver.rc | 55 ++++++++++ src/wixnative/wixnative.vcxproj | 2 +- version.json | 11 -- version.txt | 1 + 14 files changed, 223 insertions(+), 63 deletions(-) create mode 100644 signing.json create mode 100644 src/Directory.vcxproj.targets create mode 100644 src/test/version.txt create mode 100644 src/ver.rc delete mode 100644 version.json create mode 100644 version.txt (limited to 'src/Directory.Build.props') diff --git a/appveyor.yml b/appveyor.yml index dccc2071..364569cf 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -21,6 +21,8 @@ environment: build_script: - appveyor.cmd +test: off + pull_requests: do_not_increment_build_number: true @@ -30,8 +32,6 @@ nuget: skip_branch_with_pr: true skip_tags: true -test: off - artifacts: - path: build\Release\**\*.nupkg name: nuget diff --git a/signing.json b/signing.json new file mode 100644 index 00000000..fe1c8c9b --- /dev/null +++ b/signing.json @@ -0,0 +1,13 @@ +{ + "SignClient": { + "AzureAd": { + "AADInstance": "https://login.microsoftonline.com/", + "ClientId": "c248d68a-ba6f-4aa9-8a68-71fe872063f8", + "TenantId": "16076fdc-fcc1-4a15-b1ca-32c9a255900e" + }, + "Service": { + "Url": "https://codesign.dotnetfoundation.org/", + "ResourceId": "https://SignService/3c30251f-36f3-490b-a955-520addb85001" + } + } +} diff --git a/src/Directory.Build.props b/src/Directory.Build.props index b3c6287c..dc78f888 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -8,7 +8,6 @@ Debug false - MSB3246 $(MSBuildProjectName) $([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\build\)) @@ -20,6 +19,10 @@ Copyright (c) .NET Foundation and contributors. All rights reserved. MS-RL WiX Toolset + + false + version.txt + v?(?<MAJOR>\d+|{[\dA-za-z\-\.]+})\.(?<MINOR>(\d+|{[\dA-za-z\-\.]+}))(?:\-(?<LABEL>[\dA-Za-z\-\.{}]+))?$|^v?(?<MAJOR>\d+|{[\dA-za-z\-\.]+})\.(?<MINOR>(\d+|{[\dA-za-z\-\.]+}))\.(?<PATCH>\d+|{[\dA-za-z\-\.]+})(?:\-(?<LABEL>[\dA-Za-z\-\.{}]+))?$|^(?<LABEL>[\dA-Za-z\-\.{}]+)\-v?(?<MAJOR>\d+|{[\dA-za-z\-\.]+})\.(?<MINOR>\d+|{[\dA-za-z\-\.]+})\.(?<PATCH>\d+|{[\dA-za-z\-\.]+})$ diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index 2fcc765a..c426f25e 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets @@ -4,47 +4,105 @@ Do NOT modify this file. Update the canonical version in Home\repo-template\src\Directory.Build.targets then update all of the repos. --> - - true - $(SolutionPath) - $(NCrunchOriginalSolutionPath) + $(BaseOutputPath)obj\.tools + $(SigningToolFolder)\SignClient.exe + $(SigningToolFolder)\empty-filelist.txt + $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), signing.json))\signing.json + + + + + $(GitBaseVersion.Replace('{apiversion}', '$(ApiVersion)')) + $(GitBaseVersion.Replace('{height}', '$(GitCommits)')) + $(GitBaseVersion.Replace('{commits}', '$(GitCommits)')) + + + + + + $(GitBaseVersionMajor).$(GitBaseVersionMinor).0.0 + $(GitBaseVersionMajor).$(GitBaseVersionMinor).$(GitBaseVersionPatch).$(GitCommits) + $(GitBaseVersionMajor).$(GitBaseVersionMinor).$(GitBaseVersionPatch)$(GitSemVerDashLabel) + $(GitBaseVersionMajor).$(GitBaseVersionMinor).$(GitBaseVersionPatch)$(GitSemVerDashLabel)+$(GitSha) + + false + + + + + + + + $(GenerateNuspecDependsOn); + __SetNuspecProperties + - - + + + $(GitRepositoryUrl.Replace('.git','')) + + $(MSBuildProjectName).nuspec + $([System.IO.Path]::GetFullPath($(OutputPath)..))\ + $(NuspecProperties);Id=$(PackageId);Authors="$(Authors)";Configuration=$(Configuration);Copyright="$(Copyright)";Description="$(Description)";Title="$(Title)" + $(NuspecProperties);Version=$(PackageVersion);RepositoryCommit=$(GitSha);RepositoryType=git;RepositoryUrl=$(GitRepositoryUrl);ProjectFolder=$(MSBuildProjectDirectory)\;ProjectUrl=$(ProjectUrl) + true + snupkg + + + + + + + + + + + + + + + + - - $([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/Directory.csproj.targets b/src/Directory.csproj.targets index c3270426..49303a1d 100644 --- a/src/Directory.csproj.targets +++ b/src/Directory.csproj.targets @@ -9,18 +9,5 @@ $(OutputPath)\$(AssemblyName).xml - - - $(PrivateRepositoryUrl.Replace('.git','')) - - $(MSBuildProjectName).nuspec - $(OutputPath)..\ - $(NuspecProperties);Id=$(PackageId);Authors=$(Authors);Copyright=$(Copyright);Description=$(Description);Title=$(Title) - $(NuspecProperties);Version=$(PackageVersion);RepositoryCommit=$(SourceRevisionId);RepositoryType=$(RepositoryType);RepositoryUrl=$(PrivateRepositoryUrl);ProjectFolder=$(MSBuildProjectDirectory)\;ProjectUrl=$(ProjectUrl) - true - snupkg - - - + diff --git a/src/Directory.vcxproj.props b/src/Directory.vcxproj.props index bcf26c57..63d73b36 100644 --- a/src/Directory.vcxproj.props +++ b/src/Directory.vcxproj.props @@ -19,17 +19,22 @@ $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) + + $(MSBuildThisFileDirectory)CustomizedNativeRecommendedRules.ruleset + + $(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) + WIN32;_WINDOWS;_WIN32_MSI=500;_WIN32_WINNT=0x0600;$(ArmPreprocessorDefinitions);$(UnicodePreprocessorDefinitions);_CRT_STDIO_LEGACY_WIDE_SPECIFIERS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions) Use precomp.h StdCall true false + Guard -YlprecompDefine /Zc:threadSafeInit- %(AdditionalOptions) true @@ -79,6 +84,7 @@ + MultiThreadedDebugDll @@ -98,6 +104,7 @@ + MultiThreadedDll diff --git a/src/Directory.vcxproj.targets b/src/Directory.vcxproj.targets new file mode 100644 index 00000000..9f0689d5 --- /dev/null +++ b/src/Directory.vcxproj.targets @@ -0,0 +1,45 @@ + + + + + + $(PrepareForBuildDependsOn); + __SetVersionResource + + + + + + <_ResourceFileType Condition=" '$(ConfigurationType)'=='Application' ">VFT_APP + <_ResourceFileType Condition=" '$(ConfigurationType)'=='DynamicLibrary' ">VFT_DLL + $(TargetName) + $(Description) + + + + + + %(PreprocessorDefinitions); + GITVER_FILEVER=$(FileVersion.Replace('.', ',')); + GITVER_PRODUCTVER=$(AssemblyVersion.Replace('.', ',')); + GITVER_FILE_VERSION=$(FileVersion); + GITVER_PRODUCT_VERSION=$(AssemblyVersion); + GITVER_FILE_TYPE=$(_ResourceFileType); + GITVER_CODEPAGE=0; + GITVER_LCID=$([System.Convert]::ToInt32('%(Culture)', 16)); + GITVER_VERSION_BLOCK=$([System.Convert]::ToString($([MSBuild]::Multiply($([System.Convert]::ToUint64('%(Culture)', 16)), 65536)), 16).PadLeft(8, '0')); + GITVER_COMPANY=$(Company); + GITVER_COPYRIGHT=$(Copyright); + GITVER_TITLE=$(Title); + GITVER_PRODUCT=$(Product); + GITVER_INFORMATIONAL_VERSION=$(InformationalVersion); + GITVER_INTERNAL_NAME=$(TargetName); + GITVER_FILE_NAME=$(TargetFileName); + + + + + diff --git a/src/WixToolset.Core.Native/WixToolset.Core.Native.csproj b/src/WixToolset.Core.Native/WixToolset.Core.Native.csproj index d53a155b..fea15922 100644 --- a/src/WixToolset.Core.Native/WixToolset.Core.Native.csproj +++ b/src/WixToolset.Core.Native/WixToolset.Core.Native.csproj @@ -7,7 +7,6 @@ netstandard2.0 embedded WiX Toolset Native Processing - true true NU5128 @@ -45,6 +44,6 @@ - + diff --git a/src/test/WixToolsetTest.Core.Native/WixToolsetTest.Core.Native.csproj b/src/test/WixToolsetTest.Core.Native/WixToolsetTest.Core.Native.csproj index 77a53c29..6068dbea 100644 --- a/src/test/WixToolsetTest.Core.Native/WixToolsetTest.Core.Native.csproj +++ b/src/test/WixToolsetTest.Core.Native/WixToolsetTest.Core.Native.csproj @@ -17,6 +17,8 @@ + + diff --git a/src/test/version.txt b/src/test/version.txt new file mode 100644 index 00000000..cf138743 --- /dev/null +++ b/src/test/version.txt @@ -0,0 +1 @@ +v42.42.{height}-preview.0 \ No newline at end of file diff --git a/src/ver.rc b/src/ver.rc new file mode 100644 index 00000000..4dc64d37 --- /dev/null +++ b/src/ver.rc @@ -0,0 +1,55 @@ +#pragma once +// ------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +#if defined(_UNICODE) +#define GITVER_VERSION_STRING(x) L ## #x +#else +#define GITVER_VERSION_STRING(x) #x +#endif + +#define GVS(x) GITVER_VERSION_STRING(x) + +#ifdef RC_INVOKED + +#include + +VS_VERSION_INFO VERSIONINFO + FILEVERSION GITVER_FILEVER + PRODUCTVERSION GITVER_PRODUCTVER + FILEFLAGSMASK 0x3FL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE GITVER_FILE_TYPE + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK GVS(GITVER_VERSION_BLOCK) + BEGIN + VALUE "CompanyName", GVS(GITVER_COMPANY) + VALUE "FileDescription", GVS(GITVER_TITLE) + VALUE "FileVersion", GVS(GITVER_FILE_VERSION) + VALUE "InternalName", GVS(GITVER_INTERNAL_NAME) + VALUE "OriginalFilename", GVS(GITVER_FILE_NAME) + VALUE "ProductName", GVS(GITVER_PRODUCT) + VALUE "ProductVersion", GVS(GITVER_INFORMATIONAL_VERSION) + VALUE "LegalCopyright", GVS(GITVER_COPYRIGHT) + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", GITVER_LCID, GITVER_CODEPAGE + END +END +#endif diff --git a/src/wixnative/wixnative.vcxproj b/src/wixnative/wixnative.vcxproj index 09dc97fa..20959827 100644 --- a/src/wixnative/wixnative.vcxproj +++ b/src/wixnative/wixnative.vcxproj @@ -69,7 +69,7 @@ - + diff --git a/version.json b/version.json deleted file mode 100644 index 5f857771..00000000 --- a/version.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "version": "4.0", - "publicReleaseRefSpec": [ - "^refs/heads/master$" - ], - "cloudBuild": { - "buildNumber": { - "enabled": true - } - } -} diff --git a/version.txt b/version.txt new file mode 100644 index 00000000..dc60d914 --- /dev/null +++ b/version.txt @@ -0,0 +1 @@ +v4.{apiversion}-preview.0-build.{height} -- cgit v1.2.3-55-g6feb