wabbajack/Wabbajack/MainWindow.xaml.cs

51 lines
1.4 KiB
C#
Raw Normal View History

2019-07-22 22:17:46 +00:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Wabbajack.Common;
namespace Wabbajack
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
var context = new AppState(Dispatcher, "Building");
WorkQueue.Init((id, msg, progress) => context.SetProgress(id, msg, progress));
var compiler = new Compiler("c:\\Mod Organizer 2", msg => context.LogMsg(msg));
new Thread(() =>
{
compiler.LoadArchives();
compiler.MO2Profile = "Basic Graphics and Fixes";
2019-07-22 22:17:46 +00:00
compiler.Compile();
2019-07-23 04:27:26 +00:00
compiler.ModList.ToJSON("C:\\tmp\\modpack.json");
2019-07-23 04:27:26 +00:00
var installer = new Installer(compiler.ModList, "c:\\tmp\\install\\", msg => context.LogMsg(msg));
installer.Install();
2019-07-22 22:17:46 +00:00
}).Start();
this.DataContext = context;
}
}
}