diff --git a/ModAPI.Common/CommonStrings.Designer.cs b/ModAPI.Common/CommonStrings.Designer.cs
index 1f4b070..8a4de4e 100644
--- a/ModAPI.Common/CommonStrings.Designer.cs
+++ b/ModAPI.Common/CommonStrings.Designer.cs
@@ -19,7 +19,7 @@ namespace ModAPI.Common {
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "18.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class CommonStrings {
@@ -39,7 +39,7 @@ internal CommonStrings() {
public static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ModApi.Common.CommonStrings", typeof(CommonStrings).Assembly);
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ModAPI.Common.CommonStrings", typeof(CommonStrings).Assembly);
resourceMan = temp;
}
return resourceMan;
@@ -61,7 +61,11 @@ internal CommonStrings() {
}
///
- /// Looks up a localized string similar to An update to the ModAPI DLLs is available. It includes new features and bugfixes, and is required to run modern mods. Do you want to download it?.
+ /// Looks up a localized string similar to An update to the ModAPI DLLs is available. It includes new features and bugfixes, and is required to use newer mods. Would you like to install it now?
+ ///
+ ///Current Launcher Kit version: $CURRENTLK$
+ ///Current ModAPI DLLs version: $CURRENTDLLS$
+ ///New ModAPI DLLs version: $NEWDLLS$.
///
public static string DllsUpdateAvailable {
get {
@@ -79,101 +83,114 @@ public static string DllsUpdateAvailableTitle {
}
///
- /// Looks up a localized string similar to Error.
+ /// Looks up a localized string similar to Please close Spore before using the Launcher Kit again.
+ ///
+ ///If you have just closed Spore, wait a moment for the game to fully exit. If you continue to get this error, please restart your computer..
///
- public static string Error {
+ public static string GameAlreadyRunning {
get {
- return ResourceManager.GetString("Error", resourceCulture);
+ return ResourceManager.GetString("GameAlreadyRunning", resourceCulture);
}
}
///
- /// Looks up a localized string similar to Galactic Adventures was not found..
+ /// Looks up a localized string similar to Game already running.
///
- public static string GalacticAdventuresNotFound {
+ public static string GameAlreadyRunningTitle {
get {
- return ResourceManager.GetString("GalacticAdventuresNotFound", resourceCulture);
+ return ResourceManager.GetString("GameAlreadyRunningTitle", resourceCulture);
}
}
///
- /// Looks up a localized string similar to Galactic Adventures was not found. Please specify the installation folder manually (usually called SPORE_EP1 or SPORE Galactic Adventures)..
+ /// Looks up a localized string similar to Spore or Spore Galactic Adventures was not found.
+ ///
+ ///Both Spore and Spore Galactic Adventures must be installed from disc, EA App, Steam, or GOG.
+ ///
+ ///Please see https://launcherkit.sporecommunity.com/support for further help..
///
- public static string GalacticAdventuresNotFoundSpecifyManual {
+ public static string GameNotFound {
get {
- return ResourceManager.GetString("GalacticAdventuresNotFoundSpecifyManual", resourceCulture);
+ return ResourceManager.GetString("GameNotFound", resourceCulture);
}
}
///
- /// Looks up a localized string similar to The path specified does not exist or is invalid..
+ /// Looks up a localized string similar to Game not found.
///
- public static string InvalidPath {
+ public static string GameNotFoundTitle {
get {
- return ResourceManager.GetString("InvalidPath", resourceCulture);
+ return ResourceManager.GetString("GameNotFoundTitle", resourceCulture);
}
}
///
- /// Looks up a localized string similar to Invalid path.
+ /// Looks up a localized string similar to The path specified does not exist or is invalid..
///
- public static string InvalidPathTitle {
+ public static string InvalidPath {
get {
- return ResourceManager.GetString("InvalidPathTitle", resourceCulture);
+ return ResourceManager.GetString("InvalidPath", resourceCulture);
}
}
///
- /// Looks up a localized string similar to Spore was not found..
+ /// Looks up a localized string similar to An update to the Spore ModAPI Launcher Kit is now available. Would you like to install it now?
+ ///
+ ///Current Launcher Kit version: $CURRENTLK$
+ ///New Launcher Kit version: $NEWLKS$.
///
- public static string SporeNotFound {
+ public static string LKUpdateAvailable {
get {
- return ResourceManager.GetString("SporeNotFound", resourceCulture);
+ return ResourceManager.GetString("LKUpdateAvailable", resourceCulture);
}
}
///
- /// Looks up a localized string similar to Spore was not found. Please specify the installation folder manually (usually called SPORE)..
+ /// Looks up a localized string similar to Launcher Kit Update Available.
///
- public static string SporeNotFoundSpecifyManual {
+ public static string LKUpdateAvailableTitle {
get {
- return ResourceManager.GetString("SporeNotFoundSpecifyManual", resourceCulture);
+ return ResourceManager.GetString("LKUpdateAvailableTitle", resourceCulture);
}
}
///
- /// Looks up a localized string similar to Steam was not found..
+ /// Looks up a localized string similar to Please launch Spore Galactic Adventures once from Steam. This will complete the installation of the game, and allow the Launcher Kit to work.
+ ///
+ ///Afterwards, always use the ModAPI Launcher to play the game.
+ ///
+ ///If you continue to get this message, or the game is not installed from Steam, then the game is likely not installed properly. Please see https://launcherkit.sporecommunity.com/support for further help..
///
- public static string SteamNotFound {
+ public static string SteamDownloadedButNotLaunched {
get {
- return ResourceManager.GetString("SteamNotFound", resourceCulture);
+ return ResourceManager.GetString("SteamDownloadedButNotLaunched", resourceCulture);
}
}
///
- /// Looks up a localized string similar to Steam was not found. Please specify the installation folder manually (usually C:\Program Files (x86)\Steam)..
+ /// Looks up a localized string similar to Steam installation not completed.
///
- public static string SteamNotFoundSpecifyManual {
+ public static string SteamDownloadedButNotLaunchedTitle {
get {
- return ResourceManager.GetString("SteamNotFoundSpecifyManual", resourceCulture);
+ return ResourceManager.GetString("SteamDownloadedButNotLaunchedTitle", resourceCulture);
}
}
///
- /// Looks up a localized string similar to Unauthorized access. Try executing the launcher with Administrator Privileges (Right-click > "Run as Administrator")..
+ /// Looks up a localized string similar to The Launcher Kit could not connect to the update service. Try again in a few minutes, or check https://launcherkit.sporecommunity.com/support for help..
///
- public static string UnauthorizedAccess {
+ public static string UpdateCheckFailed {
get {
- return ResourceManager.GetString("UnauthorizedAccess", resourceCulture);
+ return ResourceManager.GetString("UpdateCheckFailed", resourceCulture);
}
}
///
- /// Looks up a localized string similar to Error: Unauthorized access.
+ /// Looks up a localized string similar to Launcher Kit Update.
///
- public static string UnauthorizedAccessTitle {
+ public static string UpdateCheckFailedTitle {
get {
- return ResourceManager.GetString("UnauthorizedAccessTitle", resourceCulture);
+ return ResourceManager.GetString("UpdateCheckFailedTitle", resourceCulture);
}
}
diff --git a/ModAPI.Common/CommonStrings.resx b/ModAPI.Common/CommonStrings.resx
index c884b75..1a99a9b 100644
--- a/ModAPI.Common/CommonStrings.resx
+++ b/ModAPI.Common/CommonStrings.resx
@@ -118,43 +118,60 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- An update to the ModAPI DLLs is available. It includes new features and bugfixes, and is required to run modern mods. Do you want to download it?
+ An update to the ModAPI DLLs is available. It includes new features and bugfixes, and is required to use newer mods. Would you like to install it now?
+
+Current Launcher Kit version: $CURRENTLK$
+Current ModAPI DLLs version: $CURRENTDLLS$
+New ModAPI DLLs version: $NEWDLLS$
ModAPI DLLs Update Available
-
- Error
+
+ Please close Spore before using the Launcher Kit again.
+
+If you have just closed Spore, wait a moment for the game to fully exit. If you continue to get this error, please restart your computer.
+
+
+ Game already running
-
- Galactic Adventures was not found.
+
+ Spore or Spore Galactic Adventures was not found.
+
+Both Spore and Spore Galactic Adventures must be installed from disc, EA App, Steam, or GOG.
+
+Please see https://launcherkit.sporecommunity.com/support for further help.
-
- Galactic Adventures was not found. Please specify the installation folder manually (usually called SPORE_EP1 or SPORE Galactic Adventures).
+
+ Game not found
The path specified does not exist or is invalid.
-
- Invalid path
-
-
- Spore was not found.
+
+ An update to the Spore ModAPI Launcher Kit is now available. Would you like to install it now?
+
+Current Launcher Kit version: $CURRENTLK$
+New Launcher Kit version: $NEWLKS$
-
- Spore was not found. Please specify the installation folder manually (usually called SPORE).
+
+ Launcher Kit Update Available
-
- Steam was not found.
+
+ Please launch Spore Galactic Adventures once from Steam. This will complete the installation of the game, and allow the Launcher Kit to work.
+
+Afterwards, always use the ModAPI Launcher to play the game.
+
+If you continue to get this message, or the game is not installed from Steam, then the game is likely not installed properly. Please see https://launcherkit.sporecommunity.com/support for further help.
-
- Steam was not found. Please specify the installation folder manually (usually C:\Program Files (x86)\Steam).
+
+ Steam installation not completed
-
- Unauthorized access. Try executing the launcher with Administrator Privileges (Right-click > "Run as Administrator").
+
+ The Launcher Kit could not connect to the update service. Try again in a few minutes, or check https://launcherkit.sporecommunity.com/support for help.
-
- Error: Unauthorized access
+
+ Launcher Kit Update
ModAPI DLLs are updating to version
diff --git a/ModAPI.Common/GameVersion.cs b/ModAPI.Common/GameVersion.cs
index 512d034..98eb88c 100644
--- a/ModAPI.Common/GameVersion.cs
+++ b/ModAPI.Common/GameVersion.cs
@@ -22,7 +22,7 @@ public enum GameVersionType
public static class GameVersion
{
- private static readonly int[] ExecutableSizes = {
+ private static readonly int[] ExecutableSizes = {
24909584, // Disc
24898224, // Origin_March2017
24906040, // EA_October2024
@@ -113,5 +113,43 @@ public static string GetNewDLLName(GameVersionType type)
return null;
}
}
+
+ public static string GetFriendlyVersionName(GameVersionType type)
+ {
+ switch (type)
+ {
+ case GameVersionType.Disc:
+ return "Disc + Patch 5.1, July 2009";
+ case GameVersionType.Origin_March2017:
+ return "Origin, March 2017";
+ case GameVersionType.EA_October2024:
+ return "EA App, October 2024";
+ case GameVersionType.Steam_March2017:
+ return "GOG/Steam, March 2017";
+ case GameVersionType.GOG_October2024:
+ return "GOG, October 2024";
+ case GameVersionType.Steam_October2024:
+ return "Steam, October 2024";
+ default:
+ return "Unknown";
+ }
+ }
+
+ ///
+ /// Returns true if this version type is compatible with LAA (Large Address Aware, aka 4GB patch).
+ ///
+ public static bool IsLAACompatible(GameVersionType type)
+ {
+ switch (type)
+ {
+ // Steam_October2024 has steamstub DRM which prevents modification of the exe, thus preventing the game from running if LAA is set in PE header
+ case GameVersionType.Steam_October2024:
+ return false;
+ // No known issues with any other versions
+ default:
+ return true;
+ }
+ }
+
}
}
diff --git a/ModAPI.Common/LAAUtils.cs b/ModAPI.Common/LAAUtils.cs
new file mode 100644
index 0000000..2980e1b
--- /dev/null
+++ b/ModAPI.Common/LAAUtils.cs
@@ -0,0 +1,38 @@
+using System.IO;
+
+namespace ModAPI.Common
+{
+ public static class LAAUtils
+ {
+ private const long POINTER_TO_PE_HEADER = 0x3C;
+ private const long CHARACTERISTICS_OFFSET_FROM_PE_HEADER = 0x16;
+ private const ushort IMAGE_FILE_LARGE_ADDRESS_AWARE = 0x20;
+
+ ///
+ /// Returns true if the specified path is a LAA (Large Address Aware, aka 4GB patched) executable.
+ /// The specified path must be a valid Windows executable, otherwise behavior is undefined.
+ ///
+ public static bool IsLAA(string path)
+ {
+ // Based on https://stackoverflow.com/a/9056757
+
+ using (var stream = new FileStream(path, FileMode.Open, FileAccess.Read))
+ {
+ using (var reader = new BinaryReader(stream))
+ {
+ // Locate PE header
+ reader.BaseStream.Position = POINTER_TO_PE_HEADER;
+ var peHeaderPosition = reader.ReadInt32();
+
+ // Locate Characteristics field
+ reader.BaseStream.Position = peHeaderPosition + CHARACTERISTICS_OFFSET_FROM_PE_HEADER;
+
+ // Check if the LAA flag is set
+ var characteristics = reader.ReadUInt16();
+ return (characteristics & IMAGE_FILE_LARGE_ADDRESS_AWARE) != 0;
+ }
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/ModAPI.Common/LauncherSettings.cs b/ModAPI.Common/LauncherSettings.cs
deleted file mode 100644
index 4618403..0000000
--- a/ModAPI.Common/LauncherSettings.cs
+++ /dev/null
@@ -1,100 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-using System.IO;
-
-using System.Xml;
-
-namespace ModAPI.Common
-{
- public static class LauncherSettings
- {
- private static string FileName = "LauncherSettings.config";
-
- private static Dictionary _dictionary = new Dictionary();
-
- public static string GamePath
- {
- get
- {
- string value = null;
- _dictionary.TryGetValue("GamePath", out value);
- return value;
- }
- set
- {
- _dictionary["GamePath"] = value;
- }
- }
-
- public static string SporeGamePath
- {
- get
- {
- string value = null;
- _dictionary.TryGetValue("SporeGamePath", out value);
- return value;
- }
- set
- {
- _dictionary["SporeGamePath"] = value;
- }
- }
-
- private static string GetConfigPath()
- {
- var programPath = Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location);
- return Path.Combine(programPath, FileName);
- }
-
- public static bool Load()
- {
- string path = GetConfigPath();
- if (File.Exists(path))
- {
- string xmlIn = File.ReadAllText(path);
- if (!String.IsNullOrEmpty(xmlIn))
- {
- var document = new XmlDocument();
- document.LoadXml(xmlIn);
-
- foreach (XmlNode node in document.ChildNodes)
- {
- if (node.Name == "Settings")
- {
- foreach (XmlNode settingNode in node.ChildNodes)
- {
- _dictionary[settingNode.Name] = settingNode.InnerText;
- }
- }
- }
- }
-
- return true;
- }
- else
- {
- return false;
- }
- }
-
- public static void Save()
- {
- string path = GetConfigPath();
- var document = new XmlDocument();
-
- var mainNode = document.CreateElement("Settings");
- document.AppendChild(mainNode);
-
- foreach (KeyValuePair entry in _dictionary)
- {
- var node = document.CreateElement(entry.Key);
- node.InnerText = entry.Value;
-
- mainNode.AppendChild(node);
- }
-
- document.Save(path);
- }
- }
-}
diff --git a/ModAPI.Common/ModApi.Common.csproj b/ModAPI.Common/ModApi.Common.csproj
index f8947ac..151f716 100644
--- a/ModAPI.Common/ModApi.Common.csproj
+++ b/ModAPI.Common/ModApi.Common.csproj
@@ -62,12 +62,12 @@
-
-
+
+
diff --git a/ModAPI.Common/PathDialogs.cs b/ModAPI.Common/PathDialogs.cs
deleted file mode 100644
index 1826a2d..0000000
--- a/ModAPI.Common/PathDialogs.cs
+++ /dev/null
@@ -1,156 +0,0 @@
-using System.Threading;
-using System.IO;
-using System.Windows.Forms;
-using System;
-
-namespace ModAPI.Common
-{
- public static class PathDialogs
- {
- // Returns path to SporebinEP1 or null
- private static string _galacticAdventuresPath = null;
- public static string ProcessGalacticAdventures()
- {
- if (_galacticAdventuresPath != null)
- {
- return _galacticAdventuresPath;
- }
-
- try
- {
- // attempt to retrieve spore path from registry
- string path = SporePath.GetFromRegistry(SporePath.Game.GalacticAdventures);
- if (!String.IsNullOrEmpty(path) && Directory.Exists(path))
- {
- path = SporePath.MoveToSporebinEP1(path);
- }
-
- // fallback to specified game path
- if (String.IsNullOrEmpty(path) || !Directory.Exists(path))
- {
- path = LauncherSettings.GamePath;
- if (!String.IsNullOrEmpty(path) && Directory.Exists(path))
- {
- path = SporePath.MoveToSporebinEP1(path);
- }
- }
-
- // ask the user when fallback wasn't found
- if (String.IsNullOrEmpty(path) || !Directory.Exists(path))
- {
- var result = MessageBox.Show(CommonStrings.GalacticAdventuresNotFoundSpecifyManual, CommonStrings.GalacticAdventuresNotFound,
- MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation);
-
- if (result == DialogResult.OK)
- {
- path = ShowGalacticAdventuresChooserDialog();
- }
- }
-
- _galacticAdventuresPath = path;
- }
- catch (Exception)
- {
- return null;
- }
-
- return _galacticAdventuresPath;
- }
-
- // Returns path to Sporebin or null
- private static string _coreSporePath = null;
- public static string ProcessSpore()
- {
- if (_coreSporePath != null)
- {
- return _coreSporePath;
- }
-
- try
- {
- // attempt to retrieve spore path from registry
- string path = SporePath.GetFromRegistry(SporePath.Game.Spore);
- if (!String.IsNullOrEmpty(path) && Directory.Exists(path))
- {
- path = SporePath.MoveToSporebin(path);
- }
-
- // fallback to specified game path
- if (String.IsNullOrEmpty(path) || !Directory.Exists(path))
- {
- path = LauncherSettings.SporeGamePath;
- if (!String.IsNullOrEmpty(path) && Directory.Exists(path))
- {
- path = SporePath.MoveToSporebin(path);
- }
- }
-
- // ask the user when fallback wasn't found
- if (String.IsNullOrEmpty(path) || !Directory.Exists(path))
- {
- var result = MessageBox.Show(CommonStrings.SporeNotFoundSpecifyManual, CommonStrings.SporeNotFound,
- MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation);
-
- if (result == DialogResult.OK)
- {
- path = ShowSporeChooserDialog();
- }
- }
-
- _coreSporePath = path;
- }
- catch (Exception)
- {
- return null;
- }
-
- return _coreSporePath;
- }
-
- // -- DIALOGS -- //
- private static string ShowGalacticAdventuresChooserDialog()
- {
- string path = null;
- Thread thread = new Thread(() =>
- {
- var dialog = new FolderBrowserDialog();
- if (dialog.ShowDialog() == DialogResult.OK)
- {
- path = dialog.SelectedPath;
- // move the path to SporebinEP1
- path = SporePath.MoveToSporebinEP1(path);
- LauncherSettings.GamePath = path;
- LauncherSettings.Save();
- }
- });
- thread.SetApartmentState(ApartmentState.STA);
- thread.Start();
- thread.Join();
-
- return path;
- }
-
- private static string ShowSporeChooserDialog()
- {
- string path = null;
- Thread thread = new Thread(() =>
- {
- var dialog = new FolderBrowserDialog();
- if (dialog.ShowDialog() == DialogResult.OK)
- {
- path = dialog.SelectedPath;
- // move the path to SporebinEP1
- path = SporePath.MoveToSporebin(path);
- LauncherSettings.SporeGamePath = path;
- LauncherSettings.Save();
- }
- });
- thread.SetApartmentState(ApartmentState.STA);
- thread.Start();
- thread.Join();
-
- return path;
- }
- }
-
-}
diff --git a/ModAPI.Common/SporePath.cs b/ModAPI.Common/SporePath.cs
index 7e632d5..c7527b9 100644
--- a/ModAPI.Common/SporePath.cs
+++ b/ModAPI.Common/SporePath.cs
@@ -1,10 +1,12 @@
using Microsoft.Win32;
using System.IO;
+using System.Windows;
namespace ModAPI.Common
{
public static class SporePath
{
+
public enum Game
{
None,
@@ -12,39 +14,76 @@ public enum Game
Spore,
CreepyAndCute
}
- public static readonly string[] RegistryValues = { "InstallLoc", "Install Dir" };
- public static readonly string[] RegistryKeys = {
- "HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Electronic Arts\\SPORE_EP1",
- "HKEY_LOCAL_MACHINE\\SOFTWARE\\Electronic Arts\\SPORE_EP1"
- };
+ // Some things for Steam
+ public static readonly string SteamAppsKey = @"HKEY_CURRENT_USER\Software\Valve\Steam\Apps\";
+ public static readonly string GalacticAdventuresSteamID = "24720";
- public static readonly string[] SporeRegistryKeys = {
- "HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Electronic Arts\\SPORE",
- "HKEY_LOCAL_MACHINE\\SOFTWARE\\Electronic Arts\\SPORE"
- };
+ ///
+ /// Gets the path to the SporebinEP1 folder that contains SporeApp.exe for Galactic Adventures.
+ /// The path will NOT have a trailing slash.
+ /// If the path cannot be found or does not exist (typically if GA is not properly installed), this will return null.
+ ///
+ public static string GetSporebinEP1Path()
+ {
+ // Use GA's data path as a starting point, as SporebinEP1 is always next to whatever GA's data dir is
+ var dataPath = GetDataPath(Game.GalacticAdventures);
+ if (dataPath == null)
+ {
+ return null;
+ }
- public static readonly string[] CCRegistryKeys = {
- "HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Electronic Arts\\SPORE(TM) Creepy & Cute Parts Pack",
- "HKEY_LOCAL_MACHINE\\SOFTWARE\\Electronic Arts\\SPORE(TM) Creepy & Cute Parts Pack"
- };
+ var gameRootPath = Directory.GetParent(dataPath).ToString();
+ var binPath = Path.Combine(gameRootPath, "SporebinEP1");
+ // Verify that this folder actually contains SporeApp.exe
+ if (!File.Exists(Path.Combine(binPath, "SporeApp.exe")))
+ {
+ return null;
+ }
- public static readonly string RegistryDataDir = "DataDir"; // Steam/GoG users don't have InstallLoc nor Install Dir
+ return binPath;
+ }
+ ///
+ /// Gets the path to the Data folder that contains packages for the specified game.
+ /// The path will NOT have a trailing slash.
+ /// If the path cannot be found or does not exist (typically if the game is not properly installed), this will return null.
+ ///
+ public static string GetDataPath(Game game)
+ {
+ // If registry value is missing or not a string, return null
+ if (!(GetFromRegistry(game, "DataDir") is string path))
+ {
+ return null;
+ }
- // Some things for Steam
- public static readonly string[] SteamRegistryKeys = {
- "HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Valve\\Steam",
- "HKEY_LOCAL_MACHINE\\SOFTWARE\\Valve\\Steam"
- };
+ // Remove "" if necessary
+ path = FixPath(path);
- public static readonly string SteamRegistryValue = "InstallPath";
+ // Fix slashes if necessary (GOG .22 has mixed slashes)
+ path = Path.GetFullPath(path);
- public static readonly string SteamAppsKey = @"HKEY_CURRENT_USER\Software\Valve\Steam\Apps\";
+ // Remove trailing slash if present
+ path = path.TrimEnd(Path.DirectorySeparatorChar);
- public static readonly string GalacticAdventuresSteamID = "24720";
+ // Verify that folder actually exists
+ if (!Directory.Exists(path))
+ {
+ return null;
+ }
+ return path;
+ }
+
+ ///
+ /// Returns true if the specified game is properly installed, by checking that its Data folder can be found and exists.
+ /// This matches the behavior of the game itself, which shows a "Data directory missing or corrupt" error and exits if the Data folder (located via hardcoded registry key) cannot be found or does not exist.
+ ///
+ public static bool IsInstalled(Game game)
+ {
+ return GetDataPath(game) != null;
+ }
// remove "" if necessary
private static string FixPath(string path)
@@ -66,156 +105,83 @@ public static bool SporeIsInstalledOnSteam()
return result != null && ((int)result != 0);
}
- public static string GetFromRegistry(Game game)
+ ///
+ /// Returns true if Spore and GA are properly installed.
+ /// If either game is not properly installed, returns false, and optionally shows an error message to the user. If the game is installed from Steam but hasn't been launched to complete the installation, shows a specific error message about launching the game on Steam.
+ ///
+ ///
+ public static bool IsGameInstalled(bool showMessageWhenFalse)
{
- if (game == Game.GalacticAdventures)
- {
- return GetFromRegistry(RegistryKeys);
- }
- else if (game == Game.Spore)
- {
- return GetFromRegistry(SporeRegistryKeys);
- }
- else
+ if (IsInstalled(Game.Spore) && IsInstalled(Game.GalacticAdventures))
{
- return GetFromRegistry(CCRegistryKeys);
+ return true;
}
- }
-
- public static string GetFromRegistry(string[] keys)
- {
- string result = null;
-
- foreach (string key in keys)
+ if (showMessageWhenFalse)
{
- foreach (string value in RegistryValues)
+ // Steam doesn't run the install script to create the registry keys until the game is launched from Steam for the first time
+ if (SporeIsInstalledOnSteam())
{
- result = (string)Registry.GetValue(key, value, null);
- if (result != null)
- {
-
- return FixPath(result);
- }
+ SupportInfo.ShowInfo(CommonStrings.SteamDownloadedButNotLaunched, CommonStrings.SteamDownloadedButNotLaunchedTitle, true, false);
}
- }
-
- // not found? try with DataDir; some users only have that one
- foreach (string key in RegistryKeys)
- {
- result = (string)Registry.GetValue(key, RegistryDataDir, null);
- if (result != null)
+ else
{
-
- return FixPath(result);
+ SupportInfo.ShowError(CommonStrings.GameNotFound, CommonStrings.GameNotFoundTitle, false, false);
}
}
-
- return null;
+ return false;
}
-
- public static string GetFromRegistry(string[] keys, string[] values)
+ ///
+ /// Gets the value of a registry key for the specified game, checking both 32-bit and 64-bit paths.
+ /// If the key does not exist, returns null.
+ ///
+ private static object GetFromRegistry(Game game, string valueName)
{
- string result = null;
-
- foreach (string key in keys)
+ foreach (string key in GetRegistryKeySuffixes(game))
{
- foreach (string value in values)
+ var value = GetFromRegistry(key, valueName);
+ if (value != null)
{
- result = (string)Registry.GetValue(key, value, null);
- if (result != null)
- {
-
- return FixPath(result);
- }
+ return value;
}
}
-
return null;
}
- // If a path ends in \\, Directory.GetParent willl return the same folder!!
- public static string GetRealParent(string path)
+ ///
+ /// Gets the value of a registry key from HKLM\Software, checking both 32-bit and 64-bit paths.
+ /// If the key does not exist, returns null.
+ ///
+ private static object GetFromRegistry(string keyName, string valueName)
{
- if (path.EndsWith("\\"))
- {
- path = Directory.GetParent(path).ToString();
- }
+ // Registry key prefix varies depending on 64-bit or 32-bit system
+ const string keyPrefix64 = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\";
+ const string keyPrefix32 = "HKEY_LOCAL_MACHINE\\SOFTWARE\\";
- return Directory.GetParent(path).ToString();
+ var value = Registry.GetValue(keyPrefix64 + keyName, valueName, null);
+ return value ?? Registry.GetValue(keyPrefix32 + keyName, valueName, null);
}
- // This method returns the path to the folder that contains the executable
- public static string MoveToSporebinEP1(string path, bool recursive = true)
+ ///
+ /// Gets the possible registry subkeys within HKLM\Software for the specified game.
+ /// These keys contain the DataDir value, which is used by the game to locate its own packages.
+ ///
+ private static string[] GetRegistryKeySuffixes(Game game)
{
- if (File.Exists(Path.Combine(path, "SporeApp.exe")))
- {
- return path;
- }
-
- string sporeBinEP1Path = Path.Combine(path, "SporebinEP1");
- if (Directory.Exists(sporeBinEP1Path))
- {
- return sporeBinEP1Path;
- }
-
- if (recursive)
- {
- // check if the user selected another folder (for example, "Data")
- return MoveToSporebinEP1(GetRealParent(path), false);
+ switch (game)
+ {
+ case Game.GalacticAdventures:
+ return new[] { "Electronic Arts\\SPORE_EP1" };
+ case Game.Spore:
+ return new[] { "Electronic Arts\\SPORE" };
+ case Game.CreepyAndCute:
+ // Disc/Origin/EA use the former, Steam/GOG use the latter, game hardcodes both
+ return new[] { "Electronic Arts\\SPORE(TM) Creepy & Cute Parts Pack", "Electronic Arts\\SPORE Creepy and Cute Parts Pack" };
+ default:
+ return new string[] { };
}
-
- return null;
}
- // This method returns the path to the folder that contains the executable
- public static string MoveToSporebin(string path, bool recursive = true)
- {
- if (File.Exists(Path.Combine(path, "SporeApp.exe")))
- {
- return path;
- }
-
- string sporeBinPath = Path.Combine(path, "Sporebin");
- if (Directory.Exists(sporeBinPath))
- {
- return sporeBinPath;
- }
-
- if (recursive)
- {
- // check if the user selected another folder (for example, "Data")
- return MoveToSporebin(GetRealParent(path), false);
- }
-
- return null;
- }
-
- public static string MoveToData(Game game, string installationDirectory)
- {
- if (game == Game.Spore)
- {
- return Path.Combine(installationDirectory, "Data");
- }
- else if (game == Game.GalacticAdventures)
- {
- // Steam and GoG uses DataEP1
- string outputPath = Path.Combine(installationDirectory, "DataEP1");
- if (Directory.Exists(outputPath))
- {
- return outputPath;
- }
- else
- {
- return Path.Combine(installationDirectory, "Data");
- }
- }
- else
- {
- // Creepy and Cute uses the installation path itself
- return installationDirectory;
- }
- }
}
-}
+}
\ No newline at end of file
diff --git a/ModAPI.Common/SupportInfo.cs b/ModAPI.Common/SupportInfo.cs
new file mode 100644
index 0000000..7975fc5
--- /dev/null
+++ b/ModAPI.Common/SupportInfo.cs
@@ -0,0 +1,160 @@
+using ModAPI.Common.Update;
+using System;
+using System.Diagnostics;
+using System.IO;
+using System.Reflection;
+using System.Windows.Forms;
+
+namespace ModAPI.Common
+{
+ public static class SupportInfo
+ {
+ ///
+ /// The current version of the Launcher Kit.
+ ///
+ public static Version LauncherKitVersion => UpdateManager.CurrentVersion;
+
+ ///
+ /// The current version of the Launcher Kit, as a string containing a minimum of three version components (i.e. "1.2.3"). A fourth component (revision) will be included only if it is non-zero.
+ ///
+ public static string LauncherKitVersionString => LauncherKitVersion.Revision == 0 ? LauncherKitVersion.ToString(3) : LauncherKitVersion.ToString();
+
+ ///
+ /// The current version of the ModAPI DLLs that will be injected into the game.
+ ///
+ public static Version ModAPIDllsVersion => UpdateManager.CurrentDllsBuild;
+
+ ///
+ /// The current version of the ModAPI DLLs, as a string containing a minimum of three version components (i.e. "1.2.3"). A fourth component (revision) will be included only if it is non-zero.
+ ///
+ public static string ModAPIDllsVersionString => ModAPIDllsVersion.Revision == 0 ? ModAPIDllsVersion.ToString(3) : ModAPIDllsVersion.ToString();
+
+ ///
+ /// The folder path where the Launcher Kit is installed. This folder contains the executables for the Easy Installer, Easy Uninstaller, and Launcher.
+ /// By default, this is "%programdata%\Spore ModAPI Launcher Kit".
+ /// The path will NOT have a trailing slash.
+ ///
+ public static String LauncherKitPath => Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
+
+
+
+ ///
+ /// The file version of SporeApp.exe.
+ /// If SporeApp.exe could not be found, this will return null.
+ ///
+ public static string GameVersionString
+ {
+ get
+ {
+ var sporebinEP1Path = SporePath.GetSporebinEP1Path();
+ if (sporebinEP1Path == null)
+ {
+ return null;
+ }
+ // If not null, SporebinEP1Path is guaranteed to exist and contain SporeApp.exe
+ var sporeAppPath = Path.Combine(sporebinEP1Path, "SporeApp.exe");
+ return FileVersionInfo.GetVersionInfo(sporeAppPath).FileVersion;
+ }
+ }
+
+ ///
+ /// The version type of the game. This will be one of the following values:
+ /// "Disc + Patch 5.1, July 2009",
+ /// "Origin, March 2017",
+ /// "EA App, October 2024",
+ /// "GOG/Steam, March 2017",
+ /// "GOG, October 2024",
+ /// "Steam, October 2024",
+ /// "Unknown".
+ /// If SporeApp.exe could not be found, this will return null.
+ ///
+ public static string GameVersionTypeString
+ {
+ get
+ {
+ var sporebinEP1Path = SporePath.GetSporebinEP1Path();
+ if (sporebinEP1Path == null)
+ {
+ return null;
+ }
+ var sporeAppPath = Path.Combine(sporebinEP1Path, "SporeApp.exe");
+ var versionType = GameVersion.DetectVersion(sporeAppPath);
+ return GameVersion.GetFriendlyVersionName(versionType);
+ }
+ }
+
+ ///
+ /// Gets a string with the game version and version type, i.e. "3.1.0.29 - GOG, October 2024, LAA".
+ /// If SporeApp.exe could not be found, this will return "Game not found".
+ ///
+ public static string GameFullVersionInfoString
+ {
+ get
+ {
+ if (GameVersionString == null || GameVersionTypeString == null)
+ {
+ return "Game not found";
+ }
+
+ var sporeAppPath = Path.Combine(SporePath.GetSporebinEP1Path(), "SporeApp.exe");
+ var laaString = LAAUtils.IsLAA(sporeAppPath) ? ", LAA" : "";
+
+ return $"{GameVersionString} - {GameVersionTypeString}{laaString}";
+ }
+ }
+
+
+
+ private static DialogResult ShowMessageBox(string message, string title, bool showGameInfo, bool showPaths, MessageBoxButtons buttons, MessageBoxIcon icon)
+ {
+ message += "\n";
+
+ // Append game info
+ if (showGameInfo)
+ {
+ message += $"\nSpore version: {GameFullVersionInfoString}";
+ if (showPaths)
+ {
+ message += $"\nSpore path: {SporePath.GetSporebinEP1Path()}";
+ }
+ }
+
+ // Append LK info
+ message += $"\nLauncher Kit version: {LauncherKitVersionString}\nModAPI DLLs Version: {ModAPIDllsVersionString}";
+ if (showPaths)
+ {
+ message += $"\nLauncher Kit path: {LauncherKitPath}";
+ }
+
+ return MessageBox.Show(message, title, buttons, icon);
+ }
+
+ ///
+ /// Shows an info message box to the user. Information about the Launcher Kit will be included, and optionally information about the game.
+ /// Info message boxes should be used for information that the user should be aware of, but is not causing a problem.
+ ///
+ public static DialogResult ShowInfo(string message, string title, bool showGameInfo = true, bool showPaths = true, MessageBoxButtons buttons = MessageBoxButtons.OK)
+ {
+ return ShowMessageBox(message, title, showGameInfo, showPaths, buttons, MessageBoxIcon.Information);
+ }
+
+ ///
+ /// Shows a warning message box to the user. Information about the Launcher Kit will be included, and optionally information about the game.
+ /// Warning message boxes should be used for potential problems, where the program can continue, but further problems are likely to occur.
+ ///
+ public static DialogResult ShowWarning(string message, string title, bool showGameInfo = true, bool showPaths = true, MessageBoxButtons buttons = MessageBoxButtons.OK)
+ {
+ return ShowMessageBox(message, title, showGameInfo, showPaths, buttons, MessageBoxIcon.Warning);
+ }
+
+ ///
+ /// Shows an error message box to the user. Information about the Launcher Kit will be included, and optionally information about the game.
+ /// Error message boxes should be used for problems that prevent the program from continuing.
+ ///
+ public static DialogResult ShowError(string message, string title, bool showGameInfo = true, bool showPaths = true, MessageBoxButtons buttons = MessageBoxButtons.OK)
+ {
+ return ShowMessageBox(message, title, showGameInfo, showPaths, buttons, MessageBoxIcon.Error);
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/ModAPI.Common/Update/UpdateManager.cs b/ModAPI.Common/Update/UpdateManager.cs
index 84c2d70..28cac88 100644
--- a/ModAPI.Common/Update/UpdateManager.cs
+++ b/ModAPI.Common/Update/UpdateManager.cs
@@ -6,15 +6,13 @@
using System.IO;
using System.Linq;
using System.Reflection;
-using System.Windows;
-using System.Xml;
+using System.Windows.Forms;
using ModAPI.Common.Dialog;
namespace ModAPI.Common.Update
{
public static class UpdateManager
{
- public static bool Development = false;
public static List LauncherKitUpdateUrls = new List
{
// Cloudflare R2 + Cache
@@ -56,30 +54,11 @@ public static Version CurrentDllsBuild
}
}
- public static bool HasValidDllsVersion(XmlDocument document)
- {
- var modNode = document.SelectSingleNode("/mod");
-
- if (modNode != null)
- {
- Version requiredDllsVersion = null;
- if (modNode.Attributes["dllsBuild"] != null)
- Version.TryParse(modNode.Attributes["dllsBuild"].Value, out requiredDllsVersion);
-
- if (requiredDllsVersion != null &&
- requiredDllsVersion > CurrentDllsBuild)
- {
- return false;
- }
- }
- return true;
- }
-
public static void CheckForUpdates()
{
if ((Process.GetProcessesByName("SporeApp").Length > 0) || (Process.GetProcessesByName("SporeApp_ModAPIFix").Length > 0))
{
- MessageBox.Show("Please close Spore before attempting to use the Spore ModAPI Launcher Kit again. If you have just closed Spore, wait a moment for the game to fully exit.", string.Empty);
+ SupportInfo.ShowWarning(CommonStrings.GameAlreadyRunning, CommonStrings.GameAlreadyRunningTitle, true, false);
Process.GetCurrentProcess().Kill();
}
@@ -121,7 +100,7 @@ public static void CheckForUpdates()
{
List exceptions = new List();
bool didDownload = false;
-
+
// Try to download the update info file from the override path first
if (File.Exists(UpdaterOverridePath))
{
@@ -182,7 +161,7 @@ public static void CheckForUpdates()
if (!didDownload)
{
ShowUpdateCheckFailedMessage(exceptions);
-
+
// early return when failed
return;
}
@@ -195,9 +174,10 @@ public static void CheckForUpdates()
{
if (Version.Parse(updateInfoLines[1]) > CurrentVersion)
{
- string versionString = "Current version: " + CurrentVersion + "\nNew version: " + updateInfoLines[1];
+ string currentLKVersion = SupportInfo.LauncherKitVersionString;
+ string newLKVersion = updateInfoLines[1];
- if (MessageBox.Show("An update to the Spore ModAPI Launcher Kit is now available. Would you like to install it now?\n\n" + versionString, "Update Available", MessageBoxButton.YesNo) == MessageBoxResult.Yes)
+ if (MessageBox.Show(CommonStrings.LKUpdateAvailable.Replace("$NEWLK", newLKVersion).Replace("$CURRENTLK", currentLKVersion), CommonStrings.LKUpdateAvailableTitle, MessageBoxButtons.YesNo) == DialogResult.Yes)
{
if (bool.Parse(updateInfoLines[2]))
{
@@ -206,7 +186,7 @@ public static void CheckForUpdates()
else
{
var dialog = new ProgressDialog(
- "Spore ModAPI Launcher Kit is updating to " + updateInfoLines[1],
+ "Spore ModAPI Launcher Kit is updating to " + newLKVersion,
"Spore ModAPI Launcher Kit updating",
(s, e) =>
{
@@ -231,7 +211,7 @@ public static void CheckForUpdates()
foreach (string arg in args)
currentArgs += "\"" + arg.TrimEnd('\\') + "\" ";
- string argOnePath = Directory.GetParent(System.Reflection.Assembly.GetEntryAssembly().Location).ToString().TrimEnd('\\');
+ string argOnePath = Directory.GetParent(Assembly.GetEntryAssembly().Location).ToString().TrimEnd('\\');
if (!argOnePath.EndsWith(" "))
argOnePath = argOnePath + " ";
@@ -255,8 +235,11 @@ public static void CheckForUpdates()
if (DllsUpdater.HasDllsUpdate(out var githubRelease))
{
- var result = MessageBox.Show(CommonStrings.DllsUpdateAvailable, CommonStrings.DllsUpdateAvailableTitle, MessageBoxButton.YesNo);
- if (result == MessageBoxResult.Yes)
+ string newDllsVersion = githubRelease.tag_name;
+ string currentDllsVersion = SupportInfo.ModAPIDllsVersionString;
+ string currentLKVersion = SupportInfo.LauncherKitVersionString;
+ var result = MessageBox.Show(CommonStrings.DllsUpdateAvailable.Replace("$NEWDLLS", newDllsVersion).Replace("$CURRENTDLLS", currentDllsVersion).Replace("$CURRENTLK$", currentLKVersion), CommonStrings.DllsUpdateAvailableTitle, MessageBoxButtons.YesNo);
+ if (result == DialogResult.Yes)
{
var dialog = new ProgressDialog(
CommonStrings.UpdatingDllsDialog + githubRelease.tag_name,
@@ -300,12 +283,12 @@ static void ShowUpdateCheckFailedMessage(List exceptions)
}
- MessageBox.Show("The Launcher Kit could not connect to the update service. Try again in a few minutes, or check https://launcherkit.sporecommunity.com/support for help.\n\nCurrent version: "+ CurrentVersion + "\n\n" + exceptionText);
+ SupportInfo.ShowWarning(CommonStrings.UpdateCheckFailed + "\n\n" + exceptionText, CommonStrings.UpdateCheckFailedTitle, false, true);
}
static void ShowUnrecognizedUpdateInfoVersionMessage()
{
- MessageBox.Show("This update to the Spore ModAPI Launcher Kit must be downloaded manually.");
+ SupportInfo.ShowInfo("This update to the Spore ModAPI Launcher Kit must be downloaded manually. Please visit https://launcherkit.sporecommunity.com/support for more information.", CommonStrings.UpdateCheckFailedTitle, false, true);
}
}
}
\ No newline at end of file
diff --git a/Spore ModAPI Easy Installer/EasyInstaller.cs b/Spore ModAPI Easy Installer/EasyInstaller.cs
index 340bcb3..e23e639 100755
--- a/Spore ModAPI Easy Installer/EasyInstaller.cs
+++ b/Spore ModAPI Easy Installer/EasyInstaller.cs
@@ -9,11 +9,8 @@
using System.Diagnostics;
using System.IO;
using System.IO.Compression;
-using System.Linq;
-using System.Net;
using System.Threading;
using System.Windows.Forms;
-using System.Windows.Interop;
using System.Xml;
namespace Spore_ModAPI_Easy_Installer
@@ -67,12 +64,10 @@ static void Main()
else
{
Application.EnableVisualStyles();
- LauncherSettings.Load();
ModList.Load();
// ensure we find Spore & GA as early as possible
- if (PathDialogs.ProcessSpore() == null ||
- PathDialogs.ProcessGalacticAdventures() == null)
+ if (!SporePath.IsGameInstalled(true))
{
return;
}
@@ -104,7 +99,7 @@ static void Main()
FileType fileType = GetFileType(Path.GetFileName(inputPath));
string modName = Path.GetFileNameWithoutExtension(inputPath);
ResultType result = ResultType.UnsupportedFile;
-
+
try
{
@@ -217,10 +212,10 @@ static string GetOutputPath(FileType type)
return Directory.GetParent(System.Reflection.Assembly.GetEntryAssembly().Location).ToString();
case FileType.Package:
- return GetGADataPath();
+ return SporePath.GetDataPath(SporePath.Game.GalacticAdventures);
case FileType.Spore_Package:
- return GetSporeDataPath();
+ return SporePath.GetDataPath(SporePath.Game.Spore);
default:
return null;
@@ -247,32 +242,6 @@ static string GetOutputPath(string pathType)
}
}
- static string GetGADataPath()
- {
- string path = PathDialogs.ProcessGalacticAdventures();
-
- if (path != null)
- {
- // now we have the path to SporebinEP1; move it to Data
- path = SporePath.MoveToData(SporePath.Game.GalacticAdventures, SporePath.GetRealParent(path));
- }
-
- return path;
- }
-
- static string GetSporeDataPath()
- {
- string path = PathDialogs.ProcessSpore();
-
- if (path != null)
- {
- // now we have the path to Sporebin; move it to Data
- path = SporePath.MoveToData(SporePath.Game.Spore, SporePath.GetRealParent(path));
- }
-
- return path;
- }
-
static ResultType InstallPackage(string inputFile, string modName)
{
ResultType result = ResultType.Success;
@@ -382,7 +351,7 @@ private static ResultType ExtractSporemodZip(string inputFile, ModConfiguration
}
}
- eventHandler?.Invoke(null, (int)((entriesExtracted / (float) numEntries) * 100.0f));
+ eventHandler?.Invoke(null, (int)((entriesExtracted / (float)numEntries) * 100.0f));
entriesExtracted++;
}
}
@@ -390,24 +359,20 @@ private static ResultType ExtractSporemodZip(string inputFile, ModConfiguration
return ResultType.Success;
}
- private static bool CheckModCoreDllsVersion(ZipArchiveEntry xmlEntry)
+ private static Version GetModCoreDllsVersion(ZipArchiveEntry xmlEntry)
{
- try
+ using (var stream = xmlEntry.Open())
{
- using (var stream = xmlEntry.Open())
- {
- var document = new XmlDocument();
- document.Load(stream);
+ var document = new XmlDocument();
+ document.Load(stream);
- if (!UpdateManager.HasValidDllsVersion(document))
- {
- return false;
- }
+ var modNode = document.SelectSingleNode("/mod");
+ if (modNode != null && modNode.Attributes["dllsBuild"] != null)
+ {
+ return Version.Parse(modNode.Attributes["dllsBuild"].Value);
}
}
- catch {
- }
- return true;
+ return null;
}
static ResultType TryExecuteInstaller(string inputFile, string modName)
@@ -420,12 +385,24 @@ static ResultType TryExecuteInstaller(string inputFile, string modName)
if (xmlEntry != null)
{
- if (!CheckModCoreDllsVersion(xmlEntry))
+ Version modCoreDllsVersion = null;
+ try
{
- MessageBox.Show($"\"{modName}\"{Strings.UnsupportedDllVersion}",
- Strings.UnsupportedDllVersionTitle);
+ modCoreDllsVersion = GetModCoreDllsVersion(xmlEntry);
+ }
+ // If the version cannot be read due to an exception, show an error and don't install the mod
+ catch
+ {
+ SupportInfo.ShowWarning(Strings.InvalidDllVersion.Replace("$MODNAME$", modName), Strings.InvalidDllVersionTitle, false, false);
return ResultType.ModNotInstalled;
}
+ // If the version can be read but is outdated, show an error and don't install the mod
+ if (modCoreDllsVersion != null && modCoreDllsVersion > UpdateManager.CurrentDllsBuild)
+ {
+ SupportInfo.ShowWarning(Strings.OutdatedDllVersion.Replace("$MODNAME$", modName).Replace("$REQUIREDVERSION$", modCoreDllsVersion.ToString()), Strings.OutdatedDllVersionTitle, false, false);
+ return ResultType.ModNotInstalled;
+ }
+ // If the version is not specified, continue installing (the value is optional because not all mods use the ModAPI SDK)
string modPath = Path.Combine(Directory.GetParent(System.Reflection.Assembly.GetEntryAssembly().Location).ToString(), "ModConfigs", modName);
if (Directory.Exists(modPath))
@@ -508,7 +485,7 @@ static ResultType InstallSporemod(string inputFile, string modName)
Thread thread = new Thread(() =>
{
- var dialog = new ProgressDialog(Strings.ModIsInstalling1 + modName + "\" is being installed", Strings.InstallingModTitle, (s, e) =>
+ var dialog = new ProgressDialog(Strings.InstallingMod.Replace("$MODNAME$", modName), Strings.InstallingModTitle, (s, e) =>
{
try
{
@@ -563,7 +540,7 @@ static ResultType InstallSporemod(string inputFile, string modName)
// the Installer existed but there was a problem
return result;
}
-
+
}
static void RemoveModFiles(ModConfiguration mod)
@@ -592,8 +569,8 @@ static string GetErrorMessage(ResultType errorType)
switch (errorType)
{
case ResultType.UnsupportedFile: return Strings.ErrorUnsupportedFile;
- case ResultType.GalacticAdventuresNotFound: return CommonStrings.GalacticAdventuresNotFound;
- case ResultType.UnauthorizedAccess: return CommonStrings.UnauthorizedAccess;
+ case ResultType.GalacticAdventuresNotFound: return CommonStrings.GameNotFound;
+ case ResultType.UnauthorizedAccess: return Strings.UnauthorizedAccess;
case ResultType.InvalidPath: return CommonStrings.InvalidPath;
default:
@@ -608,11 +585,11 @@ static string GetResultText(ResultType result, string modName, string errorStrin
if (result == ResultType.Success)
{
// show message to the user
- return Strings.ModInstalled1 + modName + Strings.ModInstalled2;
+ return Strings.ModInstalled.Replace("$MODNAME$", modName);
}
else if (result == ResultType.ModNotInstalled)
{
- return Strings.ModInstalled1 + modName + Strings.CancelledInstallation;
+ return Strings.ModCancelled.Replace("$MODNAME$", modName);
}
else
{
@@ -622,7 +599,7 @@ static string GetResultText(ResultType result, string modName, string errorStrin
}
// show message to the user
//MessageBox.Show(Strings.ModNotInstalled1 + modName + Strings.ModNotInstalled2 + " " + errorString, Strings.InstallationCancelled);
- return Strings.ModNotInstalled1 + modName + Strings.ModNotInstalled2 + " " + errorString;
+ return Strings.ModNotInstalled.Replace("$MODNAME$", modName) + "\n\n" + errorString;
}
}
diff --git a/Spore ModAPI Easy Installer/Strings.Designer.cs b/Spore ModAPI Easy Installer/Strings.Designer.cs
index 72b1b18..3c63b6a 100644
--- a/Spore ModAPI Easy Installer/Strings.Designer.cs
+++ b/Spore ModAPI Easy Installer/Strings.Designer.cs
@@ -19,7 +19,7 @@ namespace Spore_ModAPI_Easy_Installer {
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "18.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Strings {
@@ -60,15 +60,6 @@ internal Strings() {
}
}
- ///
- /// Looks up a localized string similar to " cancelled installation.
- ///
- internal static string CancelledInstallation {
- get {
- return ResourceManager.GetString("CancelledInstallation", resourceCulture);
- }
- }
-
///
/// Looks up a localized string similar to Copying file.
///
@@ -79,7 +70,7 @@ internal static string CopyingFile {
}
///
- /// Looks up a localized string similar to The file given is not supported. Only .sporemod, .package and .exe files are supported..
+ /// Looks up a localized string similar to This is not a valid mod file. Only .sporemod and .package files are supported..
///
internal static string ErrorUnsupportedFile {
get {
@@ -123,6 +114,15 @@ internal static string InstallationCompleted {
}
}
+ ///
+ /// Looks up a localized string similar to The mod "$MODNAME$" is being installed, please wait....
+ ///
+ internal static string InstallingMod {
+ get {
+ return ResourceManager.GetString("InstallingMod", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Installing mod....
///
@@ -133,75 +133,76 @@ internal static string InstallingModTitle {
}
///
- /// Looks up a localized string similar to The mod ".
+ /// Looks up a localized string similar to cannot be installed, because it specifies an invalid version of the ModAPI DLLs. Please ask the mod developer for help..
///
- internal static string ModInstalled1 {
+ internal static string InvalidDllVersion {
get {
- return ResourceManager.GetString("ModInstalled1", resourceCulture);
+ return ResourceManager.GetString("InvalidDllVersion", resourceCulture);
}
}
///
- /// Looks up a localized string similar to " has been installed successfully..
+ /// Looks up a localized string similar to Error: mod cannot be installed.
///
- internal static string ModInstalled2 {
+ internal static string InvalidDllVersionTitle {
get {
- return ResourceManager.GetString("ModInstalled2", resourceCulture);
+ return ResourceManager.GetString("InvalidDllVersionTitle", resourceCulture);
}
}
///
- /// Looks up a localized string similar to The mod ".
+ /// Looks up a localized string similar to Installation of the mod "$MODNAME$" was cancelled..
///
- internal static string ModIsInstalling1 {
+ internal static string ModCancelled {
get {
- return ResourceManager.GetString("ModIsInstalling1", resourceCulture);
+ return ResourceManager.GetString("ModCancelled", resourceCulture);
}
}
///
- /// Looks up a localized string similar to " is being installed. Please, wait until it finishes..
+ /// Looks up a localized string similar to The mod "$MODNAME$" has been installed..
///
- internal static string ModIsInstalling2 {
+ internal static string ModInstalled {
get {
- return ResourceManager.GetString("ModIsInstalling2", resourceCulture);
+ return ResourceManager.GetString("ModInstalled", resourceCulture);
}
}
///
- /// Looks up a localized string similar to The mod ".
+ /// Looks up a localized string similar to Something went wrong when installing the mod "$MODNAME$". This mod was not installed..
///
- internal static string ModNotInstalled1 {
+ internal static string ModNotInstalled {
get {
- return ResourceManager.GetString("ModNotInstalled1", resourceCulture);
+ return ResourceManager.GetString("ModNotInstalled", resourceCulture);
}
}
///
- /// Looks up a localized string similar to " could not be installed..
+ /// Looks up a localized string similar to cannot be installed, because it requires a newer version of the ModAPI DLLs. Please restart the launcher and allow it to update.
+ ///
+ ///Required ModAPI DLLs version: $REQUIREDVERSION$ or higher.
///
- internal static string ModNotInstalled2 {
+ internal static string OutdatedDllVersion {
get {
- return ResourceManager.GetString("ModNotInstalled2", resourceCulture);
+ return ResourceManager.GetString("OutdatedDllVersion", resourceCulture);
}
}
///
- /// Looks up a localized string similar to cannot be installed, because it requires a greater version of the ModAPI Core DLLs.
- ///Please, restart the launcher and allow it to update..
+ /// Looks up a localized string similar to Outdated ModAPI DLLs version.
///
- internal static string UnsupportedDllVersion {
+ internal static string OutdatedDllVersionTitle {
get {
- return ResourceManager.GetString("UnsupportedDllVersion", resourceCulture);
+ return ResourceManager.GetString("OutdatedDllVersionTitle", resourceCulture);
}
}
///
- /// Looks up a localized string similar to Error: mod cannot be installed.
+ /// Looks up a localized string similar to The Easy Installer does not currently have permission to install or change mods. You may need to right-click the Easy Installer and "Run as Administrator"..
///
- internal static string UnsupportedDllVersionTitle {
+ internal static string UnauthorizedAccess {
get {
- return ResourceManager.GetString("UnsupportedDllVersionTitle", resourceCulture);
+ return ResourceManager.GetString("UnauthorizedAccess", resourceCulture);
}
}
}
diff --git a/Spore ModAPI Easy Installer/Strings.resx b/Spore ModAPI Easy Installer/Strings.resx
index 1dc9937..729025c 100644
--- a/Spore ModAPI Easy Installer/Strings.resx
+++ b/Spore ModAPI Easy Installer/Strings.resx
@@ -121,7 +121,7 @@
Copying file
- The file given is not supported. Only .sporemod, .package and .exe files are supported.
+ This is not a valid mod file. Only .sporemod and .package files are supported.
Extracting file
@@ -132,38 +132,39 @@
Choose the mod to be installed
-
- " cancelled installation
+
+ Installation of the mod "$MODNAME$" was cancelled.
Installing mod...
-
- The mod "
+
+ The mod "$MODNAME$" has been installed.
-
- " has been installed successfully.
+
+ The mod "$MODNAME$" is being installed, please wait...
-
- The mod "
+
+ Something went wrong when installing the mod "$MODNAME$". This mod was not installed.
-
- " is being installed. Please, wait until it finishes.
+
+ Outdated ModAPI DLLs version
-
- The mod "
-
-
- " could not be installed.
-
-
- cannot be installed, because it requires a greater version of the ModAPI Core DLLs.
-Please, restart the launcher and allow it to update.
-
-
+
Error: mod cannot be installed
Installation completed
+
+ cannot be installed, because it requires a newer version of the ModAPI DLLs. Please restart the launcher and allow it to update.
+
+Required ModAPI DLLs version: $REQUIREDVERSION$ or higher
+
+
+ cannot be installed, because it specifies an invalid version of the ModAPI DLLs. Please ask the mod developer for help.
+
+
+ The Easy Installer does not currently have permission to install or change mods. You may need to right-click the Easy Installer and "Run as Administrator".
+
\ No newline at end of file
diff --git a/Spore ModAPI Easy Installer/XmlInstallerWindow.xaml.cs b/Spore ModAPI Easy Installer/XmlInstallerWindow.xaml.cs
index 53d61da..3b15576 100644
--- a/Spore ModAPI Easy Installer/XmlInstallerWindow.xaml.cs
+++ b/Spore ModAPI Easy Installer/XmlInstallerWindow.xaml.cs
@@ -58,9 +58,9 @@ public partial class XmlInstallerWindow : DecoratableWindow
int _installerMode = 0; //0 = show components list, 1 = don't show components list
bool _isModMatched = false;
bool _dontUseLegacyPackagePlacement = false;
- public static string GaDataPath = SporePath.MoveToData(SporePath.Game.GalacticAdventures, SporePath.GetRealParent(PathDialogs.ProcessGalacticAdventures()));
+ public static string GaDataPath = SporePath.GetDataPath(SporePath.Game.GalacticAdventures);
- public static string SporeDataPath = SporePath.MoveToData(SporePath.Game.Spore, SporePath.GetRealParent(PathDialogs.ProcessSpore()));
+ public static string SporeDataPath = SporePath.GetDataPath(SporePath.Game.Spore);
private ResultType _result = ResultType.ModNotInstalled;
@@ -70,10 +70,11 @@ public XmlInstallerWindow(string modName, bool configure, bool uninstall)
//LauncherSettings.Load();
installerWindows.Add(this);
- if (!Directory.Exists(SporeDataPath))
+ // TODO: do we need to show an error if data folders not found? PathDialogs would've shown a dialog, but could return null, so this code would've continued with a null path
+ /*if (!Directory.Exists(SporeDataPath))
PathDialogs.ProcessSpore();
if (!Directory.Exists(GaDataPath))
- PathDialogs.ProcessGalacticAdventures();
+ PathDialogs.ProcessGalacticAdventures();*/
ModName = modName.Trim('"');
XmlInstallerCancellation.Cancellation.Add(ModName, false);
@@ -151,8 +152,8 @@ private void PrepareInstaller()
{
ModInfoVersion = Version.Parse(Document.SelectSingleNode("/mod").Attributes["installerSystemVersion"].Value);
- if ((ModInfoVersion == new Version(1, 0, 0, 0)) ||
- (ModInfoVersion == new Version(1, 0, 1, 0)) ||
+ if ((ModInfoVersion == new Version(1, 0, 0, 0)) ||
+ (ModInfoVersion == new Version(1, 0, 1, 0)) ||
(ModInfoVersion == new Version(1, 0, 1, 1)) ||
(ModInfoVersion == new Version(1, 0, 1, 2)))
{
@@ -180,7 +181,7 @@ private void PrepareInstaller()
if (Document.SelectSingleNode("/mod").Attributes["mode"].Value == "compatOnly")
_installerMode = 1;
}
- else if ((ModInfoVersion == new Version(1, 0, 1, 0)) ||
+ else if ((ModInfoVersion == new Version(1, 0, 1, 0)) ||
(ModInfoVersion == new Version(1, 0, 1, 1)) ||
(ModInfoVersion == new Version(1, 0, 1, 2)))
{
@@ -209,7 +210,7 @@ private void PrepareInstaller()
throw new Exception("This Mod's installer does not have a Unique Identifier. Please inform the mod's developer of this.");
ModConfiguration[] configs = EasyInstaller.ModList.ModConfigurations.ToArray();
-
+
foreach (ModConfiguration mod in configs)
{
if (mod.Unique == ModUnique)
@@ -619,7 +620,7 @@ private async void StartInstallationButton_Click(object sender, RoutedEventArgs
InstallationCompleteDescriptionTextBlock.Text = "The mod \"" + ModDisplayName + "\" has been installed.";
_installerState = 1;
CollapseButtons();
-
+
var anim = new DoubleAnimation()
{
Duration = _time,
@@ -1311,7 +1312,7 @@ private void XmlInstallerWindow_Closing(object sender, System.ComponentModel.Can
{
if (Directory.Exists(ModConfigPath))
DeleteFolder(ModConfigPath);
-
+
}
XmlInstallerCancellation.Cancellation[ModName] = true;
}
@@ -1331,7 +1332,7 @@ private void XmlInstallerWindow_Closed(object sender, EventArgs e)
if (_isConfigurator)
Environment.Exit((int)_result);
}
-
+
private void SplashBorder_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
DragMove();
@@ -1386,14 +1387,16 @@ public void Remove()
new DirectoryInfo(Directory.GetParent(System.Reflection.Assembly.GetEntryAssembly().Location).ToString()),
new DirectoryInfo(Path.Combine(Directory.GetParent(System.Reflection.Assembly.GetEntryAssembly().Location).ToString(), "mLibs"))
};
- foreach (DirectoryInfo info in infos) {
- List files = info.EnumerateFiles(RemovalFileNames[i]).ToList();
-
- foreach (FileInfo f in files)
+ foreach (DirectoryInfo info in infos)
{
- if (File.Exists(f.FullName))
- File.Delete(f.FullName);
- } }
+ List files = info.EnumerateFiles(RemovalFileNames[i]).ToList();
+
+ foreach (FileInfo f in files)
+ {
+ if (File.Exists(f.FullName))
+ File.Delete(f.FullName);
+ }
+ }
}
}
}
diff --git a/Spore ModAPI Easy Uninstaller/EasyUninstaller.cs b/Spore ModAPI Easy Uninstaller/EasyUninstaller.cs
index f7f0f0a..57ebea9 100644
--- a/Spore ModAPI Easy Uninstaller/EasyUninstaller.cs
+++ b/Spore ModAPI Easy Uninstaller/EasyUninstaller.cs
@@ -1,7 +1,5 @@
using System;
using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
using System.Windows.Forms;
using System.Diagnostics;
@@ -19,10 +17,6 @@ namespace Spore_ModAPI_Easy_Uninstaller
public static class EasyUninstaller
{
- private static string SporeDataPath;
- private static string SporeDataEP1Path;
- private static string DllPath;
-
private static InstalledMods Mods;
private static UninstallerForm Form;
@@ -44,11 +38,8 @@ static void Main()
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
- LauncherSettings.Load();
-
// ensure we find Spore & GA as early as possible
- if (PathDialogs.ProcessSpore() == null ||
- PathDialogs.ProcessGalacticAdventures() == null)
+ if (!SporePath.IsGameInstalled(true))
{
return;
}
@@ -97,11 +88,11 @@ public static void UninstallMods(Dictionary mods)
}
catch (UnauthorizedAccessException)
{
- MessageBox.Show(CommonStrings.UnauthorizedAccess, Strings.CouldNotUninstall, MessageBoxButtons.OK, MessageBoxIcon.Error);
+ SupportInfo.ShowWarning(Strings.UnauthorizedAccess, Strings.CouldNotUninstall, false);
}
catch (Exception ex)
{
- MessageBox.Show(ex.Message, Strings.CouldNotUninstall, MessageBoxButtons.OK, MessageBoxIcon.Error);
+ SupportInfo.ShowWarning(ex.Message, Strings.CouldNotUninstall, false);
}
if (successfulMods.Count > 0)
@@ -122,61 +113,18 @@ public static void UninstallMods(Dictionary mods)
}
}
- private static void CheckSporeDataEP1Path(string modName)
- {
- if (SporeDataEP1Path == null)
- {
- string path = PathDialogs.ProcessGalacticAdventures();
- if (path == null && modName != null)
- {
- throw new Exception(Strings.CouldNotUninstall + " \"" + modName + "\"\n" + CommonStrings.GalacticAdventuresNotFound);
- }
- else
- {
- SporeDataEP1Path = SporePath.MoveToData(SporePath.Game.GalacticAdventures, SporePath.GetRealParent(path));
- }
- }
- }
-
- private static void CheckSporeDataPath(string modName)
- {
- if (SporeDataPath == null)
- {
- string path = PathDialogs.ProcessSpore();
- if (path == null && modName != null)
- {
- throw new Exception(Strings.CouldNotUninstall + " \"" + modName + "\"\n" + CommonStrings.SporeNotFound);
- }
- else
- {
- SporeDataPath = SporePath.MoveToData(SporePath.Game.Spore, SporePath.GetRealParent(path));
- }
- }
- }
-
- private static void CheckDllPath()
- {
- if (DllPath == null)
- {
- DllPath = Directory.GetParent(System.Reflection.Assembly.GetEntryAssembly().Location).ToString();
- }
- }
-
- private static string GetOutputPath(string pathType, string modName)
+ private static string GetOutputPath(string pathType)
{
switch (pathType)
{
case "GalacticAdventures":
- CheckSporeDataEP1Path(modName);
- return SporeDataEP1Path;
+ return SporePath.GetDataPath(SporePath.Game.GalacticAdventures);
case "Spore":
- CheckSporeDataPath(modName);
- return SporeDataPath;
+ return SporePath.GetDataPath(SporePath.Game.Spore);
case "None":
- CheckDllPath();
- return DllPath;
+ return Directory.GetParent(System.Reflection.Assembly.GetEntryAssembly().Location).ToString();
default:
return null;
@@ -188,19 +136,21 @@ private static void RemoveModFiles(ModConfiguration mod)
{
foreach (InstalledFile file in mod.InstalledFiles)
{
- string outputPath = GetOutputPath(file.PathType, mod.Name);
+ string outputPath = GetOutputPath(file.PathType);
- if (outputPath != null)
+ if (outputPath == null)
{
- string outputFile = Path.Combine(outputPath, file.Name);
- string outputFile2 = Path.Combine(outputPath, "mLibs", file.Name);
- if (File.Exists(outputFile))
- File.Delete(outputFile);
- if (File.Exists(outputFile2)) //if ((file.Name.Contains("-disk") || file.Name.Contains("-steam") || file.Name.Contains("-steam_patched")))
- File.Delete(outputFile2);
+ throw new Exception(Strings.CouldNotUninstall + " \"" + mod.Name + "\"\n" + CommonStrings.GameNotFound);
}
+
+ string outputFile = Path.Combine(outputPath, file.Name);
+ string outputFile2 = Path.Combine(outputPath, "mLibs", file.Name);
+ if (File.Exists(outputFile))
+ File.Delete(outputFile);
+ if (File.Exists(outputFile2)) //if ((file.Name.Contains("-disk") || file.Name.Contains("-steam") || file.Name.Contains("-steam_patched")))
+ File.Delete(outputFile2);
}
-
+
string modConfigPath = Path.Combine(Directory.GetParent(System.Reflection.Assembly.GetEntryAssembly().Location).ToString(), "ModConfigs", mod.Name);
if (Directory.Exists(modConfigPath))
Directory.Delete(modConfigPath, true);
diff --git a/Spore ModAPI Easy Uninstaller/Strings.Designer.cs b/Spore ModAPI Easy Uninstaller/Strings.Designer.cs
index 7dfb0ac..89c23c4 100644
--- a/Spore ModAPI Easy Uninstaller/Strings.Designer.cs
+++ b/Spore ModAPI Easy Uninstaller/Strings.Designer.cs
@@ -19,7 +19,7 @@ namespace Spore_ModAPI_Easy_Uninstaller {
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "18.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Strings {
@@ -61,7 +61,7 @@ internal Strings() {
}
///
- /// Looks up a localized string similar to Are you sure you want to uninstall the selected mods and all their components?.
+ /// Looks up a localized string similar to Are you sure you want to uninstall the selected mods and all of their components?.
///
internal static string AreYouSure {
get {
@@ -106,7 +106,7 @@ internal static string ConfirmationNeeded {
}
///
- /// Looks up a localized string similar to Error, could not uninstall mod.
+ /// Looks up a localized string similar to Could not uninstall mod.
///
internal static string CouldNotUninstall {
get {
@@ -124,7 +124,7 @@ internal static string InstalledMods {
}
///
- /// Looks up a localized string similar to The following mods were uninstalled successfully:.
+ /// Looks up a localized string similar to The following mods were uninstalled:.
///
internal static string ModsWereUninstalled {
get {
@@ -132,6 +132,15 @@ internal static string ModsWereUninstalled {
}
}
+ ///
+ /// Looks up a localized string similar to The Easy Uninstaller does not currently have permission to uninstall or change mods. You may need to right-click the Easy Uninstaller and "Run as Administrator"..
+ ///
+ internal static string UnauthorizedAccess {
+ get {
+ return ResourceManager.GetString("UnauthorizedAccess", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Uninstallation successful.
///
diff --git a/Spore ModAPI Easy Uninstaller/Strings.resx b/Spore ModAPI Easy Uninstaller/Strings.resx
index e286cb3..89895d9 100644
--- a/Spore ModAPI Easy Uninstaller/Strings.resx
+++ b/Spore ModAPI Easy Uninstaller/Strings.resx
@@ -118,7 +118,7 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- Are you sure you want to uninstall the selected mods and all their components?
+ Are you sure you want to uninstall the selected mods and all of their components?
Cancel
@@ -133,13 +133,16 @@
Confirmation needed
- Error, could not uninstall mod
+ Could not uninstall mod
Installed Mods
- The following mods were uninstalled successfully:
+ The following mods were uninstalled:
+
+
+ The Easy Uninstaller does not currently have permission to uninstall or change mods. You may need to right-click the Easy Uninstaller and "Run as Administrator".
Uninstallation successful
diff --git a/Spore ModAPI Easy Uninstaller/UninstallerForm.Designer.cs b/Spore ModAPI Easy Uninstaller/UninstallerForm.Designer.cs
index f21f126..6ebf486 100644
--- a/Spore ModAPI Easy Uninstaller/UninstallerForm.Designer.cs
+++ b/Spore ModAPI Easy Uninstaller/UninstallerForm.Designer.cs
@@ -35,11 +35,11 @@ private void InitializeComponent()
this.btnCancel = new System.Windows.Forms.Button();
this.btnUninstall = new System.Windows.Forms.Button();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
- this.label2 = new System.Windows.Forms.Label();
this.MainColumn = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.ModNames = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ModDisplayNames = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ModConfiguration = new System.Windows.Forms.DataGridViewCheckBoxColumn();
+ this.label2 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.SuspendLayout();
//
@@ -47,18 +47,20 @@ private void InitializeComponent()
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label1.Location = new System.Drawing.Point(13, 13);
+ this.label1.Location = new System.Drawing.Point(17, 16);
+ this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(278, 18);
+ this.label1.Size = new System.Drawing.Size(349, 24);
this.label1.TabIndex = 0;
this.label1.Text = "Choose the mod(s) you want to uninstall:";
//
// btnCancel
//
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.btnCancel.Location = new System.Drawing.Point(405, 377);
+ this.btnCancel.Location = new System.Drawing.Point(540, 464);
+ this.btnCancel.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btnCancel.Name = "btnCancel";
- this.btnCancel.Size = new System.Drawing.Size(75, 23);
+ this.btnCancel.Size = new System.Drawing.Size(100, 28);
this.btnCancel.TabIndex = 1;
this.btnCancel.Text = "Cancel";
this.btnCancel.UseVisualStyleBackColor = true;
@@ -67,9 +69,10 @@ private void InitializeComponent()
// btnUninstall
//
this.btnUninstall.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
- this.btnUninstall.Location = new System.Drawing.Point(239, 377);
+ this.btnUninstall.Location = new System.Drawing.Point(319, 464);
+ this.btnUninstall.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btnUninstall.Name = "btnUninstall";
- this.btnUninstall.Size = new System.Drawing.Size(160, 23);
+ this.btnUninstall.Size = new System.Drawing.Size(213, 28);
this.btnUninstall.TabIndex = 2;
this.btnUninstall.Text = "Uninstall";
this.btnUninstall.UseVisualStyleBackColor = true;
@@ -107,27 +110,20 @@ private void InitializeComponent()
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dataGridView1.DefaultCellStyle = dataGridViewCellStyle2;
- this.dataGridView1.Location = new System.Drawing.Point(13, 50);
+ this.dataGridView1.Location = new System.Drawing.Point(17, 62);
+ this.dataGridView1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.RowHeadersVisible = false;
+ this.dataGridView1.RowHeadersWidth = 51;
this.dataGridView1.RowTemplate.Height = 30;
this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
- this.dataGridView1.Size = new System.Drawing.Size(464, 311);
+ this.dataGridView1.Size = new System.Drawing.Size(619, 383);
this.dataGridView1.TabIndex = 5;
//
- // label2
- //
- this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.label2.AutoSize = true;
- this.label2.Location = new System.Drawing.Point(10, 382);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(45, 13);
- this.label2.TabIndex = 6;
- this.label2.Text = "Version ";
- //
// MainColumn
//
this.MainColumn.HeaderText = "Uninstall";
+ this.MainColumn.MinimumWidth = 6;
this.MainColumn.Name = "MainColumn";
this.MainColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.MainColumn.Width = 30;
@@ -147,26 +143,41 @@ private void InitializeComponent()
this.ModDisplayNames.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.ModDisplayNames.DataPropertyName = "DisplayName";
this.ModDisplayNames.HeaderText = "Mod Display Names";
+ this.ModDisplayNames.MinimumWidth = 6;
this.ModDisplayNames.Name = "ModDisplayNames";
this.ModDisplayNames.ReadOnly = true;
//
// ModConfiguration
//
this.ModConfiguration.HeaderText = "Mod Configuration";
+ this.ModConfiguration.MinimumWidth = 6;
this.ModConfiguration.Name = "ModConfiguration";
this.ModConfiguration.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+ this.ModConfiguration.Width = 125;
+ //
+ // label2
+ //
+ this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+ this.label2.AutoSize = true;
+ this.label2.Location = new System.Drawing.Point(18, 449);
+ this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(56, 16);
+ this.label2.TabIndex = 6;
+ this.label2.Text = "Version ";
//
// UninstallerForm
//
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(492, 412);
+ this.ClientSize = new System.Drawing.Size(656, 507);
this.Controls.Add(this.label2);
this.Controls.Add(this.dataGridView1);
this.Controls.Add(this.btnUninstall);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.label1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
+ this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.Name = "UninstallerForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Spore ModAPI Easy Uninstaller";
diff --git a/Spore ModAPI Easy Uninstaller/UninstallerForm.cs b/Spore ModAPI Easy Uninstaller/UninstallerForm.cs
index e3c7242..98cd733 100644
--- a/Spore ModAPI Easy Uninstaller/UninstallerForm.cs
+++ b/Spore ModAPI Easy Uninstaller/UninstallerForm.cs
@@ -31,7 +31,7 @@ public UninstallerForm()
this.btnCancel.Text = Strings.Cancel;
this.btnUninstall.Text = Strings.UninstallSelected + " (0)";
this.btnUninstall.Enabled = false;
- this.label2.Text = "Spore ModAPI Launcher Kit Version " + UpdateManager.CurrentVersion.ToString() + "\nDLLs Build " + UpdateManager.CurrentDllsBuild;
+ this.label2.Text = $"Spore {SupportInfo.GameFullVersionInfoString}\nLauncher Kit version {SupportInfo.LauncherKitVersionString}\nModAPI DLLs version {SupportInfo.ModAPIDllsVersionString}";
this.BringToFront();
}
@@ -229,7 +229,7 @@ private void ExecuteConfigurator(ModConfiguration mod)
}
catch (Exception ex)
{
- MessageBox.Show(this, ex.Message, CommonStrings.Error, MessageBoxButtons.OK, MessageBoxIcon.Error);
+ MessageBox.Show(this, ex.Message, "Easy Uninstaller Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
diff --git a/Spore ModAPI Launcher/Program.cs b/Spore ModAPI Launcher/Program.cs
index 3b276ba..47e897b 100644
--- a/Spore ModAPI Launcher/Program.cs
+++ b/Spore ModAPI Launcher/Program.cs
@@ -21,7 +21,6 @@ namespace SporeModAPI_Launcher
class Program
{
private const string ModAPIFixDownloadURL = "https://davoonline.com/sporemodder/emd4600/SporeApp_ModAPIFix.zip";
- private const string ModApiHelpThreadURL = "https://launcherkit.sporecommunity.com/support";
private string SporebinPath;
private string ExecutablePath;
@@ -42,7 +41,7 @@ static void Main()
if (Permissions.IsAdministrator())
{
proceed = false;
- if (MessageBox.Show("For security reasons, explicitly running the Spore ModAPI Launcher as Administrator (by right-clicking and selecting \"Run as Administrator\") is not recommended. Doing so will also prevent you from being able to load creations into Spore by dragging their PNGs into the game window. Are you sure you want to proceed?", String.Empty, MessageBoxButtons.YesNo) == DialogResult.Yes)
+ if (SupportInfo.ShowWarning(Strings.RunAsAdminWarning, String.Empty, true, false, MessageBoxButtons.YesNo) == DialogResult.Yes)
proceed = true;
}
@@ -50,11 +49,9 @@ static void Main()
{
UpdateManager.CheckForUpdates();
Application.EnableVisualStyles();
- LauncherSettings.Load();
// ensure we find Spore & GA as early as possible
- if (PathDialogs.ProcessSpore() == null ||
- PathDialogs.ProcessGalacticAdventures() == null)
+ if (!SporePath.IsGameInstalled(true))
{
return;
}
@@ -78,7 +75,7 @@ void Execute()
// Before, we used Steam to launch the game and tried to find the new process and inject it.
// However, when the injection happens the game already executed a bit, so mods fail.
// Instead, we create a steam_appid.txt that allows us to execute SporeApp.exe directly
- SporebinPath = PathDialogs.ProcessGalacticAdventures();
+ SporebinPath = SporePath.GetSporebinEP1Path();
// use the default path for now (we might have to use a different one for Origin)
this.ExecutablePath = Path.Combine(this.SporebinPath, "SporeApp.exe");
@@ -87,7 +84,7 @@ void Execute()
// ensure we have detected a valid game version
if (this.ExecutableType == GameVersionType.None)
{
- MessageBox.Show(Strings.UnsupportedSporeVersion, Strings.UnsupportedSporeVersionTitle);
+ SupportInfo.ShowError(Strings.UnsupportedSporeVersion, Strings.UnsupportedSporeVersionTitle);
return;
}
@@ -102,7 +99,7 @@ void Execute()
if (fileVersionInfo.InternalName == originalFileName ||
fileVersionInfo.OriginalFilename == originalFileName)
{
- MessageBox.Show(Strings.SporeModLoaderDetected.Replace("$PATH$", sporeModLoaderPath), Strings.SporeModLoaderDetectedTitle, MessageBoxButtons.OK, MessageBoxIcon.Error);
+ SupportInfo.ShowWarning(Strings.SporeModLoaderDetected.Replace("$PATH$", sporeModLoaderPath), Strings.SporeModLoaderDetectedTitle);
return;
}
}
@@ -112,6 +109,12 @@ void Execute()
// ignore exception, SporeModLoader is likely not installed
}
+ // Check if LAA was used on incompatible game version
+ if(!GameVersion.IsLAACompatible(this.ExecutableType) && LAAUtils.IsLAA(this.ExecutablePath))
+ {
+ SupportInfo.ShowWarning(Strings.LAAUnsupported, Strings.LAAUnsupportedTitle);
+ }
+
// get the correct executable path
this.ExecutablePath = Path.Combine(this.SporebinPath, GameVersion.GetExecutableFileName(this.ExecutableType));
if (!File.Exists(this.ExecutablePath))
@@ -126,10 +129,10 @@ void Execute()
}
else
{
- throw new Exception(CommonStrings.GalacticAdventuresNotFound);
+ throw new Exception(CommonStrings.GameNotFound);
}
}
-
+
// we must also check if the steam_api.dll doesn't exist (it's required for Origin users)
if (GameVersion.RequiresModAPIFix(this.ExecutableType) && !File.Exists(Path.Combine(this.SporebinPath, "steam_api.dll")))
@@ -152,7 +155,7 @@ void Execute()
}
catch
{
- MessageBox.Show(Strings.CannotApplySteamFix.Replace("$PATH$", this.SporebinPath), Strings.CannotApplySteamFixTitle, MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ SupportInfo.ShowWarning(Strings.CompatibilityFixErrorSteam.Replace("$PATH$", this.SporebinPath), Strings.CompatibilityFixErrorTitle);
}
}
}
@@ -164,15 +167,10 @@ void Execute()
ShowError(ex);
}
}
-
+
public void ShowError(Exception ex)
{
- string versionInfo = "Launcher Kit version: " + UpdateManager.CurrentVersion + "\nModAPI DLLs version: " + UpdateManager.CurrentDllsBuild + "\nLauncher Kit path: " + Assembly.GetEntryAssembly().Location;
- if (this.ExecutablePath != null && File.Exists(this.ExecutablePath))
- {
- versionInfo += "\n\nSpore version: " + FileVersionInfo.GetVersionInfo(this.ExecutablePath).FileVersion + " - " + this.ExecutableType + "\nSpore path: " + this.ExecutablePath;
- }
- MessageBox.Show(Strings.GalacticAdventuresNotExecuted + "\n" + ModApiHelpThreadURL + "\n\n" + ex.GetType() + "\n\n" + ex.Message + "\n\n" + ex.StackTrace + "\n\n" + versionInfo, CommonStrings.Error, MessageBoxButtons.OK, MessageBoxIcon.Error);
+ SupportInfo.ShowError(Strings.GameNotExecuted + "\n\n" + ex.GetType() + "\n" + ex.Message + "\n\n" + ex.StackTrace, Strings.LauncherError);
if (ex is Win32Exception)
{
var exc = ex as Win32Exception;
@@ -193,12 +191,12 @@ string[] GetDLLsToInject(string dllEnding)
//coreLibs and mLibs
string coreLibsPath = Path.Combine(this.LauncherKitPath, "coreLibs");
- string mLibsPath = Path.Combine(this.LauncherKitPath, "mLibs");
+ string mLibsPath = Path.Combine(this.LauncherKitPath, "mLibs");
if (!Directory.Exists(mLibsPath))
Directory.CreateDirectory(mLibsPath);
- const string coreLibFile = "SporeModAPI.lib";
+ const string coreLibFile = "SporeModAPI.lib";
string coreLibPath = Path.Combine(coreLibsPath, coreLibFile);
string coreLegacyDllName = "SporeModAPI-" + dllEnding + ".dll";
string coreLegacyDllPath = Path.Combine(this.LauncherKitPath, coreLegacyDllName);
@@ -221,7 +219,7 @@ string[] GetDLLsToInject(string dllEnding)
dlls.Add(coreLegacyDllPath);
foreach (string file in Directory.EnumerateFiles(mLibsPath)
- .Where(x =>
+ .Where(x =>
{
x = x.ToLowerInvariant();
return x.EndsWith(".dll") && x != coreDllOutPath.ToLowerInvariant();
@@ -296,7 +294,7 @@ void CreateSporeProcess()
}
if (!NativeMethods.CreateProcess(null, "\"" + this.ExecutablePath + "\" " + sb,
- IntPtr.Zero, IntPtr.Zero, false, NativeTypes.ProcessCreationFlags.CREATE_SUSPENDED, IntPtr.Zero,
+ IntPtr.Zero, IntPtr.Zero, false, NativeTypes.ProcessCreationFlags.CREATE_SUSPENDED, IntPtr.Zero,
this.SporebinPath, ref this.StartupInfo, out this.ProcessInfo))
{
ThrowWin32Exception(Strings.ProcessNotStarted);
@@ -313,7 +311,7 @@ void ResumeSporeProcess()
bool HandleOriginUsers()
{
- if (MessageBox.Show(Strings.DownloadOriginFix, Strings.FileNeeded, MessageBoxButtons.OKCancel) == DialogResult.OK)
+ if (SupportInfo.ShowInfo(Strings.CompatibilityFixDownload, Strings.CompatibilityFixDownloadTitle, true, false, MessageBoxButtons.YesNo) == DialogResult.Yes)
{
return ShowDownloadFixDialog(this.SporebinPath);
}
@@ -332,7 +330,7 @@ static bool ShowDownloadFixDialog(string outputPath)
Thread thread = new Thread(() =>
{
- var dialog = new ProgressDialog(Strings.DownloadFixTitle, Strings.DownloadFixTitle, (s, e) =>
+ var dialog = new ProgressDialog(Strings.CompatibilityFixDownloadTitle, Strings.CompatibilityFixDownloadTitle, (s, e) =>
{
try
{
@@ -353,7 +351,7 @@ static bool ShowDownloadFixDialog(string outputPath)
}
catch (Exception ex)
{
- MessageBox.Show(ex.ToString(), "Failed to download or extract ModAPI Fix");
+ SupportInfo.ShowError(Strings.CompatibilityFixErrorEA + "\n\n" + ex.ToString(), Strings.CompatibilityFixErrorTitle);
result = false;
}
});
@@ -384,7 +382,7 @@ static bool ExtractFixFiles(MemoryStream zipStream, string outputPath)
}
catch (System.UnauthorizedAccessException)
{
- MessageBox.Show(CommonStrings.UnauthorizedAccess, CommonStrings.UnauthorizedAccessTitle, MessageBoxButtons.OK, MessageBoxIcon.Error);
+ SupportInfo.ShowError(Strings.CompatibilityFixErrorEA, Strings.CompatibilityFixErrorTitle);
return false;
}
}
diff --git a/Spore ModAPI Launcher/Strings.resx b/Spore ModAPI Launcher/Strings.resx
index daef9d6..75a0bed 100644
--- a/Spore ModAPI Launcher/Strings.resx
+++ b/Spore ModAPI Launcher/Strings.resx
@@ -117,17 +117,16 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
- Downloading ModAPI Fix
+
+ Downloading compatibility fix
-
- EA App and Origin users need to download an additional file in order for mods to work. If you press OK, the launcher will download and apply this additional file.
+
+ The Launcher Kit needs to download a compatibility fix for your current game version. Do you want to continue?
-
- File needed
-
-
- Something went wrong while starting or injecting your mods into Spore. The game may start, but some mods will not work correctly. Please report the issue, along with a screenshot of this error, using the instructions at the following website:
+
+ Something went wrong while starting or loading your mods into Spore. The game may start, but some mods will not work correctly.
+
+Please see https://launcherkit.sporecommunity.com/support for further help.
Process thread could not be resumed.
@@ -135,30 +134,65 @@
Could not start process.
-
- Could not apply the Steam fix. To apply it, you can do one of these two options:
- - Re-execute the Launcher with Administrator Privileges.
+
+ The Launcher Kit could not apply a Steam compatibility fix. To apply it, you can do one of these two options:
+ - Right click the Spore ModAPI Launcher and "Run as Administrator" once, to allow the fix to be applied, then exit the game and run it normally
or
- Create a file called 'steam_appid.txt', with the numbers '17390' inside, in the folder $PATH$
-
- Could not apply the Steam fix
+
+ Could not apply compatibility fix
- SporeModLoader has been detected, running the Launcher Kit alongside SporeModLoader is unsupported.
+ SporeModLoader has been detected. Running the Launcher Kit alongside SporeModLoader is unsupported.
You have the the following options:
- Remove SporeModLoader to use the Launcher Kit by removing $PATH$
-- Use SporeModLoader instead of the Launcher Kit
-
+- Use SporeModLoader instead of the Launcher Kit
SporeModLoader detected
- Your current Spore game version is not compatible with this Launcher Kit version. If you downloaded the game from EA App, Steam, or GOG, please update to version 3.1.0.29 to proceed. If you're using a higher version of Spore, please see https://launcherkit.sporecommunity.com/support.
+ Your current Spore game version is not compatible with this Launcher Kit version.
+
+Both Spore and Spore Galactic Adventures must be installed from disc, EA App, Steam, or GOG.
+
+If you downloaded the game from EA App, Steam, or GOG, please ensure the game is up-to-date.
+
+Please see https://launcherkit.sporecommunity.com/support for further help.
Unsupported Spore version
+
+ Running the Spore ModAPI Launcher as Administrator (by right-clicking and selecting "Run as Administrator") is not recommended.
+
+This can be a security risk and can also cause problems with game functionality. You may be unable to load creations into Spore by dragging their PNGs into the game window.
+
+Are you sure you want to continue?
+
+
+ Spore ModAPI Launcher Error
+
+
+ The Launcher Kit could not apply an EA App compatibility fix. Please try the following:
+- Ensure you have a stable internet connection
+ - Right click the Spore ModAPI Launcher and "Run as Administrator" once, to allow the fix to be applied, then exit the game and run it normally
+
+
+ Your current game version is not compatible with the LAA/4GB patch. The game may not launch.
+
+You can do one of the following:
+- Downgrade to a game version that is compatible with the LAA/4GB patch
+- Remove the LAA/4GB patch using the same tool used to apply it
+- Remove the LAA/4GB patch by verifying the game files for Spore Galactic Adventures
+
+The LAA/4GB patch is not required to use mods, but may help improve game stability.
+
+Please see https://launcherkit.sporecommunity.com/support for further help.
+
+
+ LAA/4GB Patch Incompatible
+
\ No newline at end of file
diff --git a/Spore ModAPI Launcher/Strings1.Designer.cs b/Spore ModAPI Launcher/Strings1.Designer.cs
index e4dd869..f90b0c2 100644
--- a/Spore ModAPI Launcher/Strings1.Designer.cs
+++ b/Spore ModAPI Launcher/Strings1.Designer.cs
@@ -19,7 +19,7 @@ namespace SporeModAPI_Launcher {
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "18.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class Strings {
@@ -61,59 +61,99 @@ internal Strings() {
}
///
- /// Looks up a localized string similar to Could not apply the Steam fix. To apply it, you can do one of these two options:
- /// - Re-execute the Launcher with Administrator Privileges.
+ /// Looks up a localized string similar to The Launcher Kit needs to download a compatibility fix for your current game version. Do you want to continue?.
+ ///
+ public static string CompatibilityFixDownload {
+ get {
+ return ResourceManager.GetString("CompatibilityFixDownload", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Downloading compatibility fix.
+ ///
+ public static string CompatibilityFixDownloadTitle {
+ get {
+ return ResourceManager.GetString("CompatibilityFixDownloadTitle", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The Launcher Kit could not apply an EA App compatibility fix. Please try the following:
+ ///- Ensure you have a stable internet connection
+ /// - Right click the Spore ModAPI Launcher and "Run as Administrator" once, to allow the fix to be applied, then exit the game and run it normally.
+ ///
+ public static string CompatibilityFixErrorEA {
+ get {
+ return ResourceManager.GetString("CompatibilityFixErrorEA", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The Launcher Kit could not apply a Steam compatibility fix. To apply it, you can do one of these two options:
+ /// - Right click the Spore ModAPI Launcher and "Run as Administrator" once, to allow the fix to be applied, then exit the game and run it normally
///or
/// - Create a file called 'steam_appid.txt', with the numbers '17390' inside, in the folder $PATH$.
///
- public static string CannotApplySteamFix {
+ public static string CompatibilityFixErrorSteam {
get {
- return ResourceManager.GetString("CannotApplySteamFix", resourceCulture);
+ return ResourceManager.GetString("CompatibilityFixErrorSteam", resourceCulture);
}
}
///
- /// Looks up a localized string similar to Could not apply the Steam fix.
+ /// Looks up a localized string similar to Could not apply compatibility fix.
///
- public static string CannotApplySteamFixTitle {
+ public static string CompatibilityFixErrorTitle {
get {
- return ResourceManager.GetString("CannotApplySteamFixTitle", resourceCulture);
+ return ResourceManager.GetString("CompatibilityFixErrorTitle", resourceCulture);
}
}
///
- /// Looks up a localized string similar to Downloading ModAPI Fix.
+ /// Looks up a localized string similar to Something went wrong while starting or loading your mods into Spore. The game may start, but some mods will not work correctly.
+ ///
+ ///Please see https://launcherkit.sporecommunity.com/support for further help..
///
- public static string DownloadFixTitle {
+ public static string GameNotExecuted {
get {
- return ResourceManager.GetString("DownloadFixTitle", resourceCulture);
+ return ResourceManager.GetString("GameNotExecuted", resourceCulture);
}
}
///
- /// Looks up a localized string similar to EA App and Origin users need to download an additional file in order for mods to work. If you press OK, the launcher will download and apply this additional file..
+ /// Looks up a localized string similar to Your current game version is not compatible with the LAA/4GB patch. The game may not launch.
+ ///
+ ///You can do one of the following:
+ ///- Downgrade to a game version that is compatible with the LAA/4GB patch
+ ///- Remove the LAA/4GB patch using the same tool used to apply it
+ ///- Remove the LAA/4GB patch by verifying the game files for Spore Galactic Adventures
+ ///
+ ///The LAA/4GB patch is not required to use mods, but may help improve game stability.
+ ///
+ ///Please see https://launcherkit.sporecommunity.com/support for further [rest of string was truncated]";.
///
- public static string DownloadOriginFix {
+ public static string LAAUnsupported {
get {
- return ResourceManager.GetString("DownloadOriginFix", resourceCulture);
+ return ResourceManager.GetString("LAAUnsupported", resourceCulture);
}
}
///
- /// Looks up a localized string similar to File needed.
+ /// Looks up a localized string similar to LAA/4GB Patch Incompatible.
///
- public static string FileNeeded {
+ public static string LAAUnsupportedTitle {
get {
- return ResourceManager.GetString("FileNeeded", resourceCulture);
+ return ResourceManager.GetString("LAAUnsupportedTitle", resourceCulture);
}
}
///
- /// Looks up a localized string similar to Something went wrong while starting or injecting your mods into Spore. The game may start, but some mods will not work correctly. Please report the issue, along with a screenshot of this error, using the instructions at the following website:.
+ /// Looks up a localized string similar to Spore ModAPI Launcher Error.
///
- public static string GalacticAdventuresNotExecuted {
+ public static string LauncherError {
get {
- return ResourceManager.GetString("GalacticAdventuresNotExecuted", resourceCulture);
+ return ResourceManager.GetString("LauncherError", resourceCulture);
}
}
@@ -136,12 +176,24 @@ public static string ProcessNotStarted {
}
///
- /// Looks up a localized string similar to SporeModLoader has been detected, running the Launcher Kit alongside SporeModLoader is unsupported.
+ /// Looks up a localized string similar to Running the Spore ModAPI Launcher as Administrator (by right-clicking and selecting "Run as Administrator") is not recommended.
+ ///
+ ///This can be a security risk and can also cause problems with game functionality. You may be unable to load creations into Spore by dragging their PNGs into the game window.
+ ///
+ ///Are you sure you want to continue?.
+ ///
+ public static string RunAsAdminWarning {
+ get {
+ return ResourceManager.GetString("RunAsAdminWarning", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to SporeModLoader has been detected. Running the Launcher Kit alongside SporeModLoader is unsupported.
///
///You have the the following options:
///- Remove SporeModLoader to use the Launcher Kit by removing $PATH$
- ///- Use SporeModLoader instead of the Launcher Kit
- ///.
+ ///- Use SporeModLoader instead of the Launcher Kit.
///
public static string SporeModLoaderDetected {
get {
@@ -159,7 +211,13 @@ public static string SporeModLoaderDetectedTitle {
}
///
- /// Looks up a localized string similar to Your current Spore game version is not compatible with this Launcher Kit version. If you downloaded the game from EA App, Steam, or GOG, please update to version 3.1.0.29 to proceed. If you're using a higher version of Spore, please see https://launcherkit.sporecommunity.com/support..
+ /// Looks up a localized string similar to Your current Spore game version is not compatible with this Launcher Kit version.
+ ///
+ ///Both Spore and Spore Galactic Adventures must be installed from disc, EA App, Steam, or GOG.
+ ///
+ ///If you downloaded the game from EA App, Steam, or GOG, please ensure the game is up-to-date.
+ ///
+ ///Please see https://launcherkit.sporecommunity.com/support for further help..
///
public static string UnsupportedSporeVersion {
get {