Index: InstallerWindow.cpp
===================================================================
--- InstallerWindow.cpp	(revision 35770)
+++ InstallerWindow.cpp	(working copy)
@@ -48,6 +48,7 @@
 #define TR_CONTEXT "InstallerWindow"
 
 #define DRIVESETUP_SIG "application/x-vnd.Haiku-DriveSetup"
+#define BOOTMAN_SIG "application/x-vnd.Haiku-Bootman"
 
 const uint32 BEGIN_MESSAGE = 'iBGN';
 const uint32 SHOW_BOTTOM_MESSAGE = 'iSBT';
@@ -213,6 +214,10 @@
 		TR("Write boot sector"), new BMessage(MSG_WRITE_BOOT_SECTOR));
 	fMakeBootableButton->SetEnabled(false);
 
+	fBootmanButton = new BButton("bootman_button",
+		TR("Setup Boot Menu"), new BMessage(MSG_WRITE_BOOTMAN));
+	fBootmanButton->SetEnabled(false);
+
 	SetLayout(new BGroupLayout(B_HORIZONTAL));
 	AddChild(BGroupLayoutBuilder(B_VERTICAL)
 		.Add(BGroupLayoutBuilder(B_HORIZONTAL)
@@ -238,6 +243,7 @@
 			.Add(BGroupLayoutBuilder(B_HORIZONTAL, 10)
 				.Add(fSetupButton)
 				.Add(fMakeBootableButton)
+				.Add(fBootmanButton)
 				.AddGlue()
 				.Add(fBeginButton)
 			)
@@ -268,7 +274,11 @@
 		"the installation, but you can manually make a\n"
 		"partition bootable in case you do not need to\n"
 		"perform an installation."));
-
+	fBootmanButton->SetToolTip(
+		TR("Install/Uninstall our Boot Menu, which allow you to choose\n"
+		"operating system to boot when computer starts up\n"
+		"If you have another Boot manager such as LILO or GRUB\n"
+		"You do not need to perform this one\n"));
 	// finish creating window
 	if (!be_roster->IsRunning(kDeskbarSignature))
 		SetFlags(Flags() | B_NOT_MINIMIZABLE);
@@ -276,10 +286,9 @@
 	CenterOnScreen();
 	Show();
 
-	fDriveSetupLaunched = be_roster->IsRunning(DRIVESETUP_SIG);
  
 	if (Lock()) {
-		fSetupButton->SetEnabled(!fDriveSetupLaunched);
+		fSetupButton->SetEnabled(!fDriveSetupLaunched || !fDriveSetupLaunched);
 		Unlock();
 	}
 
@@ -466,25 +475,37 @@
 		case B_SOME_APP_LAUNCHED:
 		case B_SOME_APP_QUIT:
 		{
-			const char *signature;
-			if (msg->FindString("be:signature", &signature) == B_OK
-				&& strcasecmp(signature, DRIVESETUP_SIG) == 0) {
-				fDriveSetupLaunched = msg->what == B_SOME_APP_LAUNCHED;
-				fBeginButton->SetEnabled(!fDriveSetupLaunched);
-				_DisableInterface(fDriveSetupLaunched);
-				if (fDriveSetupLaunched)
-					_SetStatusMessage(TR("Running DriveSetup" B_UTF8_ELLIPSIS
+
+			if (fDriveSetupLaunched) {
+			fDriveSetupLaunched = msg->what == B_SOME_APP_LAUNCHED;
+			fBeginButton->SetEnabled(!fDriveSetupLaunched);
+			_DisableInterface(fDriveSetupLaunched);
+			_SetStatusMessage(TR("Running DriveSetup" B_UTF8_ELLIPSIS
 						"\n\nClose DriveSetup to continue with the "
 						"installation."));
-				else
+				} else
 					_ScanPartitions();
+
+			if (fBootmanLaunched) {
+			fBootmanLaunched = msg->what == B_SOME_APP_LAUNCHED;
+			fBeginButton->SetEnabled(!fBootmanLaunched);
+			_DisableInterface(fBootmanLaunched);
+			_SetStatusMessage(TR("Running Boot Manager" B_UTF8_ELLIPSIS
+						"\n\nClose Boot Manager to continue with the "
+						"installation."));
+				}
 			}
 			break;
-		}
+			
 		case MSG_WRITE_BOOT_SECTOR:
 			fWorkerThread->WriteBootSector(fDestMenu);
 			break;
 
+		case MSG_WRITE_BOOTMAN:
+		{
+			_LaunchBootman();
+		}
+			break;
 		default:
 			BWindow::MessageReceived(msg);
 			break;
@@ -502,6 +523,13 @@
 		return false;
 	}
 
+	if (fBootmanLaunched) {
+		(new BAlert("bootman",
+			TR("Please close the Boot Manager window before closing the "
+			"Installer window."), TR("OK")))->Go();
+		return false;
+	}
+	
 	if (fInstallStatus != kFinished && (Flags() & B_NOT_MINIMIZABLE) != 0) {
 		// This means Deskbar is not running, i.e. Installer is the only
 		// thing on the screen and we will reboot the machine once it quits.
@@ -536,7 +564,12 @@
 void
 InstallerWindow::_LaunchDriveSetup()
 {
-	if (be_roster->Launch(DRIVESETUP_SIG) != B_OK) {
+	if (be_roster->Launch(DRIVESETUP_SIG) == B_OK) {
+
+		fDriveSetupLaunched = be_roster->IsRunning(DRIVESETUP_SIG);
+
+	} else {
+
 		// Try really hard to launch it. It's very likely that this fails,
 		// when we run from the CD and there is only an incomplete mime
 		// database for example...
@@ -552,16 +585,45 @@
 				"application to configure disk partitions, could not be "
 				"launched."), TR("OK"));
 			alert->Go();
+			} 
+		fDriveSetupLaunched = be_roster->IsRunning(&ref);
+	} 
+}
+
+void
+InstallerWindow::_LaunchBootman()
+{
+	if (be_roster->Launch(BOOTMAN_SIG) == B_OK) {
+
+		fBootmanLaunched = be_roster->IsRunning(BOOTMAN_SIG);
+
+		} else {
+		// Try really hard to launch it. It's very likely that this fails,
+		// when we run from the CD and there is only an incomplete mime
+		// database for example...
+		BPath path;
+		if (find_directory(B_BEOS_SYSTEM_DIRECTORY, &path) != B_OK
+			|| path.Append("bin/bootman") != B_OK) {
+			path.SetTo("/boot/system/bin/bootman");
 		}
+		BEntry entry(path.Path());
+		entry_ref ref;
+		if (entry.GetRef(&ref) != B_OK || be_roster->Launch(&ref) != B_OK) {
+			BAlert* alert = new BAlert("error", TR("Boot Manager, the "
+				"application to Setup Boot Menu, could not be "
+				"launched."), TR("OK"));
+			alert->Go();
+			}
+		fBootmanLaunched = be_roster->IsRunning(&ref);
 	}
 }
 
-
 void
 InstallerWindow::_DisableInterface(bool disable)
 {
 	fSetupButton->SetEnabled(!disable);
 	fMakeBootableButton->SetEnabled(!disable);
+	fBootmanButton->SetEnabled(!disable);
 	fSrcMenuField->SetEnabled(!disable);
 	fDestMenuField->SetEnabled(!disable);
 }
@@ -651,7 +713,7 @@
 	fBeginButton->SetLabel(TR("Begin"));
 	fBeginButton->SetEnabled(srcItem && dstItem);
 
-	// adjust "Write Boot Sector" button
+	// adjust "Write Boot Sector and Setup Boot Menu" button
 	if (dstItem) {
 		char buffer[256];
 		snprintf(buffer, sizeof(buffer), TR("Write boot sector to '%s'"),
@@ -661,7 +723,8 @@
 		label = TR("Write boot sector");
 	fMakeBootableButton->SetEnabled(dstItem);
 	fMakeBootableButton->SetLabel(label.String());
-
+	fBootmanButton->SetEnabled(dstItem);
+	
 	if (!fEncouragedToSetupPartitions && !foundOneSuitableTarget) {
 		// Focus the users attention on the DriveSetup button
 		fEncouragedToSetupPartitions = true;
Index: InstallerWindow.h
===================================================================
--- InstallerWindow.h	(revision 35770)
+++ InstallerWindow.h	(working copy)
@@ -35,6 +35,7 @@
 const uint32 MSG_INSTALL_FINISHED = 'iIFN';
 const uint32 MSG_RESET = 'iRSI';
 const uint32 MSG_WRITE_BOOT_SECTOR = 'iWBS';
+const uint32 MSG_WRITE_BOOTMAN = 'iWBM';
 
 const char PACKAGES_DIRECTORY[] = "_packages_";
 const char VAR_DIRECTORY[] = "var";
@@ -53,6 +54,7 @@
 private:
 			void				_ShowOptionalPackages();
 			void				_LaunchDriveSetup();
+			void				_LaunchBootman();
 			void				_DisableInterface(bool disable);
 			void				_ScanPartitions();
 			void				_UpdateControls();
@@ -86,10 +88,12 @@
 			BButton*			fBeginButton;
 			BButton*			fSetupButton;
 			BButton*			fMakeBootableButton;
-
+			BButton*			fBootmanButton;
 			bool				fEncouragedToSetupPartitions;
 
 			bool				fDriveSetupLaunched;
+			bool 				fBootmanLaunched;
+			
 			InstallStatus		fInstallStatus;
 
 			WorkerThread*		fWorkerThread;
