mirror of https://github.com/winsw/winsw
Publish single executable
parent
492a4e3e42
commit
cf396b718b
|
@ -27,7 +27,9 @@ dotnet_csproj:
|
||||||
version: $(appveyor_build_version)
|
version: $(appveyor_build_version)
|
||||||
|
|
||||||
build_script:
|
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:
|
after_build:
|
||||||
- ps: nuget pack WinSW.nuspec -Version $env:APPVEYOR_BUILD_VERSION
|
- ps: nuget pack WinSW.nuspec -Version $env:APPVEYOR_BUILD_VERSION
|
||||||
|
@ -46,6 +48,10 @@ artifacts:
|
||||||
name: WinSW.NET45.exe
|
name: WinSW.NET45.exe
|
||||||
- path: 'src\Core\ServiceWrapper\bin\Release\netcoreapp3.1\'
|
- path: 'src\Core\ServiceWrapper\bin\Release\netcoreapp3.1\'
|
||||||
name: WinSW.NETCore31
|
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'
|
- path: 'WinSW.$(appveyor_build_version).nupkg'
|
||||||
name: WinSW.nupkg
|
name: WinSW.nupkg
|
||||||
- path: 'examples\sample-allOptions.xml'
|
- path: 'examples\sample-allOptions.xml'
|
||||||
|
|
|
@ -1,96 +1,86 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFrameworks>net20;net40;net45;netcoreapp3.1</TargetFrameworks>
|
<TargetFrameworks>net20;net40;net45;netcoreapp3.1</TargetFrameworks>
|
||||||
<Version><!-- Populated by AppVeyor --></Version>
|
<Version><!-- Populated by AppVeyor --></Version>
|
||||||
<AssemblyTitle>Windows Service Wrapper</AssemblyTitle>
|
<AssemblyTitle>Windows Service Wrapper</AssemblyTitle>
|
||||||
<Description>Allows arbitrary process to run as a Windows service by wrapping it.</Description>
|
<Description>Allows arbitrary process to run as a Windows service by wrapping it.</Description>
|
||||||
<Company>CloudBees, Inc.</Company>
|
<Company>CloudBees, Inc.</Company>
|
||||||
<Product>Windows Service Wrapper</Product>
|
<Product>Windows Service Wrapper</Product>
|
||||||
<Copyright>Copyright 2008-2016 Oleg Nenashev, CloudBees, Inc. and other contributors</Copyright>
|
<Copyright>Copyright 2008-2016 Oleg Nenashev, CloudBees, Inc. and other contributors</Copyright>
|
||||||
<RootNamespace>winsw</RootNamespace>
|
<RootNamespace>winsw</RootNamespace>
|
||||||
<AssemblyName>WindowsService</AssemblyName>
|
<AssemblyName>WindowsService</AssemblyName>
|
||||||
<SignAssembly>true</SignAssembly>
|
<SignAssembly>true</SignAssembly>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="log4net" Version="2.0.8" />
|
<PackageReference Include="log4net" Version="2.0.8" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
|
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
|
||||||
<PackageReference Include="Microsoft.Win32.Registry" Version="4.7.0" />
|
<PackageReference Include="Microsoft.Win32.Registry" Version="4.7.0" />
|
||||||
<PackageReference Include="System.ServiceProcess.ServiceController" Version="4.7.0" />
|
<PackageReference Include="System.ServiceProcess.ServiceController" Version="4.7.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<!-- error NU1605: Detected package downgrade: log4net 2.0.8 -->
|
<ItemGroup Condition="'$(TargetFramework)' != 'netcoreapp3.1'">
|
||||||
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
|
<PackageReference Include="ilmerge" Version="3.0.29" />
|
||||||
<PackageReference Include="System.Diagnostics.Debug" Version="4.3.0" />
|
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" />
|
||||||
<PackageReference Include="System.IO.FileSystem" Version="4.3.0" />
|
<Reference Include="System.Management" />
|
||||||
<PackageReference Include="System.Net.NameResolution" Version="4.3.0" />
|
<Reference Include="System.ServiceProcess" />
|
||||||
<PackageReference Include="System.Runtime.Extensions" Version="4.3.1" />
|
</ItemGroup>
|
||||||
<PackageReference Include="System.Runtime.InteropServices" Version="4.3.0" />
|
|
||||||
<PackageReference Include="System.Threading" Version="4.3.0" />
|
<ItemGroup>
|
||||||
</ItemGroup>
|
<Content Include="manifest.xml" />
|
||||||
|
</ItemGroup>
|
||||||
<ItemGroup Condition="'$(TargetFramework)' != 'netcoreapp3.1'">
|
|
||||||
<PackageReference Include="ilmerge" Version="3.0.29" />
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" />
|
<None Include="$(AssemblyOriginatorKeyFile)" />
|
||||||
<Reference Include="System.Management" />
|
</ItemGroup>
|
||||||
<Reference Include="System.ServiceProcess" />
|
|
||||||
</ItemGroup>
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\WinSWCore\WinSWCore.csproj" />
|
||||||
<ItemGroup>
|
<ProjectReference Include="..\..\Plugins\RunawayProcessKiller\RunawayProcessKiller.csproj" />
|
||||||
<Content Include="manifest.xml" />
|
<ProjectReference Include="..\..\Plugins\SharedDirectoryMapper\SharedDirectoryMapper.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<!-- Merge plugins and other DLLs into the executable -->
|
||||||
<None Include="$(AssemblyOriginatorKeyFile)" />
|
<Target Name="Merge" BeforeTargets="AfterBuild" Condition="'$(TargetFramework)' != 'netcoreapp3.1'">
|
||||||
</ItemGroup>
|
|
||||||
|
<PropertyGroup Condition="'$(TargetFramework)' == 'net20'">
|
||||||
<ItemGroup>
|
<TargetPlatform>v2</TargetPlatform>
|
||||||
<ProjectReference Include="..\WinSWCore\WinSWCore.csproj" />
|
</PropertyGroup>
|
||||||
<ProjectReference Include="..\..\Plugins\RunawayProcessKiller\RunawayProcessKiller.csproj" />
|
|
||||||
<ProjectReference Include="..\..\Plugins\SharedDirectoryMapper\SharedDirectoryMapper.csproj" />
|
<PropertyGroup Condition="'$(TargetFramework)' == 'net40'">
|
||||||
</ItemGroup>
|
<TargetPlatform>v4</TargetPlatform>
|
||||||
|
</PropertyGroup>
|
||||||
<!-- Merge plugins and other DLLs into the executable -->
|
|
||||||
<Target Name="Merge" BeforeTargets="AfterBuild" Condition="'$(TargetFramework)' != 'netcoreapp3.1'">
|
<PropertyGroup Condition="'$(TargetFramework)' == 'net45'">
|
||||||
|
<TargetPlatform>v4.5</TargetPlatform>
|
||||||
<PropertyGroup Condition="'$(TargetFramework)' == 'net20'">
|
</PropertyGroup>
|
||||||
<TargetPlatform>v2</TargetPlatform>
|
|
||||||
</PropertyGroup>
|
<PropertyGroup>
|
||||||
|
<InputAssemblies>"$(OutDir)$(TargetFileName)"</InputAssemblies>
|
||||||
<PropertyGroup Condition="'$(TargetFramework)' == 'net40'">
|
<InputAssemblies>$(InputAssemblies) "$(OutDir)WinSWCore.dll"</InputAssemblies>
|
||||||
<TargetPlatform>v4</TargetPlatform>
|
<InputAssemblies>$(InputAssemblies) "$(OutDir)SharedDirectoryMapper.dll"</InputAssemblies>
|
||||||
</PropertyGroup>
|
<InputAssemblies>$(InputAssemblies) "$(OutDir)RunawayProcessKiller.dll"</InputAssemblies>
|
||||||
|
<InputAssemblies>$(InputAssemblies) "$(OutDir)log4net.dll"</InputAssemblies>
|
||||||
<PropertyGroup Condition="'$(TargetFramework)' == 'net45'">
|
<OutputAssembly>"$(OutDir)WinSW.exe"</OutputAssembly>
|
||||||
<TargetPlatform>v4.5</TargetPlatform>
|
</PropertyGroup>
|
||||||
</PropertyGroup>
|
|
||||||
|
<PropertyGroup Condition="'$(TargetFramework)' == 'net20' or '$(TargetFramework)' == 'net40'">
|
||||||
<PropertyGroup>
|
<InputAssemblies>$(InputAssemblies) "$(OutDir)ICSharpCode.SharpZipLib.dll"</InputAssemblies>
|
||||||
<InputAssemblies>"$(OutDir)$(TargetFileName)"</InputAssemblies>
|
</PropertyGroup>
|
||||||
<InputAssemblies>$(InputAssemblies) "$(OutDir)WinSWCore.dll"</InputAssemblies>
|
|
||||||
<InputAssemblies>$(InputAssemblies) "$(OutDir)SharedDirectoryMapper.dll"</InputAssemblies>
|
<PropertyGroup>
|
||||||
<InputAssemblies>$(InputAssemblies) "$(OutDir)RunawayProcessKiller.dll"</InputAssemblies>
|
<ILMerge>$(NuGetPackageRoot)ilmerge\3.0.29\tools\net452\ILMerge.exe</ILMerge>
|
||||||
<InputAssemblies>$(InputAssemblies) "$(OutDir)log4net.dll"</InputAssemblies>
|
<ILMergeArgs>/keyfile:"$(AssemblyOriginatorKeyFile)" /targetplatform:$(TargetPlatform) /out:$(OutputAssembly) $(InputAssemblies)</ILMergeArgs>
|
||||||
<OutputAssembly>"$(OutDir)WinSW.exe"</OutputAssembly>
|
<ILMergeCommand>"$(ILMerge)" $(ILMergeArgs)</ILMergeCommand>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(TargetFramework)' == 'net20' or '$(TargetFramework)' == 'net40'">
|
<Message Text="$(ILMergeCommand)" Importance="high" />
|
||||||
<InputAssemblies>$(InputAssemblies) "$(OutDir)ICSharpCode.SharpZipLib.dll"</InputAssemblies>
|
<Exec Command="$(ILMergeCommand)" />
|
||||||
</PropertyGroup>
|
|
||||||
|
</Target>
|
||||||
<PropertyGroup>
|
|
||||||
<ILMerge>$(NuGetPackageRoot)ilmerge\3.0.29\tools\net452\ILMerge.exe</ILMerge>
|
</Project>
|
||||||
<ILMergeArgs>/keyfile:"$(AssemblyOriginatorKeyFile)" /targetplatform:$(TargetPlatform) /out:$(OutputAssembly) $(InputAssemblies)</ILMergeArgs>
|
|
||||||
<ILMergeCommand>"$(ILMerge)" $(ILMergeArgs)</ILMergeCommand>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<Message Text="$(ILMergeCommand)" Importance="high" />
|
|
||||||
<Exec Command="$(ILMergeCommand)" />
|
|
||||||
|
|
||||||
</Target>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
|
|
|
@ -16,6 +16,16 @@
|
||||||
<PackageReference Include="System.Management" Version="4.7.0" />
|
<PackageReference Include="System.Management" Version="4.7.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<!-- error NU1605: Detected package downgrade: log4net 2.0.8 -->
|
||||||
|
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
|
||||||
|
<PackageReference Include="System.Diagnostics.Debug" Version="4.3.0" />
|
||||||
|
<PackageReference Include="System.IO.FileSystem" Version="4.3.0" />
|
||||||
|
<PackageReference Include="System.Net.NameResolution" Version="4.3.0" />
|
||||||
|
<PackageReference Include="System.Runtime.Extensions" Version="4.3.1" />
|
||||||
|
<PackageReference Include="System.Runtime.InteropServices" Version="4.3.0" />
|
||||||
|
<PackageReference Include="System.Threading" Version="4.3.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition="'$(TargetFramework)' != 'netcoreapp3.1'">
|
<ItemGroup Condition="'$(TargetFramework)' != 'netcoreapp3.1'">
|
||||||
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" />
|
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" />
|
||||||
<Reference Include="System.Management" />
|
<Reference Include="System.Management" />
|
||||||
|
|
Loading…
Reference in New Issue