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

View File

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