From f5a0dd15781f652a04a0d6620433e594128dfd01 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Tue, 30 Nov 2021 20:18:17 -0500 Subject: [PATCH 1/3] fix error running installer from folder paths containing parentheses --- docs/release-notes.md | 3 +++ src/SMAPI.Installer/assets/windows-install.bat | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/release-notes.md b/docs/release-notes.md index 08cc832c..72b321c8 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -1,6 +1,9 @@ ← [README](README.md) # Release notes +## Upcoming release +* Fixed installer failing on Windows when run from the game folder. + ## 3.13.0 Released 30 November 2021 for Stardew Valley 1.5.5 or later. diff --git a/src/SMAPI.Installer/assets/windows-install.bat b/src/SMAPI.Installer/assets/windows-install.bat index 2e0be906..f21679ae 100644 --- a/src/SMAPI.Installer/assets/windows-install.bat +++ b/src/SMAPI.Installer/assets/windows-install.bat @@ -1,6 +1,6 @@ @echo off -SET installerDir=%~dp0 +SET installerDir="%~dp0" REM make sure we're not running within a zip folder echo %installerDir% | findstr /C:"%TEMP%" 1>nul @@ -28,7 +28,7 @@ if %ERRORLEVEL% NEQ 0 ( ) REM make sure an antivirus hasn't deleted the installer DLL -if not exist "%installerDir%internal\windows\SMAPI.Installer.dll" ( +if not exist %installerDir%"internal\windows\SMAPI.Installer.dll" ( echo Oops! SMAPI is missing one of its files. Your antivirus might have deleted it. echo Missing file: %installerDir%internal\windows\SMAPI.Installer.dll echo. From 05b06e7a9faccfa0998bc3f7f9953817cd473bfb Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Tue, 30 Nov 2021 21:53:09 -0500 Subject: [PATCH 2/3] improve installer's .NET 5 validation to explain how to fix it --- docs/release-notes.md | 1 + .../assets/windows-install.bat | 31 ++++++++++++++----- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/docs/release-notes.md b/docs/release-notes.md index 72b321c8..3f5172af 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -2,6 +2,7 @@ # Release notes ## Upcoming release +* Improved .NET 5 validation in Windows installer to better explain how to get the right version. * Fixed installer failing on Windows when run from the game folder. ## 3.13.0 diff --git a/src/SMAPI.Installer/assets/windows-install.bat b/src/SMAPI.Installer/assets/windows-install.bat index f21679ae..e34b9554 100644 --- a/src/SMAPI.Installer/assets/windows-install.bat +++ b/src/SMAPI.Installer/assets/windows-install.bat @@ -1,4 +1,5 @@ @echo off +setlocal enabledelayedexpansion SET installerDir="%~dp0" @@ -12,16 +13,30 @@ if %ERRORLEVEL% EQU 0 ( ) REM make sure .NET 5 is installed +SET hasNet5=1 WHERE dotnet /q -if %ERRORLEVEL% NEQ 0 ( - echo Oops! You must have .NET 5 ^(desktop x64^) installed to use SMAPI: https://dotnet.microsoft.com/download/dotnet/5.0/runtime - echo. - pause - exit +if !ERRORLEVEL! NEQ 0 ( + SET hasNet5=0 +) else ( + dotnet --info | findstr /C:"Microsoft.WindowsDesktop.App 5." 1>nul + if !ERRORLEVEL! NEQ 0 ( + SET hasNet5=0 + ) ) -dotnet --info | findstr /C:"Microsoft.WindowsDesktop.App 5." 1>nul -if %ERRORLEVEL% NEQ 0 ( - echo Oops! You must have .NET 5 ^(desktop x64^) installed to use SMAPI: https://dotnet.microsoft.com/download/dotnet/5.0/runtime +if "%hasNet5%" == "0" ( + echo Oops! You don't have the required .NET version installed. + echo. + echo To install it: + echo 1. Go to https://dotnet.microsoft.com/download/dotnet/5.0/runtime + + if "%PROCESSOR_ARCHITECTURE%" == "ARM64" ( + echo 2. Under "Run desktop apps", click "Download Arm64". + ) else ( + echo 2. Under "Run desktop apps", click "Download x64". + ) + + echo 3. Run the downloaded installer. + echo 4. Restart your computer. echo. pause exit From 25ebcc1ea7f104eca36d8085ef184e62dc4de465 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Tue, 30 Nov 2021 21:54:29 -0500 Subject: [PATCH 3/3] prepare for release --- build/common.targets | 2 +- docs/release-notes.md | 4 +++- src/SMAPI.Mods.ConsoleCommands/manifest.json | 4 ++-- src/SMAPI.Mods.ErrorHandler/manifest.json | 4 ++-- src/SMAPI.Mods.SaveBackup/manifest.json | 4 ++-- src/SMAPI/Constants.cs | 2 +- 6 files changed, 11 insertions(+), 9 deletions(-) diff --git a/build/common.targets b/build/common.targets index 9dd6f7a2..578076a9 100644 --- a/build/common.targets +++ b/build/common.targets @@ -1,7 +1,7 @@ - 3.13.0 + 3.13.1 SMAPI latest $(AssemblySearchPaths);{GAC} diff --git a/docs/release-notes.md b/docs/release-notes.md index 3f5172af..d50a923d 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -1,7 +1,9 @@ ← [README](README.md) # Release notes -## Upcoming release +## 3.13.1 +Released 30 November 2021 for Stardew Valley 1.5.5 or later. + * Improved .NET 5 validation in Windows installer to better explain how to get the right version. * Fixed installer failing on Windows when run from the game folder. diff --git a/src/SMAPI.Mods.ConsoleCommands/manifest.json b/src/SMAPI.Mods.ConsoleCommands/manifest.json index 85653a7d..ac6ff6ea 100644 --- a/src/SMAPI.Mods.ConsoleCommands/manifest.json +++ b/src/SMAPI.Mods.ConsoleCommands/manifest.json @@ -1,9 +1,9 @@ { "Name": "Console Commands", "Author": "SMAPI", - "Version": "3.13.0", + "Version": "3.13.1", "Description": "Adds SMAPI console commands that let you manipulate the game.", "UniqueID": "SMAPI.ConsoleCommands", "EntryDll": "ConsoleCommands.dll", - "MinimumApiVersion": "3.13.0" + "MinimumApiVersion": "3.13.1" } diff --git a/src/SMAPI.Mods.ErrorHandler/manifest.json b/src/SMAPI.Mods.ErrorHandler/manifest.json index da8306d1..e19a6a7f 100644 --- a/src/SMAPI.Mods.ErrorHandler/manifest.json +++ b/src/SMAPI.Mods.ErrorHandler/manifest.json @@ -1,9 +1,9 @@ { "Name": "Error Handler", "Author": "SMAPI", - "Version": "3.13.0", + "Version": "3.13.1", "Description": "Handles some common vanilla errors to log more useful info or avoid breaking the game.", "UniqueID": "SMAPI.ErrorHandler", "EntryDll": "ErrorHandler.dll", - "MinimumApiVersion": "3.13.0" + "MinimumApiVersion": "3.13.1" } diff --git a/src/SMAPI.Mods.SaveBackup/manifest.json b/src/SMAPI.Mods.SaveBackup/manifest.json index 4c57bd49..3e55ce42 100644 --- a/src/SMAPI.Mods.SaveBackup/manifest.json +++ b/src/SMAPI.Mods.SaveBackup/manifest.json @@ -1,9 +1,9 @@ { "Name": "Save Backup", "Author": "SMAPI", - "Version": "3.13.0", + "Version": "3.13.1", "Description": "Automatically backs up all your saves once per day into its folder.", "UniqueID": "SMAPI.SaveBackup", "EntryDll": "SaveBackup.dll", - "MinimumApiVersion": "3.13.0" + "MinimumApiVersion": "3.13.1" } diff --git a/src/SMAPI/Constants.cs b/src/SMAPI/Constants.cs index cf4bb677..c5ad215c 100644 --- a/src/SMAPI/Constants.cs +++ b/src/SMAPI/Constants.cs @@ -49,7 +49,7 @@ namespace StardewModdingAPI internal static int? LogScreenId { get; set; } /// SMAPI's current raw semantic version. - internal static string RawApiVersion = "3.13.0"; + internal static string RawApiVersion = "3.13.1"; } /// Contains SMAPI's constants and assumptions.