From 84ce33fe9ca0e625f69a4983e8558376802e97fd Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Wed, 23 Dec 2020 23:00:17 +0000 Subject: [PATCH] Trim unused assemblies to reduce packaged size further. --- OpenRA.Launcher/OpenRA.Launcher.csproj | 5 +++++ OpenRA.Server/OpenRA.Server.csproj | 5 +++++ OpenRA.Utility/OpenRA.Utility.csproj | 5 +++++ OpenRA.WindowsLauncher/OpenRA.WindowsLauncher.csproj | 5 +++++ packaging/functions.sh | 2 +- 5 files changed, 21 insertions(+), 1 deletion(-) diff --git a/OpenRA.Launcher/OpenRA.Launcher.csproj b/OpenRA.Launcher/OpenRA.Launcher.csproj index 3e81754db5..0099bc5978 100644 --- a/OpenRA.Launcher/OpenRA.Launcher.csproj +++ b/OpenRA.Launcher/OpenRA.Launcher.csproj @@ -65,4 +65,9 @@ + + + + + diff --git a/OpenRA.Server/OpenRA.Server.csproj b/OpenRA.Server/OpenRA.Server.csproj index b6385d6745..ea4d65ec08 100644 --- a/OpenRA.Server/OpenRA.Server.csproj +++ b/OpenRA.Server/OpenRA.Server.csproj @@ -40,4 +40,9 @@ + + + + + diff --git a/OpenRA.Utility/OpenRA.Utility.csproj b/OpenRA.Utility/OpenRA.Utility.csproj index b6385d6745..ea4d65ec08 100644 --- a/OpenRA.Utility/OpenRA.Utility.csproj +++ b/OpenRA.Utility/OpenRA.Utility.csproj @@ -40,4 +40,9 @@ + + + + + diff --git a/OpenRA.WindowsLauncher/OpenRA.WindowsLauncher.csproj b/OpenRA.WindowsLauncher/OpenRA.WindowsLauncher.csproj index a477020314..f8499d2eb3 100644 --- a/OpenRA.WindowsLauncher/OpenRA.WindowsLauncher.csproj +++ b/OpenRA.WindowsLauncher/OpenRA.WindowsLauncher.csproj @@ -58,4 +58,9 @@ + + + + + diff --git a/packaging/functions.sh b/packaging/functions.sh index dc06962c32..29c8f1ccc8 100755 --- a/packaging/functions.sh +++ b/packaging/functions.sh @@ -118,7 +118,7 @@ install_assemblies() { ORIG_PWD=$(pwd) cd "${SRC_PATH}" || exit 1 - dotnet publish -c Release -p:TargetPlatform="${TARGETPLATFORM}" -p:CopyGenericLauncher="${COPY_GENERIC_LAUNCHER}" -p:CopyCncDll="${COPY_CNC_DLL}" -p:CopyD2kDll="${COPY_D2K_DLL}" -r "${TARGETPLATFORM}" -o "${DEST_PATH}" + dotnet publish -c Release -p:TargetPlatform="${TARGETPLATFORM}" -p:PublishTrimmed=true -p:CopyGenericLauncher="${COPY_GENERIC_LAUNCHER}" -p:CopyCncDll="${COPY_CNC_DLL}" -p:CopyD2kDll="${COPY_D2K_DLL}" -r "${TARGETPLATFORM}" -o "${DEST_PATH}" cd "${ORIG_PWD}" || exit 1 }