ISubCompilerVM.Compile returns bool now

Completion status now marked failure if that bool is false
This commit is contained in:
Justin Swanson 2020-01-18 15:53:10 -06:00
parent ada207fb11
commit e2ebeb9af6
4 changed files with 7 additions and 7 deletions

View File

@ -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)
{

View File

@ -12,6 +12,6 @@ namespace Wabbajack
ModlistSettingsEditorVM ModlistSettings { get; }
void Unload();
IObservable<bool> CanCompile { get; }
Task Compile();
Task<bool> Compile();
}
}

View File

@ -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

View File

@ -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