summaryrefslogtreecommitdiff
path: root/rbutil/rbutilqt/rbutilqt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/rbutilqt/rbutilqt.cpp')
-rw-r--r--rbutil/rbutilqt/rbutilqt.cpp57
1 files changed, 44 insertions, 13 deletions
diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp
index 3d700b7e81..a374737bd8 100644
--- a/rbutil/rbutilqt/rbutilqt.cpp
+++ b/rbutil/rbutilqt/rbutilqt.cpp
@@ -337,6 +337,40 @@ void RbUtilQt::installBl()
337 logger->show(); 337 logger->show();
338 338
339 QString platform = userSettings->value("defaults/platform").toString(); 339 QString platform = userSettings->value("defaults/platform").toString();
340
341 // create installer
342 blinstaller = new BootloaderInstaller(this);
343
344 blinstaller->setMountPoint(userSettings->value("defaults/mountpoint").toString());
345
346 blinstaller->setProxy(proxy());
347 blinstaller->setDevice(platform);
348 blinstaller->setBootloaderMethod(devices->value(platform + "/bootloadermethod").toString());
349 blinstaller->setBootloaderName(devices->value(platform + "/bootloadername").toString());
350 blinstaller->setBootloaderBaseUrl(devices->value("bootloader_url").toString());
351 blinstaller->setBootloaderInfoUrl(devices->value("bootloader_info_url").toString());
352 if(!blinstaller->downloadInfo())
353 {
354 logger->addItem(tr("Could not get the bootloader info file!"),LOGERROR);
355 logger->abort();
356 return;
357 }
358
359 if(blinstaller->uptodate())
360 {
361 int ret = QMessageBox::question(this, tr("Bootloader Installation"),
362 tr("It seem your Bootloader is already uptodate.\n"
363 "Do really want to install it?"),
364 QMessageBox::Ok | QMessageBox::Cancel,
365 QMessageBox::Cancel);
366 if(ret == QMessageBox::Cancel)
367 {
368 logger->addItem(tr("Bootloader installation Canceled!"),LOGERROR);
369 logger->abort();
370 return;
371 }
372
373 }
340 374
341 // if fwpatcher , ask for extra file 375 // if fwpatcher , ask for extra file
342 QString offirmware; 376 QString offirmware;
@@ -367,22 +401,11 @@ void RbUtilQt::installBl()
367 return; 401 return;
368 } 402 }
369 } 403 }
370
371 // create installer
372 blinstaller = new BootloaderInstaller(this);
373
374 blinstaller->setMountPoint(userSettings->value("defaults/mountpoint").toString());
375
376 blinstaller->setProxy(proxy());
377 blinstaller->setDevice(platform);
378 blinstaller->setBootloaderMethod(devices->value(platform + "/bootloadermethod").toString());
379 blinstaller->setBootloaderName(devices->value(platform + "/bootloadername").toString());
380 blinstaller->setBootloaderBaseUrl(devices->value("bootloader_url").toString());
381 blinstaller->setOrigFirmwarePath(offirmware); 404 blinstaller->setOrigFirmwarePath(offirmware);
382 405
383 blinstaller->install(logger);
384 406
385 // connect(blinstaller, SIGNAL(done(bool)), this, SLOT(done(bool))); 407 blinstaller->install(logger);
408
386} 409}
387 410
388 411
@@ -507,6 +530,14 @@ void RbUtilQt::uninstallBootloader(void)
507 blinstaller.setBootloaderMethod(devices->value(plattform + "/bootloadermethod").toString()); 530 blinstaller.setBootloaderMethod(devices->value(plattform + "/bootloadermethod").toString());
508 blinstaller.setBootloaderName(devices->value(plattform + "/bootloadername").toString()); 531 blinstaller.setBootloaderName(devices->value(plattform + "/bootloadername").toString());
509 blinstaller.setBootloaderBaseUrl(devices->value("bootloader_url").toString()); 532 blinstaller.setBootloaderBaseUrl(devices->value("bootloader_url").toString());
533 blinstaller.setBootloaderInfoUrl(devices->value("bootloader_info_url").toString());
534 if(!blinstaller.downloadInfo())
535 {
536 logger->addItem(tr("Could not get the bootloader info file!"),LOGERROR);
537 logger->abort();
538 return;
539 }
540
510 blinstaller.uninstall(logger); 541 blinstaller.uninstall(logger);
511 542
512} 543}