generated from azures04/Photino-Boilerplate
finished post install
This commit is contained in:
parent
7b133c1ea5
commit
aa0775d58b
@ -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;
|
||||
|
||||
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user