mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-16 16:42:33 -05:00
fix line endings.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14058 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
f52c178517
commit
57fbb39ce2
3 changed files with 413 additions and 413 deletions
|
|
@ -1,279 +1,279 @@
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* __________ __ ___.
|
* __________ __ ___.
|
||||||
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||||
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007 by Dominik Riebeling
|
* Copyright (C) 2007 by Dominik Riebeling
|
||||||
* $Id$
|
* $Id$
|
||||||
*
|
*
|
||||||
* All files in this archive are subject to the GNU General Public License.
|
* 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.
|
* 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
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <QtGui>
|
#include <QtGui>
|
||||||
|
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
#include "rbutilqt.h"
|
#include "rbutilqt.h"
|
||||||
#include "ui_rbutilqtfrm.h"
|
#include "ui_rbutilqtfrm.h"
|
||||||
#include "ui_aboutbox.h"
|
#include "ui_aboutbox.h"
|
||||||
#include "configure.h"
|
#include "configure.h"
|
||||||
#include "install.h"
|
#include "install.h"
|
||||||
#include "installbl.h"
|
#include "installbl.h"
|
||||||
#include "httpget.h"
|
#include "httpget.h"
|
||||||
#include "installbootloader.h"
|
#include "installbootloader.h"
|
||||||
#include "installzipwindow.h"
|
#include "installzipwindow.h"
|
||||||
|
|
||||||
RbUtilQt::RbUtilQt(QWidget *parent) : QMainWindow(parent)
|
RbUtilQt::RbUtilQt(QWidget *parent) : QMainWindow(parent)
|
||||||
{
|
{
|
||||||
QString programPath = qApp->arguments().at(0);
|
QString programPath = qApp->arguments().at(0);
|
||||||
absolutePath = QFileInfo(programPath).absolutePath() + "/";
|
absolutePath = QFileInfo(programPath).absolutePath() + "/";
|
||||||
// use built-in rbutil.ini if no external file in binary folder
|
// use built-in rbutil.ini if no external file in binary folder
|
||||||
QString iniFile = absolutePath + "rbutil.ini";
|
QString iniFile = absolutePath + "rbutil.ini";
|
||||||
if(QFileInfo(iniFile).isFile()) {
|
if(QFileInfo(iniFile).isFile()) {
|
||||||
qDebug() << "using external rbutil.ini";
|
qDebug() << "using external rbutil.ini";
|
||||||
devices = new QSettings(iniFile, QSettings::IniFormat, 0);
|
devices = new QSettings(iniFile, QSettings::IniFormat, 0);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
qDebug() << "using built-in rbutil.ini";
|
qDebug() << "using built-in rbutil.ini";
|
||||||
devices = new QSettings(":/ini/rbutil.ini", QSettings::IniFormat, 0);
|
devices = new QSettings(":/ini/rbutil.ini", QSettings::IniFormat, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
ui.setupUi(this);
|
ui.setupUi(this);
|
||||||
initDeviceNames();
|
initDeviceNames();
|
||||||
|
|
||||||
// portable installation:
|
// portable installation:
|
||||||
// check for a configuration file in the program folder.
|
// check for a configuration file in the program folder.
|
||||||
QFileInfo config;
|
QFileInfo config;
|
||||||
config.setFile(absolutePath + "RockboxUtility.ini");
|
config.setFile(absolutePath + "RockboxUtility.ini");
|
||||||
if(config.isFile()) {
|
if(config.isFile()) {
|
||||||
userSettings = new QSettings(absolutePath + "RockboxUtility.ini",
|
userSettings = new QSettings(absolutePath + "RockboxUtility.ini",
|
||||||
QSettings::IniFormat, 0);
|
QSettings::IniFormat, 0);
|
||||||
qDebug() << "config: portable";
|
qDebug() << "config: portable";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
userSettings = new QSettings(QSettings::IniFormat,
|
userSettings = new QSettings(QSettings::IniFormat,
|
||||||
QSettings::UserScope, "rockbox.org", "RockboxUtility");
|
QSettings::UserScope, "rockbox.org", "RockboxUtility");
|
||||||
qDebug() << "config: system";
|
qDebug() << "config: system";
|
||||||
}
|
}
|
||||||
|
|
||||||
userSettings->beginGroup("defaults");
|
userSettings->beginGroup("defaults");
|
||||||
platform = userSettings->value("platform").toString();
|
platform = userSettings->value("platform").toString();
|
||||||
userSettings->endGroup();
|
userSettings->endGroup();
|
||||||
ui.comboBoxDevice->setCurrentIndex(ui.comboBoxDevice->findData(platform));
|
ui.comboBoxDevice->setCurrentIndex(ui.comboBoxDevice->findData(platform));
|
||||||
updateDevice(ui.comboBoxDevice->currentIndex());
|
updateDevice(ui.comboBoxDevice->currentIndex());
|
||||||
|
|
||||||
connect(ui.actionAbout_Qt, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
|
connect(ui.actionAbout_Qt, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
|
||||||
connect(ui.action_About, SIGNAL(triggered()), this, SLOT(about()));
|
connect(ui.action_About, SIGNAL(triggered()), this, SLOT(about()));
|
||||||
connect(ui.action_Configure, SIGNAL(triggered()), this, SLOT(configDialog()));
|
connect(ui.action_Configure, SIGNAL(triggered()), this, SLOT(configDialog()));
|
||||||
connect(ui.comboBoxDevice, SIGNAL(currentIndexChanged(int)), this, SLOT(updateDevice(int)));
|
connect(ui.comboBoxDevice, SIGNAL(currentIndexChanged(int)), this, SLOT(updateDevice(int)));
|
||||||
connect(ui.buttonRockbox, SIGNAL(clicked()), this, SLOT(install()));
|
connect(ui.buttonRockbox, SIGNAL(clicked()), this, SLOT(install()));
|
||||||
connect(ui.buttonBootloader, SIGNAL(clicked()), this, SLOT(installBl()));
|
connect(ui.buttonBootloader, SIGNAL(clicked()), this, SLOT(installBl()));
|
||||||
connect(ui.buttonFonts, SIGNAL(clicked()), this, SLOT(installFonts()));
|
connect(ui.buttonFonts, SIGNAL(clicked()), this, SLOT(installFonts()));
|
||||||
connect(ui.buttonGames, SIGNAL(clicked()), this, SLOT(installDoom()));
|
connect(ui.buttonGames, SIGNAL(clicked()), this, SLOT(installDoom()));
|
||||||
|
|
||||||
// disable unimplemented stuff
|
// disable unimplemented stuff
|
||||||
ui.buttonThemes->setEnabled(false);
|
ui.buttonThemes->setEnabled(false);
|
||||||
ui.buttonSmall->setEnabled(false);
|
ui.buttonSmall->setEnabled(false);
|
||||||
ui.buttonRemoveRockbox->setEnabled(false);
|
ui.buttonRemoveRockbox->setEnabled(false);
|
||||||
ui.buttonRemoveBootloader->setEnabled(false);
|
ui.buttonRemoveBootloader->setEnabled(false);
|
||||||
ui.buttonComplete->setEnabled(false);
|
ui.buttonComplete->setEnabled(false);
|
||||||
ui.buttonDetect->setEnabled(false);
|
ui.buttonDetect->setEnabled(false);
|
||||||
|
|
||||||
initIpodpatcher();
|
initIpodpatcher();
|
||||||
downloadInfo();
|
downloadInfo();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void RbUtilQt::downloadInfo()
|
void RbUtilQt::downloadInfo()
|
||||||
{
|
{
|
||||||
// try to get the current build information
|
// try to get the current build information
|
||||||
daily = new HttpGet(this);
|
daily = new HttpGet(this);
|
||||||
connect(daily, SIGNAL(done(bool)), this, SLOT(downloadDone(bool)));
|
connect(daily, SIGNAL(done(bool)), this, SLOT(downloadDone(bool)));
|
||||||
connect(daily, SIGNAL(requestFinished(int, bool)), this, SLOT(downloadDone(int, bool)));
|
connect(daily, SIGNAL(requestFinished(int, bool)), this, SLOT(downloadDone(int, bool)));
|
||||||
if(userSettings->value("defaults/proxytype") == "manual")
|
if(userSettings->value("defaults/proxytype") == "manual")
|
||||||
daily->setProxy(QUrl(userSettings->value("defaults/proxy").toString()));
|
daily->setProxy(QUrl(userSettings->value("defaults/proxy").toString()));
|
||||||
|
|
||||||
qDebug() << "downloading build info";
|
qDebug() << "downloading build info";
|
||||||
daily->setFile(&buildInfo);
|
daily->setFile(&buildInfo);
|
||||||
daily->getFile(QUrl(devices->value("server_conf_url").toString()));
|
daily->getFile(QUrl(devices->value("server_conf_url").toString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void RbUtilQt::downloadDone(bool error)
|
void RbUtilQt::downloadDone(bool error)
|
||||||
{
|
{
|
||||||
if(error) qDebug() << "network error:" << daily->error();
|
if(error) qDebug() << "network error:" << daily->error();
|
||||||
qDebug() << "network status:" << daily->error();
|
qDebug() << "network status:" << daily->error();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void RbUtilQt::downloadDone(int id, bool error)
|
void RbUtilQt::downloadDone(int id, bool error)
|
||||||
{
|
{
|
||||||
QString errorString;
|
QString errorString;
|
||||||
errorString = tr("Network error: %1. Please check your network and proxy settings.").arg(daily->errorString());
|
errorString = tr("Network error: %1. Please check your network and proxy settings.").arg(daily->errorString());
|
||||||
if(error) QMessageBox::about(this, "Network Error", errorString);
|
if(error) QMessageBox::about(this, "Network Error", errorString);
|
||||||
qDebug() << "downloadDone:" << id << error;
|
qDebug() << "downloadDone:" << id << error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void RbUtilQt::about()
|
void RbUtilQt::about()
|
||||||
{
|
{
|
||||||
QDialog *window = new QDialog;
|
QDialog *window = new QDialog;
|
||||||
Ui::aboutBox about;
|
Ui::aboutBox about;
|
||||||
about.setupUi(window);
|
about.setupUi(window);
|
||||||
|
|
||||||
QFile licence(":/docs/gpl-2.0.html");
|
QFile licence(":/docs/gpl-2.0.html");
|
||||||
licence.open(QIODevice::ReadOnly);
|
licence.open(QIODevice::ReadOnly);
|
||||||
QTextStream c(&licence);
|
QTextStream c(&licence);
|
||||||
QString cline = c.readAll();
|
QString cline = c.readAll();
|
||||||
about.browserLicense->insertHtml(cline);
|
about.browserLicense->insertHtml(cline);
|
||||||
about.browserLicense->moveCursor(QTextCursor::Start, QTextCursor::MoveAnchor);
|
about.browserLicense->moveCursor(QTextCursor::Start, QTextCursor::MoveAnchor);
|
||||||
QFile credits(":/docs/CREDITS");
|
QFile credits(":/docs/CREDITS");
|
||||||
credits.open(QIODevice::ReadOnly);
|
credits.open(QIODevice::ReadOnly);
|
||||||
QTextStream r(&credits);
|
QTextStream r(&credits);
|
||||||
QString rline = r.readAll();
|
QString rline = r.readAll();
|
||||||
about.browserCredits->insertPlainText(rline);
|
about.browserCredits->insertPlainText(rline);
|
||||||
about.browserCredits->moveCursor(QTextCursor::Start, QTextCursor::MoveAnchor);
|
about.browserCredits->moveCursor(QTextCursor::Start, QTextCursor::MoveAnchor);
|
||||||
QString title = QString("<b>The Rockbox Utility</b> Version %1").arg(VERSION);
|
QString title = QString("<b>The Rockbox Utility</b> Version %1").arg(VERSION);
|
||||||
about.labelTitle->setText(title);
|
about.labelTitle->setText(title);
|
||||||
|
|
||||||
window->show();
|
window->show();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void RbUtilQt::configDialog()
|
void RbUtilQt::configDialog()
|
||||||
{
|
{
|
||||||
Config *cw = new Config(this);
|
Config *cw = new Config(this);
|
||||||
cw->setUserSettings(userSettings);
|
cw->setUserSettings(userSettings);
|
||||||
cw->show();
|
cw->show();
|
||||||
connect(cw, SIGNAL(settingsUpdated()), this, SLOT(downloadInfo()));
|
connect(cw, SIGNAL(settingsUpdated()), this, SLOT(downloadInfo()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void RbUtilQt::initDeviceNames()
|
void RbUtilQt::initDeviceNames()
|
||||||
{
|
{
|
||||||
qDebug() << "RbUtilQt::initDeviceNames()";
|
qDebug() << "RbUtilQt::initDeviceNames()";
|
||||||
devices->beginGroup("platforms");
|
devices->beginGroup("platforms");
|
||||||
QStringList a = devices->childKeys();
|
QStringList a = devices->childKeys();
|
||||||
devices->endGroup();
|
devices->endGroup();
|
||||||
|
|
||||||
for(int it = 0; it < a.size(); it++) {
|
for(int it = 0; it < a.size(); it++) {
|
||||||
QString curdev;
|
QString curdev;
|
||||||
devices->beginGroup("platforms");
|
devices->beginGroup("platforms");
|
||||||
curdev = devices->value(a.at(it), "null").toString();
|
curdev = devices->value(a.at(it), "null").toString();
|
||||||
devices->endGroup();
|
devices->endGroup();
|
||||||
QString curname;
|
QString curname;
|
||||||
devices->beginGroup(curdev);
|
devices->beginGroup(curdev);
|
||||||
curname = devices->value("name", "null").toString();
|
curname = devices->value("name", "null").toString();
|
||||||
devices->endGroup();
|
devices->endGroup();
|
||||||
ui.comboBoxDevice->addItem(curname, curdev);
|
ui.comboBoxDevice->addItem(curname, curdev);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void RbUtilQt::updateDevice(int index)
|
void RbUtilQt::updateDevice(int index)
|
||||||
{
|
{
|
||||||
platform = ui.comboBoxDevice->itemData(index).toString();
|
platform = ui.comboBoxDevice->itemData(index).toString();
|
||||||
userSettings->setValue("defaults/platform", platform);
|
userSettings->setValue("defaults/platform", platform);
|
||||||
userSettings->sync();
|
userSettings->sync();
|
||||||
|
|
||||||
devices->beginGroup(platform);
|
devices->beginGroup(platform);
|
||||||
if(devices->value("needsbootloader", "") == "no") {
|
if(devices->value("needsbootloader", "") == "no") {
|
||||||
ui.buttonBootloader->setEnabled(false);
|
ui.buttonBootloader->setEnabled(false);
|
||||||
ui.buttonRemoveBootloader->setEnabled(false);
|
ui.buttonRemoveBootloader->setEnabled(false);
|
||||||
ui.labelBootloader->setEnabled(false);
|
ui.labelBootloader->setEnabled(false);
|
||||||
ui.labelRemoveBootloader->setEnabled(false);
|
ui.labelRemoveBootloader->setEnabled(false);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ui.buttonBootloader->setEnabled(true);
|
ui.buttonBootloader->setEnabled(true);
|
||||||
ui.labelBootloader->setEnabled(true);
|
ui.labelBootloader->setEnabled(true);
|
||||||
if(devices->value("bootloadermethod") == "fwpatcher") {
|
if(devices->value("bootloadermethod") == "fwpatcher") {
|
||||||
ui.labelRemoveBootloader->setEnabled(false);
|
ui.labelRemoveBootloader->setEnabled(false);
|
||||||
ui.buttonRemoveBootloader->setEnabled(false);
|
ui.buttonRemoveBootloader->setEnabled(false);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ui.labelRemoveBootloader->setEnabled(true);
|
ui.labelRemoveBootloader->setEnabled(true);
|
||||||
ui.buttonRemoveBootloader->setEnabled(true);
|
ui.buttonRemoveBootloader->setEnabled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
devices->endGroup();
|
devices->endGroup();
|
||||||
|
|
||||||
qDebug() << "new device selected:" << platform;
|
qDebug() << "new device selected:" << platform;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void RbUtilQt::install()
|
void RbUtilQt::install()
|
||||||
{
|
{
|
||||||
Install *installWindow = new Install(this);
|
Install *installWindow = new Install(this);
|
||||||
installWindow->setUserSettings(userSettings);
|
installWindow->setUserSettings(userSettings);
|
||||||
installWindow->setDeviceSettings(devices);
|
installWindow->setDeviceSettings(devices);
|
||||||
if(userSettings->value("defaults/proxytype") == "manual")
|
if(userSettings->value("defaults/proxytype") == "manual")
|
||||||
installWindow->setProxy(QUrl(userSettings->value("defaults/proxy").toString()));
|
installWindow->setProxy(QUrl(userSettings->value("defaults/proxy").toString()));
|
||||||
installWindow->setMountPoint(userSettings->value("defaults/mountpoint").toString());
|
installWindow->setMountPoint(userSettings->value("defaults/mountpoint").toString());
|
||||||
|
|
||||||
buildInfo.open();
|
buildInfo.open();
|
||||||
QSettings info(buildInfo.fileName(), QSettings::IniFormat, this);
|
QSettings info(buildInfo.fileName(), QSettings::IniFormat, this);
|
||||||
buildInfo.close();
|
buildInfo.close();
|
||||||
installWindow->setArchivedString(info.value("dailies/date").toString());
|
installWindow->setArchivedString(info.value("dailies/date").toString());
|
||||||
|
|
||||||
devices->beginGroup(platform);
|
devices->beginGroup(platform);
|
||||||
QString released = devices->value("released").toString();
|
QString released = devices->value("released").toString();
|
||||||
devices->endGroup();
|
devices->endGroup();
|
||||||
if(released == "yes")
|
if(released == "yes")
|
||||||
installWindow->setReleased(devices->value("last_release", "").toString());
|
installWindow->setReleased(devices->value("last_release", "").toString());
|
||||||
else
|
else
|
||||||
installWindow->setReleased(0);
|
installWindow->setReleased(0);
|
||||||
|
|
||||||
installWindow->show();
|
installWindow->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
void RbUtilQt::installBl()
|
void RbUtilQt::installBl()
|
||||||
{
|
{
|
||||||
InstallBl *installWindow = new InstallBl(this);
|
InstallBl *installWindow = new InstallBl(this);
|
||||||
installWindow->setUserSettings(userSettings);
|
installWindow->setUserSettings(userSettings);
|
||||||
installWindow->setDeviceSettings(devices);
|
installWindow->setDeviceSettings(devices);
|
||||||
if(userSettings->value("defaults/proxytype") == "manual")
|
if(userSettings->value("defaults/proxytype") == "manual")
|
||||||
installWindow->setProxy(QUrl(userSettings->value("defaults/proxy").toString()));
|
installWindow->setProxy(QUrl(userSettings->value("defaults/proxy").toString()));
|
||||||
installWindow->setMountPoint(userSettings->value("defaults/mountpoint").toString());
|
installWindow->setMountPoint(userSettings->value("defaults/mountpoint").toString());
|
||||||
|
|
||||||
installWindow->show();
|
installWindow->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
void RbUtilQt::installFonts()
|
void RbUtilQt::installFonts()
|
||||||
{
|
{
|
||||||
InstallZipWindow* installWindow = new InstallZipWindow(this);
|
InstallZipWindow* installWindow = new InstallZipWindow(this);
|
||||||
installWindow->setUserSettings(userSettings);
|
installWindow->setUserSettings(userSettings);
|
||||||
installWindow->setDeviceSettings(devices);
|
installWindow->setDeviceSettings(devices);
|
||||||
if(userSettings->value("defaults/proxytype") == "manual")
|
if(userSettings->value("defaults/proxytype") == "manual")
|
||||||
installWindow->setProxy(QUrl(userSettings->value("defaults/proxy").toString()));
|
installWindow->setProxy(QUrl(userSettings->value("defaults/proxy").toString()));
|
||||||
installWindow->setMountPoint(userSettings->value("defaults/mountpoint").toString());
|
installWindow->setMountPoint(userSettings->value("defaults/mountpoint").toString());
|
||||||
installWindow->setLogSection("Fonts");
|
installWindow->setLogSection("Fonts");
|
||||||
installWindow->setUrl(devices->value("font_url").toString());
|
installWindow->setUrl(devices->value("font_url").toString());
|
||||||
installWindow->setWindowTitle("Font Installation");
|
installWindow->setWindowTitle("Font Installation");
|
||||||
installWindow->show();
|
installWindow->show();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RbUtilQt::installDoom()
|
void RbUtilQt::installDoom()
|
||||||
{
|
{
|
||||||
InstallZipWindow* installWindow = new InstallZipWindow(this);
|
InstallZipWindow* installWindow = new InstallZipWindow(this);
|
||||||
installWindow->setUserSettings(userSettings);
|
installWindow->setUserSettings(userSettings);
|
||||||
installWindow->setDeviceSettings(devices);
|
installWindow->setDeviceSettings(devices);
|
||||||
if(userSettings->value("defaults/proxytype") == "manual")
|
if(userSettings->value("defaults/proxytype") == "manual")
|
||||||
installWindow->setProxy(QUrl(userSettings->value("defaults/proxy").toString()));
|
installWindow->setProxy(QUrl(userSettings->value("defaults/proxy").toString()));
|
||||||
installWindow->setMountPoint(userSettings->value("defaults/mountpoint").toString());
|
installWindow->setMountPoint(userSettings->value("defaults/mountpoint").toString());
|
||||||
installWindow->setLogSection("Doom");
|
installWindow->setLogSection("Doom");
|
||||||
installWindow->setUrl(devices->value("doom_url").toString());
|
installWindow->setUrl(devices->value("doom_url").toString());
|
||||||
installWindow->setWindowTitle("Doom Installation");
|
installWindow->setWindowTitle("Doom Installation");
|
||||||
installWindow->show();
|
installWindow->show();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,60 +1,60 @@
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* __________ __ ___.
|
* __________ __ ___.
|
||||||
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||||
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
* \/ \/ \/ \/ \/
|
* \/ \/ \/ \/ \/
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007 by Dominik Riebeling
|
* Copyright (C) 2007 by Dominik Riebeling
|
||||||
* $Id$
|
* $Id$
|
||||||
*
|
*
|
||||||
* All files in this archive are subject to the GNU General Public License.
|
* 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.
|
* 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
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
* KIND, either express or implied.
|
* KIND, either express or implied.
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifndef QRBUTIL_H
|
#ifndef QRBUTIL_H
|
||||||
#define QRBUTIL_H
|
#define QRBUTIL_H
|
||||||
|
|
||||||
#include "ui_rbutilqtfrm.h"
|
#include "ui_rbutilqtfrm.h"
|
||||||
#include "httpget.h"
|
#include "httpget.h"
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QTemporaryFile>
|
#include <QTemporaryFile>
|
||||||
|
|
||||||
class RbUtilQt : public QMainWindow
|
class RbUtilQt : public QMainWindow
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RbUtilQt(QWidget *parent = 0);
|
RbUtilQt(QWidget *parent = 0);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::RbUtilQtFrm ui;
|
Ui::RbUtilQtFrm ui;
|
||||||
QSettings *devices;
|
QSettings *devices;
|
||||||
QSettings *userSettings;
|
QSettings *userSettings;
|
||||||
void initDeviceNames(void);
|
void initDeviceNames(void);
|
||||||
QString deviceName(QString);
|
QString deviceName(QString);
|
||||||
QString platform;
|
QString platform;
|
||||||
HttpGet *daily;
|
HttpGet *daily;
|
||||||
QString absolutePath;
|
QString absolutePath;
|
||||||
QTemporaryFile buildInfo;
|
QTemporaryFile buildInfo;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void about(void);
|
void about(void);
|
||||||
void configDialog(void);
|
void configDialog(void);
|
||||||
void updateDevice(int);
|
void updateDevice(int);
|
||||||
void install(void);
|
void install(void);
|
||||||
void installBl(void);
|
void installBl(void);
|
||||||
void installFonts(void);
|
void installFonts(void);
|
||||||
void installDoom(void);
|
void installDoom(void);
|
||||||
void downloadDone(bool);
|
void downloadDone(bool);
|
||||||
void downloadDone(int, bool);
|
void downloadDone(int, bool);
|
||||||
void downloadInfo(void);
|
void downloadInfo(void);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1,74 +1,74 @@
|
||||||
SOURCES += rbutilqt.cpp \
|
SOURCES += rbutilqt.cpp \
|
||||||
main.cpp \
|
main.cpp \
|
||||||
install.cpp \
|
install.cpp \
|
||||||
httpget.cpp \
|
httpget.cpp \
|
||||||
configure.cpp \
|
configure.cpp \
|
||||||
zip/zip.cpp \
|
zip/zip.cpp \
|
||||||
zip/unzip.cpp \
|
zip/unzip.cpp \
|
||||||
installzip.cpp \
|
installzip.cpp \
|
||||||
installbootloader.cpp \
|
installbootloader.cpp \
|
||||||
installbl.cpp \
|
installbl.cpp \
|
||||||
installzipwindow.cpp \
|
installzipwindow.cpp \
|
||||||
../ipodpatcher/ipodpatcher.c \
|
../ipodpatcher/ipodpatcher.c \
|
||||||
../sansapatcher/sansapatcher.c \
|
../sansapatcher/sansapatcher.c \
|
||||||
irivertools/irivertools.cpp \
|
irivertools/irivertools.cpp \
|
||||||
irivertools/md5sum.cpp
|
irivertools/md5sum.cpp
|
||||||
|
|
||||||
|
|
||||||
HEADERS += rbutilqt.h \
|
HEADERS += rbutilqt.h \
|
||||||
settings.h \
|
settings.h \
|
||||||
install.h \
|
install.h \
|
||||||
httpget.h \
|
httpget.h \
|
||||||
configure.h \
|
configure.h \
|
||||||
zip/zip.h \
|
zip/zip.h \
|
||||||
zip/unzip.h \
|
zip/unzip.h \
|
||||||
zip/zipentry_p.h \
|
zip/zipentry_p.h \
|
||||||
zip/unzip_p.h \
|
zip/unzip_p.h \
|
||||||
zip/zip_p.h \
|
zip/zip_p.h \
|
||||||
version.h \
|
version.h \
|
||||||
installzip.h \
|
installzip.h \
|
||||||
installbootloader.h \
|
installbootloader.h \
|
||||||
installbl.h \
|
installbl.h \
|
||||||
installzipwindow.h \
|
installzipwindow.h \
|
||||||
../ipodpatcher/ipodpatcher.h \
|
../ipodpatcher/ipodpatcher.h \
|
||||||
../ipodpatcher/ipodio.h \
|
../ipodpatcher/ipodio.h \
|
||||||
../ipodpatcher/parttypes.h \
|
../ipodpatcher/parttypes.h \
|
||||||
../sansapatcher/sansapatcher.h \
|
../sansapatcher/sansapatcher.h \
|
||||||
../sansapatcher/sansaio.h \
|
../sansapatcher/sansaio.h \
|
||||||
irivertools/irivertools.h \
|
irivertools/irivertools.h \
|
||||||
irivertools/md5sum.h \
|
irivertools/md5sum.h \
|
||||||
irivertools/h100sums.h \
|
irivertools/h100sums.h \
|
||||||
irivertools/h120sums.h \
|
irivertools/h120sums.h \
|
||||||
irivertools/h300sums.h
|
irivertools/h300sums.h
|
||||||
|
|
||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
CONFIG += release \
|
CONFIG += release \
|
||||||
warn_on \
|
warn_on \
|
||||||
thread \
|
thread \
|
||||||
qt
|
qt
|
||||||
TARGET = rbutilqt
|
TARGET = rbutilqt
|
||||||
|
|
||||||
FORMS += rbutilqtfrm.ui \
|
FORMS += rbutilqtfrm.ui \
|
||||||
aboutbox.ui \
|
aboutbox.ui \
|
||||||
installfrm.ui \
|
installfrm.ui \
|
||||||
installprogressfrm.ui \
|
installprogressfrm.ui \
|
||||||
configurefrm.ui \
|
configurefrm.ui \
|
||||||
installbootloaderfrm.ui \
|
installbootloaderfrm.ui \
|
||||||
installzipfrm.ui
|
installzipfrm.ui
|
||||||
|
|
||||||
|
|
||||||
RESOURCES += rbutilqt.qrc
|
RESOURCES += rbutilqt.qrc
|
||||||
|
|
||||||
TRANSLATIONS += rbutil_de.ts
|
TRANSLATIONS += rbutil_de.ts
|
||||||
QT += network
|
QT += network
|
||||||
DEFINES += RBUTIL
|
DEFINES += RBUTIL
|
||||||
|
|
||||||
win32{
|
win32{
|
||||||
SOURCES += ../ipodpatcher/ipodio-win32.c
|
SOURCES += ../ipodpatcher/ipodio-win32.c
|
||||||
SOURCES += ../sansapatcher/sansaio-win32.c
|
SOURCES += ../sansapatcher/sansaio-win32.c
|
||||||
}
|
}
|
||||||
|
|
||||||
unix{
|
unix{
|
||||||
SOURCES += ../ipodpatcher/ipodio-posix.c
|
SOURCES += ../ipodpatcher/ipodio-posix.c
|
||||||
SOURCES += ../sansapatcher/sansaio-posix.c
|
SOURCES += ../sansapatcher/sansaio-posix.c
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue