From 75c50fa5a5389fd7c7ed204189f5620f5b1f737f Mon Sep 17 00:00:00 2001 From: Gerardo Grignoli Date: Wed, 23 Nov 2022 17:47:58 -0300 Subject: [PATCH] Feat: #191 add net70-arm64 build, remove net46 --- build/01-build.ps1 | 15 +++------------ build/03-sign.ps1 | 6 ++---- build/04-release-GitHub.ps1 | 2 +- 3 files changed, 6 insertions(+), 17 deletions(-) diff --git a/build/01-build.ps1 b/build/01-build.ps1 index 9a148162..df923783 100644 --- a/build/01-build.ps1 +++ b/build/01-build.ps1 @@ -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 \ No newline at end of file diff --git a/build/03-sign.ps1 b/build/03-sign.ps1 index 971f7511..801cc942 100644 --- a/build/03-sign.ps1 +++ b/build/03-sign.ps1 @@ -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. diff --git a/build/04-release-GitHub.ps1 b/build/04-release-GitHub.ps1 index ae04ad2d..86f469e0 100644 --- a/build/04-release-GitHub.ps1 +++ b/build/04-release-GitHub.ps1 @@ -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