Starting From Modlist now uses CLIArguments

This commit is contained in:
erri120 2020-01-05 14:09:34 +01:00
parent 42e4bece99
commit e149c6dbe7
No known key found for this signature in database
GPG Key ID: A8C0A18D8D4D3135
2 changed files with 5 additions and 5 deletions

View File

@ -19,7 +19,7 @@ namespace Wabbajack.Common
{
{"", "Wabbajack"},
{"FriendlyTypeName", "Wabbajack"},
{"shell\\open\\command", "\"{appPath}\" -i \"%1\""},
{"shell\\open\\command", "\"{appPath}\" -i=\"%1\""},
};
private static readonly Dictionary<string, string> ExtList = new Dictionary<string, string>
@ -34,7 +34,7 @@ namespace Wabbajack.Common
var tempKey = progIDKey?.OpenSubKey("shell\\open\\command");
if (progIDKey == null || tempKey == null) return true;
var value = tempKey.GetValue("");
return value == null || value.ToString().Equals($"\"{appPath}\" -i \"%1\"");
return value == null || value.ToString().Equals($"\"{appPath}\" -i=\"%1\"");
}
public static bool IsAssociated()

View File

@ -129,16 +129,16 @@ namespace Wabbajack
.Select(active => !SettingsPane.IsValueCreated || !object.ReferenceEquals(active, SettingsPane.Value)),
execute: () => NavigateTo(SettingsPane.Value));
}
private static bool IsStartingFromModlist(out string modlistPath)
{
string[] args = Environment.GetCommandLineArgs();
if (args.Length != 3 || !args[1].Contains("-i"))
if (CLIArguments.InstallPath == null)
{
modlistPath = default;
return false;
}
modlistPath = args[2];
modlistPath = CLIArguments.InstallPath;
return true;
}