diff --git a/chocolatey/capnpc-csharp-win-x86/capnpc-csharp-win-x86.nuspec b/chocolatey/capnpc-csharp-win-x86/capnpc-csharp-win-x86.nuspec new file mode 100644 index 0000000..7ccff88 --- /dev/null +++ b/chocolatey/capnpc-csharp-win-x86/capnpc-csharp-win-x86.nuspec @@ -0,0 +1,22 @@ + + + + capnpc-csharp-win-x86 + 1.0.0 + Christian Köllner and contributors + Christian Köllner and contributors + false + + https://licenses.nuget.org/MIT + https://github.com/c80k/capnproto-dotnetcore + Cap'n Proto C# code generator backend, self-contained Windows x86 + Christian Köllner and contributors + capnp capnpc RPC serialization cerealization + + + + + + + + \ No newline at end of file diff --git a/chocolatey/chocolateyinstall.ps1 b/chocolatey/capnpc-csharp-win-x86/chocolateyinstall.ps1 similarity index 88% rename from chocolatey/chocolateyinstall.ps1 rename to chocolatey/capnpc-csharp-win-x86/chocolateyinstall.ps1 index 025b147..e54c74c 100644 --- a/chocolatey/chocolateyinstall.ps1 +++ b/chocolatey/capnpc-csharp-win-x86/chocolateyinstall.ps1 @@ -2,4 +2,5 @@ $ErrorActionPreference = 'Stop' $toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" +choco install capnproto Install-Binfile -Name capnpc-csharp -Path "$toolsDir\capnpc-csharp.exe" diff --git a/chocolatey/chocolateyuninstall.ps1 b/chocolatey/capnpc-csharp-win-x86/chocolateyuninstall.ps1 similarity index 100% rename from chocolatey/chocolateyuninstall.ps1 rename to chocolatey/capnpc-csharp-win-x86/chocolateyuninstall.ps1 diff --git a/chocolatey/capnpc-csharp.1.0.0.nuspec b/chocolatey/capnpc-csharp/capnpc-csharp.nuspec similarity index 82% rename from chocolatey/capnpc-csharp.1.0.0.nuspec rename to chocolatey/capnpc-csharp/capnpc-csharp.nuspec index 85d6cfd..268a3dd 100644 --- a/chocolatey/capnpc-csharp.1.0.0.nuspec +++ b/chocolatey/capnpc-csharp/capnpc-csharp.nuspec @@ -1,7 +1,7 @@  - capnpc-csharp + capnpc-csharp-win-x86 1.0.0 Christian Köllner and contributors Christian Köllner and contributors @@ -9,7 +9,7 @@ https://licenses.nuget.org/MIT https://github.com/c80k/capnproto-dotnetcore - Cap'n Proto C# code generator backend + Cap'n Proto C# code generator backend, portable .NET Core 2.1 Christian Köllner and contributors capnp capnpc RPC serialization cerealization @@ -17,6 +17,6 @@ - + \ No newline at end of file diff --git a/chocolatey/capnpc-csharp/chocolateyinstall.ps1 b/chocolatey/capnpc-csharp/chocolateyinstall.ps1 new file mode 100644 index 0000000..cc77a2d --- /dev/null +++ b/chocolatey/capnpc-csharp/chocolateyinstall.ps1 @@ -0,0 +1,5 @@ +$ErrorActionPreference = 'Stop' + +$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" + +Install-Binfile -Name capnpc-csharp -Path "dotnet" -Command "$toolsDir\capnpc-csharp.dll" \ No newline at end of file diff --git a/chocolatey/capnpc-csharp/chocolateyuninstall.ps1 b/chocolatey/capnpc-csharp/chocolateyuninstall.ps1 new file mode 100644 index 0000000..e327e42 --- /dev/null +++ b/chocolatey/capnpc-csharp/chocolateyuninstall.ps1 @@ -0,0 +1,3 @@ +$ErrorActionPreference = 'Stop' + +Uninstall-BinFile capnpc-sharp \ No newline at end of file diff --git a/scripts/capnpc-csharp-install-win-x86.ps1 b/scripts/capnpc-csharp-install-win-x86.ps1 new file mode 100644 index 0000000..9d85b58 --- /dev/null +++ b/scripts/capnpc-csharp-install-win-x86.ps1 @@ -0,0 +1,8 @@ +$id = "capnpc-csharp-win-x86" + +$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path +$installDir = "$scriptDir\..\chocolatey\install" + +if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; exit } + +choco install $id -s $installDir --force diff --git a/scripts/capnpc-csharp-pack.ps1 b/scripts/capnpc-csharp-pack.ps1 index e1a064d..7ecb46a 100644 --- a/scripts/capnpc-csharp-pack.ps1 +++ b/scripts/capnpc-csharp-pack.ps1 @@ -1,14 +1,12 @@ $id = "capnpc-csharp" -$version = "1.0.0" +$id_win_x86 = "capnpc-csharp-win-x86" $scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path -$prefix = "$id.$version" $chocoDir = "$scriptDir\..\chocolatey" -$nuspecFile = "$prefix.nuspec" -$nuspecPath = "$chocoDir\$nuspecFile" -$deployDir = "$chocoDir\deploy" -$installDir = "$chocoDir\install" $csprojDir = "$scriptDir\..\capnpc-csharp" $csprojFile = "capnpc-csharp.csproj" -dotnet publish -c Release -r win-x86 --self-contained -o $deployDir "$csprojDir\$csprojFile" -choco pack $nuspecPath --outputdirectory $installDir +dotnet publish -c Release -r win-x86 --self-contained -o "$chocoDir\$id_win_x86\bin" "$csprojDir\$csprojFile" +dotnet publish -c Release -o "$chocoDir\$id\bin" "$csprojDir\$csprojFile" + +choco pack "$chocoDir\$id\$id.nuspec" --outputdirectory "$chocoDir\$id\bin" +choco pack "$chocoDir\$id_win_x86\$id_win_x86.nuspec" --outputdirectory "$chocoDir\$id_win_x86\bin"