mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Modlist can now be loaded using a shell command
This commit is contained in:
@ -2,7 +2,6 @@
|
|||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:local="clr-namespace:Wabbajack"
|
xmlns:local="clr-namespace:Wabbajack"
|
||||||
StartupUri="UI\ModeSelectionWindow.xaml"
|
|
||||||
ShutdownMode="OnExplicitShutdown">
|
ShutdownMode="OnExplicitShutdown">
|
||||||
<Application.Resources>
|
<Application.Resources>
|
||||||
<ResourceDictionary>
|
<ResourceDictionary>
|
||||||
|
@ -29,6 +29,12 @@ namespace Wabbajack
|
|||||||
Environment.Exit(1);
|
Environment.Exit(1);
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
string[] args = Environment.GetCommandLineArgs();
|
||||||
|
StartupUri = new Uri("UI/ModeSelectionWindow.xaml", UriKind.Relative);
|
||||||
|
if (args.Length != 3) return;
|
||||||
|
if (!args[1].Contains("-i")) return;
|
||||||
|
// modlists gets loaded using a shell command
|
||||||
|
StartupUri = new Uri("UI/MainWindow.xaml", UriKind.Relative);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetupHandlers()
|
private void SetupHandlers()
|
||||||
|
@ -17,10 +17,19 @@ namespace Wabbajack
|
|||||||
{
|
{
|
||||||
private AppState _state;
|
private AppState _state;
|
||||||
|
|
||||||
|
public MainWindow()
|
||||||
|
{
|
||||||
|
string[] args = Environment.GetCommandLineArgs();
|
||||||
|
|
||||||
|
if (args.Length != 3) return;
|
||||||
|
var modlistPath = args[2];
|
||||||
|
var mainWindow = new MainWindow(RunMode.Install, modlistPath);
|
||||||
|
mainWindow.Show();
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
|
||||||
public MainWindow(RunMode mode, string source)
|
public MainWindow(RunMode mode, string source)
|
||||||
{
|
{
|
||||||
var args = Environment.GetCommandLineArgs();
|
|
||||||
|
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
var context = new AppState(mode);
|
var context = new AppState(mode);
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
<Deterministic>true</Deterministic>
|
<Deterministic>true</Deterministic>
|
||||||
<NuGetPackageImportStamp>
|
<NuGetPackageImportStamp>
|
||||||
</NuGetPackageImportStamp>
|
</NuGetPackageImportStamp>
|
||||||
|
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||||
<PublishUrl>publish\</PublishUrl>
|
<PublishUrl>publish\</PublishUrl>
|
||||||
<Install>true</Install>
|
<Install>true</Install>
|
||||||
<InstallFrom>Disk</InstallFrom>
|
<InstallFrom>Disk</InstallFrom>
|
||||||
@ -29,7 +30,6 @@
|
|||||||
<MapFileExtensions>true</MapFileExtensions>
|
<MapFileExtensions>true</MapFileExtensions>
|
||||||
<ApplicationRevision>0</ApplicationRevision>
|
<ApplicationRevision>0</ApplicationRevision>
|
||||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
|
||||||
<UseApplicationTrust>false</UseApplicationTrust>
|
<UseApplicationTrust>false</UseApplicationTrust>
|
||||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
Reference in New Issue
Block a user