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.cpp67
1 files changed, 63 insertions, 4 deletions
diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp
index a374737bd8..6ae5fbf5e8 100644
--- a/rbutil/rbutilqt/rbutilqt.cpp
+++ b/rbutil/rbutilqt/rbutilqt.cpp
@@ -31,6 +31,7 @@
31#include "installthemes.h" 31#include "installthemes.h"
32#include "uninstallwindow.h" 32#include "uninstallwindow.h"
33#include "browseof.h" 33#include "browseof.h"
34#include "multiinstaller.h"
34 35
35#ifdef __linux 36#ifdef __linux
36#include <stdio.h> 37#include <stdio.h>
@@ -93,10 +94,9 @@ RbUtilQt::RbUtilQt(QWidget *parent) : QMainWindow(parent)
93 connect(ui.buttonRemoveRockbox, SIGNAL(clicked()), this, SLOT(uninstall())); 94 connect(ui.buttonRemoveRockbox, SIGNAL(clicked()), this, SLOT(uninstall()));
94 connect(ui.buttonRemoveBootloader, SIGNAL(clicked()), this, SLOT(uninstallBootloader())); 95 connect(ui.buttonRemoveBootloader, SIGNAL(clicked()), this, SLOT(uninstallBootloader()));
95 connect(ui.buttonDownloadManual, SIGNAL(clicked()), this, SLOT(downloadManual())); 96 connect(ui.buttonDownloadManual, SIGNAL(clicked()), this, SLOT(downloadManual()));
96 97 connect(ui.buttonSmall, SIGNAL(clicked()), this, SLOT(smallInstall()));
97 // disable unimplemented stuff 98 connect(ui.buttonComplete, SIGNAL(clicked()), this, SLOT(completeInstall()));
98 ui.buttonSmall->setEnabled(false); 99
99 ui.buttonComplete->setEnabled(false);
100#if !defined(STATIC) 100#if !defined(STATIC)
101 ui.actionInstall_Rockbox_Utility_on_player->setEnabled(false); 101 ui.actionInstall_Rockbox_Utility_on_player->setEnabled(false);
102#else 102#else
@@ -299,6 +299,65 @@ void RbUtilQt::updateManual()
299 } 299 }
300} 300}
301 301
302void RbUtilQt::completeInstall()
303{
304 if(QMessageBox::question(this, tr("Confirm Installation"),
305 tr("Do you really want to make a complete Installation?"),
306 QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) return;
307
308 MultiInstaller installer(this);
309 installer.setUserSettings(userSettings);
310 installer.setDeviceSettings(devices);
311 installer.setProxy(proxy());
312
313 buildInfo.open();
314 QSettings info(buildInfo.fileName(), QSettings::IniFormat, this);
315 buildInfo.close();
316
317 devices->beginGroup(platform);
318 QString released = devices->value("released").toString();
319 devices->endGroup();
320 if(released == "yes") {
321 // only set the keys if needed -- querying will yield an empty string
322 // if not set.
323 versmap.insert("rel_rev", devices->value("last_release").toString());
324 versmap.insert("rel_date", ""); // FIXME: provide the release timestamp
325 }
326 installer.setVersionStrings(versmap);
327
328 installer.installComplete();
329
330}
331
332void RbUtilQt::smallInstall()
333{
334 if(QMessageBox::question(this, tr("Confirm Installation"),
335 tr("Do you really want to make a small Installation?"),
336 QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) return;
337
338 MultiInstaller installer(this);
339 installer.setUserSettings(userSettings);
340 installer.setDeviceSettings(devices);
341 installer.setProxy(proxy());
342
343 buildInfo.open();
344 QSettings info(buildInfo.fileName(), QSettings::IniFormat, this);
345 buildInfo.close();
346
347 devices->beginGroup(platform);
348 QString released = devices->value("released").toString();
349 devices->endGroup();
350 if(released == "yes") {
351 // only set the keys if needed -- querying will yield an empty string
352 // if not set.
353 versmap.insert("rel_rev", devices->value("last_release").toString());
354 versmap.insert("rel_date", ""); // FIXME: provide the release timestamp
355 }
356 installer.setVersionStrings(versmap);
357
358 installer.installSmall();
359
360}
302 361
303void RbUtilQt::install() 362void RbUtilQt::install()
304{ 363{