From c80d07fddfffe4fd3f8fa69bf6cab6374eec992d Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 4 Dec 2021 15:55:29 -0500 Subject: migrate SMAPI to self-contained install This removes the need to have .NET 5 installed to run SMAPI. Note that there's no need to actually bundle the .NET files, since they're already bundled into the game folder. --- src/SMAPI.Installer/assets/runtimeconfig.unix.json | 3 ++- src/SMAPI.Installer/assets/runtimeconfig.windows.json | 3 ++- src/SMAPI.Installer/assets/unix-launcher.sh | 9 +-------- 3 files changed, 5 insertions(+), 10 deletions(-) (limited to 'src/SMAPI.Installer/assets') diff --git a/src/SMAPI.Installer/assets/runtimeconfig.unix.json b/src/SMAPI.Installer/assets/runtimeconfig.unix.json index 8a01ceb1..a1d060b5 100644 --- a/src/SMAPI.Installer/assets/runtimeconfig.unix.json +++ b/src/SMAPI.Installer/assets/runtimeconfig.unix.json @@ -4,7 +4,8 @@ "includedFrameworks": [ { "name": "Microsoft.NETCore.App", - "version": "5.0.7" + "version": "5.0.0", + "rollForward": "major" } ], "configProperties": { diff --git a/src/SMAPI.Installer/assets/runtimeconfig.windows.json b/src/SMAPI.Installer/assets/runtimeconfig.windows.json index b693d809..d5f24bdb 100644 --- a/src/SMAPI.Installer/assets/runtimeconfig.windows.json +++ b/src/SMAPI.Installer/assets/runtimeconfig.windows.json @@ -3,7 +3,8 @@ "tfm": "net5.0", "framework": { "name": "Microsoft.NETCore.App", - "version": "5.0.0" + "version": "5.0.0", + "rollForward": "major" }, "configProperties": { "System.Runtime.TieredCompilation": false diff --git a/src/SMAPI.Installer/assets/unix-launcher.sh b/src/SMAPI.Installer/assets/unix-launcher.sh index 58f7a5ae..e8b9ae62 100644 --- a/src/SMAPI.Installer/assets/unix-launcher.sh +++ b/src/SMAPI.Installer/assets/unix-launcher.sh @@ -49,20 +49,13 @@ if [ ! -f "Stardew Valley.dll" ]; then exit 1 fi -# .NET 5 must be installed -if ! command -v dotnet >/dev/null 2>&1; then - echo "Oops! You must have .NET 5 installed to use SMAPI: https://dotnet.microsoft.com/download"; - read - exit 1 -fi - ########## ## Launch SMAPI ########## # macOS if [ "$(uname)" == "Darwin" ]; then - dotnet StardewModdingAPI.dll "$@" + ./StardewModdingAPI "$@" # Linux else -- cgit