diff --git a/ModVerify b/ModVerify index f0ca888..59b5a3f 160000 --- a/ModVerify +++ b/ModVerify @@ -1 +1 @@ -Subproject commit f0ca888a47b75f344f72f51ff53743eed430e86d +Subproject commit 59b5a3f00b5d5445fecf1c4a1013ce412d47b80f diff --git a/ModdingToolBase b/ModdingToolBase index 3ab26e2..ed8e877 160000 --- a/ModdingToolBase +++ b/ModdingToolBase @@ -1 +1 @@ -Subproject commit 3ab26e2aaaa82fce47ef18a1fa452eea8473d186 +Subproject commit ed8e8778b5a7243a7d67287a3cabb20161a3dc9e diff --git a/RawDevTools.sln b/RawDevTools.sln index c80c640..6c3310b 100644 --- a/RawDevTools.sln +++ b/RawDevTools.sln @@ -9,8 +9,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AnakinApps", "AnakinApps", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppUpdaterFramework.Manifest", "ModdingToolBase\src\Updater\AppUpdaterFramework.Manifest\AppUpdaterFramework.Manifest.csproj", "{40EDE817-AA59-4F6D-A9E1-A26D2F65FE85}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppUpdaterFramework.Core", "ModdingToolBase\src\Updater\AppUpdaterFramework.Core\AppUpdaterFramework.Core.csproj", "{31463AD9-1BDC-40BA-A192-02F9CFE9BDB9}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AppUpdaterFramework", "ModdingToolBase\src\Updater\AppUpdaterFramework\AppUpdaterFramework.csproj", "{61E8C035-B71E-4F93-8D3A-DBCCEDE83A52}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ApplicationBase", "ModdingToolBase\src\AnakinApps\ApplicationBase\ApplicationBase.csproj", "{9F2A24AE-04E9-4CB0-825E-FE6A7BD25614}" @@ -59,6 +57,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ApplicationBase.CommandLine EndProject Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "ApplicationBase.Shared", "ModdingToolBase\src\AnakinApps\ApplicationBase.Shared\ApplicationBase.Shared.shproj", "{B297A13A-8E3A-436C-BA97-8B5F57827FFE}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppUpdaterFramework.Attributes", "ModdingToolBase\src\Updater\AppUpdaterFramework.Attributes\AppUpdaterFramework.Attributes.csproj", "{1AA3A6D5-5492-26C3-E36C-54AB5997D2CF}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -73,10 +73,6 @@ Global {40EDE817-AA59-4F6D-A9E1-A26D2F65FE85}.Debug|Any CPU.Build.0 = Debug|Any CPU {40EDE817-AA59-4F6D-A9E1-A26D2F65FE85}.Release|Any CPU.ActiveCfg = Release|Any CPU {40EDE817-AA59-4F6D-A9E1-A26D2F65FE85}.Release|Any CPU.Build.0 = Release|Any CPU - {31463AD9-1BDC-40BA-A192-02F9CFE9BDB9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {31463AD9-1BDC-40BA-A192-02F9CFE9BDB9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {31463AD9-1BDC-40BA-A192-02F9CFE9BDB9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {31463AD9-1BDC-40BA-A192-02F9CFE9BDB9}.Release|Any CPU.Build.0 = Release|Any CPU {61E8C035-B71E-4F93-8D3A-DBCCEDE83A52}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {61E8C035-B71E-4F93-8D3A-DBCCEDE83A52}.Debug|Any CPU.Build.0 = Debug|Any CPU {61E8C035-B71E-4F93-8D3A-DBCCEDE83A52}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -145,13 +141,16 @@ Global {8768819D-B0C2-4487-3B3A-84A90F36BAB7}.Debug|Any CPU.Build.0 = Debug|Any CPU {8768819D-B0C2-4487-3B3A-84A90F36BAB7}.Release|Any CPU.ActiveCfg = Release|Any CPU {8768819D-B0C2-4487-3B3A-84A90F36BAB7}.Release|Any CPU.Build.0 = Release|Any CPU + {1AA3A6D5-5492-26C3-E36C-54AB5997D2CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1AA3A6D5-5492-26C3-E36C-54AB5997D2CF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1AA3A6D5-5492-26C3-E36C-54AB5997D2CF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1AA3A6D5-5492-26C3-E36C-54AB5997D2CF}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {40EDE817-AA59-4F6D-A9E1-A26D2F65FE85} = {3E986062-E81F-4833-A127-24FA73FBCB1B} - {31463AD9-1BDC-40BA-A192-02F9CFE9BDB9} = {3E986062-E81F-4833-A127-24FA73FBCB1B} {61E8C035-B71E-4F93-8D3A-DBCCEDE83A52} = {3E986062-E81F-4833-A127-24FA73FBCB1B} {9F2A24AE-04E9-4CB0-825E-FE6A7BD25614} = {46DB413A-0F73-48A6-9071-9C38916BE6FC} {FBC72463-9948-4030-B67D-BDC8C27E11C9} = {266B0025-20CE-4A57-94DF-ABFAB21189AD} @@ -171,6 +170,7 @@ Global {EF1942AC-C4E5-A6AA-0328-1DA00E3BE7A1} = {3E986062-E81F-4833-A127-24FA73FBCB1B} {8768819D-B0C2-4487-3B3A-84A90F36BAB7} = {46DB413A-0F73-48A6-9071-9C38916BE6FC} {B297A13A-8E3A-436C-BA97-8B5F57827FFE} = {46DB413A-0F73-48A6-9071-9C38916BE6FC} + {1AA3A6D5-5492-26C3-E36C-54AB5997D2CF} = {3E986062-E81F-4833-A127-24FA73FBCB1B} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {DC15751A-BB36-4EF1-BFF0-2DF1E419AC8F} diff --git a/src/DevLauncher.Tests/DevLauncher.Tests.csproj b/src/DevLauncher.Tests/DevLauncher.Tests.csproj index c230485..a4d6339 100644 --- a/src/DevLauncher.Tests/DevLauncher.Tests.csproj +++ b/src/DevLauncher.Tests/DevLauncher.Tests.csproj @@ -1,34 +1,35 @@ - - net9.0 - disable - enable + + net9.0 + disable + enable - false - true - + false + true + - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + - - - + + + - - - + + + diff --git a/src/DevLauncher/DevLauncher.csproj b/src/DevLauncher/DevLauncher.csproj index 90eddfa..fd9c2b4 100644 --- a/src/DevLauncher/DevLauncher.csproj +++ b/src/DevLauncher/DevLauncher.csproj @@ -27,22 +27,22 @@ - - all - - + + + + all - runtime; build; native; contentfiles; analyzers; buildtransitive - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/DevLauncher/Options/ReleaseRepublicAtWarOption.cs b/src/DevLauncher/Options/ReleaseRepublicAtWarOption.cs index 3dedda0..ce9a634 100644 --- a/src/DevLauncher/Options/ReleaseRepublicAtWarOption.cs +++ b/src/DevLauncher/Options/ReleaseRepublicAtWarOption.cs @@ -10,5 +10,5 @@ internal sealed class ReleaseRepublicAtWarOption : RaWBuildOption public override bool WarnAsError { get; init; } = true; [Option("uploaderDir", Required = true)] - public string UploaderDirectory { get; init; } + public required string UploaderDirectory { get; init; } } \ No newline at end of file diff --git a/src/DevLauncher/Pipelines/Actions/CreateLocalizationDiffsAction.cs b/src/DevLauncher/Pipelines/Actions/CreateLocalizationDiffsAction.cs index 407792e..3c27909 100644 --- a/src/DevLauncher/Pipelines/Actions/CreateLocalizationDiffsAction.cs +++ b/src/DevLauncher/Pipelines/Actions/CreateLocalizationDiffsAction.cs @@ -14,7 +14,7 @@ using System.IO.Abstractions; using System.Linq; using System.Threading; -using RepublicAtWar.DevLauncher.Utilities; +using AnakinRaW.ApplicationBase; namespace RepublicAtWar.DevLauncher.Pipelines.Actions; @@ -173,23 +173,7 @@ private void ManuallyChooseDiffedText(ICollection<(DatStringEntry baseEntry, str CompuMaster.Text.Diffs.DumpDiffToConsole(newText, oldText, true); Console.WriteLine(); - - var keepEntry = ConsoleUtilities.UserQuestionOnSameLine("Keep? [y/n]: ", (string input, out bool keep) => - { - if (input.Equals("y", StringComparison.OrdinalIgnoreCase)) - { - keep = true; - return true; - } - if (input.Equals("n", StringComparison.OrdinalIgnoreCase)) - { - keep = false; - return true; - } - - keep = false; - return false; - }); + var keepEntry = ConsoleUtilities.UserYesNoQuestion("Keep?"); diffFile.Add(key, keepEntry ? TempDiffEntriesFile.DiffAction.Keep : TempDiffEntriesFile.DiffAction.Ignore); if (!keepEntry) diff --git a/src/DevLauncher/Program.cs b/src/DevLauncher/Program.cs index 7b982ae..53b0ddb 100644 --- a/src/DevLauncher/Program.cs +++ b/src/DevLauncher/Program.cs @@ -1,6 +1,5 @@ using AET.ModVerify.Reporting.Reporters; using AET.SteamAbstraction; -using AnakinRaW.AppUpdaterFramework; using AnakinRaW.AppUpdaterFramework.Handlers.Interaction; using AnakinRaW.CommonUtilities.Hashing; using AnakinRaW.CommonUtilities.Registry; @@ -29,6 +28,7 @@ using AnakinRaW.ApplicationBase.Environment; using AnakinRaW.ApplicationBase.Update; using AnakinRaW.ApplicationBase.Utilities; +using AnakinRaW.AppUpdaterFramework.Json; using AnakinRaW.CommonUtilities.FileSystem; using PG.StarWarsGame.Engine.Xml.Parsers; using PG.StarWarsGame.Files.XML.Parsers; @@ -75,7 +75,34 @@ protected override async Task RunAppAsync(string[] args, IServiceProvider a { using (new UnhandledExceptionHandler(appServiceProvider)) using (new UnobservedTaskExceptionHandler(appServiceProvider)) - return await new RawDevLauncher(UpdatableApplicationEnvironment!, appServiceProvider).RunAsync(args); + return await RunAppCoreAsync(args, appServiceProvider).ConfigureAwait(false); + } + + private async Task RunAppCoreAsync(string[] args, IServiceProvider appServiceProvider) + { + var logger = appServiceProvider.GetService()?.CreateLogger(GetType()); + try + { + var returnCode = await new RawDevLauncher(UpdatableApplicationEnvironment!, appServiceProvider) + .RunAsync(args); + logger?.LogInformation($"RaW DevLauncher finished with code: {returnCode}"); + return returnCode; + } + catch (Exception e) + { + ConsoleUtilities.WriteApplicationFatalError(ApplicationEnvironment.ApplicationName); + logger?.LogError(e, e.Message); + return e.HResult; + } + finally + { + Log.CloseAndFlush(); + + Console.WriteLine(); + ConsoleUtilities.WriteHorizontalLine('-'); + Console.Write("Press ENTER to exit."); + Console.ReadLine(); + } } protected override void ResetApp(Microsoft.Extensions.Logging.ILogger? logger) @@ -150,7 +177,6 @@ private void ConfigureLogging(ILoggingBuilder loggingBuilder) return false; return true; - }) .MinimumLevel.Is(logLevel) .CreateLogger(); diff --git a/src/DevLauncher/Properties/launchSettings.json b/src/DevLauncher/Properties/launchSettings.json index 02a981b..8cf03f9 100644 --- a/src/DevLauncher/Properties/launchSettings.json +++ b/src/DevLauncher/Properties/launchSettings.json @@ -28,7 +28,7 @@ "Build & Verify Republic at War": { "commandName": "Project", "commandLineArgs": "verify --skipUpdate", - "workingDirectory": "C:\\Program Files (x86)\\Steam\\steamapps\\common\\Star Wars Empire at War\\corruption\\Mods\\Republic_at_War" + "workingDirectory": "C:\\Privat\\Steam\\steamapps\\common\\Star Wars Empire at War\\corruption\\Mods\\republic-at-war" } } } \ No newline at end of file diff --git a/src/DevLauncher/RawDevLauncher.cs b/src/DevLauncher/RawDevLauncher.cs index 9a28ff1..1ac5ac4 100644 --- a/src/DevLauncher/RawDevLauncher.cs +++ b/src/DevLauncher/RawDevLauncher.cs @@ -27,8 +27,18 @@ internal sealed class RawDevLauncher(UpdatableApplicationEnvironment application public async Task RunAsync(IReadOnlyList args) { - _logger?.LogDebug("Command line arguments: " + string.Join(" ", args)); + var option = ParseArguments(args); + + if (option is null) + return 0xA0; + await UpdateLauncher(args).ConfigureAwait(false); + + return await RunCore(option).ConfigureAwait(false); + } + + private async Task UpdateLauncher(IReadOnlyList args) + { var skipUpdate = false; _looseArgumentParser.ParseArguments(args).WithParsed(su => skipUpdate = su.SkipUpdate); @@ -39,40 +49,36 @@ public async Task RunAsync(IReadOnlyList args) _looseArgumentParser.ParseArguments(args).WithParsed(updateOptions => options = updateOptions); var updater = new RawDevLauncherUpdater(applicationEnvironment, serviceProvider); - var branch = updater.CreateBranch(options?.BranchName, options?.ManifestUrl); + var branchName = updater.GetBranchNameFromRegistry(options?.BranchName, true); + var branch = updater.CreateBranch(branchName, options?.ManifestUrl); + await updater.AutoUpdateApplication(branch); } else { _logger?.LogDebug("Skipping update routine."); } + } + private DevToolsOptionBase? ParseArguments(IReadOnlyList args) + { Type[] optionTypes = [ typeof(BuildAndRunOption), - typeof(InitializeLocalizationOption), - typeof(PrepareLocalizationsOption), - typeof(MergeLocalizationOption), - typeof(ReleaseRepublicAtWarOption), - typeof(VerifyOption) + typeof(InitializeLocalizationOption), + typeof(PrepareLocalizationsOption), + typeof(MergeLocalizationOption), + typeof(ReleaseRepublicAtWarOption), + typeof(VerifyOption) ]; - var toolResult = 0; var parseResult = _looseArgumentParser.ParseArguments(args, optionTypes); - await parseResult.WithParsedAsync(async o => - { - toolResult = await RunCore((DevToolsOptionBase)o); - }); - - await parseResult.WithNotParsedAsync(_ => - { - Console.WriteLine(HelpText.AutoBuild(parseResult).ToString()); - toolResult = 0xA0; - return Task.CompletedTask; - }); + if (parseResult.Value is DevToolsOptionBase devToolsOption) + return devToolsOption; - return toolResult; + Console.WriteLine(HelpText.AutoBuild(parseResult).ToString()); + return null; } private async Task RunCore(DevToolsOptionBase options) diff --git a/src/DevLauncher/Update/RawDevLauncherUpdater.cs b/src/DevLauncher/Update/RawDevLauncherUpdater.cs index 6c940ae..4785455 100644 --- a/src/DevLauncher/Update/RawDevLauncherUpdater.cs +++ b/src/DevLauncher/Update/RawDevLauncherUpdater.cs @@ -13,39 +13,38 @@ namespace RepublicAtWar.DevLauncher.Update; internal sealed class RawDevLauncherUpdater(UpdatableApplicationEnvironment environment, IServiceProvider serviceProvider) - : ApplicationUpdater(serviceProvider) + : ApplicationUpdater(environment, serviceProvider) { public async Task AutoUpdateApplication(ProductBranch branch) { using (ConsoleUtilities.HorizontalLineSeparatedBlock()) { - IUpdateCatalog updateCatalog; + var currentAction = "checking for update"; try { - updateCatalog = await CheckForUpdateAsync(branch); + var updateCatalog = await CheckForUpdateAsync(branch); + + if (updateCatalog.Action != UpdateCatalogAction.Update) + return; + + currentAction = "updating"; + await UpdateAsync(updateCatalog); } catch (Exception e) { Console.ForegroundColor = ConsoleColor.DarkRed; - Console.WriteLine($"Error while checking for update: {e.Message}"); + Console.WriteLine($"Error while {currentAction}: {e.Message}"); Logger?.LogError(e, $"Unable to check for updates: {e.Message}"); Console.ResetColor(); - return; } - - if (updateCatalog.Action != UpdateCatalogAction.Update) - return; - await UpdateAsync(updateCatalog); - } } - public override async Task CheckForUpdateAsync(ProductBranch branch, CancellationToken token = default) + public override async Task CheckForUpdateAsync(ProductBranch branch, CancellationToken token = default) { - var currentProduct = ProductService.GetCurrentInstance(); - var updateReference = new ProductReference(currentProduct.Name, null, branch); + var updateReference = ProductService.CreateProductReference(null, branch); - Console.WriteLine($"Checking update for {currentProduct.Name}..."); + Console.WriteLine($"Checking update for {updateReference.Name}..."); var updateCatalog = await UpdateService.CheckForUpdatesAsync(updateReference, token); if (updateCatalog is null) @@ -68,10 +67,10 @@ public override async Task CheckForUpdateAsync(ProductBranch bra return updateCatalog; } - public override async Task UpdateAsync(IUpdateCatalog updateCatalog, CancellationToken token = default) + public override async Task UpdateAsync(UpdateCatalog updateCatalog, CancellationToken token = default) { Console.WriteLine("Updating..."); - + UpdateResult? updateResult; try { @@ -88,7 +87,7 @@ public override async Task UpdateAsync(IUpdateCatalog updateCatalog, Cancellatio throw; } - var resultHandler = new RawDevLauncherUpdateResultHandler(environment, ServiceProvider); + var resultHandler = new RawDevLauncherUpdateResultHandler(Environment, ServiceProvider); await resultHandler.Handle(updateResult); } diff --git a/src/DevLauncher/Update/SkipUpdateOption.cs b/src/DevLauncher/Update/SkipUpdateOption.cs index 71d562b..6f7c33a 100644 --- a/src/DevLauncher/Update/SkipUpdateOption.cs +++ b/src/DevLauncher/Update/SkipUpdateOption.cs @@ -4,6 +4,7 @@ namespace RepublicAtWar.DevLauncher.Update; internal sealed class SkipUpdateOption { - [Option("skipUpdate", Default = false, HelpText = "Skips update procedure.", Hidden = true)] + [Option("skipUpdate", Default = false, + HelpText = "When set, the application does not search or install updates (an incomplete update will be finalized).", Hidden = true)] public bool SkipUpdate { get; init; } } \ No newline at end of file diff --git a/src/DevLauncher/Utilities/ConsoleUtilities.cs b/src/DevLauncher/Utilities/ConsoleUtilities.cs deleted file mode 100644 index d65ee0b..0000000 --- a/src/DevLauncher/Utilities/ConsoleUtilities.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System; - -namespace RepublicAtWar.DevLauncher.Utilities; - -internal static class ConsoleUtilities -{ - public delegate bool ConsoleQuestionValueFactory(string input, out T value); - - public static void WriteHorizontalLine(char lineChar = '─', int length = 20) - { - var line = new string(lineChar, length); - Console.WriteLine(line); - } - - public static T UserQuestionOnSameLine(string question, ConsoleQuestionValueFactory inputCorrect) - { - while (true) - { - var promptLeft = 0; - var promptTop = Console.CursorTop; - - Console.SetCursorPosition(promptLeft, promptTop); - Console.Write(question); - Console.SetCursorPosition(promptLeft + question.Length, promptTop); - - var input = ReadLineInline(); - - if (!inputCorrect(input, out var result)) - { - Console.SetCursorPosition(0, promptTop); - Console.Write(new string(' ', Console.WindowWidth - 1)); - continue; - } - - Console.WriteLine(); - return result; - } - } - - private static string ReadLineInline() - { - var input = ""; - while (true) - { - var key = Console.ReadKey(intercept: true); - - if (key.Key == ConsoleKey.Enter) - break; - - if (key.Key == ConsoleKey.Backspace) - { - if (input.Length > 0) - { - input = input[..^1]; - Console.SetCursorPosition(Console.CursorLeft - 1, Console.CursorTop); - Console.Write(' '); - Console.SetCursorPosition(Console.CursorLeft - 1, Console.CursorTop); - } - } - else if (!char.IsControl(key.KeyChar)) - { - input += key.KeyChar; - Console.Write(key.KeyChar); - } - } - - return input; - } -} \ No newline at end of file diff --git a/src/DevLauncher/Utilities/ProgressBar.cs b/src/DevLauncher/Utilities/ProgressBar.cs index 73fce4f..b6a2ba1 100644 --- a/src/DevLauncher/Utilities/ProgressBar.cs +++ b/src/DevLauncher/Utilities/ProgressBar.cs @@ -46,10 +46,16 @@ private void TimerHandler(object state) if (_disposed) return; - var progressBlockCount = (int)(_currentProgress * BlockCount); - var percent = _marquee ? string.Empty : $"{(int)(_currentProgress * 100),3} %"; - var text = - $"[{new string('#', progressBlockCount)}{new string('-', BlockCount - progressBlockCount)}] {percent} {Animation[_animationIndex++ % Animation.Length]}"; + string text; + if (_marquee) + text = $"{Animation[_animationIndex++ % Animation.Length]}"; + else + { + var progressBlockCount = (int)(_currentProgress * BlockCount); + var percent = $"{(int)(_currentProgress * 100),3} %"; + text = $"[{new string('#', progressBlockCount)}{new string('-', BlockCount - progressBlockCount)}] {percent} {Animation[_animationIndex++ % Animation.Length]}"; + } + UpdateText(text); ResetTimer(); diff --git a/src/MegCompile/MegCompile.csproj b/src/MegCompile/MegCompile.csproj index da510a1..f0186c2 100644 --- a/src/MegCompile/MegCompile.csproj +++ b/src/MegCompile/MegCompile.csproj @@ -15,18 +15,18 @@ - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + diff --git a/src/RawDevTools/Steps/Build/CleanOutdatedAssetsStep.cs b/src/RawDevTools/Steps/Build/CleanOutdatedAssetsStep.cs index 055fa72..af12d65 100644 --- a/src/RawDevTools/Steps/Build/CleanOutdatedAssetsStep.cs +++ b/src/RawDevTools/Steps/Build/CleanOutdatedAssetsStep.cs @@ -17,6 +17,7 @@ public class CleanOutdatedAssetsStep(IPhysicalMod mod, IServiceProvider serviceP protected override void RunCore(CancellationToken token) { + Logger?.LogInformation("Cleaning outdated assets..."); var matcher = new Matcher(); matcher.AddInclude("Data/Audio/SFX/sfx2d_*.meg"); @@ -25,5 +26,7 @@ protected override void RunCore(CancellationToken token) Logger?.LogDebug($"Deleting old asset '{fileToDelete}'"); _fileSystem.File.DeleteWithRetry(fileToDelete); } + + Logger?.LogInformation("Finished cleaning outdated assets."); } } \ No newline at end of file diff --git a/src/RawDevTools/Steps/Build/PackIconsStep.cs b/src/RawDevTools/Steps/Build/PackIconsStep.cs index 811af97..855191f 100644 --- a/src/RawDevTools/Steps/Build/PackIconsStep.cs +++ b/src/RawDevTools/Steps/Build/PackIconsStep.cs @@ -35,11 +35,7 @@ protected override void RunCore(CancellationToken token) _logger?.LogWarning("No Icons directory found."); return; } - - // TODO: Currently not required since ModCompile.exe already does this - //if (!RequiresBuild()) - // return; - + if (settings.CleanBuild) { try diff --git a/src/TextCompile/TextCompile.csproj b/src/TextCompile/TextCompile.csproj index ceb52ba..5c129c8 100644 --- a/src/TextCompile/TextCompile.csproj +++ b/src/TextCompile/TextCompile.csproj @@ -15,18 +15,18 @@ - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + +