From fb837374fceec7642a95d0d8f269bc70c76a2ec2 Mon Sep 17 00:00:00 2001 From: chylex Date: Fri, 22 Dec 2023 02:30:24 +0100 Subject: [PATCH] Enable single file compression and disable unnecessary .NET features --- app/Directory.Build.props | 12 ++++++++++++ app/build.bat | 4 ++-- app/build.sh | 4 ++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/app/Directory.Build.props b/app/Directory.Build.props index b126d4b..c1120dd 100644 --- a/app/Directory.Build.props +++ b/app/Directory.Build.props @@ -19,11 +19,23 @@ + false true partial + false + false + false + false true + + true + false + true + true + + false none diff --git a/app/build.bat b/app/build.bat index 96a8cd0..17f3371 100644 --- a/app/build.bat +++ b/app/build.bat @@ -4,11 +4,11 @@ set list=win-x64 linux-x64 osx-x64 rmdir /S /Q bin (for %%a in (%list%) do ( - dotnet publish Desktop -c Release -r %%a -o ./bin/%%a -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishReadyToRun=false --self-contained true + dotnet publish Desktop -c Release -r %%a -o ./bin/%%a --self-contained true powershell "Compress-Archive -Path ./bin/%%a/* -DestinationPath ./bin/%%a.zip -CompressionLevel Optimal" )) -dotnet publish Desktop -c Release -o ./bin/portable -p:PublishTrimmed=false --self-contained false +dotnet publish Desktop -c Release -o ./bin/portable -p:PublishSingleFile=false -p:PublishTrimmed=false --self-contained false powershell "Compress-Archive -Path ./bin/portable/* -DestinationPath ./bin/portable.zip -CompressionLevel Optimal" echo Done diff --git a/app/build.sh b/app/build.sh index ed8a267..efe2f4a 100755 --- a/app/build.sh +++ b/app/build.sh @@ -17,9 +17,9 @@ rm -rf "./bin" configurations=(win-x64 linux-x64 osx-x64) for cfg in ${configurations[@]}; do - dotnet publish Desktop -c Release -r "$cfg" -o "./bin/$cfg" -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -p:PublishReadyToRun=false --self-contained true + dotnet publish Desktop -c Release -r "$cfg" -o "./bin/$cfg" --self-contained true makezip "$cfg" done -dotnet publish Desktop -c Release -o "./bin/portable" -p:PublishTrimmed=false --self-contained false +dotnet publish Desktop -c Release -o "./bin/portable" -p:PublishSingleFile=false -p:PublishTrimmed=false --self-contained false makezip "portable"