summaryrefslogtreecommitdiff
path: root/src/SMAPI.Installer/assets
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI.Installer/assets')
-rw-r--r--src/SMAPI.Installer/assets/README.txt44
-rw-r--r--src/SMAPI.Installer/assets/System.Numerics.dllbin0 -> 54272 bytes
-rw-r--r--src/SMAPI.Installer/assets/System.Runtime.Caching.dllbin0 -> 71168 bytes
-rw-r--r--src/SMAPI.Installer/assets/unix-install.sh24
-rw-r--r--src/SMAPI.Installer/assets/unix-launcher.sh125
-rw-r--r--src/SMAPI.Installer/assets/windows-exe-config.xml5
-rw-r--r--src/SMAPI.Installer/assets/windows-install.bat8
7 files changed, 206 insertions, 0 deletions
diff --git a/src/SMAPI.Installer/assets/README.txt b/src/SMAPI.Installer/assets/README.txt
new file mode 100644
index 00000000..0da49a46
--- /dev/null
+++ b/src/SMAPI.Installer/assets/README.txt
@@ -0,0 +1,44 @@
+ ___ ___ ___ ___ ___
+ / /\ /__/\ / /\ / /\ / /\
+ / /:/_ | |::\ / /::\ / /::\ / /:/
+ / /:/ /\ | |:|:\ / /:/\:\ / /:/\:\ / /:/
+ / /:/ /::\ __|__|:|\:\ / /:/~/::\ / /:/~/:/ / /::\ ___
+/__/:/ /:/\:\ /__/::::| \:\ /__/:/ /:/\:\ /__/:/ /:/ /__/:/\:\ /\
+\ \:\/:/~/:/ \ \:\~~\__\/ \ \:\/:/__\/ \ \:\/:/ \__\/ \:\/:/
+ \ \::/ /:/ \ \:\ \ \::/ \ \::/ \__\::/
+ \__\/ /:/ \ \:\ \ \:\ \ \:\ / /:/
+ /__/:/ \ \:\ \ \:\ \ \:\ /__/:/
+ \__\/ \__\/ \__\/ \__\/ \__\/
+
+
+SMAPI lets you run Stardew Valley with mods. Don't forget to download mods separately.
+
+
+Player's guide
+--------------------------------
+See https://stardewvalleywiki.com/Modding:Player_Guide for help installing SMAPI, adding mods, etc.
+
+
+Manual install
+--------------------------------
+THIS IS NOT RECOMMENDED FOR MOST PLAYERS. See instructions above instead.
+If you really want to install SMAPI manually, here's how.
+
+1. Unzip "internal/windows-install.dat" (on Windows) or "internal/unix-install.dat" (on Linux/Mac).
+ You can change '.dat' to '.zip', it's just a normal zip file renamed to prevent confusion.
+2. Copy the files from the folder you just unzipped into your game folder. The
+ `StardewModdingAPI.exe` file should be right next to the game's executable.
+3.
+ - Windows only: if you use Steam, see the install guide above to enable achievements and
+ overlay. Otherwise, just run StardewModdingAPI.exe in your game folder to play with mods.
+
+ - Linux/Mac only: rename the "StardewValley" file (no extension) to "StardewValley-original", and
+ "StardewModdingAPI" (no extension) to "StardewValley". Now just launch the game as usual to
+ play with mods.
+
+When installing on Linux or Mac:
+- Make sure Mono is installed (normally the installer checks for you). While it's not required,
+ many mods won't work correctly without it. (Specifically, mods which load PNG images may crash or
+ freeze the game.)
+- To configure the color scheme, edit the `smapi-internal/config.json` file and see instructions
+ there for the 'ColorScheme' setting.
diff --git a/src/SMAPI.Installer/assets/System.Numerics.dll b/src/SMAPI.Installer/assets/System.Numerics.dll
new file mode 100644
index 00000000..fed0f92c
--- /dev/null
+++ b/src/SMAPI.Installer/assets/System.Numerics.dll
Binary files differ
diff --git a/src/SMAPI.Installer/assets/System.Runtime.Caching.dll b/src/SMAPI.Installer/assets/System.Runtime.Caching.dll
new file mode 100644
index 00000000..a062391d
--- /dev/null
+++ b/src/SMAPI.Installer/assets/System.Runtime.Caching.dll
Binary files differ
diff --git a/src/SMAPI.Installer/assets/unix-install.sh b/src/SMAPI.Installer/assets/unix-install.sh
new file mode 100644
index 00000000..6d0c86ce
--- /dev/null
+++ b/src/SMAPI.Installer/assets/unix-install.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+# Run the SMAPI installer through Mono on Linux or Mac.
+
+# Move to script's directory
+cd "`dirname "$0"`"
+
+# get cross-distro version of POSIX command
+COMMAND=""
+if command -v command >/dev/null 2>&1; then
+ COMMAND="command -v"
+elif type type >/dev/null 2>&1; then
+ COMMAND="type"
+fi
+
+# if $TERM is not set to xterm, mono will bail out when attempting to write to the console.
+export TERM=xterm
+
+# validate Mono & run installer
+if $COMMAND mono >/dev/null 2>&1; then
+ mono internal/unix-install.exe
+else
+ echo "Oops! Looks like Mono isn't installed. Please install Mono from https://mono-project.com, reboot, and run this installer again."
+ read
+fi
diff --git a/src/SMAPI.Installer/assets/unix-launcher.sh b/src/SMAPI.Installer/assets/unix-launcher.sh
new file mode 100644
index 00000000..b72eed22
--- /dev/null
+++ b/src/SMAPI.Installer/assets/unix-launcher.sh
@@ -0,0 +1,125 @@
+#!/usr/bin/env bash
+# MonoKickstart Shell Script
+# Written by Ethan "flibitijibibo" Lee
+# Modified for SMAPI by various contributors
+
+# Move to script's directory
+cd "$(dirname "$0")" || exit $?
+
+# Get the system architecture
+UNAME=$(uname)
+ARCH=$(uname -m)
+
+# MonoKickstart picks the right libfolder, so just execute the right binary.
+if [ "$UNAME" == "Darwin" ]; then
+ # ... Except on OSX.
+ export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:./osx/
+
+ # El Capitan is a total idiot and wipes this variable out, making the
+ # Steam overlay disappear. This sidesteps "System Integrity Protection"
+ # and resets the variable with Valve's own variable (they provided this
+ # fix by the way, thanks Valve!). Note that you will need to update your
+ # launch configuration to the script location, NOT just the app location
+ # (i.e. Kick.app/Contents/MacOS/Kick, not just Kick.app).
+ # -flibit
+ if [ "$STEAM_DYLD_INSERT_LIBRARIES" != "" ] && [ "$DYLD_INSERT_LIBRARIES" == "" ]; then
+ export DYLD_INSERT_LIBRARIES="$STEAM_DYLD_INSERT_LIBRARIES"
+ fi
+
+ # this was here before
+ ln -sf mcs.bin.osx mcs
+
+ # fix "DllNotFoundException: libgdiplus.dylib" errors when loading images in SMAPI
+ if [ -f libgdiplus.dylib ]; then
+ rm libgdiplus.dylib
+ fi
+ if [ -f /Library/Frameworks/Mono.framework/Versions/Current/lib/libgdiplus.dylib ]; then
+ ln -s /Library/Frameworks/Mono.framework/Versions/Current/lib/libgdiplus.dylib libgdiplus.dylib
+ fi
+
+ # launch SMAPI
+ cp StardewValley.bin.osx StardewModdingAPI.bin.osx
+ open -a Terminal ./StardewModdingAPI.bin.osx "$@"
+else
+ # choose launcher
+ LAUNCHER=""
+ if [ "$ARCH" == "x86_64" ]; then
+ ln -sf mcs.bin.x86_64 mcs
+ cp StardewValley.bin.x86_64 StardewModdingAPI.bin.x86_64
+ LAUNCHER="./StardewModdingAPI.bin.x86_64 $*"
+ else
+ ln -sf mcs.bin.x86 mcs
+ cp StardewValley.bin.x86 StardewModdingAPI.bin.x86
+ LAUNCHER="./StardewModdingAPI.bin.x86 $*"
+ fi
+
+ # get cross-distro version of POSIX command
+ COMMAND=""
+ if command -v command 2>/dev/null; then
+ COMMAND="command -v"
+ elif type type 2>/dev/null; then
+ COMMAND="type"
+ fi
+
+ # select terminal (prefer xterm for best compatibility, then known supported terminals)
+ for terminal in xterm gnome-terminal kitty terminator xfce4-terminal konsole terminal termite alacritty mate-terminal x-terminal-emulator; do
+ if $COMMAND "$terminal" 2>/dev/null; then
+ # Find the true shell behind x-terminal-emulator
+ if [ "$(basename "$(readlink -f $(which "$terminal"))")" != "x-terminal-emulator" ]; then
+ export LAUNCHTERM=$terminal
+ break;
+ else
+ export LAUNCHTERM="$(basename "$(readlink -f $(which x-terminal-emulator))")"
+ # Remember that we're using x-terminal-emulator just in case it points outside the $PATH
+ export XTE=1
+ break;
+ fi
+ fi
+ done
+
+ # if no terminal was found, run in current shell or with no output
+ if [ -z "$LAUNCHTERM" ]; then
+ sh -c 'TERM=xterm $LAUNCHER'
+ if [ $? -eq 127 ]; then
+ $LAUNCHER --no-terminal
+ fi
+ exit
+ fi
+
+ # run in selected terminal and account for quirks
+ case $LAUNCHTERM in
+ terminator)
+ # Terminator converts -e to -x when used through x-terminal-emulator for some reason
+ if $XTE; then
+ terminator -e "sh -c 'TERM=xterm $LAUNCHER'"
+ else
+ terminator -x "sh -c 'TERM=xterm $LAUNCHER'"
+ fi
+ ;;
+ kitty)
+ # Kitty overrides the TERM varible unless you set it explicitly
+ kitty -o term=xterm $LAUNCHER
+ ;;
+ alacritty)
+ # Alacritty doesn't like the double quotes or the variable
+ if [ "$ARCH" == "x86_64" ]; then
+ alacritty -e sh -c 'TERM=xterm ./StardewModdingAPI.bin.x86_64 $*'
+ else
+ alacritty -e sh -c 'TERM=xterm ./StardewModdingAPI.bin.x86 $*'
+ fi
+ ;;
+ xterm|xfce4-terminal|gnome-terminal|terminal|termite|mate-terminal)
+ $LAUNCHTERM -e "sh -c 'TERM=xterm $LAUNCHER'"
+ ;;
+ konsole)
+ konsole -p Environment=TERM=xterm -e "$LAUNCHER"
+ ;;
+ *)
+ # If we don't know the terminal, just try to run it in the current shell.
+ sh -c 'TERM=xterm $LAUNCHER'
+ # if THAT fails, launch with no output
+ if [ $? -eq 127 ]; then
+ $LAUNCHER --no-terminal
+ fi
+ esac
+fi
diff --git a/src/SMAPI.Installer/assets/windows-exe-config.xml b/src/SMAPI.Installer/assets/windows-exe-config.xml
new file mode 100644
index 00000000..386c7f1a
--- /dev/null
+++ b/src/SMAPI.Installer/assets/windows-exe-config.xml
@@ -0,0 +1,5 @@
+<configuration>
+ <runtime>
+ <loadFromRemoteSources enabled="true"/>
+ </runtime>
+</configuration>
diff --git a/src/SMAPI.Installer/assets/windows-install.bat b/src/SMAPI.Installer/assets/windows-install.bat
new file mode 100644
index 00000000..d02dd4c6
--- /dev/null
+++ b/src/SMAPI.Installer/assets/windows-install.bat
@@ -0,0 +1,8 @@
+@echo off
+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
+)