From e90f50d01ef22491b81248cf2ae73dd61ed2e86c Mon Sep 17 00:00:00 2001 From: Max Paperno Date: Mon, 18 Apr 2022 11:21:27 -0400 Subject: [PATCH] [build] Configure for publishing in trimmed mode; Add/fix publishing profiles for testing, update publish.ps1 script; Exclude Sonar stuff; Fixes v0.7.0.0 release missing .Net 5 dependency at runtime. --- .../MSFSTouchPortalPlugin-Generator.csproj | 31 ++++++++++++++-- .../Properties/PublishProfiles/win-x64.pubxml | 10 +++--- MSFSTouchPortalPlugin.sln | 14 ++++++-- .../MSFSTouchPortalPlugin.csproj | 35 ++++++++++++++----- .../PublishProfiles/win-x64-Self.pubxml.user | 6 ---- .../Properties/PublishProfiles/win-x64.pubxml | 18 ++++++++++ publish.ps1 | 6 ++-- 7 files changed, 94 insertions(+), 26 deletions(-) rename MSFSTouchPortalPlugin/Properties/PublishProfiles/win-x64-Self.pubxml => MSFSTouchPortalPlugin-Generator/Properties/PublishProfiles/win-x64.pubxml (73%) delete mode 100644 MSFSTouchPortalPlugin/Properties/PublishProfiles/win-x64-Self.pubxml.user create mode 100644 MSFSTouchPortalPlugin/Properties/PublishProfiles/win-x64.pubxml diff --git a/MSFSTouchPortalPlugin-Generator/MSFSTouchPortalPlugin-Generator.csproj b/MSFSTouchPortalPlugin-Generator/MSFSTouchPortalPlugin-Generator.csproj index a51bc27..d16ecac 100644 --- a/MSFSTouchPortalPlugin-Generator/MSFSTouchPortalPlugin-Generator.csproj +++ b/MSFSTouchPortalPlugin-Generator/MSFSTouchPortalPlugin-Generator.csproj @@ -4,10 +4,11 @@ Exe net5.0 MSFSTouchPortalPlugin_Generator - ..\.sonarlint\msfstouchportalplugincsharp.ruleset x64 1.2.0 ..\build\$(Platform)-$(Configuration)\ + Debug;Release;Publish + @@ -16,7 +17,7 @@ DEBUG;TRACE - + x64 1701;1702 @@ -28,9 +29,11 @@ + @@ -42,4 +45,28 @@ + + win-x64 + true + True + copyused + False + False + + + + + + + + + + + + ..\MSFSTouchPortalPlugin\lib\Microsoft.FlightSimulator.SimConnect.dll + false + true + + + diff --git a/MSFSTouchPortalPlugin/Properties/PublishProfiles/win-x64-Self.pubxml b/MSFSTouchPortalPlugin-Generator/Properties/PublishProfiles/win-x64.pubxml similarity index 73% rename from MSFSTouchPortalPlugin/Properties/PublishProfiles/win-x64-Self.pubxml rename to MSFSTouchPortalPlugin-Generator/Properties/PublishProfiles/win-x64.pubxml index acbd352..745f327 100644 --- a/MSFSTouchPortalPlugin/Properties/PublishProfiles/win-x64-Self.pubxml +++ b/MSFSTouchPortalPlugin-Generator/Properties/PublishProfiles/win-x64.pubxml @@ -4,15 +4,15 @@ https://go.microsoft.com/fwlink/?LinkID=208121. --> - FileSystem - Release + Publish x64 - netcoreapp3.1 - ..\dist\win-x64 + ..\dist + FileSystem + net5.0 win-x64 true False False - False + True \ No newline at end of file diff --git a/MSFSTouchPortalPlugin.sln b/MSFSTouchPortalPlugin.sln index 31953ba..251887e 100644 --- a/MSFSTouchPortalPlugin.sln +++ b/MSFSTouchPortalPlugin.sln @@ -11,7 +11,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution ProjectSection(SolutionItems) = preProject .editorconfig = .editorconfig .gitignore = .gitignore - actions = actions airplane_takeoff1600.png = airplane_takeoff1600.png airplane_takeoff24.png = airplane_takeoff24.png build.ps1 = build.ps1 @@ -23,11 +22,15 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution publish.ps1 = publish.ps1 README.md = README.md sonarcube.ps1 = sonarcube.ps1 - states = states EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{BB11FB83-1407-4C82-AA08-67D7BB5A106B}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{7FEA40CD-379E-48F1-9581-2692B532A839}" + ProjectSection(SolutionItems) = preProject + .github\workflows\verify-build.yml = .github\workflows\verify-build.yml + EndProjectSection +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ISSUE_TEMPLATE", "ISSUE_TEMPLATE", "{D74D033D-8E79-4CCD-9D07-7CD7CD2FEF49}" ProjectSection(SolutionItems) = preProject .github\ISSUE_TEMPLATE\bug-report.md = .github\ISSUE_TEMPLATE\bug-report.md @@ -46,19 +49,25 @@ EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 + Publish|x64 = Publish|x64 Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {D3F1B2FB-0846-4003-8D2E-355273668F37}.Debug|x64.ActiveCfg = Debug|x64 {D3F1B2FB-0846-4003-8D2E-355273668F37}.Debug|x64.Build.0 = Debug|x64 + {D3F1B2FB-0846-4003-8D2E-355273668F37}.Publish|x64.ActiveCfg = Publish|x64 + {D3F1B2FB-0846-4003-8D2E-355273668F37}.Publish|x64.Build.0 = Publish|x64 {D3F1B2FB-0846-4003-8D2E-355273668F37}.Release|x64.ActiveCfg = Release|x64 {D3F1B2FB-0846-4003-8D2E-355273668F37}.Release|x64.Build.0 = Release|x64 {53A38611-6486-4FF5-8637-1C6BC38A6A18}.Debug|x64.ActiveCfg = Debug|x64 {53A38611-6486-4FF5-8637-1C6BC38A6A18}.Debug|x64.Build.0 = Debug|x64 + {53A38611-6486-4FF5-8637-1C6BC38A6A18}.Publish|x64.ActiveCfg = Publish|x64 + {53A38611-6486-4FF5-8637-1C6BC38A6A18}.Publish|x64.Build.0 = Publish|x64 {53A38611-6486-4FF5-8637-1C6BC38A6A18}.Release|x64.ActiveCfg = Release|x64 {53A38611-6486-4FF5-8637-1C6BC38A6A18}.Release|x64.Build.0 = Release|x64 {562A58FF-DD9A-4839-B503-4520D3BE96DA}.Debug|x64.ActiveCfg = Debug|x64 {562A58FF-DD9A-4839-B503-4520D3BE96DA}.Debug|x64.Build.0 = Debug|x64 + {562A58FF-DD9A-4839-B503-4520D3BE96DA}.Publish|x64.ActiveCfg = Release|x64 {562A58FF-DD9A-4839-B503-4520D3BE96DA}.Release|x64.ActiveCfg = Release|x64 {562A58FF-DD9A-4839-B503-4520D3BE96DA}.Release|x64.Build.0 = Release|x64 EndGlobalSection @@ -67,6 +76,7 @@ Global EndGlobalSection GlobalSection(NestedProjects) = preSolution {BB11FB83-1407-4C82-AA08-67D7BB5A106B} = {6DF0C85E-3EB4-4898-A304-EFA04CB547A6} + {7FEA40CD-379E-48F1-9581-2692B532A839} = {BB11FB83-1407-4C82-AA08-67D7BB5A106B} {D74D033D-8E79-4CCD-9D07-7CD7CD2FEF49} = {BB11FB83-1407-4C82-AA08-67D7BB5A106B} {8781784E-631E-4D29-A3A1-9CBEFBC01310} = {BB11FB83-1407-4C82-AA08-67D7BB5A106B} EndGlobalSection diff --git a/MSFSTouchPortalPlugin/MSFSTouchPortalPlugin.csproj b/MSFSTouchPortalPlugin/MSFSTouchPortalPlugin.csproj index fabe903..167e446 100644 --- a/MSFSTouchPortalPlugin/MSFSTouchPortalPlugin.csproj +++ b/MSFSTouchPortalPlugin/MSFSTouchPortalPlugin.csproj @@ -4,10 +4,12 @@ Exe net5.0 MSFSTouchPortalPlugin - 0.7.0.0-mp - ..\.sonarlint\msfstouchportalplugincsharp.ruleset + 0.7.0.1-mp x64 - ..\build\$(Platform)-$(Configuration)\ + ..\build\$(Platform)-$(Configuration)\ + 5.0 + Debug;Release;Publish + @@ -15,7 +17,7 @@ DEBUG;TRACE;DEBUG_REQUESTS - + x64 1701;1702 @@ -27,11 +29,26 @@ + + win-x64 + true + True + copyused + False + False + + + + + + + + - PreserveNewest + @@ -44,13 +61,15 @@ + + + + diff --git a/MSFSTouchPortalPlugin/Properties/PublishProfiles/win-x64-Self.pubxml.user b/MSFSTouchPortalPlugin/Properties/PublishProfiles/win-x64-Self.pubxml.user deleted file mode 100644 index 312c6e3..0000000 --- a/MSFSTouchPortalPlugin/Properties/PublishProfiles/win-x64-Self.pubxml.user +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/MSFSTouchPortalPlugin/Properties/PublishProfiles/win-x64.pubxml b/MSFSTouchPortalPlugin/Properties/PublishProfiles/win-x64.pubxml new file mode 100644 index 0000000..3d9d3d8 --- /dev/null +++ b/MSFSTouchPortalPlugin/Properties/PublishProfiles/win-x64.pubxml @@ -0,0 +1,18 @@ + + + + + FileSystem + Publish + x64 + net5.0 + ..\dist + win-x64 + true + False + False + True + + \ No newline at end of file diff --git a/publish.ps1 b/publish.ps1 index d45115b..4385698 100644 --- a/publish.ps1 +++ b/publish.ps1 @@ -3,7 +3,7 @@ Param( [string]$ProjectName = "MSFSTouchPortalPlugin", [string]$DistroName = "MSFS-TouchPortal-Plugin", - [string]$Configuration = "Release", + [string]$Configuration = "Publish", [string]$Platform = "x64", [String]$VersionSuffix = "", [switch]$Clean = $false, @@ -26,10 +26,10 @@ if (Test-Path $PluginFilesPath) { } Write-Information "`nPublishing '$ProjectName' component to '$BinFilesPath' ...`n" -InformationAction Continue -dotnet publish "$ProjectName" --output "$BinFilesPath" --configuration $Configuration -p:Platform=$Platform $VersionSuffixCommand $VersionSuffix -r "win-$Platform" +dotnet publish "$ProjectName" --output "$BinFilesPath" --configuration $Configuration -p:Platform=$Platform $VersionSuffixCommand $VersionSuffix Write-Information "`nPublishing '$ProjectName-Generator' component...`n" -InformationAction Continue -dotnet publish "$ProjectName-Generator" --output "$BinFilesPath" --configuration $Configuration -p:Platform=$Platform -r "win-$Platform" /p:ValidateExecutableReferencesMatchSelfContained=false +dotnet publish "$ProjectName-Generator" --output "$BinFilesPath" --configuration $Configuration -p:Platform=$Platform # Run Documentation Write-Information "`nGenerating entry.tp JSON and Documentation..." -InformationAction Continue