diff --git a/Knossos.NET/Classes/Knossos.cs b/Knossos.NET/Classes/Knossos.cs
index dd800c15..9ec507c3 100644
--- a/Knossos.NET/Classes/Knossos.cs
+++ b/Knossos.NET/Classes/Knossos.cs
@@ -152,8 +152,10 @@ private static async Task QuickLaunch()
string[] args = Environment.GetCommandLineArgs();
string modid = string.Empty;
string modver = string.Empty;
+ string modExecType = string.Empty;
bool saveID = false;
bool saveVer = false;
+ bool saveExecType = false;
foreach (var arg in args)
{
@@ -168,6 +170,11 @@ private static async Task QuickLaunch()
saveVer = false;
modver = arg;
}
+ if (saveExecType)
+ {
+ saveExecType = false;
+ modExecType = arg;
+ }
if (arg.ToLower() == "-playmod")
{
saveID = true;
@@ -176,16 +183,31 @@ private static async Task QuickLaunch()
{
saveVer = true;
}
+ if (arg.ToLower() == "-exec")
+ {
+ saveExecType = true;
+ }
}
if(modid != string.Empty)
{
- if(modver != string.Empty)
+ var execType = FsoExecType.Release;
+ if (modExecType != string.Empty && modExecType.ToLower() != "default")
+ {
+ execType = FsoBuild.GetExecType(modExecType);
+ if(execType == FsoExecType.Unknown)
+ {
+ Log.Add(Log.LogSeverity.Error, "Knossos.QuickLaunch", "Quick launch was used but the exec type used was invalid, reverted to Release. Used exec type: " + modExecType);
+ execType = FsoExecType.Release;
+ }
+ }
+ if (modver != string.Empty)
{
var mod = GetInstalledMod(modid, modver);
+
if(mod != null)
{
- PlayMod(mod, FsoExecType.Release);
+ PlayMod(mod, execType);
}
else
{
@@ -195,7 +217,7 @@ private static async Task QuickLaunch()
else
{
var modlist = GetInstalledModList(modid);
- if(modlist != null && modlist.Count() > 0)
+ if (modlist != null && modlist.Count() > 0)
{
Mod? mod = null;
if (modlist.Count() > 1)
@@ -215,7 +237,7 @@ private static async Task QuickLaunch()
if(mod != null)
{
- PlayMod(mod, FsoExecType.Release);
+ PlayMod(mod, execType);
}
}
else
diff --git a/Knossos.NET/ViewModels/Windows/ModSettingsViewModel.cs b/Knossos.NET/ViewModels/Windows/ModSettingsViewModel.cs
index ad9fb76c..803e9333 100644
--- a/Knossos.NET/ViewModels/Windows/ModSettingsViewModel.cs
+++ b/Knossos.NET/ViewModels/Windows/ModSettingsViewModel.cs
@@ -67,11 +67,11 @@ public ModSettingsViewModel(Mod modJson, ModCardViewModel? modCard=null)
{
if(!KnUtils.IsAppImage)
{
- QuickLaunch = System.Diagnostics.Process.GetCurrentProcess().MainModule!.FileName + " -playmod " + modJson.id + " -version " + modJson.version;
+ QuickLaunch = System.Diagnostics.Process.GetCurrentProcess().MainModule!.FileName + " -playmod " + modJson.id + " -version " + modJson.version + " -exec Default";
}
else
{
- QuickLaunch = KnUtils.AppImagePath + " -playmod " + modJson.id + " -version " + modJson.version;
+ QuickLaunch = KnUtils.AppImagePath + " -playmod " + modJson.id + " -version " + modJson.version + " -exec Default";
}
}catch { }
this.modJson = modJson;
diff --git a/Knossos.NET/Views/Windows/ModSettingsView.axaml b/Knossos.NET/Views/Windows/ModSettingsView.axaml
index a08c51ed..76e52ffc 100644
--- a/Knossos.NET/Views/Windows/ModSettingsView.axaml
+++ b/Knossos.NET/Views/Windows/ModSettingsView.axaml
@@ -34,6 +34,10 @@
QUICK LAUNCH
+
+ Available exec type options:
+ Default, Release, Debug, Fred2, Fred2Debug, QtFred, QtFredDebug
+
FSO BUILD
diff --git a/README.md b/README.md
index e77809e7..888d2f45 100644
--- a/README.md
+++ b/README.md
@@ -28,10 +28,19 @@ This greately minimizes hard drive usage, but comes with two things to keep in m
KnossosNET supports direct mod launch by adding a Command Line argument, this will open the launcher, and will launch FSO to play a mod with all the current settings and configurations, and close the launcher.
Example:
-KnossosNET.exe -playmod mod-id -version mod-version (optional)
+KnossosNET.exe -playmod mod-id -version mod-version (optional) -exec fso-exec-type (optional)
If no version is given (KnossosNET.exe -playmod mod-id) the highest version of the mod will be launched.
-The "Mod Settings" window displays the Command Line to play that mod directly via quick launch.
+If no fso-exec-type is given or "Default", or an invalid type is passed "Release" will be used instead.
+Exec type options:
+-Default
+-Release
+-Debug
+-Fred2
+-Fred2Debug
+-QtFred
+-QtFredDebug
+The "Settings" window on a mod displays the Command Line to play that mod directly via Quick Launch. You can copy that Quick Launch Command Line and use it to create a shortcut to easily launch that mod.
## **Software Rendering Mode:**