Skip to content

Commit

Permalink
Feat: #191 add net70-arm64 build, remove net46
Browse files Browse the repository at this point in the history
  • Loading branch information
gerardog committed Nov 23, 2022
1 parent 7d67117 commit 75c50fa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 17 deletions.
15 changes: 3 additions & 12 deletions build/01-build.ps1
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
pushd $PSScriptRoot\..
dotnet publish .\src\gsudo\gsudo.csproj -c Release -o .\artifacts\net46-AnyCpu\unmerged -f net46 -p:Platform=AnyCpu -v minimal -p:WarningLevel=0 || $(exit $LASTEXITCODE)
#dotnet publish .\src\gsudo\gsudo.csproj -c Release -o .\artifacts\net70-arm64 -f net7.0 -r win-arm64 --sc -p:PublishReadyToRun=true -p:PublishSingleFile=true -v minimal -p:WarningLevel=0 || $(exit $LASTEXITCODE)
dotnet publish .\src\gsudo\gsudo.csproj -c Release -o .\artifacts\arm64 -f net7.0 -r win-arm64 --sc -p:PublishReadyToRun=true -p:PublishSingleFile=true -v minimal -p:WarningLevel=0 || $(exit $LASTEXITCODE)
dotnet publish .\src\gsudo\gsudo.csproj -c Release -o .\artifacts\x86 -f net7.0 -r win-x86 --sc -p:PublishReadyToRun=true -p:PublishSingleFile=true -v minimal -p:WarningLevel=0 || $(exit $LASTEXITCODE)
dotnet publish .\src\gsudo\gsudo.csproj -c Release -o .\artifacts\x64 -f net7.0 -r win-x64 --sc -p:PublishAot=true -p:IlcOptimizationPreference=Size || $(exit $LASTEXITCODE)

ilmerge .\artifacts\net46-AnyCpu\unmerged\gsudo.exe .\artifacts\net46-AnyCpu\unmerged\*.dll /out:.\artifacts\net46-AnyCpu\gsudo.exe /target:exe /targetplatform:v4,"C:\Windows\Microsoft.NET\Framework\v4.0.30319" /ndebug /wildcards || $(exit $LASTEXITCODE)

if ($?) {
rm artifacts\net46-AnyCpu\unmerged -Recurse
echo "ilmerge -> artifacts\net46-AnyCpu\"
}

cp .\src\gsudo.Wrappers\* .\artifacts\net46-AnyCpu
#cp .\src\gsudo.Wrappers\* .\artifacts\net70-arm64
cp .\src\gsudo.Wrappers\* .\artifacts\x86
cp .\src\gsudo.Wrappers\* .\artifacts\x64
cp .\src\gsudo.Wrappers\* .\artifacts\x64
cp .\src\gsudo.Wrappers\* .\artifacts\arm64

popd
6 changes: 2 additions & 4 deletions build/03-sign.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@ $files = @(
"artifacts\x64\*.p*1"
"artifacts\x86\*.exe",
"artifacts\x86\*.p*1",
#"artifacts\arm64\*.exe",
#"artifacts\arm64\*.p*1",
"artifacts\net46-AnyCpu\*.exe",
"artifacts\net46-AnyCpu\*.p*1"
"artifacts\arm64\*.exe",
"artifacts\arm64\*.p*1"
) -join " "

# Accept $args override.
Expand Down
2 changes: 1 addition & 1 deletion build/04-release-GitHub.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if ($env:version) {
Get-ChildItem .\artifacts\ -File | Remove-Item # Remove files on artifacts root
Get-ChildItem .\artifacts\ -Filter *.pdb -Recurse | Remove-Item # Remove *.pdb on subfolders

Compress-Archive -Path ./artifacts/x86,./artifacts/x64,./artifacts/net46-AnyCpu -DestinationPath "artifacts/gsudo.v$($version).zip" -force -CompressionLevel Optimal
Compress-Archive -Path ./artifacts/x86,./artifacts/x64,./artifacts/arm64 -DestinationPath "artifacts/gsudo.v$($version).zip" -force -CompressionLevel Optimal
(Get-FileHash artifacts\gsudo.v$($version).zip).hash > artifacts\gsudo.v$($version).zip.sha256

$msbuild = &"${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -prerelease -products * -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe
Expand Down

0 comments on commit 75c50fa

Please sign in to comment.