mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Merge pull request #400 from Noggog/failed-compilation-display-bug
Failed compilation display bug
This commit is contained in:
commit
2a31c85e24
@ -184,8 +184,8 @@ namespace Wabbajack
|
||||
{
|
||||
try
|
||||
{
|
||||
await this.Compiler.Compile();
|
||||
Completed = ErrorResponse.Success;
|
||||
var successful = await this.Compiler.Compile();
|
||||
Completed = ErrorResponse.Create(successful);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
@ -12,6 +12,6 @@ namespace Wabbajack
|
||||
ModlistSettingsEditorVM ModlistSettings { get; }
|
||||
void Unload();
|
||||
IObservable<bool> CanCompile { get; }
|
||||
Task Compile();
|
||||
Task<bool> Compile();
|
||||
}
|
||||
}
|
||||
|
@ -163,7 +163,7 @@ namespace Wabbajack
|
||||
ModlistSettings?.Save();
|
||||
}
|
||||
|
||||
public async Task Compile()
|
||||
public async Task<bool> Compile()
|
||||
{
|
||||
string outputFile;
|
||||
if (string.IsNullOrWhiteSpace(Parent.OutputLocation.TargetPath))
|
||||
@ -193,7 +193,7 @@ namespace Wabbajack
|
||||
{
|
||||
Parent.MWVM.Settings.Performance.AttachToBatchProcessor(ActiveCompilation);
|
||||
|
||||
await ActiveCompilation.Begin();
|
||||
return await ActiveCompilation.Begin();
|
||||
}
|
||||
}
|
||||
finally
|
||||
|
@ -177,7 +177,7 @@ namespace Wabbajack
|
||||
GameLocation.TargetPath = StoreHandler.Instance.GetGamePath(SelectedGame.Game, StoreType.GOG);
|
||||
}
|
||||
|
||||
public async Task Compile()
|
||||
public async Task<bool> Compile()
|
||||
{
|
||||
string outputFile = $"{ModlistSettings.ModListName}{ExtensionManager.Extension}";
|
||||
if (!string.IsNullOrWhiteSpace(Parent.OutputLocation.TargetPath))
|
||||
@ -204,7 +204,7 @@ namespace Wabbajack
|
||||
})
|
||||
{
|
||||
Parent.MWVM.Settings.Performance.AttachToBatchProcessor(ActiveCompilation);
|
||||
await ActiveCompilation.Begin();
|
||||
return await ActiveCompilation.Begin();
|
||||
}
|
||||
}
|
||||
finally
|
||||
|
@ -18,6 +18,6 @@ namespace Wabbajack
|
||||
void AfterInstallNavigation();
|
||||
int ConfigVisualVerticalOffset { get; }
|
||||
IObservable<bool> CanInstall { get; }
|
||||
Task Install();
|
||||
Task<bool> Install();
|
||||
}
|
||||
}
|
||||
|
@ -364,8 +364,8 @@ namespace Wabbajack
|
||||
{
|
||||
try
|
||||
{
|
||||
await this.Installer.Install();
|
||||
Completed = ErrorResponse.Success;
|
||||
var success = await this.Installer.Install();
|
||||
Completed = ErrorResponse.Create(success);
|
||||
try
|
||||
{
|
||||
this.ModList?.OpenReadmeWindow();
|
||||
|
@ -143,7 +143,7 @@ namespace Wabbajack
|
||||
Process.Start("explorer.exe", Location.TargetPath);
|
||||
}
|
||||
|
||||
public async Task Install()
|
||||
public async Task<bool> Install()
|
||||
{
|
||||
using (var installer = new MO2Installer(
|
||||
archive: Parent.ModListLocation.TargetPath,
|
||||
@ -154,14 +154,13 @@ namespace Wabbajack
|
||||
{
|
||||
Parent.MWVM.Settings.Performance.AttachToBatchProcessor(installer);
|
||||
|
||||
await Task.Run(async () =>
|
||||
return await Task.Run(async () =>
|
||||
{
|
||||
try
|
||||
{
|
||||
var workTask = installer.Begin();
|
||||
ActiveInstallation = installer;
|
||||
await workTask;
|
||||
return ErrorResponse.Success;
|
||||
return await workTask;
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -57,7 +57,7 @@ namespace Wabbajack
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public async Task Install()
|
||||
public async Task<bool> Install()
|
||||
{
|
||||
AInstaller installer;
|
||||
|
||||
@ -72,13 +72,13 @@ namespace Wabbajack
|
||||
{
|
||||
Parent.MWVM.Settings.Performance.AttachToBatchProcessor(installer);
|
||||
|
||||
await Task.Run(async () =>
|
||||
return await Task.Run(async () =>
|
||||
{
|
||||
try
|
||||
{
|
||||
var workTask = installer.Begin();
|
||||
ActiveInstallation = installer;
|
||||
await workTask;
|
||||
return await workTask;
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user