From 9b09941bd53dff2bf47c9fa8b5afffe267b01aaf Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Mon, 10 May 2021 22:40:13 -0400 Subject: set script path in Windows launch script (#777) --- src/SMAPI.Installer/assets/windows-install.bat | 1 + 1 file changed, 1 insertion(+) (limited to 'src/SMAPI.Installer/assets') diff --git a/src/SMAPI.Installer/assets/windows-install.bat b/src/SMAPI.Installer/assets/windows-install.bat index 2cc54e80..18c40a64 100644 --- a/src/SMAPI.Installer/assets/windows-install.bat +++ b/src/SMAPI.Installer/assets/windows-install.bat @@ -4,5 +4,6 @@ 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 ( + cd "%~dp0" start /WAIT /B ./internal/windows-install.exe ) -- cgit From c212ff15d28ead57588e130247e9bbfd0b3eab0d Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 11 Jun 2021 18:39:38 -0400 Subject: fix installer error for some Windows players --- src/SMAPI.Installer/assets/windows-install.bat | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/SMAPI.Installer/assets') diff --git a/src/SMAPI.Installer/assets/windows-install.bat b/src/SMAPI.Installer/assets/windows-install.bat index 18c40a64..2cd98554 100644 --- a/src/SMAPI.Installer/assets/windows-install.bat +++ b/src/SMAPI.Installer/assets/windows-install.bat @@ -1,9 +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 ( - cd "%~dp0" - start /WAIT /B ./internal/windows-install.exe + start /WAIT /B internal\windows-install.exe ) -- cgit From 7b097c4f6fd4f716b2afef6a684122ca0c060ac0 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 2 Jul 2021 20:52:22 -0400 Subject: update launch script on Linux for 1.4.5 multiplayer hotfix (#789) --- src/SMAPI.Installer/assets/unix-launcher.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/SMAPI.Installer/assets') diff --git a/src/SMAPI.Installer/assets/unix-launcher.sh b/src/SMAPI.Installer/assets/unix-launcher.sh index a33c0d7f..71056c21 100644 --- a/src/SMAPI.Installer/assets/unix-launcher.sh +++ b/src/SMAPI.Installer/assets/unix-launcher.sh @@ -79,44 +79,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 -- cgit From 40a4992170fe080111cb732f2ac79e0a59f1e199 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Wed, 7 Jul 2021 13:10:55 -0400 Subject: update launch script on macOS for 1.4.5 multiplayer hotfix (#789) Thanks to Mr. Podunkian for his help investigating this on macOS! --- src/SMAPI.Installer/assets/unix-launcher.sh | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'src/SMAPI.Installer/assets') diff --git a/src/SMAPI.Installer/assets/unix-launcher.sh b/src/SMAPI.Installer/assets/unix-launcher.sh index 71056c21..d309f750 100644 --- a/src/SMAPI.Installer/assets/unix-launcher.sh +++ b/src/SMAPI.Installer/assets/unix-launcher.sh @@ -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="" -- cgit