Desktop installer: release channel, saved choices, robust delete, logs
- Channel radio (Release / Master (Instabil)); master installs the rolling 'master' release from OmniNX/OmniNX-Master. Preselected from release_channel in the card's manifest.ini. - Variant, RAM (8gb) and Hekate-Pro choice are prefilled from the card (manifest.ini / config.ini) like the payload does, instead of silently switching users back to 4 GB / Standard. - Clear read-only attributes before deleting folders. - Remove leftover "OmniNX <Variant>" pack folders after installing. - Create empty folders from the pack. - Save every run's log to %LocalAppData%\OmniNX-Desktop-Installer\logs, plus a "Save log" button.
This commit is contained in:
1 parent
3e0d9c9950
commit
91133f7098
6 files changed
+207
-9
No files matched your search
@@ -32,6 +32,8 @@ public sealed class InstallEngine
|
||||
await RunCleanAsync(driveRoot, staging, options, progress, cancellationToken);
|
||||
}
|
||||
|
||||
await Task.Run(() => RemovePackFoldersOnDrive(driveRoot, progress), cancellationToken);
|
||||
|
||||
Report(progress, options.Mode == InstallMode.Update
|
||||
? "Update completed successfully."
|
||||
: "Installation completed successfully.");
|
||||
@@ -177,6 +179,29 @@ public sealed class InstallEngine
|
||||
}
|
||||
}
|
||||
|
||||
// Same as the payload: pack folders copied to the card for the console installer
|
||||
// ("OmniNX Light/Standard/OC") are not needed after a desktop install.
|
||||
private static void RemovePackFoldersOnDrive(string driveRoot, IProgress<InstallProgressReport> progress)
|
||||
{
|
||||
foreach (var variant in new[] { OmniNxVariant.Light, OmniNxVariant.Standard, OmniNxVariant.Oc })
|
||||
{
|
||||
var folder = VariantHelper.GetStagingFolderName(variant);
|
||||
var path = Path.Combine(PathUtils.NormalizeDriveRoot(driveRoot), folder);
|
||||
if (!Directory.Exists(path))
|
||||
continue;
|
||||
|
||||
Report(progress, $"Removing leftover pack folder: {folder}");
|
||||
try
|
||||
{
|
||||
PathUtils.DeletePath(path);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Report(progress, $" Could not remove {folder}: {ex.Message}", isError: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void Report(IProgress<InstallProgressReport> progress, string message, bool isError = false)
|
||||
{
|
||||
progress.Report(new InstallProgressReport { Message = message, IsError = isError });
|
||||
|
||||
Reference in new issue
Block a user