finished post install

This commit is contained in:
Gilles Lazures 2026-02-11 02:35:04 +01:00
parent 7b133c1ea5
commit aa0775d58b
2 changed files with 11 additions and 5 deletions

View File

@ -134,7 +134,7 @@ class Program{
} }
} }
break; break;
case "installer::quit": case "installer::finalize":
if (jsonPayload.TryGetProperty("createShortcut", out var createShortcut) && jsonPayload.TryGetProperty("launchAfterExit", out var launchAfterExit)) { if (jsonPayload.TryGetProperty("createShortcut", out var createShortcut) && jsonPayload.TryGetProperty("launchAfterExit", out var launchAfterExit)) {
try { try {
HttpMethod httpMethod = HttpMethod.Get; HttpMethod httpMethod = HttpMethod.Get;
@ -146,8 +146,7 @@ class Program{
ShortcutService.CreateShortcut(Constants.ProductMetadata.Name, Path.Combine(Constants.ProductMetadata.InstallPath, productConfig.Executable!)); ShortcutService.CreateShortcut(Constants.ProductMetadata.Name, Path.Combine(Constants.ProductMetadata.InstallPath, productConfig.Executable!));
} }
if (installationFinish.LaunchAfterExit) { if (installationFinish.LaunchAfterExit) {
//TO-DO : Fetch executable path from remote InstallationService.LaunchApplication(Path.Combine(Constants.ProductMetadata.InstallPath, productConfig.Executable!));
// Launch it
} }
responsePayload = new { success = true }; responsePayload = new { success = true };
} catch (Exception) { } catch (Exception) {
@ -155,6 +154,9 @@ class Program{
} }
} }
break; break;
case "installer::kill":
window.Close();
break;
case "brik::metadata": case "brik::metadata":
try { try {
HttpMethod httpMethod = HttpMethod.Get; HttpMethod httpMethod = HttpMethod.Get;

View File

@ -194,8 +194,12 @@ async function quit() {
createShortcut: createShortcut["checked"], createShortcut: createShortcut["checked"],
launchAfterExit: launchAfterExit["checked"] launchAfterExit: launchAfterExit["checked"]
} }
console.log(finishState) const finalized = await system.call("installer::finalize", finishState)
await system.call("installer::quit", finishState) if (!finalized.success) {
alert("Erreur")
await sleep(1000)
}
await system.call("installer::kill")
} }
function setSourceLogo(url) { function setSourceLogo(url) {