mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-11 22:22:33 -05:00
rbtutilQt: incorporate the complete and small install into rbutil.cpp, remove the multiinstaller files..
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14465 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
41f5afb886
commit
aabc1305bc
5 changed files with 218 additions and 455 deletions
|
|
@ -1,331 +0,0 @@
|
|||
/***************************************************************************
|
||||
* __________ __ ___.
|
||||
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||
* \/ \/ \/ \/ \/
|
||||
*
|
||||
* Copyright (C) 2007 by Dominik Wenger
|
||||
* $Id: multinstaller.cpp 14462 2007-08-26 16:44:23Z domonoky $
|
||||
*
|
||||
* 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 <QtNetwork>
|
||||
|
||||
#include "multiinstaller.h"
|
||||
|
||||
#include "installbootloader.h"
|
||||
#include "progressloggergui.h"
|
||||
#include "installzip.h"
|
||||
#include "browseof.h"
|
||||
#include "installthemes.h"
|
||||
|
||||
MultiInstaller::MultiInstaller(QObject* parent): QObject(parent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void MultiInstaller::setUserSettings(QSettings* user)
|
||||
{
|
||||
userSettings = user;
|
||||
}
|
||||
void MultiInstaller::setDeviceSettings(QSettings* dev)
|
||||
{
|
||||
devices = dev;
|
||||
}
|
||||
|
||||
void MultiInstaller::setProxy(QUrl proxy)
|
||||
{
|
||||
m_proxy = proxy;
|
||||
}
|
||||
|
||||
void MultiInstaller::installSmall()
|
||||
{
|
||||
// create logger
|
||||
logger = new ProgressLoggerGui(this);
|
||||
logger->show();
|
||||
|
||||
m_plattform = userSettings->value("defaults/platform").toString();
|
||||
m_mountpoint = userSettings->value("defaults/mountpoint").toString();
|
||||
// show dialog with error if mount point is wrong
|
||||
if(!QFileInfo(m_mountpoint).isDir()) {
|
||||
logger->addItem(tr("Mount point is wrong!"),LOGERROR);
|
||||
logger->abort();
|
||||
return;
|
||||
}
|
||||
|
||||
// Bootloader
|
||||
m_error = false;
|
||||
installed = false;
|
||||
if(!installBootloader())
|
||||
return;
|
||||
else
|
||||
{
|
||||
// wait for boot loader installation finished
|
||||
while(!installed)
|
||||
QApplication::processEvents();
|
||||
}
|
||||
if(m_error) return;
|
||||
logger->undoAbort();
|
||||
|
||||
// Rockbox
|
||||
m_error = false;
|
||||
installed = false;
|
||||
if(!installRockbox())
|
||||
return;
|
||||
else
|
||||
{
|
||||
// wait for boot loader installation finished
|
||||
while(!installed)
|
||||
QApplication::processEvents();
|
||||
}
|
||||
}
|
||||
|
||||
void MultiInstaller::installComplete()
|
||||
{
|
||||
// create logger
|
||||
logger = new ProgressLoggerGui(this);
|
||||
logger->show();
|
||||
|
||||
m_plattform = userSettings->value("defaults/platform").toString();
|
||||
m_mountpoint = userSettings->value("defaults/mountpoint").toString();
|
||||
// show dialog with error if mount point is wrong
|
||||
if(!QFileInfo(m_mountpoint).isDir()) {
|
||||
logger->addItem(tr("Mount point is wrong!"),LOGERROR);
|
||||
logger->abort();
|
||||
return;
|
||||
}
|
||||
// Bootloader
|
||||
m_error = false;
|
||||
installed = false;
|
||||
if(!installBootloader())
|
||||
return;
|
||||
else
|
||||
{
|
||||
// wait for boot loader installation finished
|
||||
while(!installed)
|
||||
QApplication::processEvents();
|
||||
}
|
||||
if(m_error) return;
|
||||
logger->undoAbort();
|
||||
|
||||
// Rockbox
|
||||
m_error = false;
|
||||
installed = false;
|
||||
if(!installRockbox())
|
||||
return;
|
||||
else
|
||||
{
|
||||
// wait for boot loader installation finished
|
||||
while(!installed)
|
||||
QApplication::processEvents();
|
||||
}
|
||||
if(m_error) return;
|
||||
logger->undoAbort();
|
||||
|
||||
// Fonts
|
||||
m_error = false;
|
||||
installed = false;
|
||||
if(!installFonts())
|
||||
return;
|
||||
else
|
||||
{
|
||||
// wait for boot loader installation finished
|
||||
while(!installed)
|
||||
QApplication::processEvents();
|
||||
}
|
||||
if(m_error) return;
|
||||
logger->undoAbort();
|
||||
|
||||
// Doom
|
||||
m_error = false;
|
||||
installed = false;
|
||||
if(!installDoom())
|
||||
return;
|
||||
else
|
||||
{
|
||||
// wait for boot loader installation finished
|
||||
while(!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 MultiInstaller::installdone(bool error)
|
||||
{
|
||||
installed = true;
|
||||
m_error = error;
|
||||
}
|
||||
|
||||
|
||||
void MultiInstaller::setVersionStrings(QMap<QString, QString> ver)
|
||||
{
|
||||
version = ver;
|
||||
// version strings map is as following:
|
||||
// rel_rev release version revision id
|
||||
// rel_date release version release date
|
||||
// same for arch_* and bleed_*
|
||||
|
||||
qDebug() << "Install::setVersionStrings" << version;
|
||||
}
|
||||
|
||||
bool MultiInstaller::installBootloader()
|
||||
{
|
||||
BootloaderInstaller* blinstaller = new BootloaderInstaller(this);
|
||||
blinstaller->setMountPoint(m_mountpoint);
|
||||
blinstaller->setProxy(m_proxy);
|
||||
blinstaller->setDevice(m_plattform);
|
||||
blinstaller->setBootloaderMethod(devices->value(m_plattform + "/bootloadermethod").toString());
|
||||
blinstaller->setBootloaderName(devices->value(m_plattform + "/bootloadername").toString());
|
||||
blinstaller->setBootloaderBaseUrl(devices->value("bootloader_url").toString());
|
||||
blinstaller->setBootloaderInfoUrl(devices->value("bootloader_info_url").toString());
|
||||
if(!blinstaller->downloadInfo())
|
||||
{
|
||||
logger->addItem(tr("Could not get the bootloader info file!"),LOGERROR);
|
||||
logger->abort();
|
||||
return false;
|
||||
}
|
||||
|
||||
if(blinstaller->uptodate())
|
||||
{
|
||||
int ret = QMessageBox::question(NULL, tr("Bootloader Installation"),
|
||||
tr("It seem your Bootloader is already uptodate.\n"
|
||||
"Do really want to install it?"),
|
||||
QMessageBox::Ok | QMessageBox::Ignore |
|
||||
QMessageBox::Cancel,
|
||||
QMessageBox::Ignore);
|
||||
if(ret == QMessageBox::Cancel)
|
||||
{
|
||||
logger->addItem(tr("Bootloader installation Canceled!"),LOGERROR);
|
||||
logger->abort();
|
||||
return false;
|
||||
}
|
||||
else if(ret == QMessageBox::Ignore)
|
||||
{
|
||||
// skip to next install step
|
||||
logger->addItem(tr("Skipped Bootloader installation!"),LOGWARNING);
|
||||
installed = true;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// if fwpatcher , ask for extra file
|
||||
QString offirmware;
|
||||
if(devices->value(m_plattform + "/bootloadermethod").toString() == "fwpatcher")
|
||||
{
|
||||
BrowseOF ofbrowser(NULL);
|
||||
ofbrowser.setFile(userSettings->value("defaults/ofpath").toString());
|
||||
if(ofbrowser.exec() == QDialog::Accepted)
|
||||
{
|
||||
offirmware = ofbrowser.getFile();
|
||||
qDebug() << offirmware;
|
||||
if(!QFileInfo(offirmware).exists())
|
||||
{
|
||||
logger->addItem(tr("Original Firmware Path is wrong!"),LOGERROR);
|
||||
logger->abort();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
userSettings->setValue("defaults/ofpath",offirmware);
|
||||
userSettings->sync();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
logger->addItem(tr("Original Firmware selection Canceled!"),LOGERROR);
|
||||
logger->abort();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
blinstaller->setOrigFirmwarePath(offirmware);
|
||||
|
||||
blinstaller->install(logger);
|
||||
connect(blinstaller,SIGNAL(done(bool)),this,SLOT(installdone(bool)));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool MultiInstaller::installRockbox()
|
||||
{
|
||||
QString file = QString("%1%2/rockbox.zip")
|
||||
.arg(devices->value("bleeding_url").toString(),
|
||||
userSettings->value("defaults/platform").toString());
|
||||
QString myversion = "r" + version.value("bleed_rev");
|
||||
|
||||
ZipInstaller* installer = new ZipInstaller(this);
|
||||
installer->setUrl(file);
|
||||
installer->setProxy(m_proxy);
|
||||
installer->setLogSection("rockboxbase");
|
||||
installer->setLogVersion(myversion);
|
||||
installer->setMountPoint(m_mountpoint);
|
||||
installer->install(logger);
|
||||
|
||||
connect(installer, SIGNAL(done(bool)), this, SLOT(installdone(bool)));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool MultiInstaller::installFonts()
|
||||
{
|
||||
// create zip installer
|
||||
ZipInstaller* installer = new ZipInstaller(this);
|
||||
|
||||
installer->setUrl(devices->value("font_url").toString());
|
||||
installer->setProxy(m_proxy);
|
||||
installer->setLogSection("Fonts");
|
||||
installer->setLogVersion(version.value("arch_date"));
|
||||
installer->setMountPoint(m_mountpoint);
|
||||
installer->install(logger);
|
||||
|
||||
connect(installer, SIGNAL(done(bool)), this, SLOT(installdone(bool)));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool MultiInstaller::installDoom()
|
||||
{
|
||||
// create zip installer
|
||||
ZipInstaller* installer = new ZipInstaller(this);
|
||||
|
||||
installer->setUrl(devices->value("doom_url").toString());
|
||||
installer->setProxy(m_proxy);
|
||||
installer->setLogSection("Game Addons");
|
||||
installer->setLogVersion(version.value("arch_date"));
|
||||
installer->setMountPoint(m_mountpoint);
|
||||
installer->install(logger);
|
||||
|
||||
connect(installer, SIGNAL(done(bool)), this, SLOT(installdone(bool)));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool MultiInstaller::installThemes()
|
||||
{
|
||||
ThemesInstallWindow* tw = new ThemesInstallWindow(NULL);
|
||||
tw->setDeviceSettings(devices);
|
||||
tw->setUserSettings(userSettings);
|
||||
tw->setProxy(m_proxy);
|
||||
tw->setModal(true);
|
||||
tw->show();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1,66 +0,0 @@
|
|||
/***************************************************************************
|
||||
* __________ __ ___.
|
||||
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||
* \/ \/ \/ \/ \/
|
||||
*
|
||||
* Copyright (C) 2007 by Dominik Wenger
|
||||
* $Id: multiinstaller.h 14462 2007-08-26 16:44:23Z domonoky $
|
||||
*
|
||||
* 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 MULTIINSTALLER_H
|
||||
#define MULTIINSTALLER_H
|
||||
|
||||
#include <QtGui>
|
||||
|
||||
#include "progressloggerinterface.h"
|
||||
|
||||
|
||||
class MultiInstaller : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MultiInstaller(QObject* parent);
|
||||
|
||||
void setUserSettings(QSettings*);
|
||||
void setDeviceSettings(QSettings*);
|
||||
void setProxy(QUrl proxy);
|
||||
void setVersionStrings(QMap<QString, QString>);
|
||||
|
||||
void installComplete();
|
||||
void installSmall();
|
||||
|
||||
|
||||
private slots:
|
||||
void installdone(bool error);
|
||||
|
||||
private:
|
||||
bool installBootloader();
|
||||
bool installRockbox();
|
||||
bool installDoom();
|
||||
bool installFonts();
|
||||
bool installThemes();
|
||||
|
||||
ProgressloggerInterface* logger;
|
||||
QSettings *devices;
|
||||
QSettings *userSettings;
|
||||
|
||||
QString m_mountpoint,m_plattform;
|
||||
QUrl m_proxy;
|
||||
QMap<QString, QString> version;
|
||||
|
||||
|
||||
volatile bool installed;
|
||||
volatile bool m_error;
|
||||
};
|
||||
#endif
|
||||
|
|
@ -84,10 +84,10 @@ RbUtilQt::RbUtilQt(QWidget *parent) : QMainWindow(parent)
|
|||
connect(ui.action_About, SIGNAL(triggered()), this, SLOT(about()));
|
||||
connect(ui.action_Configure, SIGNAL(triggered()), this, SLOT(configDialog()));
|
||||
connect(ui.buttonChangeDevice, SIGNAL(clicked()), this, SLOT(configDialog()));
|
||||
connect(ui.buttonRockbox, SIGNAL(clicked()), this, SLOT(install()));
|
||||
connect(ui.buttonBootloader, SIGNAL(clicked()), this, SLOT(installBl()));
|
||||
connect(ui.buttonFonts, SIGNAL(clicked()), this, SLOT(installFonts()));
|
||||
connect(ui.buttonGames, SIGNAL(clicked()), this, SLOT(installDoom()));
|
||||
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.buttonVoice, SIGNAL(clicked()), this, SLOT(installVoice()));
|
||||
connect(ui.buttonThemes, SIGNAL(clicked()), this, SLOT(installThemes()));
|
||||
|
|
@ -305,27 +305,78 @@ void RbUtilQt::completeInstall()
|
|||
tr("Do you really want to make a complete Installation?"),
|
||||
QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) return;
|
||||
|
||||
MultiInstaller installer(this);
|
||||
installer.setUserSettings(userSettings);
|
||||
installer.setDeviceSettings(devices);
|
||||
installer.setProxy(proxy());
|
||||
|
||||
buildInfo.open();
|
||||
QSettings info(buildInfo.fileName(), QSettings::IniFormat, this);
|
||||
buildInfo.close();
|
||||
|
||||
devices->beginGroup(platform);
|
||||
QString released = devices->value("released").toString();
|
||||
devices->endGroup();
|
||||
if(released == "yes") {
|
||||
// only set the keys if needed -- querying will yield an empty string
|
||||
// if not set.
|
||||
versmap.insert("rel_rev", devices->value("last_release").toString());
|
||||
versmap.insert("rel_date", ""); // FIXME: provide the release timestamp
|
||||
// create logger
|
||||
logger = new ProgressLoggerGui(this);
|
||||
logger->show();
|
||||
|
||||
QString mountpoint = userSettings->value("defaults/mountpoint").toString();
|
||||
// show dialog with error if mount point is wrong
|
||||
if(!QFileInfo(mountpoint).isDir()) {
|
||||
logger->addItem(tr("Mount point is wrong!"),LOGERROR);
|
||||
logger->abort();
|
||||
return;
|
||||
}
|
||||
// Bootloader
|
||||
m_error = false;
|
||||
m_installed = false;
|
||||
if(!installBootloaderAuto())
|
||||
return;
|
||||
else
|
||||
{
|
||||
// wait for boot loader installation finished
|
||||
while(!m_installed)
|
||||
QApplication::processEvents();
|
||||
}
|
||||
installer.setVersionStrings(versmap);
|
||||
|
||||
installer.installComplete();
|
||||
if(m_error) return;
|
||||
logger->undoAbort();
|
||||
|
||||
// Rockbox
|
||||
m_error = false;
|
||||
m_installed = false;
|
||||
if(!installAuto())
|
||||
return;
|
||||
else
|
||||
{
|
||||
// wait for boot loader installation finished
|
||||
while(!m_installed)
|
||||
QApplication::processEvents();
|
||||
}
|
||||
if(m_error) return;
|
||||
logger->undoAbort();
|
||||
|
||||
// Fonts
|
||||
m_error = false;
|
||||
m_installed = false;
|
||||
if(!installFontsAuto())
|
||||
return;
|
||||
else
|
||||
{
|
||||
// wait for boot loader installation finished
|
||||
while(!m_installed)
|
||||
QApplication::processEvents();
|
||||
}
|
||||
if(m_error) return;
|
||||
logger->undoAbort();
|
||||
|
||||
// Doom
|
||||
m_error = false;
|
||||
m_installed = false;
|
||||
if(!installDoomAuto())
|
||||
return;
|
||||
else
|
||||
{
|
||||
// wait for boot loader 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();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -335,10 +386,61 @@ void RbUtilQt::smallInstall()
|
|||
tr("Do you really want to make a small Installation?"),
|
||||
QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) return;
|
||||
|
||||
MultiInstaller installer(this);
|
||||
installer.setUserSettings(userSettings);
|
||||
installer.setDeviceSettings(devices);
|
||||
installer.setProxy(proxy());
|
||||
// create logger
|
||||
logger = new ProgressLoggerGui(this);
|
||||
logger->show();
|
||||
|
||||
QString mountpoint = userSettings->value("defaults/mountpoint").toString();
|
||||
// show dialog with error if mount point is wrong
|
||||
if(!QFileInfo(mountpoint).isDir()) {
|
||||
logger->addItem(tr("Mount point is wrong!"),LOGERROR);
|
||||
logger->abort();
|
||||
return;
|
||||
}
|
||||
// Bootloader
|
||||
m_error = false;
|
||||
m_installed = false;
|
||||
if(!installBootloaderAuto())
|
||||
return;
|
||||
else
|
||||
{
|
||||
// wait for boot loader installation finished
|
||||
while(!m_installed)
|
||||
QApplication::processEvents();
|
||||
}
|
||||
if(m_error) return;
|
||||
logger->undoAbort();
|
||||
|
||||
// Rockbox
|
||||
m_error = false;
|
||||
m_installed = false;
|
||||
if(!installAuto())
|
||||
return;
|
||||
else
|
||||
{
|
||||
// wait for boot loader installation finished
|
||||
while(!m_installed)
|
||||
QApplication::processEvents();
|
||||
}
|
||||
}
|
||||
|
||||
void RbUtilQt::installdone(bool error)
|
||||
{
|
||||
qDebug() << "install done";
|
||||
m_installed = true;
|
||||
m_error = error;
|
||||
}
|
||||
|
||||
void RbUtilQt::installBtn()
|
||||
{
|
||||
install();
|
||||
}
|
||||
|
||||
bool RbUtilQt::installAuto()
|
||||
{
|
||||
QString file = QString("%1%2/rockbox.zip")
|
||||
.arg(devices->value("bleeding_url").toString(),
|
||||
userSettings->value("defaults/platform").toString());
|
||||
|
||||
buildInfo.open();
|
||||
QSettings info(buildInfo.fileName(), QSettings::IniFormat, this);
|
||||
|
|
@ -353,10 +455,20 @@ void RbUtilQt::smallInstall()
|
|||
versmap.insert("rel_rev", devices->value("last_release").toString());
|
||||
versmap.insert("rel_date", ""); // FIXME: provide the release timestamp
|
||||
}
|
||||
installer.setVersionStrings(versmap);
|
||||
|
||||
installer.installSmall();
|
||||
QString myversion = "r" + versmap.value("bleed_rev");
|
||||
|
||||
ZipInstaller* installer = new ZipInstaller(this);
|
||||
installer->setUrl(file);
|
||||
installer->setProxy(proxy());
|
||||
installer->setLogSection("rockboxbase");
|
||||
installer->setLogVersion(myversion);
|
||||
installer->setMountPoint(userSettings->value("defaults/mountpoint").toString());
|
||||
installer->install(logger);
|
||||
|
||||
connect(installer, SIGNAL(done(bool)), this, SLOT(installdone(bool)));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void RbUtilQt::install()
|
||||
|
|
@ -384,17 +496,28 @@ void RbUtilQt::install()
|
|||
installWindow->show();
|
||||
}
|
||||
|
||||
bool RbUtilQt::installBootloaderAuto()
|
||||
{
|
||||
installBootloader();
|
||||
connect(blinstaller,SIGNAL(done(bool)),this,SLOT(installdone(bool)));
|
||||
return !m_error;
|
||||
}
|
||||
|
||||
void RbUtilQt::installBl()
|
||||
void RbUtilQt::installBootloaderBtn()
|
||||
{
|
||||
if(QMessageBox::question(this, tr("Confirm Installation"),
|
||||
tr("Do you really want to install the Bootloader?"),
|
||||
QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) return;
|
||||
|
||||
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 = userSettings->value("defaults/platform").toString();
|
||||
|
||||
// create installer
|
||||
|
|
@ -412,6 +535,7 @@ void RbUtilQt::installBl()
|
|||
{
|
||||
logger->addItem(tr("Could not get the bootloader info file!"),LOGERROR);
|
||||
logger->abort();
|
||||
m_error = true;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -420,15 +544,20 @@ void RbUtilQt::installBl()
|
|||
int ret = QMessageBox::question(this, tr("Bootloader Installation"),
|
||||
tr("It seem your Bootloader is already uptodate.\n"
|
||||
"Do really want to install it?"),
|
||||
QMessageBox::Ok | QMessageBox::Cancel,
|
||||
QMessageBox::Ok | QMessageBox::Ignore |QMessageBox::Cancel,
|
||||
QMessageBox::Cancel);
|
||||
if(ret == QMessageBox::Cancel)
|
||||
{
|
||||
logger->addItem(tr("Bootloader installation Canceled!"),LOGERROR);
|
||||
logger->abort();
|
||||
m_error = true;
|
||||
return;
|
||||
}
|
||||
else if(ret == QMessageBox::Ignore)
|
||||
{
|
||||
m_installed = true;
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// if fwpatcher , ask for extra file
|
||||
|
|
@ -445,6 +574,7 @@ void RbUtilQt::installBl()
|
|||
{
|
||||
logger->addItem(tr("Original Firmware Path is wrong!"),LOGERROR);
|
||||
logger->abort();
|
||||
m_error = true;
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
|
@ -457,26 +587,34 @@ void RbUtilQt::installBl()
|
|||
{
|
||||
logger->addItem(tr("Original Firmware selection Canceled!"),LOGERROR);
|
||||
logger->abort();
|
||||
m_error = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
blinstaller->setOrigFirmwarePath(offirmware);
|
||||
|
||||
|
||||
blinstaller->install(logger);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void RbUtilQt::installFonts()
|
||||
void RbUtilQt::installFontsBtn()
|
||||
{
|
||||
if(QMessageBox::question(this, tr("Confirm Installation"),
|
||||
tr("Do you really want to install the fonts package?"),
|
||||
QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) return;
|
||||
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();
|
||||
|
||||
}
|
||||
|
||||
bool RbUtilQt::installFontsAuto()
|
||||
{
|
||||
installFonts();
|
||||
connect(installer, SIGNAL(done(bool)), this, SLOT(installdone(bool)));
|
||||
return !m_error;
|
||||
}
|
||||
|
||||
void RbUtilQt::installFonts()
|
||||
{
|
||||
// create zip installer
|
||||
installer = new ZipInstaller(this);
|
||||
|
||||
|
|
@ -485,9 +623,7 @@ void RbUtilQt::installFonts()
|
|||
installer->setLogSection("Fonts");
|
||||
installer->setLogVersion(versmap.value("arch_date"));
|
||||
installer->setMountPoint(userSettings->value("defaults/mountpoint").toString());
|
||||
installer->install(logger);
|
||||
|
||||
// connect(installer, SIGNAL(done(bool)), this, SLOT(done(bool)));
|
||||
installer->install(logger);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -520,16 +656,26 @@ void RbUtilQt::installVoice()
|
|||
//connect(installer, SIGNAL(done(bool)), this, SLOT(done(bool)));
|
||||
}
|
||||
|
||||
|
||||
void RbUtilQt::installDoom()
|
||||
void RbUtilQt::installDoomBtn()
|
||||
{
|
||||
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;
|
||||
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();
|
||||
connect(installer, SIGNAL(done(bool)), this, SLOT(installdone(bool)));
|
||||
return !m_error;
|
||||
}
|
||||
|
||||
void RbUtilQt::installDoom()
|
||||
{
|
||||
// create zip installer
|
||||
installer = new ZipInstaller(this);
|
||||
|
||||
|
|
@ -539,8 +685,6 @@ void RbUtilQt::installDoom()
|
|||
installer->setLogVersion(versmap.value("arch_date"));
|
||||
installer->setMountPoint(userSettings->value("defaults/mountpoint").toString());
|
||||
installer->install(logger);
|
||||
|
||||
// connect(installer, SIGNAL(done(bool)), this, SLOT(done(bool)));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -56,18 +56,36 @@ class RbUtilQt : public QMainWindow
|
|||
BootloaderInstaller* blinstaller;
|
||||
QUrl proxy(void);
|
||||
QMap<QString, QString> versmap;
|
||||
|
||||
volatile bool m_installed;
|
||||
volatile bool m_error;
|
||||
|
||||
private slots:
|
||||
void about(void);
|
||||
void configDialog(void);
|
||||
void updateDevice(void);
|
||||
void updateSettings(void);
|
||||
|
||||
void completeInstall(void);
|
||||
void smallInstall(void);
|
||||
void installdone(bool error);
|
||||
|
||||
void installBtn(void);
|
||||
bool installAuto(void);
|
||||
void install(void);
|
||||
void installBl(void);
|
||||
|
||||
void installBootloaderBtn(void);
|
||||
bool installBootloaderAuto(void);
|
||||
void installBootloader(void);
|
||||
|
||||
void installFontsBtn(void);
|
||||
bool installFontsAuto(void);
|
||||
void installFonts(void);
|
||||
|
||||
void installDoomBtn(void);
|
||||
bool installDoomAuto(void);
|
||||
void installDoom(void);
|
||||
|
||||
void createTalkFiles(void);
|
||||
void downloadDone(bool);
|
||||
void downloadDone(int, bool);
|
||||
|
|
|
|||
|
|
@ -34,8 +34,7 @@ SOURCES += rbutilqt.cpp \
|
|||
uninstall.cpp \
|
||||
uninstallwindow.cpp \
|
||||
browseof.cpp \
|
||||
preview.cpp \
|
||||
multiinstaller.cpp
|
||||
preview.cpp
|
||||
|
||||
HEADERS += rbutilqt.h \
|
||||
install.h \
|
||||
|
|
@ -70,9 +69,8 @@ HEADERS += rbutilqt.h \
|
|||
uninstall.h \
|
||||
uninstallwindow.h \
|
||||
browseof.h \
|
||||
preview.h \
|
||||
multiinstaller.h
|
||||
|
||||
preview.h
|
||||
|
||||
# Needed by QT on Win
|
||||
INCLUDEPATH = . irivertools zip zlib ../ipodpatcher ../sansapatcher
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue