From cf396b718b520e51d3650bfbffbbe73fc4fc6af2 Mon Sep 17 00:00:00 2001
From: NextTurn <45985406+NextTurn@users.noreply.github.com>
Date: Wed, 5 Dec 2018 00:00:00 +0800
Subject: [PATCH] Publish single executable
---
appveyor.yml | 8 +-
src/Core/ServiceWrapper/winsw.csproj | 182 +++++++++++++--------------
src/Core/WinSWCore/WinSWCore.csproj | 10 ++
3 files changed, 103 insertions(+), 97 deletions(-)
diff --git a/appveyor.yml b/appveyor.yml
index 8df60d5..4550983 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -27,7 +27,9 @@ dotnet_csproj:
version: $(appveyor_build_version)
build_script:
- - dotnet.exe build src\winsw.sln
+ - dotnet.exe build src\winsw.sln
+ - dotnet.exe publish -f netcoreapp3.1 -r win-x64 src\Core\ServiceWrapper\winsw.csproj /p:PublishSingleFile=true /p:PublishTrimmed=true
+ - dotnet.exe publish -f netcoreapp3.1 -r win-x86 src\Core\ServiceWrapper\winsw.csproj /p:PublishSingleFile=true /p:PublishTrimmed=true
after_build:
- ps: nuget pack WinSW.nuspec -Version $env:APPVEYOR_BUILD_VERSION
@@ -46,6 +48,10 @@ artifacts:
name: WinSW.NET45.exe
- path: 'src\Core\ServiceWrapper\bin\Release\netcoreapp3.1\'
name: WinSW.NETCore31
+ - path: 'src\Core\ServiceWrapper\bin\Release\netcoreapp3.1\win-x64\publish\WindowsService.exe'
+ name: WinSW.NETCore31.x64
+ - path: 'src\Core\ServiceWrapper\bin\Release\netcoreapp3.1\win-x86\publish\WindowsService.exe'
+ name: WinSW.NETCore31.x86
- path: 'WinSW.$(appveyor_build_version).nupkg'
name: WinSW.nupkg
- path: 'examples\sample-allOptions.xml'
diff --git a/src/Core/ServiceWrapper/winsw.csproj b/src/Core/ServiceWrapper/winsw.csproj
index 4b5b92b..eb23a24 100644
--- a/src/Core/ServiceWrapper/winsw.csproj
+++ b/src/Core/ServiceWrapper/winsw.csproj
@@ -1,96 +1,86 @@
-
-
-
- Exe
- net20;net40;net45;netcoreapp3.1
-
- Windows Service Wrapper
- Allows arbitrary process to run as a Windows service by wrapping it.
- CloudBees, Inc.
- Windows Service Wrapper
- Copyright 2008-2016 Oleg Nenashev, CloudBees, Inc. and other contributors
- winsw
- WindowsService
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- v2
-
-
-
- v4
-
-
-
- v4.5
-
-
-
- "$(OutDir)$(TargetFileName)"
- $(InputAssemblies) "$(OutDir)WinSWCore.dll"
- $(InputAssemblies) "$(OutDir)SharedDirectoryMapper.dll"
- $(InputAssemblies) "$(OutDir)RunawayProcessKiller.dll"
- $(InputAssemblies) "$(OutDir)log4net.dll"
- "$(OutDir)WinSW.exe"
-
-
-
- $(InputAssemblies) "$(OutDir)ICSharpCode.SharpZipLib.dll"
-
-
-
- $(NuGetPackageRoot)ilmerge\3.0.29\tools\net452\ILMerge.exe
- /keyfile:"$(AssemblyOriginatorKeyFile)" /targetplatform:$(TargetPlatform) /out:$(OutputAssembly) $(InputAssemblies)
- "$(ILMerge)" $(ILMergeArgs)
-
-
-
-
-
-
-
-
+
+
+
+ Exe
+ net20;net40;net45;netcoreapp3.1
+
+ Windows Service Wrapper
+ Allows arbitrary process to run as a Windows service by wrapping it.
+ CloudBees, Inc.
+ Windows Service Wrapper
+ Copyright 2008-2016 Oleg Nenashev, CloudBees, Inc. and other contributors
+ winsw
+ WindowsService
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ v2
+
+
+
+ v4
+
+
+
+ v4.5
+
+
+
+ "$(OutDir)$(TargetFileName)"
+ $(InputAssemblies) "$(OutDir)WinSWCore.dll"
+ $(InputAssemblies) "$(OutDir)SharedDirectoryMapper.dll"
+ $(InputAssemblies) "$(OutDir)RunawayProcessKiller.dll"
+ $(InputAssemblies) "$(OutDir)log4net.dll"
+ "$(OutDir)WinSW.exe"
+
+
+
+ $(InputAssemblies) "$(OutDir)ICSharpCode.SharpZipLib.dll"
+
+
+
+ $(NuGetPackageRoot)ilmerge\3.0.29\tools\net452\ILMerge.exe
+ /keyfile:"$(AssemblyOriginatorKeyFile)" /targetplatform:$(TargetPlatform) /out:$(OutputAssembly) $(InputAssemblies)
+ "$(ILMerge)" $(ILMergeArgs)
+
+
+
+
+
+
+
+
diff --git a/src/Core/WinSWCore/WinSWCore.csproj b/src/Core/WinSWCore/WinSWCore.csproj
index 415ebd7..0cfb363 100644
--- a/src/Core/WinSWCore/WinSWCore.csproj
+++ b/src/Core/WinSWCore/WinSWCore.csproj
@@ -16,6 +16,16 @@
+
+
+
+
+
+
+
+
+
+