Skip to content

Commit

Permalink
Merge branch 'develop' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
Pathoschild committed Jul 10, 2021
2 parents 7dd3e37 + 60af287 commit 8f96a97
Show file tree
Hide file tree
Showing 27 changed files with 583 additions and 248 deletions.
2 changes: 1 addition & 1 deletion build/common.targets
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!--set general build properties -->
<Version>3.10.1</Version>
<Version>3.11.0</Version>
<Product>SMAPI</Product>
<LangVersion>latest</LangVersion>
<AssemblySearchPaths>$(AssemblySearchPaths);{GAC}</AssemblySearchPaths>
Expand Down
24 changes: 24 additions & 0 deletions docs/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,30 @@
* Migrated to Harmony 2.0 (see [_migrate to Harmony 2.0_](https://stardewvalleywiki.com/Modding:Migrate_to_Harmony_2.0) for more info).
-->

## 3.11.0
Released 09 July 2021 for Stardew Valley 1.5.4 or later. See [release highlights](https://www.patreon.com/posts/53514295).

* For players:
* Updated for Stardew Valley 1.4.5 multiplayer hotfix on Linux/macOS.
* Fixed installer error on Windows when running as administrator (thanks to LostLogic!).
* Fixed installer error on some Windows systems (thanks to eddyballs!).
* Fixed error if SMAPI fails to dispose on game exit.
* Fixed `player_add` and `list_items` console commands not including some shirts _(in Console Commands)_.

* For mod authors:
* Added `World.FurnitureListChanged` event (thanks to DiscipleOfEris!).
* Added asset propagation for building/house paint masks.
* Added log message for troubleshooting if Windows software which often causes issues is installed (currently MSI Afterburner and RivaTuner).
* Improved validation for the manifest `Dependencies` field.
* Fixed validation for mods with invalid version `0.0.0`.
* Fixed _loaded with custom settings_ trace log added when using default settings.
* Fixed `Constants.SaveFolderName` and `Constants.CurrentSavePath` not set correctly in rare cases.

* For the web UI and JSON validator:
* Updated the JSON validator/schema for Content Patcher 1.23.0.
* Fixed [JSON schema](technical/web.md#using-a-schema-file-directly) in Visual Studio Code warning about comments and trailing commas.
* Fixed JSON schema for `i18n` files requiring the wrong value for the `$schema` field.

## 3.10.1
Released 03 May 2021 for Stardew Valley 1.5.4 or later.

Expand Down
2 changes: 1 addition & 1 deletion docs/technical/mod-package.md
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ To do that:
<GamePath>PATH_HERE</GamePath>
</PropertyGroup>
```
3. Replace `PATH_HERE` with your game's folder path.
3. Replace `PATH_HERE` with your game's folder path (don't add quotes).

The configuration will check your custom path first, then fall back to the default paths (so it'll
still compile on a different computer).
Expand Down
46 changes: 36 additions & 10 deletions src/SMAPI.Installer/assets/unix-launcher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,34 @@ if [ "$UNAME" == "Darwin" ]; then
cp -p StardewValley.bin.osx StardewModdingAPI.bin.osx
fi

# Make sure we're running in Terminal (so the user can see errors/warnings/update alerts).
# Previously we would just use `open -a Terminal` to launch the .bin.osx file, but that
# doesn't let us set environment variables.
if [ ! -t 1 ]; then # https://stackoverflow.com/q/911168/262123
# sanity check to make sure we don't have an infinite loop of opening windows
SKIP_TERMINAL=false
for argument in "$@"; do
if [ "$argument" == "--no-reopen-terminal" ]; then
SKIP_TERMINAL=true
break
fi
done

# reopen in Terminal if needed
# https://stackoverflow.com/a/29511052/262123
if [ "$SKIP_TERMINAL" == "false" ]; then
echo "Reopening in the Terminal app..."
echo "\"$0\" $@ --no-reopen-terminal" > /tmp/open-smapi-terminal.sh
chmod +x /tmp/open-smapi-terminal.sh
cat /tmp/open-smapi-terminal.sh
open -W -a Terminal /tmp/open-smapi-terminal.sh
rm /tmp/open-smapi-terminal.sh
exit 0
fi
fi

# launch SMAPI
open -a Terminal ./StardewModdingAPI.bin.osx "$@"
LC_ALL="C" ./StardewModdingAPI.bin.osx "$@"
else
# choose binary file to launch
LAUNCH_FILE=""
Expand Down Expand Up @@ -79,44 +105,44 @@ else
terminal|termite)
# consumes only one argument after -e
# options containing space characters are unsupported
exec $TERMINAL_NAME -e "env TERM=xterm $LAUNCH_FILE $@"
exec $TERMINAL_NAME -e "env TERM=xterm LC_ALL=\"C\" $LAUNCH_FILE $@"
;;

xterm|konsole|alacritty)
# consumes all arguments after -e
exec $TERMINAL_NAME -e env TERM=xterm $LAUNCH_FILE "$@"
exec $TERMINAL_NAME -e env TERM=xterm LC_ALL="C" $LAUNCH_FILE "$@"
;;

terminator|xfce4-terminal|mate-terminal)
# consumes all arguments after -x
exec $TERMINAL_NAME -x env TERM=xterm $LAUNCH_FILE "$@"
exec $TERMINAL_NAME -x env TERM=xterm LC_ALL="C" $LAUNCH_FILE "$@"
;;

gnome-terminal)
# consumes all arguments after --
exec $TERMINAL_NAME -- env TERM=xterm $LAUNCH_FILE "$@"
exec $TERMINAL_NAME -- env TERM=xterm LC_ALL="C" $LAUNCH_FILE "$@"
;;

kitty)
# consumes all trailing arguments
exec $TERMINAL_NAME env TERM=xterm $LAUNCH_FILE "$@"
exec $TERMINAL_NAME env TERM=xterm LC_ALL="C" $LAUNCH_FILE "$@"
;;

*)
# If we don't know the terminal, just try to run it in the current shell.
# If THAT fails, launch with no output.
env TERM=xterm $LAUNCH_FILE "$@"
env TERM=xterm LC_ALL="C" $LAUNCH_FILE "$@"
if [ $? -eq 127 ]; then
exec $LAUNCH_FILE --no-terminal "$@"
exec LC_ALL="C" $LAUNCH_FILE --no-terminal "$@"
fi
esac

## terminal isn't executable; fallback to current shell or no terminal
else
echo "The '$TERMINAL_NAME' terminal isn't executable. SMAPI might be running in a sandbox or the system might be misconfigured? Falling back to current shell."
env TERM=xterm $LAUNCH_FILE "$@"
env TERM=xterm LC_ALL="C" $LAUNCH_FILE "$@"
if [ $? -eq 127 ]; then
exec $LAUNCH_FILE --no-terminal "$@"
exec LC_ALL="C" $LAUNCH_FILE --no-terminal "$@"
fi
fi
fi
4 changes: 2 additions & 2 deletions src/SMAPI.Installer/assets/windows-install.bat
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@echo off
echo %~dp0 | findstr /C:"%TEMP%" 1>nul
echo "%~dp0" | findstr /C:"%TEMP%" 1>nul
if not errorlevel 1 (
echo Oops! It looks like you're running the installer from inside a zip file. Make sure you unzip the download first.
pause
) else (
start /WAIT /B ./internal/windows-install.exe
start /WAIT /B internal\windows-install.exe
)
Loading

0 comments on commit 8f96a97

Please sign in to comment.