Installer: Fixed installer
- InstallerWindow.cpp announces a message with a boolean that defines whether the install has been completed. That boolean will define InstallerApp.cpp's behavior. - Changed the method that was used (unsuccessfully) to open FirstBootPrompt within the Installer itself, upon quitting. Change-Id: Ibbba2f0ee3b79e091032294afcb3ed404e898f5c Reviewed-on: https://review.haiku-os.org/c/haiku/+/3218 Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
This commit is contained in:
parent
963ebbca4f
commit
b05b0c1c29
@ -78,7 +78,7 @@ InstallerApp::Quit()
|
||||
BApplication::Quit();
|
||||
|
||||
if (!be_roster->IsRunning(kDeskbarSignature)) {
|
||||
if (fInstallStatus == kFinished) {
|
||||
if (CurrentMessage()->GetBool("install_complete")) {
|
||||
// Synchronize disks
|
||||
sync();
|
||||
|
||||
@ -94,7 +94,7 @@ InstallerApp::Quit()
|
||||
} else {
|
||||
// Return to FirstBootPrompt if the user hasn't
|
||||
// installed Haiku yet
|
||||
BLaunchRoster().Target("firstbootprompt");
|
||||
be_roster->Launch("application/x-vnd.Haiku-FirstBootPrompt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -516,6 +516,7 @@ InstallerWindow::MessageReceived(BMessage *msg)
|
||||
|
||||
_SetStatusMessage(status.String());
|
||||
fInstallStatus = kFinished;
|
||||
|
||||
_DisableInterface(false);
|
||||
fProgressLayoutItem->SetVisible(false);
|
||||
fPkgSwitchLayoutItem->SetVisible(true);
|
||||
@ -638,8 +639,16 @@ InstallerWindow::QuitRequested()
|
||||
}
|
||||
|
||||
_QuitCopyEngine(false);
|
||||
fWorkerThread->PostMessage(B_QUIT_REQUESTED);
|
||||
be_app->PostMessage(B_QUIT_REQUESTED);
|
||||
|
||||
BMessage* quitWithInstallStatus = new BMessage(B_QUIT_REQUESTED);
|
||||
|
||||
if (fInstallStatus == kFinished)
|
||||
quitWithInstallStatus->AddBool("install_complete", true);
|
||||
else
|
||||
quitWithInstallStatus->AddBool("install_compelte", false);
|
||||
|
||||
fWorkerThread->PostMessage(quitWithInstallStatus);
|
||||
be_app->PostMessage(quitWithInstallStatus);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,6 @@ public:
|
||||
|
||||
virtual void MessageReceived(BMessage* message);
|
||||
virtual bool QuitRequested();
|
||||
|
||||
private:
|
||||
void _ShowOptionalPackages();
|
||||
void _LaunchDriveSetup();
|
||||
|
Loading…
Reference in New Issue
Block a user