[haiku-commits] Change in haiku[master]: Installer: Fixed installer

  • From: Gerrit <review@xxxxxxxxxxxxxxxxxxx>
  • To: waddlesplash <waddlesplash@xxxxxxxxx>, haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 15 Sep 2020 05:14:11 +0000

From Panagiotis Vasilopoulos <hello@xxxxxxxxxxxxxxx>:

Panagiotis Vasilopoulos has uploaded this change for review. ( 
https://review.haiku-os.org/c/haiku/+/3218 ;)


Change subject: Installer: Fixed installer
......................................................................

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.
---
M src/apps/installer/InstallerApp.cpp
M src/apps/installer/InstallerWindow.cpp
M src/apps/installer/InstallerWindow.h
3 files changed, 14 insertions(+), 6 deletions(-)



  git pull ssh://git.haiku-os.org:22/haiku refs/changes/18/3218/1

diff --git a/src/apps/installer/InstallerApp.cpp 
b/src/apps/installer/InstallerApp.cpp
index 8c992c0..ef99bd3 100644
--- a/src/apps/installer/InstallerApp.cpp
+++ b/src/apps/installer/InstallerApp.cpp
@@ -19,7 +19,6 @@
 #include "tracker_private.h"
 #include "Utility.h"

-
 static const uint32 kMsgAgree = 'agre';
 static const uint32 kMsgNext = 'next';

@@ -78,7 +77,7 @@
        BApplication::Quit();

        if (!be_roster->IsRunning(kDeskbarSignature)) {
-               if (fInstallStatus == kFinished) {
+               if (CurrentMessage()->GetBool("install_complete")) {
                        // Synchronize disks
                        sync();

@@ -94,7 +93,7 @@
                } else {
                        // Return to FirstBootPrompt if the user hasn't
                        // installed Haiku yet
-                       BLaunchRoster().Target("firstbootprompt");
+                       
be_roster->Launch("application/x-vnd.Haiku-FirstBootPrompt");
                }
        }
 }
diff --git a/src/apps/installer/InstallerWindow.cpp 
b/src/apps/installer/InstallerWindow.cpp
index 06f3134..3d3288e 100644
--- a/src/apps/installer/InstallerWindow.cpp
+++ b/src/apps/installer/InstallerWindow.cpp
@@ -516,6 +516,7 @@

                        _SetStatusMessage(status.String());
                        fInstallStatus = kFinished;
+
                        _DisableInterface(false);
                        fProgressLayoutItem->SetVisible(false);
                        fPkgSwitchLayoutItem->SetVisible(true);
@@ -638,8 +639,17 @@
        }

        _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;
 }

diff --git a/src/apps/installer/InstallerWindow.h 
b/src/apps/installer/InstallerWindow.h
index d5caf46..3d479a6 100644
--- a/src/apps/installer/InstallerWindow.h
+++ b/src/apps/installer/InstallerWindow.h
@@ -43,7 +43,6 @@

        virtual void                            MessageReceived(BMessage* 
message);
        virtual bool                            QuitRequested();
-
 private:
                        void                            _ShowOptionalPackages();
                        void                            _LaunchDriveSetup();

--
To view, visit https://review.haiku-os.org/c/haiku/+/3218
To unsubscribe, or for help writing mail filters, visit 
https://review.haiku-os.org/settings

Gerrit-Project: haiku
Gerrit-Branch: master
Gerrit-Change-Id: Ibbba2f0ee3b79e091032294afcb3ed404e898f5c
Gerrit-Change-Number: 3218
Gerrit-PatchSet: 1
Gerrit-Owner: Panagiotis Vasilopoulos <hello@xxxxxxxxxxxxxxx>
Gerrit-MessageType: newchange

Other related posts:

  • » [haiku-commits] Change in haiku[master]: Installer: Fixed installer - Gerrit