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 --- src/Directory.Build.targets | 48 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 src/Directory.Build.targets (limited to 'src/Directory.Build.targets') 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)')) + + + + + + + + + + + -- cgit v1.2.3-55-g6feb From 8296f237c69743d3e6cbdc58fc07e8470562b92e Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Fri, 18 Dec 2020 18:12:45 -0600 Subject: Enable XML doc. --- src/CSharp.Build.props | 1 + src/Directory.Build.targets | 8 ++++++++ src/WixToolset.Core.Native/CabInterop.cs | 4 +++- src/WixToolset.Core.Native/Cabinet.cs | 10 ++++++++-- src/WixToolset.Core.Native/MSIFILEHASHINFO.cs | 15 +++++++++++++++ src/WixToolset.Core.Native/MsmInterop.cs | 3 +++ src/WixToolset.Core.Native/WixToolset.Core.Native.csproj | 6 +++++- src/WixToolset.Core.Native/WixToolset.Core.Native.nuspec | 1 + src/winterop/packages.config | 4 ++-- src/winterop/winterop.vcxproj | 8 ++++---- src/wixnative/packages.config | 4 ++-- src/wixnative/wixnative.vcxproj | 8 ++++---- 12 files changed, 56 insertions(+), 16 deletions(-) (limited to 'src/Directory.Build.targets') diff --git a/src/CSharp.Build.props b/src/CSharp.Build.props index bcd47a0c..81d24ad1 100644 --- a/src/CSharp.Build.props +++ b/src/CSharp.Build.props @@ -8,5 +8,6 @@ true true $([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)wix.snk)) + false diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index dac7452a..cb988931 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets @@ -9,6 +9,11 @@ See the original here: https://github.com/dotnet/sdk/issues/1151#issuecomment-385133284 --> + + false + $(OutputPath)\$(AssemblyName).xml + + true $(SolutionPath) @@ -45,4 +50,7 @@ + + + diff --git a/src/WixToolset.Core.Native/CabInterop.cs b/src/WixToolset.Core.Native/CabInterop.cs index 4c1eb93d..69781047 100644 --- a/src/WixToolset.Core.Native/CabInterop.cs +++ b/src/WixToolset.Core.Native/CabInterop.cs @@ -29,6 +29,7 @@ namespace WixToolset.Core.Native /// /// 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, MSIFILEHASHINFO fileHash, IntPtr contextHandle); @@ -101,7 +102,8 @@ namespace WixToolset.Core.Native /// 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); diff --git a/src/WixToolset.Core.Native/Cabinet.cs b/src/WixToolset.Core.Native/Cabinet.cs index 2d624658..7e04cbc5 100644 --- a/src/WixToolset.Core.Native/Cabinet.cs +++ b/src/WixToolset.Core.Native/Cabinet.cs @@ -15,19 +15,25 @@ namespace WixToolset.Core.Native private const string CompressionLevelVariable = "WIX_COMPRESSION_LEVEL"; private static readonly char[] TextLineSplitter = new[] { '\t' }; + /// + /// + /// + /// Path of cabinet public Cabinet(string path) { this.Path = path; } + /// + /// Cabinet path. + /// public string Path { get; } /// /// Creates a cabinet. /// - /// Path of cabinet to create. + /// Files to compress. /// Level of compression to apply. - /// Maximum number of files that will be added to cabinet. /// Maximum size of cabinet. /// Maximum threshold for each cabinet. public void Compress(IEnumerable files, CompressionLevel compressionLevel, int maxSize = 0, int maxThresh = 0) diff --git a/src/WixToolset.Core.Native/MSIFILEHASHINFO.cs b/src/WixToolset.Core.Native/MSIFILEHASHINFO.cs index c11b44ea..d5ac1bc0 100644 --- a/src/WixToolset.Core.Native/MSIFILEHASHINFO.cs +++ b/src/WixToolset.Core.Native/MSIFILEHASHINFO.cs @@ -10,10 +10,25 @@ namespace WixToolset.Core.Native [StructLayout(LayoutKind.Explicit)] public class MSIFILEHASHINFO { + /// + /// + /// [FieldOffset(0)] public uint FileHashInfoSize; + /// + /// + /// [FieldOffset(4)] public int Data0; + /// + /// + /// [FieldOffset(8)] public int Data1; + /// + /// + /// [FieldOffset(12)] public int Data2; + /// + /// + /// [FieldOffset(16)] public int Data3; } } diff --git a/src/WixToolset.Core.Native/MsmInterop.cs b/src/WixToolset.Core.Native/MsmInterop.cs index 6b1ad141..87ed6f02 100644 --- a/src/WixToolset.Core.Native/MsmInterop.cs +++ b/src/WixToolset.Core.Native/MsmInterop.cs @@ -481,6 +481,9 @@ namespace WixToolset.Core.Native [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public interface IClassFactory { + /// + /// + /// [return: MarshalAs(UnmanagedType.IUnknown)] object CreateInstance(IntPtr unkOuter, [MarshalAs(UnmanagedType.LPStruct)] Guid iid); } diff --git a/src/WixToolset.Core.Native/WixToolset.Core.Native.csproj b/src/WixToolset.Core.Native/WixToolset.Core.Native.csproj index f12d674c..2c118d51 100644 --- a/src/WixToolset.Core.Native/WixToolset.Core.Native.csproj +++ b/src/WixToolset.Core.Native/WixToolset.Core.Native.csproj @@ -1,3 +1,6 @@ + + + @@ -6,6 +9,7 @@ Core Native embedded true + true @@ -29,7 +33,7 @@ - + diff --git a/src/WixToolset.Core.Native/WixToolset.Core.Native.nuspec b/src/WixToolset.Core.Native/WixToolset.Core.Native.nuspec index 0ec4747d..33b19bc1 100644 --- a/src/WixToolset.Core.Native/WixToolset.Core.Native.nuspec +++ b/src/WixToolset.Core.Native/WixToolset.Core.Native.nuspec @@ -18,6 +18,7 @@ + diff --git a/src/winterop/packages.config b/src/winterop/packages.config index 321d628a..eb65b3b3 100644 --- a/src/winterop/packages.config +++ b/src/winterop/packages.config @@ -3,6 +3,6 @@ - - + + \ No newline at end of file diff --git a/src/winterop/winterop.vcxproj b/src/winterop/winterop.vcxproj index 28393dba..ae844fdf 100644 --- a/src/winterop/winterop.vcxproj +++ b/src/winterop/winterop.vcxproj @@ -5,7 +5,7 @@ - + @@ -51,7 +51,7 @@ - + @@ -87,8 +87,8 @@ 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}. - - + + diff --git a/src/wixnative/packages.config b/src/wixnative/packages.config index 321d628a..eb65b3b3 100644 --- a/src/wixnative/packages.config +++ b/src/wixnative/packages.config @@ -3,6 +3,6 @@ - - + + \ No newline at end of file diff --git a/src/wixnative/wixnative.vcxproj b/src/wixnative/wixnative.vcxproj index 0d79b80c..681b2e1e 100644 --- a/src/wixnative/wixnative.vcxproj +++ b/src/wixnative/wixnative.vcxproj @@ -5,7 +5,7 @@ - + @@ -50,7 +50,7 @@ - + @@ -87,8 +87,8 @@ 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}. - - + + -- 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.targets') 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.targets') 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