summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2012-06-26 18:41:25 +0200
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2012-06-26 20:11:41 +0200
commitfa17cb904c270e8227c0446bee4b51789eb5bb8c (patch)
tree97069aa4d4062ed710442cb119a10cae6d2e1351
parent9b783bc1050d9288e5392cb1eb90dcde2401f8bb (diff)
downloadrockbox-fa17cb904c270e8227c0446bee4b51789eb5bb8c.tar.gz
rockbox-fa17cb904c270e8227c0446bee4b51789eb5bb8c.zip
Rework Installation and remove Quick Start tab.
The Quick Start tab turned out to be used a lot but not explaining what its functionality actually does, leading to various amount of confusion. The Quick Start tab and its functionality have been completely removed. As replacement the reworked Installation tab now includes both the entries from the old Installation tab (Bootloader and Rockbox) and the Extras tab (Fonts, Themes, Game files). Each of the items can be enabled or disabled individually, and the selection is saved in the configuration. The only exception is the bootloader option, since installing the bootloader is only needed once. To help with this the bootloader checkbox is automatically enabled if no Rockbox installation is found, and disabled if one is found. While it would be nicer to check if the bootloader is actually installed this is not possible for various players so the implementation simply relies on a Rockbox installation. This should also make it much easier to update an existing installation. Current limitations: - the selected themes are not saved. - it is not possible to detect if the target has the plugins that require additional game files prior to installation. Thus the "Game files" option is available for all targets but simply skipped if the plugins are not found. Change-Id: I1929bb7045e382fcbba431cca057d3121607d3a9
-rw-r--r--rbutil/rbutilqt/base/rbsettings.cpp4
-rw-r--r--rbutil/rbutilqt/base/rbsettings.h4
-rw-r--r--rbutil/rbutilqt/base/zipinstaller.cpp3
-rw-r--r--rbutil/rbutilqt/gui/selectiveinstallwidget.cpp552
-rw-r--r--rbutil/rbutilqt/gui/selectiveinstallwidget.h66
-rw-r--r--rbutil/rbutilqt/gui/selectiveinstallwidgetfrm.ui266
-rw-r--r--rbutil/rbutilqt/installwindow.cpp316
-rw-r--r--rbutil/rbutilqt/installwindow.h63
-rw-r--r--rbutil/rbutilqt/installwindowfrm.ui251
-rw-r--r--rbutil/rbutilqt/rbutilqt.cpp552
-rw-r--r--rbutil/rbutilqt/rbutilqt.h24
-rw-r--r--rbutil/rbutilqt/rbutilqt.pri6
-rw-r--r--rbutil/rbutilqt/rbutilqtfrm.ui397
13 files changed, 945 insertions, 1559 deletions
diff --git a/rbutil/rbutilqt/base/rbsettings.cpp b/rbutil/rbutilqt/base/rbsettings.cpp
index f6a936ab9a..a42b33c1bd 100644
--- a/rbutil/rbutilqt/base/rbsettings.cpp
+++ b/rbutil/rbutilqt/base/rbsettings.cpp
@@ -41,6 +41,10 @@ const static struct {
{ RbSettings::Platform, "platform", "" },
{ RbSettings::Language, "lang", "" },
{ RbSettings::BackupPath, "backuppath", "" },
+ { RbSettings::InstallRockbox, "install_rockbox", "true" },
+ { RbSettings::InstallFonts, "install_fonts", "true" },
+ { RbSettings::InstallThemes, "install_themes", "false" },
+ { RbSettings::InstallGamefiles, "install_gamefiles", "true" },
#if defined(Q_OS_WIN32)
{ RbSettings::Tts, "tts", "sapi" },
#elif defined(Q_OS_MACX)
diff --git a/rbutil/rbutilqt/base/rbsettings.h b/rbutil/rbutilqt/base/rbsettings.h
index 21234a4e9a..7aada6e78c 100644
--- a/rbutil/rbutilqt/base/rbsettings.h
+++ b/rbutil/rbutilqt/base/rbsettings.h
@@ -41,6 +41,10 @@ class RbSettings : public QObject
Platform,
Language,
BackupPath,
+ InstallRockbox,
+ InstallFonts,
+ InstallThemes,
+ InstallGamefiles,
Tts,
UseTtsCorrections,
TalkFolders,
diff --git a/rbutil/rbutilqt/base/zipinstaller.cpp b/rbutil/rbutilqt/base/zipinstaller.cpp
index 117fa2dae9..c41304e3b4 100644
--- a/rbutil/rbutilqt/base/zipinstaller.cpp
+++ b/rbutil/rbutilqt/base/zipinstaller.cpp
@@ -63,8 +63,7 @@ void ZipInstaller::installContinue()
installStart();
}
else {
- emit logItem(tr("Installation finished successfully."), LOGOK);
-
+ emit logItem(tr("Package installation finished successfully."), LOGOK);
emit done(false);
return;
}
diff --git a/rbutil/rbutilqt/gui/selectiveinstallwidget.cpp b/rbutil/rbutilqt/gui/selectiveinstallwidget.cpp
new file mode 100644
index 0000000000..360ff546eb
--- /dev/null
+++ b/rbutil/rbutilqt/gui/selectiveinstallwidget.cpp
@@ -0,0 +1,552 @@
+/***************************************************************************
+ * __________ __ ___.
+ * Open \______ \ ____ ____ | | _\_ |__ _______ ___
+ * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+ * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+ * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+ * \/ \/ \/ \/ \/
+ *
+ * Copyright (C) 2012 by Dominik Riebeling
+ *
+ * All files in this archive are subject to the GNU General Public License.
+ * See the file COPYING in the source tree root for full license agreement.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ****************************************************************************/
+
+#include <QtGui>
+#include "selectiveinstallwidget.h"
+#include "ui_selectiveinstallwidgetfrm.h"
+#include "serverinfo.h"
+#include "rbsettings.h"
+#include "rockboxinfo.h"
+#include "systeminfo.h"
+#include "progressloggergui.h"
+#include "bootloaderinstallbase.h"
+#include "bootloaderinstallhelper.h"
+#include "themesinstallwindow.h"
+#include "utils.h"
+
+SelectiveInstallWidget::SelectiveInstallWidget(QWidget* parent) : QWidget(parent)
+{
+ ui.setupUi(this);
+ ui.rockboxCheckbox->setChecked(RbSettings::value(RbSettings::InstallRockbox).toBool());
+ ui.fontsCheckbox->setChecked(RbSettings::value(RbSettings::InstallFonts).toBool());
+ ui.themesCheckbox->setChecked(RbSettings::value(RbSettings::InstallThemes).toBool());
+ ui.gamefileCheckbox->setChecked(RbSettings::value(RbSettings::InstallGamefiles).toBool());
+
+ // check if Rockbox is installed by looking after rockbox-info.txt.
+ // If installed uncheck bootloader installation.
+ RockboxInfo info(m_mountpoint);
+ ui.bootloaderCheckbox->setChecked(!info.success());
+
+ m_logger = NULL;
+ m_zipinstaller = NULL;
+ m_themesinstaller = NULL;
+
+ connect(ui.installButton, SIGNAL(clicked()), this, SLOT(startInstall()));
+ connect(this, SIGNAL(installSkipped(bool)), this, SLOT(continueInstall(bool)));
+ connect(ui.themesCustomize, SIGNAL(clicked()), this, SLOT(customizeThemes()));
+ connect(ui.selectedVersion, SIGNAL(currentIndexChanged(int)),
+ this, SLOT(selectedVersionChanged(int)));
+ // update version information. This also handles setting the previously
+ // selected build type and bootloader disabling.
+ updateVersion();
+}
+
+
+void SelectiveInstallWidget::selectedVersionChanged(int index)
+{
+ QString current = ui.selectedVersion->itemData(index).toString();
+ if(current == "release")
+ ui.selectedDescription->setText(tr("This is the latest stable "
+ "release available."));
+ if(current == "current")
+ ui.selectedDescription->setText(tr("The development version is "
+ "updated on every code change. Last update was on %1").arg(
+ ServerInfo::value(ServerInfo::BleedingDate).toString()));
+ if(current == "rc")
+ ui.selectedDescription->setText(tr("This will eventually become the "
+ "next Rockbox version. Install it to help testing."));
+}
+
+
+void SelectiveInstallWidget::updateVersion(void)
+{
+ // get some configuration values globally
+ m_mountpoint = RbSettings::value(RbSettings::Mountpoint).toString();
+ m_target = RbSettings::value(RbSettings::CurrentPlatform).toString();
+ m_blmethod = SystemInfo::platformValue(m_target,
+ SystemInfo::CurBootloaderMethod).toString();
+
+ if(m_logger != NULL) {
+ delete m_logger;
+ m_logger = NULL;
+ }
+
+ // re-populate all version items
+ m_versions.clear();
+ m_versions.insert("release", ServerInfo::value(ServerInfo::CurReleaseVersion).toString());
+ m_versions.insert("current", ServerInfo::value(ServerInfo::BleedingRevision).toString());
+ m_versions.insert("rc", ServerInfo::value(ServerInfo::RelCandidateVersion).toString());
+
+ ui.selectedVersion->clear();
+ if(!m_versions["release"].isEmpty()) {
+ ui.selectedVersion->addItem(tr("Stable Release (Version %1)").arg(
+ m_versions["release"]), "release");
+ }
+ if(!m_versions["current"].isEmpty()) {
+ ui.selectedVersion->addItem(tr("Development Version (Revison %1)").arg(
+ m_versions["current"]), "current");
+ }
+ if(!m_versions["rc"].isEmpty()) {
+ ui.selectedVersion->addItem(tr("Release Candidate (Revison %1)").arg(
+ m_versions["rc"]), "rc");
+ }
+
+ // select previously selected version
+ int index = ui.selectedVersion->findData(RbSettings::value(RbSettings::Build).toString());
+ if(index != -1) {
+ ui.selectedVersion->setCurrentIndex(index);
+ }
+ else {
+ index = ui.selectedVersion->findData("release");
+ ui.selectedVersion->setCurrentIndex(index);
+ }
+ // check if Rockbox is installed. If it is untick the bootloader option, as
+ // well as if the selected player doesn't need a bootloader.
+ if(m_blmethod == "none") {
+ ui.bootloaderCheckbox->setEnabled(false);
+ ui.bootloaderLabel->setEnabled(false);
+ ui.bootloaderLabel->setText(tr("The selected player doesn't need a bootloader."));
+ }
+ else {
+ ui.bootloaderCheckbox->setEnabled(true);
+ ui.bootloaderLabel->setEnabled(true);
+ ui.bootloaderLabel->setText(tr("The bootloader is required for starting "
+ "Rockbox. Installation of the bootloader is only necessary "
+ "on first time installation."));
+ }
+
+ // check if Rockbox is installed by looking after rockbox-info.txt.
+ // If installed uncheck bootloader installation.
+ RockboxInfo info(m_mountpoint);
+ ui.bootloaderCheckbox->setChecked(!info.success());
+
+}
+
+
+void SelectiveInstallWidget::saveSettings(void)
+{
+ qDebug() << "[SelectiveInstallWidget] saving current settings";
+
+ RbSettings::setValue(RbSettings::InstallRockbox, ui.rockboxCheckbox->isChecked());
+ RbSettings::setValue(RbSettings::InstallFonts, ui.fontsCheckbox->isChecked());
+ RbSettings::setValue(RbSettings::InstallThemes, ui.themesCheckbox->isChecked());
+ RbSettings::setValue(RbSettings::InstallGamefiles, ui.gamefileCheckbox->isChecked());
+}
+
+
+void SelectiveInstallWidget::startInstall(void)
+{
+ qDebug() << "[SelectiveInstallWidget] starting installation";
+ saveSettings();
+ m_installStage = 0;
+ if(m_logger != NULL) delete m_logger;
+ m_logger = new ProgressLoggerGui(this);
+ m_logger->show();
+ if(!QFileInfo(m_mountpoint).isDir()) {
+ m_logger->addItem(tr("Mountpoint is wrong"), LOGERROR);
+ m_logger->setFinished();
+ return;
+ }
+ // start installation. No errors until now.
+ continueInstall(false);
+
+}
+
+
+void SelectiveInstallWidget::continueInstall(bool error)
+{
+ qDebug() << "[SelectiveInstallWidget] continuing install with stage" << m_installStage;
+ if(error) {
+ qDebug() << "[SelectiveInstallWidget] Last part returned error.";
+ m_logger->setFinished();
+ m_installStage = 7;
+ }
+ m_installStage++;
+ switch(m_installStage) {
+ case 0: qDebug() << "[SelectiveInstallWidget] Something wrong!"; break;
+ case 1: installBootloader(); break;
+ case 2: installRockbox(); break;
+ case 3: installFonts(); break;
+ case 4: installThemes(); break;
+ case 5: installGamefiles(); break;
+ case 6: installBootloaderPost(); break;
+ default: break;
+ }
+
+ if(m_installStage > 6) {
+ qDebug() << "[SelectiveInstallWidget] All install stages done.";
+ m_logger->setFinished();
+ // check if Rockbox is installed by looking after rockbox-info.txt.
+ // If installed uncheck bootloader installation.
+ RockboxInfo info(m_mountpoint);
+ ui.bootloaderCheckbox->setChecked(!info.success());
+ }
+}
+
+
+void SelectiveInstallWidget::installBootloader(void)
+{
+ if(ui.bootloaderCheckbox->isChecked()) {
+ qDebug() << "[SelectiveInstallWidget] installing bootloader";
+
+ QString platform = RbSettings::value(RbSettings::Platform).toString();
+ QString backupDestination = "";
+
+ // create installer
+ BootloaderInstallBase *bl =
+ BootloaderInstallHelper::createBootloaderInstaller(this,
+ SystemInfo::value(SystemInfo::CurBootloaderMethod).toString());
+ if(bl == NULL) {
+ m_logger->addItem(tr("No install method known."), LOGERROR);
+ m_logger->setFinished();
+ return;
+ }
+
+ // the bootloader install class does NOT use any GUI stuff.
+ // All messages are passed via signals.
+ connect(bl, SIGNAL(done(bool)), m_logger, SLOT(setFinished()));
+ connect(bl, SIGNAL(done(bool)), this, SLOT(continueInstall(bool)));
+ connect(bl, SIGNAL(logItem(QString, int)), m_logger, SLOT(addItem(QString, int)));
+ connect(bl, SIGNAL(logProgress(int, int)), m_logger, SLOT(setProgress(int, int)));
+
+ // set bootloader filename. Do this now as installed() needs it.
+ QStringList blfile = SystemInfo::value(SystemInfo::CurBootloaderFile).toStringList();
+ QStringList blfilepath;
+ for(int a = 0; a < blfile.size(); a++) {
+ blfilepath.append(RbSettings::value(RbSettings::Mountpoint).toString()
+ + blfile.at(a));
+ }
+ bl->setBlFile(blfilepath);
+ QUrl url(SystemInfo::value(SystemInfo::BootloaderUrl).toString()
+ + SystemInfo::value(SystemInfo::CurBootloaderName).toString());
+ bl->setBlUrl(url);
+ bl->setLogfile(RbSettings::value(RbSettings::Mountpoint).toString()
+ + "/.rockbox/rbutil.log");
+
+ if(bl->installed() == BootloaderInstallBase::BootloaderRockbox) {
+ if(QMessageBox::question(this, tr("Bootloader detected"),
+ tr("Bootloader already installed. Do you want to reinstall the bootloader?"),
+ QMessageBox::Yes | QMessageBox::No) == QMessageBox::No) {
+ // keep m_logger open for auto installs.
+ // don't consider abort as error in auto-mode.
+ m_logger->addItem(tr("Bootloader installation skipped"), LOGINFO);
+ delete bl;
+ emit installSkipped(true);
+ return;
+ }
+ }
+ else if(bl->installed() == BootloaderInstallBase::BootloaderOther
+ && bl->capabilities() & BootloaderInstallBase::Backup)
+ {
+ QString targetFolder = SystemInfo::value(SystemInfo::CurPlatformName).toString()
+ + " Firmware Backup";
+ // remove invalid character(s)
+ targetFolder.remove(QRegExp("[:/]"));
+ if(QMessageBox::question(this, tr("Create Bootloader backup"),
+ tr("You can create a backup of the original bootloader "
+ "file. Press \"Yes\" to select an output folder on your "
+ "computer to save the file to. The file will get placed "
+ "in a new folder \"%1\" created below the selected folder.\n"
+ "Press \"No\" to skip this step.").arg(targetFolder),
+ QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
+ backupDestination = QFileDialog::getExistingDirectory(this,
+ tr("Browse backup folder"), QDir::homePath());
+ if(!backupDestination.isEmpty())
+ backupDestination += "/" + targetFolder;
+
+ qDebug() << "[RbUtil] backing up to" << backupDestination;
+ // backup needs to be done after the m_logger has been set up.
+ }
+ }
+
+ if(bl->capabilities() & BootloaderInstallBase::NeedsOf)
+ {
+ int ret;
+ ret = QMessageBox::information(this, tr("Prerequisites"),
+ bl->ofHint(),QMessageBox::Ok | QMessageBox::Abort);
+ if(ret != QMessageBox::Ok) {
+ // consider aborting an error to close window / abort automatic
+ // installation.
+ m_logger->addItem(tr("Bootloader installation aborted"), LOGINFO);
+ m_logger->setFinished();
+ emit installSkipped(true);
+ return;
+ }
+ // open dialog to browse to of file
+ QString offile;
+ QString filter
+ = SystemInfo::value(SystemInfo::CurBootloaderFilter).toString();
+ if(!filter.isEmpty()) {
+ filter = tr("Bootloader files (%1)").arg(filter) + ";;";
+ }
+ filter += tr("All files (*)");
+ offile = QFileDialog::getOpenFileName(this,
+ tr("Select firmware file"), QDir::homePath(), filter);
+ if(!QFileInfo(offile).isReadable()) {
+ m_logger->addItem(tr("Error opening firmware file"), LOGERROR);
+ m_logger->setFinished();
+ emit installSkipped(true);
+ return;
+ }
+ if(!bl->setOfFile(offile, blfile)) {
+ m_logger->addItem(tr("Error reading firmware file"), LOGERROR);
+ m_logger->setFinished();
+ emit installSkipped(true);
+ return;
+ }
+ }
+
+ // start install.
+ if(!backupDestination.isEmpty()) {
+ if(!bl->backup(backupDestination)) {
+ if(QMessageBox::warning(this, tr("Backup error"),
+ tr("Could not create backup file. Continue?"),
+ QMessageBox::No | QMessageBox::Yes)
+ == QMessageBox::No) {
+ m_logger->setFinished();
+ return;
+ }
+ }
+ }
+ bl->install();
+
+ }
+ else {
+ qDebug() << "[SelectiveInstallWidget] Bootloader install disabled.";
+ emit installSkipped(false);
+ }
+}
+
+void SelectiveInstallWidget::installBootloaderPost()
+{
+ // don't do anything if no bootloader install has been done.
+ if(ui.bootloaderCheckbox->isChecked()) {
+ QString msg = BootloaderInstallHelper::postinstallHints(
+ RbSettings::value(RbSettings::Platform).toString());
+ if(!msg.isEmpty()) {
+ QMessageBox::information(this, tr("Manual steps required"), msg);
+ }
+ }
+ emit installSkipped(false);
+}
+
+
+void SelectiveInstallWidget::installRockbox(void)
+{
+ if(ui.rockboxCheckbox->isChecked()) {
+ qDebug() << "[SelectiveInstallWidget] installing Rockbox";
+ QString url;
+
+ QString selected = ui.selectedVersion->itemData(ui.selectedVersion->currentIndex()).toString();
+ RbSettings::setValue(RbSettings::Build, selected);
+ RbSettings::sync();
+
+ QString warning = Utils::checkEnvironment(false);
+ if(!warning.isEmpty())
+ {
+ warning += "<br/>" + tr("Continue with installation?");
+ if(QMessageBox::warning(this, tr("Really continue?"), warning,
+ QMessageBox::Ok | QMessageBox::Abort, QMessageBox::Abort)
+ == QMessageBox::Abort)
+ {
+ m_logger->addItem(tr("Aborted!"),LOGERROR);
+ m_logger->setFinished();
+ emit installSkipped(true);
+ return;
+ }
+ }
+
+ if(selected == "release") url = ServerInfo::platformValue(m_target,
+ ServerInfo::CurReleaseUrl).toString();
+ else if(selected == "current") url = ServerInfo::platformValue(m_target,
+ ServerInfo::CurDevelUrl).toString();
+ else if(selected == "rc") url = ServerInfo::platformValue(m_target,
+ ServerInfo::RelCandidateUrl).toString();
+
+#if 0
+ RockboxInfo info(m_mountpoint);
+ if(info.success()) {
+ // existing installation found. Ask for backup.
+ QMessageBox::information(this, tr("Backup existing installation?"),
+ tr("Existing installation detected. Create a backup before installing?"),
+ QMessageBox::Yes | QMessageBox::No, QMessageBox::No);
+
+ }
+#endif
+#if 0
+ //! check if we should backup
+ if(ui.backup->isChecked())
+ {
+ m_logger->addItem(tr("Beginning Backup..."),LOGINFO);
+ QCoreApplication::processEvents();
+
+ //! create dir, if it doesnt exist
+ QFileInfo backupFile(m_backupName);
+ if(!QDir(backupFile.path()).exists())
+ {
+ QDir a;
+ a.mkpath(backupFile.path());
+ }
+
+ //! create backup
+ bool result = true;
+ ZipUtil zip(this);
+ connect(&zip, SIGNAL(logProgress(int, int)), m_logger, SLOT(setProgress(int, int)));
+ connect(&zip, SIGNAL(logItem(QString, int)), m_logger, SLOT(addItem(QString, int)));
+ zip.open(m_backupName, QuaZip::mdCreate);
+ QString mp = RbSettings::value(RbSettings::Mountpoint).toString();
+ QString folder = mp + "/.rockbox";
+ result = zip.appendDirToArchive(folder, mp);
+ zip.close();
+ if(result) {
+ m_logger->addItem(tr("Backup finished."), LOGINFO);
+ }
+ else {
+ m_logger->addItem(tr("Backup failed!"), LOGERROR);
+ m_logger->setFinished();
+ return;
+ }
+ }
+#endif
+
+ //! install build
+ if(m_zipinstaller != NULL) delete m_zipinstaller;
+ m_zipinstaller = new ZipInstaller(this);
+ m_zipinstaller->setUrl(url);
+ m_zipinstaller->setLogSection("Rockbox (Base)");
+ if(!RbSettings::value(RbSettings::CacheDisabled).toBool())
+ m_zipinstaller->setCache(true);
+ m_zipinstaller->setLogVersion(m_versions[selected]);
+ m_zipinstaller->setMountPoint(m_mountpoint);
+
+ connect(m_zipinstaller, SIGNAL(done(bool)), this, SLOT(continueInstall(bool)));
+
+ connect(m_zipinstaller, SIGNAL(logItem(QString, int)), m_logger, SLOT(addItem(QString, int)));
+ connect(m_zipinstaller, SIGNAL(logProgress(int, int)), m_logger, SLOT(setProgress(int, int)));
+ connect(m_logger, SIGNAL(aborted()), m_zipinstaller, SLOT(abort()));
+ m_zipinstaller->install();
+
+ }
+ else {
+ qDebug() << "[SelectiveInstallWidget] Rockbox install disabled.";
+ emit installSkipped(false);
+ }
+}
+
+
+void SelectiveInstallWidget::installFonts(void)
+{
+ if(ui.fontsCheckbox->isChecked()) {
+ qDebug() << "[SelectiveInstallWidget] installing Fonts";
+
+ RockboxInfo installInfo(m_mountpoint);
+ QString fontsurl;
+ QString logversion;
+ QString relversion = installInfo.release();
+ if(relversion.isEmpty()) {
+ // release is empty for non-release versions (i.e. daily / current)
+ fontsurl = SystemInfo::value(SystemInfo::DailyFontUrl).toString();
+ }
+ else {
+ fontsurl = SystemInfo::value(SystemInfo::ReleaseFontUrl).toString();
+ logversion = installInfo.release();
+ }
+ fontsurl.replace("%RELEASEVER%", relversion);
+
+ // create new zip installer
+ if(m_zipinstaller != NULL) delete m_zipinstaller;
+ m_zipinstaller = new ZipInstaller(this);
+ m_zipinstaller->setUrl(fontsurl);
+ m_zipinstaller->setLogSection("Fonts");
+ m_zipinstaller->setLogVersion(logversion);
+ m_zipinstaller->setMountPoint(m_mountpoint);
+ if(!RbSettings::value(RbSettings::CacheDisabled).toBool())
+ m_zipinstaller->setCache(true);
+
+ connect(m_zipinstaller, SIGNAL(done(bool)), this, SLOT(continueInstall(bool)));
+ connect(m_zipinstaller, SIGNAL(logItem(QString, int)), m_logger, SLOT(addItem(QString, int)));
+ connect(m_zipinstaller, SIGNAL(logProgress(int, int)), m_logger, SLOT(setProgress(int, int)));
+ connect(m_logger, SIGNAL(aborted()), m_zipinstaller, SLOT(abort()));
+ m_zipinstaller->install();
+ }
+ else {
+ qDebug() << "[SelectiveInstallWidget] Fonts install disabled.";
+ emit installSkipped(false);
+ }
+}
+
+void SelectiveInstallWidget::customizeThemes(void)
+{
+ if(m_themesinstaller == NULL)
+ m_themesinstaller = new ThemesInstallWindow(this);
+
+ m_themesinstaller->setSelectOnly(true);
+ m_themesinstaller->show();
+}
+
+
+void SelectiveInstallWidget::installThemes(void)
+{
+ if(ui.themesCheckbox->isChecked()) {
+ qDebug() << "[SelectiveInstallWidget] installing themes";
+ if(m_themesinstaller == NULL)
+ m_themesinstaller = new ThemesInstallWindow(this);
+
+ m_themesinstaller->setLogger(m_logger);
+ m_themesinstaller->setModal(true);
+ m_themesinstaller->install();
+ connect(m_themesinstaller, SIGNAL(done(bool)), this, SLOT(continueInstall(bool)));
+ }
+ else {
+ qDebug() << "[SelectiveInstallWidget] Themes install disabled.";
+ emit installSkipped(false);
+ }
+}
+
+
+void SelectiveInstallWidget::installGamefiles(void)
+{
+ if(ui.gamefileCheckbox->isChecked()) {
+ // check if installed Rockbox has doom plugin. If not disable doom.
+ if(!QFileInfo(m_mountpoint + "/.rockbox/rocks/games/doom.rock").exists()) {
+ m_logger->addItem(tr("Your installation doesn't require game files, skipping."), LOGINFO);
+ emit installSkipped(false);
+ }
+ qDebug() << "[SelectiveInstallWidget] installing gamefiles";
+ // create new zip installer
+ if(m_zipinstaller != NULL) delete m_zipinstaller;
+ m_zipinstaller = new ZipInstaller(this);
+
+ m_zipinstaller->setUrl(SystemInfo::value(SystemInfo::DoomUrl).toString());
+ m_zipinstaller->setLogSection("Game Addons");
+ m_zipinstaller->setLogVersion();
+ m_zipinstaller->setMountPoint(m_mountpoint);
+ if(!RbSettings::value(RbSettings::CacheDisabled).toBool())
+ m_zipinstaller->setCache(true);
+ connect(m_zipinstaller, SIGNAL(done(bool)), this, SLOT(continueInstall(bool)));
+ connect(m_zipinstaller, SIGNAL(logItem(QString, int)), m_logger, SLOT(addItem(QString, int)));
+ connect(m_zipinstaller, SIGNAL(logProgress(int, int)), m_logger, SLOT(setProgress(int, int)));
+ connect(m_logger, SIGNAL(aborted()), m_zipinstaller, SLOT(abort()));
+ m_zipinstaller->install();
+ }
+ else {
+ qDebug() << "[SelectiveInstallWidget] Gamefile install disabled.";
+ emit installSkipped(false);
+ }
+}
+
diff --git a/rbutil/rbutilqt/gui/selectiveinstallwidget.h b/rbutil/rbutilqt/gui/selectiveinstallwidget.h
new file mode 100644
index 0000000000..72820b23d4
--- /dev/null
+++ b/rbutil/rbutilqt/gui/selectiveinstallwidget.h
@@ -0,0 +1,66 @@
+/***************************************************************************
+ * __________ __ ___.
+ * Open \______ \ ____ ____ | | _\_ |__ _______ ___
+ * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+ * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+ * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+ * \/ \/ \/ \/ \/
+ *
+ * Copyright (C) 2012 by Dominik Riebeling
+ *
+ * All files in this archive are subject to the GNU General Public License.
+ * See the file COPYING in the source tree root for full license agreement.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ****************************************************************************/
+
+#ifndef SELECTIVEINSTALLWIDGET_H
+#define SELECTIVEINSTALLWIDGET_H
+
+#include <QWidget>
+#include "ui_selectiveinstallwidgetfrm.h"
+#include "progressloggergui.h"
+#include "zipinstaller.h"
+#include "themesinstallwindow.h"
+
+class SelectiveInstallWidget : public QWidget
+{
+ Q_OBJECT
+ public:
+ SelectiveInstallWidget(QWidget* parent = 0);
+
+ public slots:
+ void updateVersion(void);
+ void saveSettings(void);
+ void startInstall(void);
+
+ private slots:
+ void continueInstall(bool);
+ void installBootloader(void);
+ void installRockbox(void);
+ void installFonts(void);
+ void installThemes(void);
+ void installGamefiles(void);
+ void installBootloaderPost(void);
+ void customizeThemes(void);
+ void selectedVersionChanged(int);
+
+ signals:
+ void installSkipped(bool);
+
+ private:
+ Ui::SelectiveInstallWidget ui;
+ QString m_target;
+ QString m_blmethod;
+ QString m_mountpoint;
+ ProgressLoggerGui *m_logger;
+ int m_installStage;
+ ZipInstaller *m_zipinstaller;
+ QMap<QString, QString> m_versions;
+ ThemesInstallWindow *m_themesinstaller;
+};
+
+#endif
+
diff --git a/rbutil/rbutilqt/gui/selectiveinstallwidgetfrm.ui b/rbutil/rbutilqt/gui/selectiveinstallwidgetfrm.ui
new file mode 100644
index 0000000000..25cf44ba90
--- /dev/null
+++ b/rbutil/rbutilqt/gui/selectiveinstallwidgetfrm.ui
@@ -0,0 +1,266 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>SelectiveInstallWidget</class>
+ <widget class="QWidget" name="SelectiveInstallWidget">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>663</width>
+ <height>369</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="windowTitle">
+ <string>Form</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_3">
+ <item row="0" column="0">
+ <widget class="QGroupBox" name="versionSelectGroupBox">
+ <property name="title">
+ <string>Rockbox version to install</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0">
+ <widget class="QComboBox" name="selectedVersion"/>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLabel" name="selectedDescription">
+ <property name="text">
+ <string>Version information not available yet.</string>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QGroupBox" name="groupBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string>Rockbox components to install</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_2">
+ <item row="0" column="0">
+ <widget class="QCheckBox" name="bootloaderCheckbox">
+ <property name="text">
+ <string>&amp;Bootloader</string>
+ </property>
+ <property name="icon">
+ <iconset resource="../rbutilqt.qrc">
+ <normaloff>:/icons/bootloader_btn.png</normaloff>:/icons/bootloader_btn.png</iconset>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLabel" name="rockboxLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>The main Rockbox firmware.</string>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QCheckBox" name="fontsCheckbox">
+ <property name="text">
+ <string>Fonts</string>
+ </property>
+ <property name="icon">
+ <iconset resource="../rbutilqt.qrc">
+ <normaloff>:/icons/font_btn.png</normaloff>:/icons/font_btn.png</iconset>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QCheckBox" name="rockboxCheckbox">
+ <property name="text">
+ <string>&amp;Rockbox</string>
+ </property>
+ <property name="icon">
+ <iconset resource="../rbutilqt.qrc">
+ <normaloff>:/icons/rbinstall_btn.png</normaloff>:/icons/rbinstall_btn.png</iconset>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="1">
+ <widget class="QLabel" name="gameLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Some game plugins require additional files.</string>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QLabel" name="fontsLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Additional fonts for the User Interface.</string>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLabel" name="bootloaderLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>The bootloader is required for starting Rockbox. Only necessary for first time install.</string>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="0">
+ <widget class="QCheckBox" name="gamefileCheckbox">
+ <property name="text">
+ <string>Game Files</string>
+ </property>
+ <property name="icon">
+ <iconset resource="../rbutilqt.qrc">
+ <normaloff>:/icons/doom_btn.png</normaloff>:/icons/doom_btn.png</iconset>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="3">
+ <widget class="QPushButton" name="themesCustomize">
+ <property name="text">
+ <string>Customize</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <widget class="QCheckBox" name="themesCheckbox">
+ <property name="text">
+ <string>Themes</string>
+ </property>
+ <property name="icon">
+ <iconset resource="../rbutilqt.qrc">
+ <normaloff>:/icons/themes_btn.png</normaloff>:/icons/themes_btn.png</iconset>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="QLabel" name="themesLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Themes allow adjusting the user interface of Rockbox. Use &quot;Customize&quot; to select themes.</string>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2">
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Minimum</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>1</width>
+ <height>1</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Expanding</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>1</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="3" column="0">
+ <widget class="QPushButton" name="installButton">
+ <property name="text">
+ <string>&amp;Install</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <tabstops>
+ <tabstop>selectedVersion</tabstop>
+ <tabstop>bootloaderCheckbox</tabstop>
+ <tabstop>rockboxCheckbox</tabstop>
+ <tabstop>fontsCheckbox</tabstop>
+ <tabstop>themesCheckbox</tabstop>
+ <tabstop>themesCustomize</tabstop>
+ <tabstop>gamefileCheckbox</tabstop>
+ <tabstop>installButton</tabstop>
+ </tabstops>
+ <resources>
+ <include location="../rbutilqt.qrc"/>
+ </resources>
+ <connections/>
+</ui>
diff --git a/rbutil/rbutilqt/installwindow.cpp b/rbutil/rbutilqt/installwindow.cpp
deleted file mode 100644
index 17d0495bc4..0000000000
--- a/rbutil/rbutilqt/installwindow.cpp
+++ /dev/null
@@ -1,316 +0,0 @@
-/***************************************************************************
- * __________ __ ___.
- * Open \______ \ ____ ____ | | _\_ |__ _______ ___
- * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
- * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
- * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
- * \/ \/ \/ \/ \/
- *
- * Copyright (C) 2007 by Dominik Riebeling
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
-#include "installwindow.h"
-#include "ui_installwindowfrm.h"
-#include "system.h"
-#include "rbsettings.h"
-#include "serverinfo.h"
-#include "systeminfo.h"
-#include "utils.h"
-#include "rockboxinfo.h"
-#include "ziputil.h"
-
-InstallWindow::InstallWindow(QWidget *parent) : QDialog(parent)
-{
- ui.setupUi(this);
-
- connect(ui.radioStable, SIGNAL(toggled(bool)), this, SLOT(setDetailsStable(bool)));
- connect(ui.radioCandidate, SIGNAL(toggled(bool)), this, SLOT(setDetailsCandidate(bool)));
- connect(ui.radioCurrent, SIGNAL(toggled(bool)), this, SLOT(setDetailsCurrent(bool)));
- connect(ui.changeBackup, SIGNAL(pressed()), this, SLOT(changeBackupPath()));
- connect(ui.backup, SIGNAL(stateChanged(int)), this, SLOT(backupCheckboxChanged(int)));
-
- //! check if rockbox is already installed
- RockboxInfo rbinfo(RbSettings::value(RbSettings::Mountpoint).toString());
- QString version = rbinfo.version();
-
- if(version != "") {
- ui.Backupgroup->show();
- m_backupName = RbSettings::value(RbSettings::Mountpoint).toString();
- if(!m_backupName.endsWith("/")) m_backupName += "/";
- m_backupName += ".backup/rockbox-backup-"+version+".zip";
- // for some reason the label doesn't return its final size yet.
- // Delay filling ui.backupLocation until the checkbox is changed.
- }
- else {
- ui.Backupgroup->hide();
- }
- backupCheckboxChanged(Qt::Unchecked);
-
- if(ServerInfo::value(ServerInfo::CurReleaseVersion).toString().isEmpty()) {
- ui.radioStable->setEnabled(false);
- }
-
- // try to use the old selection first. If no selection has been made
- // in the past, use a preselection based on released status.
- QString lastinstalled = RbSettings::value(RbSettings::Build).toString();
- if(lastinstalled == "stable"
- && !ServerInfo::value(ServerInfo::CurReleaseVersion).toString().isEmpty()) {
- ui.radioStable->setChecked(true);
- }
- else if(lastinstalled == "rc"
- && !ServerInfo::value(ServerInfo::RelCandidateVersion).toString().isEmpty()) {
- ui.radioCandidate->setChecked(true);
- }
- else if(lastinstalled == "current") {
- ui.radioCurrent->setChecked(true);
- }
- else if(!ServerInfo::value(ServerInfo::CurReleaseVersion).toString().isEmpty()) {
- ui.radioStable->setChecked(true);
- ui.radioStable->setEnabled(true);
- }
- else {
- ui.radioCurrent->setChecked(true);
- ui.radioStable->setEnabled(false);
- ui.radioStable->setChecked(false);
- }
- if(ServerInfo::value(ServerInfo::RelCandidateVersion).toString().isEmpty()) {
- ui.radioCandidate->setEnabled(false);
- }
-
-}
-
-
-void InstallWindow::resizeEvent(QResizeEvent *e)
-{
- (void)e;
-
- // recalculate width of elided text.
- updateBackupLocation();
-}
-
-
-void InstallWindow::updateBackupLocation(void)
-{
- ui.backupLocation->setText(QDir::toNativeSeparators(
- fontMetrics().elidedText(tr("Backup to %1").arg(m_backupName),
- Qt::ElideMiddle, ui.backupLocation->size().width())));
-}
-
-
-void InstallWindow::backupCheckboxChanged(int state)
-{
- if(state == Qt::Checked)
- {
- ui.backupLocation->show();
- ui.changeBackup->show();
- // update backup location display.
- updateBackupLocation();
- }
- else
- {
- ui.backupLocation->hide();
- ui.changeBackup->hide();
- }
-}
-
-
-void InstallWindow::accept()
-{
- QString url;
- logger = new ProgressLoggerGui(this);
- logger->show();
- QString mountPoint = RbSettings::value(RbSettings::Mountpoint).toString();
- qDebug() << "[Install] mountpoint:" << mountPoint;
- // show dialog with error if mount point is wrong
- if(!QFileInfo(mountPoint).isDir()) {
- logger->addItem(tr("Mount point is wrong!"),LOGERROR);
- logger->setFinished();
- return;
- }
-
- QString myversion;
- if(ui.radioStable->isChecked()) {
- url = ServerInfo::value(ServerInfo::CurReleaseUrl).toString();
- RbSettings::setValue(RbSettings::Build, "stable");
- myversion = ServerInfo::value(ServerInfo::CurReleaseVersion).toString();
- }
- else if(ui.radioCurrent->isChecked()) {
- url = ServerInfo::value(ServerInfo::CurDevelUrl).toString();
- RbSettings::setValue(RbSettings::Build, "current");
- myversion = "r" + ServerInfo::value(ServerInfo::BleedingRevision).toString();
- }
- else if(ui.radioCandidate->isChecked()) {
- url = ServerInfo::value(ServerInfo::RelCandidateUrl).toString();
- RbSettings::setValue(RbSettings::Build, "rc");
- myversion = ServerInfo::value(ServerInfo::RelCandidateVersion).toString();
- }
- else {
- qDebug() << "[Install] no build selected -- this shouldn't happen";
- return;
- }
- RbSettings::sync();
-
- QString warning = Utils::checkEnvironment(false);
- if(!warning.isEmpty())
- {
- if(QMessageBox::warning(this, tr("Really continue?"), warning,
- QMessageBox::Ok | QMessageBox::Abort, QMessageBox::Abort)
- == QMessageBox::Abort)
- {
- logger->addItem(tr("Aborted!"),LOGERROR);
- logger->setFinished();
- return;
- }
- }
-
- //! check if we should backup
- if(ui.backup->isChecked())
- {
- logger->addItem(tr("Beginning Backup..."),LOGINFO);
- QCoreApplication::processEvents();
-
- //! create dir, if it doesnt exist
- QFileInfo backupFile(m_backupName);
- if(!QDir(backupFile.path()).exists())
- {
- QDir a;
- a.mkpath(backupFile.path());
- }
-
- //! create backup
- bool result = true;
- ZipUtil zip(this);
- connect(&zip, SIGNAL(logProgress(int, int)), logger, SLOT(setProgress(int, int)));
- connect(&zip, SIGNAL(logItem(QString, int)), logger, SLOT(addItem(QString, int)));
- zip.open(m_backupName, QuaZip::mdCreate);
- QString mp = RbSettings::value(RbSettings::Mountpoint).toString();
- QString folder = mp + "/.rockbox";
- result = zip.appendDirToArchive(folder, mp);
- zip.close();
- if(result) {
- logger->addItem(tr("Backup finished."), LOGINFO);
- }
- else {
- logger->addItem(tr("Backup failed!"), LOGERROR);
- logger->setFinished();
- return;
- }
- }
-
- //! install build
- installer = new ZipInstaller(this);
- installer->setUrl(url);
- installer->setLogSection("Rockbox (Base)");
- if(!RbSettings::value(RbSettings::CacheDisabled).toBool()
- && !ui.checkBoxCache->isChecked())
- {
- installer->setCache(true);
- }
- installer->setLogVersion(myversion);
- installer->setMountPoint(mountPoint);
-
- connect(installer, SIGNAL(done(bool)), this, SLOT(done(bool)));
-
- connect(installer, SIGNAL(logItem(QString, int)), logger, SLOT(addItem(QString, int)));
- connect(installer, SIGNAL(logProgress(int, int)), logger, SLOT(setProgress(int, int)));
- connect(installer, SIGNAL(done(bool)), logger, SLOT(setFinished()));
- connect(logger, SIGNAL(aborted()), installer, SLOT(abort()));
- installer->install();
-
-}
-
-void InstallWindow::changeBackupPath()
-{
- QString backupString = QFileDialog::getSaveFileName(this,
- tr("Select Backup Filename"), m_backupName, "*.zip");
- // only update if a filename was entered, ignore if cancelled
- if(!backupString.isEmpty()) {
- m_backupName = backupString;
- updateBackupLocation();
- }
-}
-
-
-// Zip installer has finished
-void InstallWindow::done(bool error)
-{
- qDebug() << "[Install] done, error:" << error;
-
- if(error)
- {
- logger->setFinished();
- return;
- }
-
- // no error, close the window, when the logger is closed
- connect(logger,SIGNAL(closed()),this,SLOT(close()));
- // add platform info to log file for later detection
- QSettings installlog(RbSettings::value(RbSettings::Mountpoint).toString()
- + "/.rockbox/rbutil.log", QSettings::IniFormat, 0);
- installlog.setValue("platform", RbSettings::value(RbSettings::Platform).toString());
- installlog.sync();
-}
-
-
-void InstallWindow::setDetailsCurrent(bool show)
-{
- if(show) {
- ui.labelDetails->setText(tr("This is the absolute up to the minute "
- "Rockbox built. The development version will get updated every time "
- "a change is made. Latest development version is %1 (%2).")
- .arg(ServerInfo::value(ServerInfo::BleedingRevision).toString(),
- ServerInfo::value(ServerInfo::BleedingDate).toString()));
- }
-}
-
-
-void InstallWindow::setDetailsStable(bool show)
-{
- if(show) {
- ui.labelDetails->setText(
- tr("This is the last released version of Rockbox."));
-
- if(!ServerInfo::value(ServerInfo::CurReleaseVersion).toString().isEmpty())
- ui.labelNote->setText(tr("<b>Note:</b> "
- "The lastest stable version is %1.")
- .arg(ServerInfo::value(ServerInfo::CurReleaseVersion).toString()));
- else ui.labelNote->setText("");
- }
-}
-
-
-void InstallWindow::setDetailsCandidate(bool show)
-{
- if(show) {
- ui.labelDetails->setText(
- tr("This is the release candidate for the next Rockbox version."
- "<br/>A release candidate is intended for testing. It will "
- "receive bugfixes and eventually become the next stable "
- "release of Rockbox. If you want to help testing Rockbox and "
- "improve the next release install the release candidate."));
-
- if(!ServerInfo::value(ServerInfo::CurReleaseVersion).toString().isEmpty())
- ui.labelNote->setText(tr("<b>Note:</b> "
- "The lastest release candidate is %1.")
- .arg(ServerInfo::value(ServerInfo::RelCandidateVersion).toString()));
- else ui.labelNote->setText("");
- }
-}
-
-
-void InstallWindow::changeEvent(QEvent *e)
-{
- if(e->type() == QEvent::LanguageChange) {
- ui.retranslateUi(this);
- } else {
- QWidget::changeEvent(e);
- }
-}
-
diff --git a/rbutil/rbutilqt/installwindow.h b/rbutil/rbutilqt/installwindow.h
deleted file mode 100644
index 140782088d..0000000000
--- a/rbutil/rbutilqt/installwindow.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/***************************************************************************
- * __________ __ ___.
- * Open \______ \ ____ ____ | | _\_ |__ _______ ___
- * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
- * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
- * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
- * \/ \/ \/ \/ \/
- *
- * Copyright (C) 2007 by Dominik Riebeling
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-
-#ifndef INSTALL_H
-#define INSTALL_H
-
-#include <QtGui>
-
-#include "ui_installwindowfrm.h"
-#include "zipinstaller.h"
-#include "progressloggergui.h"
-
-class InstallWindow : public QDialog
-{
- Q_OBJECT
- public:
- InstallWindow(QWidget *parent);
-
- public slots:
- void accept(void);
-
- private:
- Ui::InstallWindowFrm ui;
- ProgressLoggerGui* logger;
- QHttp *download;
- QFile *target;
- ZipInstaller* installer;
- QString m_backupName;
- void resizeEvent(QResizeEvent*);
- void changeEvent(QEvent *event);
-
- void changeBackupPath(QString);
- void updateBackupLocation(void);
-
- private slots:
- void setDetailsCurrent(bool);
- void setDetailsStable(bool);
- void setDetailsCandidate(bool);
- void done(bool);
- void changeBackupPath(void);
- void backupCheckboxChanged(int state);
-
-};
-
-
-#endif
diff --git a/rbutil/rbutilqt/installwindowfrm.ui b/rbutil/rbutilqt/installwindowfrm.ui
deleted file mode 100644
index 67ab40b991..0000000000
--- a/rbutil/rbutilqt/installwindowfrm.ui
+++ /dev/null
@@ -1,251 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0" >
- <class>InstallWindowFrm</class>
- <widget class="QDialog" name="InstallWindowFrm" >
- <property name="windowModality" >
- <enum>Qt::WindowModal</enum>
- </property>
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>644</width>
- <height>448</height>
- </rect>
- </property>
- <property name="windowTitle" >
- <string>Install Rockbox</string>
- </property>
- <layout class="QGridLayout" name="gridLayout_2" >
- <item row="0" column="0" rowspan="9" >
- <widget class="QLabel" name="label" >
- <property name="text" >
- <string/>
- </property>
- <property name="pixmap" >
- <pixmap resource="rbutilqt.qrc" >:/icons/wizard.jpg</pixmap>
- </property>
- <property name="alignment" >
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
- </property>
- </widget>
- </item>
- <item row="0" column="1" colspan="3" >
- <widget class="QLabel" name="label_4" >
- <property name="text" >
- <string>Please select the Rockbox version you want to install on your player:</string>
- </property>
- <property name="wordWrap" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="1" column="1" colspan="3" >
- <widget class="QGroupBox" name="groupBox" >
- <property name="title" >
- <string>Version</string>
- </property>
- <layout class="QVBoxLayout" >
- <item>
- <widget class="QRadioButton" name="radioStable" >
- <property name="text" >
- <string>&amp;Stable release</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QRadioButton" name="radioCandidate" >
- <property name="text" >
- <string>Release &amp;Candidate</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QRadioButton" name="radioCurrent" >
- <property name="text" >
- <string>&amp;Development build</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item row="2" column="1" colspan="3" >
- <widget class="QGroupBox" name="groupBox_2" >
- <property name="sizePolicy" >
- <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="title" >
- <string>Details</string>
- </property>
- <layout class="QGridLayout" name="gridLayout_3" >
- <item row="0" column="0" >
- <widget class="QLabel" name="labelDetails" >
- <property name="text" >
- <string>Details about the selected version</string>
- </property>
- <property name="wordWrap" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="1" column="0" >
- <widget class="QLabel" name="labelNote" >
- <property name="text" >
- <string>Note</string>
- </property>
- <property name="wordWrap" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item row="8" column="1" >
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0" >
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="8" column="2" colspan="2" >
- <layout class="QHBoxLayout" >
- <item>
- <widget class="QPushButton" name="buttonOk" >
- <property name="text" >
- <string>&amp;Install</string>
- </property>
- <property name="icon" >
- <iconset resource="rbutilqt.qrc" >
- <normaloff>:/icons/go-next.png</normaloff>:/icons/go-next.png</iconset>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="buttonCancel" >
- <property name="text" >
- <string>&amp;Cancel</string>
- </property>
- <property name="icon" >
- <iconset resource="rbutilqt.qrc" >
- <normaloff>:/icons/process-stop.png</normaloff>:/icons/process-stop.png</iconset>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item row="7" column="2" >
- <spacer>
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0" >
- <size>
- <width>20</width>
- <height>1</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="3" column="1" colspan="3" >
- <widget class="QGroupBox" name="Backupgroup" >
- <property name="title" >
- <string>Backup</string>
- </property>
- <layout class="QGridLayout" name="gridLayout" >
- <item row="0" column="0" colspan="2" >
- <widget class="QCheckBox" name="backup" >
- <property name="text" >
- <string>Backup before installing</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0" colspan="2" >
- <widget class="QLabel" name="backupLocation" >
- <property name="text" >
- <string>Backup location</string>
- </property>
- </widget>
- </item>
- <item row="1" column="2" >
- <widget class="QPushButton" name="changeBackup" >
- <property name="sizePolicy" >
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="maximumSize" >
- <size>
- <width>60</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text" >
- <string>Change</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item row="5" column="1" >
- <widget class="QCheckBox" name="checkBoxCache" >
- <property name="toolTip" >
- <string>Rockbox Utility stores copies of Rockbox it has downloaded on the local hard disk to save network traffic. If your local copy is no longer working, tick this box to download a fresh copy.</string>
- </property>
- <property name="text" >
- <string>&amp;Don't use locally cached copy</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <resources>
- <include location="rbutilqt.qrc" />
- </resources>
- <connections>
- <connection>
- <sender>buttonOk</sender>
- <signal>clicked()</signal>
- <receiver>InstallWindowFrm</receiver>
- <slot>accept()</slot>
- <hints>
- <hint type="sourcelabel" >
- <x>562</x>
- <y>420</y>
- </hint>
- <hint type="destinationlabel" >
- <x>500</x>
- <y>352</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>buttonCancel</sender>
- <signal>clicked()</signal>
- <receiver>InstallWindowFrm</receiver>
- <slot>reject()</slot>
- <hints>
- <hint type="sourcelabel" >
- <x>658</x>
- <y>429</y>
- </hint>
- <hint type="destinationlabel" >
- <x>611</x>
- <y>360</y>
- </hint>
- </hints>
- </connection>
- </connections>
-</ui>
diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp
index 575859fd46..b1065936f7 100644
--- a/rbutil/rbutilqt/rbutilqt.cpp
+++ b/rbutil/rbutilqt/rbutilqt.cpp
@@ -23,7 +23,6 @@
#include "ui_rbutilqtfrm.h"
#include "ui_aboutbox.h"
#include "configure.h"
-#include "installwindow.h"
#include "installtalkwindow.h"
#include "createvoicewindow.h"
#include "httpget.h"
@@ -40,6 +39,7 @@
#include "ziputil.h"
#include "manualwidget.h"
#include "infowidget.h"
+#include "selectiveinstallwidget.h"
#include "backupdialog.h"
#include "progressloggerinterface.h"
@@ -122,18 +122,19 @@ RbUtilQt::RbUtilQt(QWidget *parent) : QMainWindow(parent)
manual = new ManualWidget(this);
mantablayout->addWidget(manual);
+ // selective "install" tab.
+ QGridLayout *selectivetablayout = new QGridLayout(this);
+ ui.selective->setLayout(selectivetablayout);
+ selectiveinstallwidget = new SelectiveInstallWidget(this);
+ selectivetablayout->addWidget(selectiveinstallwidget);
+ connect(ui.buttonChangeDevice, SIGNAL(clicked()), selectiveinstallwidget, SLOT(saveSettings()));
+
// info tab
QGridLayout *infotablayout = new QGridLayout(this);
ui.info->setLayout(infotablayout);
info = new InfoWidget(this);
infotablayout->addWidget(info);
- // disable quick install until version info is available
- ui.buttonSmall->setEnabled(false);
- ui.buttonComplete->setEnabled(false);
- ui.actionSmall_Installation->setEnabled(false);
- ui.actionComplete_Installation->setEnabled(false);
-
connect(ui.tabWidget, SIGNAL(currentChanged(int)), this, SLOT(updateTabs(int)));
connect(ui.actionAbout_Qt, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
connect(ui.action_About, SIGNAL(triggered()), this, SLOT(about()));
@@ -141,28 +142,14 @@ RbUtilQt::RbUtilQt(QWidget *parent) : QMainWindow(parent)
connect(ui.action_Configure, SIGNAL(triggered()), this, SLOT(configDialog()));
connect(ui.actionE_xit, SIGNAL(triggered()), this, SLOT(shutdown()));
connect(ui.buttonChangeDevice, SIGNAL(clicked()), this, SLOT(configDialog()));
- connect(ui.buttonRockbox, SIGNAL(clicked()), this, SLOT(installBtn()));
- connect(ui.buttonBootloader, SIGNAL(clicked()), this, SLOT(installBootloaderBtn()));
- connect(ui.buttonFonts, SIGNAL(clicked()), this, SLOT(installFontsBtn()));
- connect(ui.buttonGames, SIGNAL(clicked()), this, SLOT(installDoomBtn()));
connect(ui.buttonTalk, SIGNAL(clicked()), this, SLOT(createTalkFiles()));
connect(ui.buttonCreateVoice, SIGNAL(clicked()), this, SLOT(createVoiceFile()));
connect(ui.buttonVoice, SIGNAL(clicked()), this, SLOT(installVoice()));
- connect(ui.buttonThemes, SIGNAL(clicked()), this, SLOT(installThemes()));
connect(ui.buttonRemoveRockbox, SIGNAL(clicked()), this, SLOT(uninstall()));
connect(ui.buttonRemoveBootloader, SIGNAL(clicked()), this, SLOT(uninstallBootloader()));
- connect(ui.buttonSmall, SIGNAL(clicked()), this, SLOT(smallInstall()));
- connect(ui.buttonComplete, SIGNAL(clicked()), this, SLOT(completeInstall()));
connect(ui.buttonBackup, SIGNAL(clicked()), this, SLOT(backup()));
// actions accessible from the menu
- connect(ui.actionComplete_Installation, SIGNAL(triggered()), this, SLOT(completeInstall()));
- connect(ui.actionSmall_Installation, SIGNAL(triggered()), this, SLOT(smallInstall()));
- connect(ui.actionInstall_Bootloader, SIGNAL(triggered()), this, SLOT(installBootloaderBtn()));
- connect(ui.actionInstall_Rockbox, SIGNAL(triggered()), this, SLOT(installBtn()));
- connect(ui.actionFonts_Package, SIGNAL(triggered()), this, SLOT(installFontsBtn()));
- connect(ui.actionInstall_Themes, SIGNAL(triggered()), this, SLOT(installThemes()));
- connect(ui.actionInstall_Game_Files, SIGNAL(triggered()), this, SLOT(installDoomBtn()));
connect(ui.actionInstall_Voice_File, SIGNAL(triggered()), this, SLOT(installVoice()));
connect(ui.actionCreate_Voice_File, SIGNAL(triggered()), this, SLOT(createVoiceFile()));
connect(ui.actionCreate_Talk_Files, SIGNAL(triggered()), this, SLOT(createTalkFiles()));
@@ -336,6 +323,7 @@ void RbUtilQt::updateSettings()
"now open to allow you to correct the problem."));
configDialog();
}
+ selectiveinstallwidget->updateVersion();
}
@@ -347,9 +335,6 @@ void RbUtilQt::updateDevice()
/* Enable bootloader installation, if possible */
bool bootloaderInstallable =
SystemInfo::value(SystemInfo::CurBootloaderMethod) != "none";
- ui.buttonBootloader->setEnabled(bootloaderInstallable);
- ui.labelBootloader->setEnabled(bootloaderInstallable);
- ui.actionInstall_Bootloader->setEnabled(bootloaderInstallable);
/* Enable bootloader uninstallation, if possible */
bool bootloaderUninstallable = bootloaderInstallable &&
@@ -387,12 +372,6 @@ void RbUtilQt::updateDevice()
pm = pm.scaledToHeight(QFontMetrics(QApplication::font()).height() * 3);
ui.labelPlayerPic->setPixmap(pm);
- // hide quickstart buttons if no release available
- bool installable = !ServerInfo::value(ServerInfo::CurReleaseVersion).toString().isEmpty();
- ui.buttonSmall->setEnabled(installable);
- ui.buttonComplete->setEnabled(installable);
- ui.actionSmall_Installation->setEnabled(installable);
- ui.actionComplete_Installation->setEnabled(installable);
}
@@ -400,131 +379,9 @@ void RbUtilQt::backup(void)
{
backupdialog = new BackupDialog(this);
backupdialog->show();
-}
-
-
-void RbUtilQt::completeInstall()
-{
- if(chkConfig(this)) return;
- if(QMessageBox::question(this, tr("Confirm Installation"),
- tr("Do you really want to perform a complete installation?\n\n"
- "This will install Rockbox %1. To install the most recent "
- "development build available press \"Cancel\" and "
- "use the \"Installation\" tab.")
- .arg(ServerInfo::value(ServerInfo::CurReleaseVersion).toString()),
- QMessageBox::Ok | QMessageBox::Cancel) != QMessageBox::Ok)
- return;
- // create logger
- logger = new ProgressLoggerGui(this);
- logger->show();
-
- if(smallInstallInner())
- return;
- logger->setRunning();
- // Fonts
- m_error = false;
- m_installed = false;
- if(!installFontsAuto())
- return;
- else
- {
- // wait for installation finished
- while(!m_installed)
- QApplication::processEvents();
- }
- if(m_error) return;
- logger->setRunning();
-
- // Doom
- if(hasDoom())
- {
- m_error = false;
- m_installed = false;
- if(!installDoomAuto())
- return;
- else
- {
- // wait for installation finished
- while(!m_installed)
- QApplication::processEvents();
- }
- if(m_error) return;
- }
-
- // theme
- // this is a window
- // it has its own logger window,so close our.
- logger->close();
- installThemes();
}
-void RbUtilQt::smallInstall()
-{
- if(chkConfig(this)) return;
- if(QMessageBox::question(this, tr("Confirm Installation"),
- tr("Do you really want to perform a minimal installation? "
- "A minimal installation will contain only the absolutely "
- "necessary parts to run Rockbox.\n\n"
- "This will install Rockbox %1. To install the most recent "
- "development build available press \"Cancel\" and "
- "use the \"Installation\" tab.")
- .arg(ServerInfo::value(ServerInfo::CurReleaseVersion).toString()),
- QMessageBox::Ok | QMessageBox::Cancel) != QMessageBox::Ok)
- return;
-
- // create logger
- logger = new ProgressLoggerGui(this);
- logger->show();
-
- smallInstallInner();
-}
-
-bool RbUtilQt::smallInstallInner()
-{
- QString mountpoint = RbSettings::value(RbSettings::Mountpoint).toString();
- // show dialog with error if mount point is wrong
- if(!QFileInfo(mountpoint).isDir()) {
- logger->addItem(tr("Mount point is wrong!"),LOGERROR);
- logger->setFinished();
- return true;
- }
- // Bootloader
- if(SystemInfo::value(SystemInfo::CurBootloaderMethod) != "none")
- {
- m_error = false;
- m_installed = false;
- m_auto = true;
- if(!installBootloaderAuto()) {
- logger->setFinished();
- return true;
- }
- else
- {
- // wait for boot loader installation finished
- while(!m_installed)
- QApplication::processEvents();
- }
- m_auto = false;
- if(m_error) return true;
- logger->setRunning();
- }
-
- // Rockbox
- m_error = false;
- m_installed = false;
- if(!installAuto())
- return true;
- else
- {
- // wait for installation finished
- while(!m_installed)
- QApplication::processEvents();
- }
-
- installBootloaderPost(false);
- return false;
-}
void RbUtilQt::installdone(bool error)
{
@@ -533,339 +390,6 @@ void RbUtilQt::installdone(bool error)
m_error = error;
}
-void RbUtilQt::installBtn()
-{
- if(chkConfig(this)) return;
- install();
-}
-
-bool RbUtilQt::installAuto()
-{
- QString file = ServerInfo::value(ServerInfo::CurReleaseUrl).toString();
-
- // check installed Version and Target
- QString warning = Utils::checkEnvironment(false);
- if(!warning.isEmpty())
- {
- if(QMessageBox::warning(this, tr("Really continue?"), warning,
- QMessageBox::Ok | QMessageBox::Abort, QMessageBox::Abort)
- == QMessageBox::Abort)
- {
- logger->addItem(tr("Aborted!"), LOGERROR);
- logger->setFinished();
- return false;
- }
- }
-
- // check version
- RockboxInfo rbinfo(RbSettings::value(RbSettings::Mountpoint).toString());
- if(rbinfo.version() != "")
- {
- if(QMessageBox::question(this, tr("Installed Rockbox detected"),
- tr("Rockbox installation detected. Do you want to backup first?"),
- QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes)
- {
- bool result;
- logger->addItem(tr("Starting backup..."),LOGINFO);
- QString backupName = RbSettings::value(RbSettings::Mountpoint).toString()
- + "/.backup/rockbox-backup-" + rbinfo.version() + ".zip";
-
- //! create dir, if it doesnt exist
- QFileInfo backupFile(backupName);
- if(!QDir(backupFile.path()).exists())
- {
- QDir a;
- a.mkpath(backupFile.path());
- }
-
- logger->addItem(tr("Beginning Backup..."),LOGINFO);
- QCoreApplication::processEvents();
-
- //! create backup
- ZipUtil zip(this);
- connect(&zip, SIGNAL(logProgress(int, int)), logger, SLOT(setProgress(int, int)));
- connect(&zip, SIGNAL(logItem(QString, int)), logger, SLOT(addItem(QString, int)));
- zip.open(backupName, QuaZip::mdCreate);
- QString mp = RbSettings::value(RbSettings::Mountpoint).toString();
- QString folder = mp + "/.rockbox";
- result = zip.appendDirToArchive(folder, mp);
- zip.close();
- if(result)
- {
- logger->addItem(tr("Backup successful"),LOGOK);
- }
- else
- {
- logger->addItem(tr("Backup failed!"),LOGERROR);
- logger->setFinished();
- return false;
- }
- }
- }
-
- //! install current build
- ZipInstaller* installer = new ZipInstaller(this);
- installer->setUrl(file);
- installer->setLogSection("Rockbox (Base)");
- installer->setLogVersion(ServerInfo::value(ServerInfo::CurReleaseVersion).toString());
- if(!RbSettings::value(RbSettings::CacheDisabled).toBool())
- installer->setCache(true);
- installer->setMountPoint(RbSettings::value(RbSettings::Mountpoint).toString());
-
- connect(installer, SIGNAL(done(bool)), this, SLOT(installdone(bool)));
- connect(installer, SIGNAL(logItem(QString, int)), logger, SLOT(addItem(QString, int)));
- connect(installer, SIGNAL(logProgress(int, int)), logger, SLOT(setProgress(int, int)));
- connect(installer, SIGNAL(done(bool)), logger, SLOT(setFinished()));
- connect(logger, SIGNAL(aborted()), installer, SLOT(abort()));
- installer->install();
- return true;
-}
-
-
-void RbUtilQt::install()
-{
- InstallWindow *installWindow = new InstallWindow(this);
- installWindow->show();
-}
-
-bool RbUtilQt::installBootloaderAuto()
-{
- installBootloader();
- return !m_error;
-}
-
-void RbUtilQt::installBootloaderBtn()
-{
- if(chkConfig(this)) return;
- if(QMessageBox::question(this, tr("Confirm Installation"),
- tr("Do you really want to install the Bootloader?"),
- QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) return;
-
- // create logger
- logger = new ProgressLoggerGui(this);
- logger->show();
- installBootloader();
-}
-
-void RbUtilQt::installBootloader()
-{
- QString platform = RbSettings::value(RbSettings::Platform).toString();
- QString backupDestination = "";
- m_error = false;
-
- // create installer
- BootloaderInstallBase *bl =
- BootloaderInstallHelper::createBootloaderInstaller(this,
- SystemInfo::value(SystemInfo::CurBootloaderMethod).toString());
- if(bl == NULL) {
- logger->addItem(tr("No install method known."), LOGERROR);
- logger->setFinished();
- return;
- }
-
- // the bootloader install class does NOT use any GUI stuff.
- // All messages are passed via signals.
- connect(bl, SIGNAL(done(bool)), logger, SLOT(setFinished()));
- connect(bl, SIGNAL(done(bool)), this, SLOT(installBootloaderPost(bool)));
- connect(bl, SIGNAL(logItem(QString, int)), logger, SLOT(addItem(QString, int)));
- connect(bl, SIGNAL(logProgress(int, int)), logger, SLOT(setProgress(int, int)));
-
- // set bootloader filename. Do this now as installed() needs it.
- QStringList blfile = SystemInfo::value(SystemInfo::CurBootloaderFile).toStringList();
- QStringList blfilepath;
- for(int a = 0; a < blfile.size(); a++) {
- blfilepath.append(RbSettings::value(RbSettings::Mountpoint).toString()
- + blfile.at(a));
- }
- bl->setBlFile(blfilepath);
- QUrl url(SystemInfo::value(SystemInfo::BootloaderUrl).toString()
- + SystemInfo::value(SystemInfo::CurBootloaderName).toString());
- bl->setBlUrl(url);
- bl->setLogfile(RbSettings::value(RbSettings::Mountpoint).toString()
- + "/.rockbox/rbutil.log");
-
- if(bl->installed() == BootloaderInstallBase::BootloaderRockbox) {
- if(QMessageBox::question(this, tr("Bootloader detected"),
- tr("Bootloader already installed. Do you want to reinstall the bootloader?"),
- QMessageBox::Yes | QMessageBox::No) == QMessageBox::No) {
- if(m_auto) {
- // keep logger open for auto installs.
- // don't consider abort as error in auto-mode.
- logger->addItem(tr("Bootloader installation skipped"), LOGINFO);
- installBootloaderPost(false);
- }
- else {
- logger->close();
- installBootloaderPost(true);
- }
- delete bl;
- return;
- }
- }
- else if(bl->installed() == BootloaderInstallBase::BootloaderOther
- && bl->capabilities() & BootloaderInstallBase::Backup)
- {
- QString targetFolder = SystemInfo::value(SystemInfo::CurPlatformName).toString()
- + " Firmware Backup";
- // remove invalid character(s)
- targetFolder.remove(QRegExp("[:/]"));
- if(QMessageBox::question(this, tr("Create Bootloader backup"),
- tr("You can create a backup of the original bootloader "
- "file. Press \"Yes\" to select an output folder on your "
- "computer to save the file to. The file will get placed "
- "in a new folder \"%1\" created below the selected folder.\n"
- "Press \"No\" to skip this step.").arg(targetFolder),
- QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
- backupDestination = QFileDialog::getExistingDirectory(this,
- tr("Browse backup folder"), QDir::homePath());
- if(!backupDestination.isEmpty())
- backupDestination += "/" + targetFolder;
-
- qDebug() << "[RbUtil] backing up to" << backupDestination;
- // backup needs to be done after the logger has been set up.
- }
- }
-
- if(bl->capabilities() & BootloaderInstallBase::NeedsOf)
- {
- int ret;
- ret = QMessageBox::information(this, tr("Prerequisites"),
- bl->ofHint(),QMessageBox::Ok | QMessageBox::Abort);
- if(ret != QMessageBox::Ok) {
- // consider aborting an error to close window / abort automatic
- // installation.
- m_error = true;
- logger->addItem(tr("Bootloader installation aborted"), LOGINFO);
- logger->setFinished();
- return;
- }
- // open dialog to browse to of file
- QString offile;
- QString filter
- = SystemInfo::value(SystemInfo::CurBootloaderFilter).toString();
- if(!filter.isEmpty()) {
- filter = tr("Bootloader files (%1)").arg(filter) + ";;";
- }
- filter += tr("All files (*)");
- offile = QFileDialog::getOpenFileName(this,
- tr("Select firmware file"), QDir::homePath(), filter);
- if(!QFileInfo(offile).isReadable()) {
- logger->addItem(tr("Error opening firmware file"), LOGERROR);
- logger->setFinished();
- m_error = true;
- return;
- }
- if(!bl->setOfFile(offile, blfile)) {
- logger->addItem(tr("Error reading firmware file"), LOGERROR);
- logger->setFinished();
- m_error = true;
- return;
- }
- }
-
- // start install.
- if(!backupDestination.isEmpty()) {
- if(!bl->backup(backupDestination)) {
- if(QMessageBox::warning(this, tr("Backup error"),
- tr("Could not create backup file. Continue?"),
- QMessageBox::No | QMessageBox::Yes)
- == QMessageBox::No) {
- logger->setFinished();
- return;
- }
- }
- }
- bl->install();
-}
-
-void RbUtilQt::installBootloaderPost(bool error)
-{
- qDebug() << "[RbUtil] Bootloader Post-Installation, error state:" << error;
- // if an error occured don't perform post install steps.
- if(error) {
- m_error = true;
- return;
- }
- else
- m_error = false;
-
- m_installed = true;
- // end here if automated install
- if(m_auto)
- return;
-
- QString msg = BootloaderInstallHelper::postinstallHints(
- RbSettings::value(RbSettings::Platform).toString());
- if(!msg.isEmpty()) {
- QMessageBox::information(this, tr("Manual steps required"), msg);
- logger->close();
- }
-
-}
-
-void RbUtilQt::installFontsBtn()
-{
- if(chkConfig(this)) return;
- QString mountpoint = RbSettings::value(RbSettings::Mountpoint).toString();
- RockboxInfo installInfo(mountpoint);
- if(installInfo.revision().isEmpty() && installInfo.release().isEmpty()) {
- QMessageBox::critical(this, tr("No Rockbox installation found"),
- tr("Could not determine the installed Rockbox version. "
- "Please install a Rockbox build before installing "
- "fonts."));
- return;
- }
- if(QMessageBox::question(this, tr("Confirm Installation"),
- tr("Do you really want to install the fonts package?"),
- QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) return;
- // create logger
- logger = new ProgressLoggerGui(this);
- logger->show();
- installFonts();
-}
-
-bool RbUtilQt::installFontsAuto()
-{
- installFonts();
-
- return !m_error;
-}
-
-void RbUtilQt::installFonts()
-{
- QString mountpoint = RbSettings::value(RbSettings::Mountpoint).toString();
- RockboxInfo installInfo(mountpoint);
- QString fontsurl;
- QString logversion;
- QString relversion = installInfo.release();
- if(relversion.isEmpty()) {
- // release is empty for non-release versions (i.e. daily / current)
- fontsurl = SystemInfo::value(SystemInfo::DailyFontUrl).toString();
- }
- else {
- fontsurl = SystemInfo::value(SystemInfo::ReleaseFontUrl).toString();
- logversion = installInfo.release();
- }
- fontsurl.replace("%RELEASEVER%", relversion);
-
- // create zip installer
- installer = new ZipInstaller(this);
- installer->setUrl(fontsurl);
- installer->setLogSection("Fonts");
- installer->setLogVersion(logversion);
- installer->setMountPoint(mountpoint);
- if(!RbSettings::value(RbSettings::CacheDisabled).toBool())
- installer->setCache(true);
-
- connect(installer, SIGNAL(done(bool)), this, SLOT(installdone(bool)));
- connect(installer, SIGNAL(logItem(QString, int)), logger, SLOT(addItem(QString, int)));
- connect(installer, SIGNAL(logProgress(int, int)), logger, SLOT(setProgress(int, int)));
- connect(installer, SIGNAL(done(bool)), logger, SLOT(setFinished()));
- connect(logger, SIGNAL(aborted()), installer, SLOT(abort()));
- installer->install();
-}
-
-
void RbUtilQt::installVoice()
{
if(chkConfig(this)) return;
@@ -938,64 +462,6 @@ void RbUtilQt::installVoice()
}
-void RbUtilQt::installDoomBtn()
-{
- if(chkConfig(this)) return;
- if(!hasDoom()){
- QMessageBox::critical(this, tr("Error"),
- tr("Your device doesn't have a doom plugin. Aborting."));
- return;
- }
-
- if(QMessageBox::question(this, tr("Confirm Installation"),
- tr("Do you really want to install the game addon files?"),
- QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) return;
- // create logger
- logger = new ProgressLoggerGui(this);
- logger->show();
-
- installDoom();
-}
-bool RbUtilQt::installDoomAuto()
-{
- installDoom();
- return !m_error;
-}
-
-bool RbUtilQt::hasDoom()
-{
- QFile doomrock(RbSettings::value(RbSettings::Mountpoint).toString()
- +"/.rockbox/rocks/games/doom.rock");
- return doomrock.exists();
-}
-
-void RbUtilQt::installDoom()
-{
- // create zip installer
- installer = new ZipInstaller(this);
-
- installer->setUrl(SystemInfo::value(SystemInfo::DoomUrl).toString());
- installer->setLogSection("Game Addons");
- installer->setLogVersion();
- installer->setMountPoint(RbSettings::value(RbSettings::Mountpoint).toString());
- if(!RbSettings::value(RbSettings::CacheDisabled).toBool())
- installer->setCache(true);
- connect(installer, SIGNAL(done(bool)), this, SLOT(installdone(bool)));
- connect(installer, SIGNAL(logItem(QString, int)), logger, SLOT(addItem(QString, int)));
- connect(installer, SIGNAL(logProgress(int, int)), logger, SLOT(setProgress(int, int)));
- connect(installer, SIGNAL(done(bool)), logger, SLOT(setFinished()));
- connect(logger, SIGNAL(aborted()), installer, SLOT(abort()));
- installer->install();
-
-}
-
-void RbUtilQt::installThemes()
-{
- if(chkConfig(this)) return;
- ThemesInstallWindow* tw = new ThemesInstallWindow(this);
- tw->setModal(true);
- tw->show();
-}
void RbUtilQt::createTalkFiles(void)
{
diff --git a/rbutil/rbutilqt/rbutilqt.h b/rbutil/rbutilqt/rbutilqt.h
index 3e57af589b..1db100430a 100644
--- a/rbutil/rbutilqt/rbutilqt.h
+++ b/rbutil/rbutilqt/rbutilqt.h
@@ -34,6 +34,7 @@
#include "bootloaderinstallbase.h"
#include "manualwidget.h"
#include "infowidget.h"
+#include "selectiveinstallwidget.h"
#include "backupdialog.h"
class RbUtilQt : public QMainWindow
@@ -48,6 +49,7 @@ class RbUtilQt : public QMainWindow
private:
ManualWidget *manual;
InfoWidget *info;
+ SelectiveInstallWidget* selectiveinstallwidget;
BackupDialog *backupdialog;
Ui::RbUtilQtFrm ui;
@@ -81,29 +83,8 @@ class RbUtilQt : public QMainWindow
void updateDevice(void);
void updateSettings(void);
- void completeInstall(void);
- void smallInstall(void);
- bool smallInstallInner(void);
void installdone(bool error);
- void installBtn(void);
- bool installAuto(void);
- void install(void);
-
- void installBootloaderBtn(void);
- bool installBootloaderAuto(void);
- void installBootloader(void);
- void installBootloaderPost(bool error);
-
- void installFontsBtn(void);
- bool installFontsAuto(void);
- void installFonts(void);
-
- bool hasDoom(void);
- void installDoomBtn(void);
- bool installDoomAuto(void);
- void installDoom(void);
-
void createTalkFiles(void);
void createVoiceFile(void);
void downloadDone(bool);
@@ -111,7 +92,6 @@ class RbUtilQt : public QMainWindow
void backup(void);
void installVoice(void);
- void installThemes(void);
void uninstall(void);
void uninstallBootloader(void);
void installPortable(void);
diff --git a/rbutil/rbutilqt/rbutilqt.pri b/rbutil/rbutilqt/rbutilqt.pri
index 330a3cd19a..ebb49f09ec 100644
--- a/rbutil/rbutilqt/rbutilqt.pri
+++ b/rbutil/rbutilqt/rbutilqt.pri
@@ -21,7 +21,6 @@ SOURCES += \
gui/infowidget.cpp \
rbutilqt.cpp \
main.cpp \
- installwindow.cpp \
base/httpget.cpp \
configure.cpp \
base/zipinstaller.cpp \
@@ -78,6 +77,7 @@ SOURCES += \
quazip/ioapi.c \
base/ziputil.cpp \
comboboxviewdelegate.cpp \
+ gui/selectiveinstallwidget.cpp \
gui/backupdialog.cpp \
@@ -85,7 +85,6 @@ HEADERS += \
gui/manualwidget.h \
gui/infowidget.h \
rbutilqt.h \
- installwindow.h \
base/httpget.h \
configure.h \
version.h \
@@ -150,6 +149,7 @@ HEADERS += \
base/ziputil.h \
lame/lame.h \
comboboxviewdelegate.h \
+ gui/selectiveinstallwidget.h \
gui/backupdialog.h \
@@ -158,7 +158,6 @@ FORMS += \
gui/infowidgetfrm.ui \
rbutilqtfrm.ui \
aboutbox.ui \
- installwindowfrm.ui \
progressloggerfrm.ui \
configurefrm.ui \
installtalkfrm.ui \
@@ -168,6 +167,7 @@ FORMS += \
createvoicefrm.ui \
sysinfofrm.ui \
systracefrm.ui \
+ gui/selectiveinstallwidgetfrm.ui \
gui/backupdialogfrm.ui \
diff --git a/rbutil/rbutilqt/rbutilqtfrm.ui b/rbutil/rbutilqt/rbutilqtfrm.ui
index 561a9aa3ae..85da42ed01 100644
--- a/rbutil/rbutilqt/rbutilqtfrm.ui
+++ b/rbutil/rbutilqt/rbutilqtfrm.ui
@@ -18,34 +18,15 @@
<normaloff>:/icons/rockbox-32.png</normaloff>:/icons/rockbox-32.png</iconset>
</property>
<widget class="QWidget" name="centralwidget">
- <layout class="QGridLayout">
- <item row="0" column="0">
- <widget class="QLabel" name="logoLabel">
+ <layout class="QGridLayout" name="gridLayout_3">
+ <item row="0" column="1">
+ <widget class="QGroupBox" name="groupBoxDevice">
<property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="baseSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string comment="Welcome to Rockbox Utility, the installation and housekeeping tool for Rockbox."/>
- </property>
- <property name="pixmap">
- <pixmap resource="rbutilqt.qrc">:/icons/rblogo.png</pixmap>
- </property>
- <property name="scaledContents">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QGroupBox" name="groupBoxDevice">
<property name="title">
<string>Device</string>
</property>
@@ -121,316 +102,43 @@
</layout>
</widget>
</item>
+ <item row="0" column="0">
+ <widget class="QLabel" name="logoLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="baseSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string comment="Welcome to Rockbox Utility, the installation and housekeeping tool for Rockbox."/>
+ </property>
+ <property name="pixmap">
+ <pixmap resource="rbutilqt.qrc">:/icons/rblogo.png</pixmap>
+ </property>
+ <property name="scaledContents">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
<item row="1" column="0" colspan="2">
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>7</number>
</property>
- <widget class="QWidget" name="quickStart">
- <attribute name="title">
- <string>&amp;Quick Start</string>
- </attribute>
- <attribute name="toolTip">
- <string>Welcome</string>
- </attribute>
- <layout class="QGridLayout">
- <item row="0" column="0">
- <widget class="QToolButton" name="buttonComplete">
- <property name="text">
- <string>Complete Installation</string>
- </property>
- <property name="icon">
- <iconset resource="rbutilqt.qrc">
- <normaloff>:/icons/bootloader_btn.png</normaloff>:/icons/bootloader_btn.png</iconset>
- </property>
- <property name="iconSize">
- <size>
- <width>56</width>
- <height>46</height>
- </size>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLabel" name="labelComplete">
- <property name="text">
- <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Complete Installation&lt;/span&gt;&lt;br/&gt;This installs the bootloader, the most recent release and the extras package. This is the recommended method for new installations.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
- </property>
- <property name="textFormat">
- <enum>Qt::AutoText</enum>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QToolButton" name="buttonSmall">
- <property name="text">
- <string>Minimal Installation</string>
- </property>
- <property name="icon">
- <iconset resource="rbutilqt.qrc">
- <normaloff>:/icons/rbinstall_btn.png</normaloff>:/icons/rbinstall_btn.png</iconset>
- </property>
- <property name="iconSize">
- <size>
- <width>56</width>
- <height>46</height>
- </size>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QLabel" name="labelSmall">
- <property name="text">
- <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Minimal installation&lt;/span&gt;&lt;br/&gt;This installs bootloader and the most recent release of Rockbox. If you don't want the extras package, choose this option.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
- </property>
- <property name="buddy">
- <cstring>buttonRockbox</cstring>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <spacer>
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>91</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="2" column="1">
- <spacer>
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>81</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
- <widget class="QWidget" name="installation">
+ <widget class="QWidget" name="selective">
<attribute name="title">
<string>&amp;Installation</string>
</attribute>
<attribute name="toolTip">
- <string>Basic Rockbox installation</string>
- </attribute>
- <layout class="QGridLayout">
- <item row="0" column="0">
- <widget class="QToolButton" name="buttonBootloader">
- <property name="text">
- <string>Install Bootloader</string>
- </property>
- <property name="icon">
- <iconset resource="rbutilqt.qrc">
- <normaloff>:/icons/bootloader_btn.png</normaloff>:/icons/bootloader_btn.png</iconset>
- </property>
- <property name="iconSize">
- <size>
- <width>56</width>
- <height>46</height>
- </size>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLabel" name="labelBootloader">
- <property name="text">
- <string>&lt;b&gt;Install the bootloader&lt;/b&gt;&lt;br/&gt;Before Rockbox can be run on your audio player, you may have to install a bootloader. This is only necessary the first time Rockbox is installed.</string>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QToolButton" name="buttonRockbox">
- <property name="text">
- <string>Install Rockbox</string>
- </property>
- <property name="icon">
- <iconset resource="rbutilqt.qrc">
- <normaloff>:/icons/rbinstall_btn.png</normaloff>:/icons/rbinstall_btn.png</iconset>
- </property>
- <property name="iconSize">
- <size>
- <width>56</width>
- <height>46</height>
- </size>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QLabel" name="labelInstall">
- <property name="text">
- <string>&lt;b&gt;Install Rockbox&lt;/b&gt; on your audio player</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <spacer>
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>91</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="2" column="1">
- <spacer>
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>81</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
- <widget class="QWidget" name="extras">
- <attribute name="title">
- <string>&amp;Extras</string>
- </attribute>
- <attribute name="toolTip">
- <string>Install extras for Rockbox</string>
+ <string>Welcome</string>
</attribute>
- <layout class="QGridLayout">
- <item row="0" column="0">
- <widget class="QToolButton" name="buttonFonts">
- <property name="text">
- <string>Install Fonts package</string>
- </property>
- <property name="icon">
- <iconset resource="rbutilqt.qrc">
- <normaloff>:/icons/font_btn.png</normaloff>:/icons/font_btn.png</iconset>
- </property>
- <property name="iconSize">
- <size>
- <width>56</width>
- <height>46</height>
- </size>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLabel" name="labelFonts">
- <property name="text">
- <string>&lt;b&gt;Fonts Package&lt;/b&gt;&lt;br/&gt;The Fonts Package contains a couple of commonly used fonts. Installation is highly recommended.</string>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QToolButton" name="buttonThemes">
- <property name="text">
- <string>Install themes</string>
- </property>
- <property name="icon">
- <iconset resource="rbutilqt.qrc">
- <normaloff>:/icons/themes_btn.png</normaloff>:/icons/themes_btn.png</iconset>
- </property>
- <property name="iconSize">
- <size>
- <width>56</width>
- <height>46</height>
- </size>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QLabel" name="labelThemes">
- <property name="text">
- <string>&lt;b&gt;Install Themes&lt;/b&gt;&lt;br/&gt;Rockbox's look can be customized by themes. You can choose and install several officially distributed themes.</string>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QToolButton" name="buttonGames">
- <property name="text">
- <string>Install game files</string>
- </property>
- <property name="icon">
- <iconset resource="rbutilqt.qrc">
- <normaloff>:/icons/doom_btn.png</normaloff>:/icons/doom_btn.png</iconset>
- </property>
- <property name="iconSize">
- <size>
- <width>56</width>
- <height>46</height>
- </size>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QLabel" name="labelGames">
- <property name="text">
- <string>&lt;b&gt;Install Game Files&lt;/b&gt;&lt;br/&gt;Doom needs a base wad file to run.</string>
- </property>
- <property name="openExternalLinks">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="4" column="0">
- <spacer>
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="4" column="1">
- <spacer>
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
</widget>
<widget class="QWidget" name="accessibility">
<attribute name="title">
@@ -610,9 +318,6 @@
<property name="wordWrap">
<bool>true</bool>
</property>
- <property name="buddy">
- <cstring>buttonRockbox</cstring>
- </property>
</widget>
</item>
<item row="2" column="0">
@@ -716,28 +421,6 @@
<property name="title">
<string>Action&amp;s</string>
</property>
- <widget class="QMenu" name="menuInstallation">
- <property name="title">
- <string>&amp;Installation</string>
- </property>
- <addaction name="actionInstall_Bootloader"/>
- <addaction name="actionInstall_Rockbox"/>
- </widget>
- <widget class="QMenu" name="menuQuick_Start">
- <property name="title">
- <string>&amp;Quick Start</string>
- </property>
- <addaction name="actionComplete_Installation"/>
- <addaction name="actionSmall_Installation"/>
- </widget>
- <widget class="QMenu" name="menuExtras">
- <property name="title">
- <string>&amp;Extras</string>
- </property>
- <addaction name="actionFonts_Package"/>
- <addaction name="actionInstall_Themes"/>
- <addaction name="actionInstall_Game_Files"/>
- </widget>
<widget class="QMenu" name="menuAccessibility">
<property name="title">
<string>&amp;Accessibility</string>
@@ -753,9 +436,7 @@
<addaction name="actionRemove_bootloader"/>
<addaction name="actionUninstall_Rockbox"/>
</widget>
- <addaction name="menuQuick_Start"/>
- <addaction name="menuInstallation"/>
- <addaction name="menuExtras"/>
+ <addaction name="action_Installation"/>
<addaction name="menuAccessibility"/>
<addaction name="menuUninstallation"/>
</widget>
@@ -948,19 +629,17 @@
<string>System &amp;Trace</string>
</property>
</action>
+ <action name="action_Installation">
+ <property name="text">
+ <string>&amp;Installation</string>
+ </property>
+ </action>
</widget>
<tabstops>
<tabstop>tabWidget</tabstop>
- <tabstop>buttonComplete</tabstop>
- <tabstop>buttonSmall</tabstop>
- <tabstop>buttonBootloader</tabstop>
- <tabstop>buttonRockbox</tabstop>
- <tabstop>buttonFonts</tabstop>
- <tabstop>buttonThemes</tabstop>
- <tabstop>buttonGames</tabstop>
+ <tabstop>buttonChangeDevice</tabstop>
<tabstop>buttonRemoveBootloader</tabstop>
<tabstop>buttonRemoveRockbox</tabstop>
- <tabstop>buttonChangeDevice</tabstop>
<tabstop>buttonVoice</tabstop>
<tabstop>buttonCreateVoice</tabstop>
<tabstop>buttonTalk</tabstop>