From 5fa13459d367bc5e3248a8b1447f4f56354e1fae Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Mon, 22 May 2017 18:55:09 -0400 Subject: show friendly error when running install.exe from within zip file --- src/StardewModdingAPI.Installer/InteractiveInstaller.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/StardewModdingAPI.Installer/InteractiveInstaller.cs') diff --git a/src/StardewModdingAPI.Installer/InteractiveInstaller.cs b/src/StardewModdingAPI.Installer/InteractiveInstaller.cs index 01f7a01f..43cb7d70 100644 --- a/src/StardewModdingAPI.Installer/InteractiveInstaller.cs +++ b/src/StardewModdingAPI.Installer/InteractiveInstaller.cs @@ -158,7 +158,10 @@ namespace StardewModdingApi.Installer ****/ if (!packageDir.Exists) { - this.PrintError($"The 'internal/{platform}' package folder is missing (should be at {packageDir})."); + this.PrintError(platform == Platform.Windows && packageDir.FullName.Contains(Path.GetTempPath()) && packageDir.FullName.Contains(".zip") + ? "The installer is missing some files. It looks like you're running the installer from inside the downloaded zip; make sure you unzip the downloaded file first, then run the installer from the unzipped folder." + : $"The 'internal/{platform}' package folder is missing (should be at {packageDir})." + ); Console.ReadLine(); return; } -- cgit From e92dbc41df1548b72be4ca5c0a6c6fe17235d950 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 27 May 2017 00:21:48 -0400 Subject: improve libgdiplus.dylib fix for Mono players --- lib/libgdiplus.dylib | Bin 1202796 -> 0 bytes release-notes.md | 3 ++- .../InteractiveInstaller.cs | 1 + src/StardewModdingAPI/unix-launcher.sh | 11 +++++++++++ src/prepare-install-package.targets | 3 --- 5 files changed, 14 insertions(+), 4 deletions(-) delete mode 100644 lib/libgdiplus.dylib (limited to 'src/StardewModdingAPI.Installer/InteractiveInstaller.cs') diff --git a/lib/libgdiplus.dylib b/lib/libgdiplus.dylib deleted file mode 100644 index 8a9676c8..00000000 Binary files a/lib/libgdiplus.dylib and /dev/null differ diff --git a/release-notes.md b/release-notes.md index fd69e1c7..deab5cfe 100644 --- a/release-notes.md +++ b/release-notes.md @@ -20,6 +20,7 @@ For players: * you have Stardew Valley 1.11 or earlier (which aren't compatible); * you run `install.exe` from within the downloaded zip file. * Fixed "unknown mod" deprecation warnings by improving how SMAPI detects the mod using the event. +* Fixed `libgdiplus.dylib` errors for some players on Mac. * Fixed rare crash when window loses focus for a few players. For modders: @@ -68,7 +69,7 @@ For players: * The installer now lets you choose the install path if you have multiple copies of the game, instead of using the first path found. * Fixed mod draw errors breaking the game. * Fixed mods on Linux/Mac no longer working after the game saves. -* Fixed libgdiplus DLL-not-found errors on Linux/Mac when mods read PNG files. +* Fixed `libgdiplus.dylib` errors on Mac when mods read PNG files. * Adopted pufferchick. For mod developers: diff --git a/src/StardewModdingAPI.Installer/InteractiveInstaller.cs b/src/StardewModdingAPI.Installer/InteractiveInstaller.cs index 43cb7d70..efad0a3e 100644 --- a/src/StardewModdingAPI.Installer/InteractiveInstaller.cs +++ b/src/StardewModdingAPI.Installer/InteractiveInstaller.cs @@ -85,6 +85,7 @@ namespace StardewModdingApi.Installer yield return GetInstallPath("steam_appid.txt"); // Linux/Mac only + yield return GetInstallPath("libgdiplus.dylib"); yield return GetInstallPath("StardewModdingAPI"); yield return GetInstallPath("StardewModdingAPI.exe.mdb"); yield return GetInstallPath("System.Numerics.dll"); diff --git a/src/StardewModdingAPI/unix-launcher.sh b/src/StardewModdingAPI/unix-launcher.sh index eb2f42af..39fd4f29 100644 --- a/src/StardewModdingAPI/unix-launcher.sh +++ b/src/StardewModdingAPI/unix-launcher.sh @@ -26,7 +26,18 @@ if [ "$UNAME" == "Darwin" ]; 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 diff --git a/src/prepare-install-package.targets b/src/prepare-install-package.targets index 9a514abd..f2a2b23c 100644 --- a/src/prepare-install-package.targets +++ b/src/prepare-install-package.targets @@ -35,9 +35,6 @@ - - - -- cgit