summaryrefslogtreecommitdiff
path: root/src/SMAPI.Installer/Framework/InstallerPaths.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI.Installer/Framework/InstallerPaths.cs')
-rw-r--r--src/SMAPI.Installer/Framework/InstallerPaths.cs44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/SMAPI.Installer/Framework/InstallerPaths.cs b/src/SMAPI.Installer/Framework/InstallerPaths.cs
index 6ba5fa5f..0976eceb 100644
--- a/src/SMAPI.Installer/Framework/InstallerPaths.cs
+++ b/src/SMAPI.Installer/Framework/InstallerPaths.cs
@@ -1,4 +1,5 @@
using System.IO;
+using StardewModdingAPI.Toolkit.Framework;
namespace StardewModdingAPI.Installer.Framework
{
@@ -44,17 +45,20 @@ namespace StardewModdingAPI.Installer.Framework
/// <summary>The full path to the user's config overrides file.</summary>
public string ApiUserConfigPath { get; }
- /// <summary>The full path to the installed game executable file.</summary>
- public string ExecutablePath { get; private set; }
+ /// <summary>The full path to the installed game DLL.</summary>
+ public string GameDllPath { get; }
- /// <summary>The full path to the vanilla game launcher on Linux/macOS.</summary>
- public string UnixLauncherPath { get; }
+ /// <summary>The full path to the installed SMAPI executable file.</summary>
+ public string UnixSmapiExecutablePath { get; }
- /// <summary>The full path to the installed SMAPI launcher on Linux/macOS before it's renamed.</summary>
- public string UnixSmapiLauncherPath { get; }
+ /// <summary>The full path to the vanilla game launch script on Linux/macOS.</summary>
+ public string VanillaLaunchScriptPath { get; }
- /// <summary>The full path to the vanilla game launcher on Linux/macOS after SMAPI is installed.</summary>
- public string UnixBackupLauncherPath { get; }
+ /// <summary>The full path to the installed SMAPI launch script on Linux/macOS before it's renamed.</summary>
+ public string NewLaunchScriptPath { get; }
+
+ /// <summary>The full path to the backed up game launch script on Linux/macOS after SMAPI is installed.</summary>
+ public string BackupLaunchScriptPath { get; }
/*********
@@ -63,28 +67,24 @@ namespace StardewModdingAPI.Installer.Framework
/// <summary>Construct an instance.</summary>
/// <param name="bundleDir">The directory path containing the files to copy into the game folder.</param>
/// <param name="gameDir">The directory path for the installed game.</param>
- /// <param name="gameExecutableName">The name of the game's executable file for the current platform.</param>
- public InstallerPaths(DirectoryInfo bundleDir, DirectoryInfo gameDir, string gameExecutableName)
+ public InstallerPaths(DirectoryInfo bundleDir, DirectoryInfo gameDir)
{
+ // base paths
this.BundleDir = bundleDir;
this.GameDir = gameDir;
this.ModsDir = new DirectoryInfo(Path.Combine(gameDir.FullName, "Mods"));
+ this.GameDllPath = Path.Combine(gameDir.FullName, Constants.GameDllName);
- this.BundleApiUserConfigPath = Path.Combine(bundleDir.FullName, "smapi-internal", "config.user.json");
+ // launch scripts
+ this.VanillaLaunchScriptPath = Path.Combine(gameDir.FullName, "StardewValley");
+ this.NewLaunchScriptPath = Path.Combine(gameDir.FullName, "unix-launcher.sh");
+ this.BackupLaunchScriptPath = Path.Combine(gameDir.FullName, "StardewValley-original");
+ this.UnixSmapiExecutablePath = Path.Combine(gameDir.FullName, "StardewModdingAPI");
- this.ExecutablePath = Path.Combine(gameDir.FullName, gameExecutableName);
- this.UnixLauncherPath = Path.Combine(gameDir.FullName, "StardewValley");
- this.UnixSmapiLauncherPath = Path.Combine(gameDir.FullName, "StardewModdingAPI");
- this.UnixBackupLauncherPath = Path.Combine(gameDir.FullName, "StardewValley-original");
+ // internal files
+ this.BundleApiUserConfigPath = Path.Combine(bundleDir.FullName, "smapi-internal", "config.user.json");
this.ApiConfigPath = Path.Combine(gameDir.FullName, "smapi-internal", "config.json");
this.ApiUserConfigPath = Path.Combine(gameDir.FullName, "smapi-internal", "config.user.json");
}
-
- /// <summary>Override the filename for the <see cref="ExecutablePath"/>.</summary>
- /// <param name="filename">the file name.</param>
- public void SetExecutableFileName(string filename)
- {
- this.ExecutablePath = Path.Combine(this.GamePath, filename);
- }
}
}