From 46f2c1134d276944fb74584a61d90cc363aee7eb Mon Sep 17 00:00:00 2001 From: Benjamin Dobell Date: Sun, 5 Dec 2010 00:25:04 +1100 Subject: Removed the "Heimdall" folder and moved its contents to the root directory. --- heimdall-frontend/.DS_Store | Bin 0 -> 12292 bytes heimdall-frontend/._.DS_Store | Bin 0 -> 4096 bytes heimdall-frontend/._heimdall-frontend.pri | Bin 0 -> 4096 bytes heimdall-frontend/._heimdall-frontend.pro | Bin 0 -> 4096 bytes heimdall-frontend/._heimdall-frontend.vcxproj | Bin 0 -> 4096 bytes heimdall-frontend/Qt4VSPropertySheet.props | 15 + heimdall-frontend/Source/.DS_Store | Bin 0 -> 6148 bytes heimdall-frontend/Source/._.DS_Store | Bin 0 -> 4096 bytes heimdall-frontend/Source/._main.cpp | Bin 0 -> 4096 bytes heimdall-frontend/Source/._mainwindow.cpp | Bin 0 -> 4096 bytes heimdall-frontend/Source/._mainwindow.h | Bin 0 -> 4096 bytes heimdall-frontend/Source/aboutform.cpp | 29 + heimdall-frontend/Source/aboutform.h | 35 + heimdall-frontend/Source/main.cpp | 37 + heimdall-frontend/Source/mainwindow.cpp | 742 ++++++++++++++++++ heimdall-frontend/Source/mainwindow.h | 93 +++ heimdall-frontend/aboutform.ui | 348 ++++++++ heimdall-frontend/description-pak | 1 + heimdall-frontend/doc-pak/LICENSE | 19 + heimdall-frontend/doc-pak/README | 119 +++ heimdall-frontend/heimdall-frontend.pri | 12 + heimdall-frontend/heimdall-frontend.pro | 45 ++ heimdall-frontend/heimdall-frontend.vcxproj | 174 ++++ .../heimdall-frontend.vcxproj.filters | 78 ++ heimdall-frontend/mainwindow.qrc | 4 + heimdall-frontend/mainwindow.ui | 872 +++++++++++++++++++++ 26 files changed, 2623 insertions(+) create mode 100644 heimdall-frontend/.DS_Store create mode 100644 heimdall-frontend/._.DS_Store create mode 100644 heimdall-frontend/._heimdall-frontend.pri create mode 100644 heimdall-frontend/._heimdall-frontend.pro create mode 100644 heimdall-frontend/._heimdall-frontend.vcxproj create mode 100644 heimdall-frontend/Qt4VSPropertySheet.props create mode 100644 heimdall-frontend/Source/.DS_Store create mode 100644 heimdall-frontend/Source/._.DS_Store create mode 100644 heimdall-frontend/Source/._main.cpp create mode 100644 heimdall-frontend/Source/._mainwindow.cpp create mode 100644 heimdall-frontend/Source/._mainwindow.h create mode 100644 heimdall-frontend/Source/aboutform.cpp create mode 100644 heimdall-frontend/Source/aboutform.h create mode 100644 heimdall-frontend/Source/main.cpp create mode 100644 heimdall-frontend/Source/mainwindow.cpp create mode 100644 heimdall-frontend/Source/mainwindow.h create mode 100644 heimdall-frontend/aboutform.ui create mode 100644 heimdall-frontend/description-pak create mode 100644 heimdall-frontend/doc-pak/LICENSE create mode 100644 heimdall-frontend/doc-pak/README create mode 100644 heimdall-frontend/heimdall-frontend.pri create mode 100644 heimdall-frontend/heimdall-frontend.pro create mode 100644 heimdall-frontend/heimdall-frontend.vcxproj create mode 100644 heimdall-frontend/heimdall-frontend.vcxproj.filters create mode 100644 heimdall-frontend/mainwindow.qrc create mode 100644 heimdall-frontend/mainwindow.ui (limited to 'heimdall-frontend') diff --git a/heimdall-frontend/.DS_Store b/heimdall-frontend/.DS_Store new file mode 100644 index 0000000..b92c211 Binary files /dev/null and b/heimdall-frontend/.DS_Store differ diff --git a/heimdall-frontend/._.DS_Store b/heimdall-frontend/._.DS_Store new file mode 100644 index 0000000..338bd7b Binary files /dev/null and b/heimdall-frontend/._.DS_Store differ diff --git a/heimdall-frontend/._heimdall-frontend.pri b/heimdall-frontend/._heimdall-frontend.pri new file mode 100644 index 0000000..5b4b4a0 Binary files /dev/null and b/heimdall-frontend/._heimdall-frontend.pri differ diff --git a/heimdall-frontend/._heimdall-frontend.pro b/heimdall-frontend/._heimdall-frontend.pro new file mode 100644 index 0000000..5b4b4a0 Binary files /dev/null and b/heimdall-frontend/._heimdall-frontend.pro differ diff --git a/heimdall-frontend/._heimdall-frontend.vcxproj b/heimdall-frontend/._heimdall-frontend.vcxproj new file mode 100644 index 0000000..a322a67 Binary files /dev/null and b/heimdall-frontend/._heimdall-frontend.vcxproj differ diff --git a/heimdall-frontend/Qt4VSPropertySheet.props b/heimdall-frontend/Qt4VSPropertySheet.props new file mode 100644 index 0000000..5f07ba6 --- /dev/null +++ b/heimdall-frontend/Qt4VSPropertySheet.props @@ -0,0 +1,15 @@ + + + + + D:\development\cpp\libraries\Qt\2010.05\qt + + + + + + $(QTDIR) + true + + + \ No newline at end of file diff --git a/heimdall-frontend/Source/.DS_Store b/heimdall-frontend/Source/.DS_Store new file mode 100644 index 0000000..1b015c7 Binary files /dev/null and b/heimdall-frontend/Source/.DS_Store differ diff --git a/heimdall-frontend/Source/._.DS_Store b/heimdall-frontend/Source/._.DS_Store new file mode 100644 index 0000000..338bd7b Binary files /dev/null and b/heimdall-frontend/Source/._.DS_Store differ diff --git a/heimdall-frontend/Source/._main.cpp b/heimdall-frontend/Source/._main.cpp new file mode 100644 index 0000000..a322a67 Binary files /dev/null and b/heimdall-frontend/Source/._main.cpp differ diff --git a/heimdall-frontend/Source/._mainwindow.cpp b/heimdall-frontend/Source/._mainwindow.cpp new file mode 100644 index 0000000..a322a67 Binary files /dev/null and b/heimdall-frontend/Source/._mainwindow.cpp differ diff --git a/heimdall-frontend/Source/._mainwindow.h b/heimdall-frontend/Source/._mainwindow.h new file mode 100644 index 0000000..a322a67 Binary files /dev/null and b/heimdall-frontend/Source/._mainwindow.h differ diff --git a/heimdall-frontend/Source/aboutform.cpp b/heimdall-frontend/Source/aboutform.cpp new file mode 100644 index 0000000..f043c20 --- /dev/null +++ b/heimdall-frontend/Source/aboutform.cpp @@ -0,0 +1,29 @@ +/* Copyright (c) 2010 Benjamin Dobell, Glass Echidna + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE.*/ + +// Heimdall +#include "aboutform.h" + +using namespace HeimdallFrontend; + +AboutForm::AboutForm(QWidget *parent) : QWidget(parent) +{ + setupUi(this); +} diff --git a/heimdall-frontend/Source/aboutform.h b/heimdall-frontend/Source/aboutform.h new file mode 100644 index 0000000..2a44c95 --- /dev/null +++ b/heimdall-frontend/Source/aboutform.h @@ -0,0 +1,35 @@ +/* Copyright (c) 2010 Benjamin Dobell, Glass Echidna + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE.*/ + +// Heimdall +#include "ui_aboutform.h" + +// Qt +#include + +namespace HeimdallFrontend +{ + class AboutForm : public QWidget, public Ui::AboutForm + { + public: + + explicit AboutForm(QWidget *parent = 0); + }; +} diff --git a/heimdall-frontend/Source/main.cpp b/heimdall-frontend/Source/main.cpp new file mode 100644 index 0000000..8df987c --- /dev/null +++ b/heimdall-frontend/Source/main.cpp @@ -0,0 +1,37 @@ +/* Copyright (c) 2010 Benjamin Dobell, Glass Echidna + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE.*/ + +// Heimdall Frontend +#include "mainwindow.h" + +// Qt +#include + +using namespace HeimdallFrontend; + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + + MainWindow w; + w.show(); + + return a.exec(); +} diff --git a/heimdall-frontend/Source/mainwindow.cpp b/heimdall-frontend/Source/mainwindow.cpp new file mode 100644 index 0000000..b5287e2 --- /dev/null +++ b/heimdall-frontend/Source/mainwindow.cpp @@ -0,0 +1,742 @@ +/* Copyright (c) 2010 Benjamin Dobell, Glass Echidna + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE.*/ + +// Heimdall Frontend +#include "mainwindow.h" + +// Qt +#include +#include +#include +#include +#include +#include +#include + +using namespace HeimdallFrontend; + +bool MainWindow::IsArchive(QString path) +{ + // Not a real check but hopefully it gets the message across, don't flash archives! + return (path.endsWith(".tar", Qt::CaseInsensitive) || path.endsWith(".gz", Qt::CaseInsensitive) || path.endsWith(".zip", Qt::CaseInsensitive) + || path.endsWith(".bz2", Qt::CaseInsensitive) || path.endsWith(".7z", Qt::CaseInsensitive) || path.endsWith(".rar", Qt::CaseInsensitive)); +} + +QString MainWindow::PromptFileSelection(void) +{ + QString path = QFileDialog::getOpenFileName(this, "Select File", lastDirectory); + + if (path != "") + lastDirectory = path.left(path.lastIndexOf('/') + 1); + + return (path); +} + +void MainWindow::UpdateStartButton(void) +{ + if (heimdallRunning) + { + startFlashButton->setEnabled(false); + return; + } + + if (repartitionCheckBox->isChecked()) + { + if (!IsArchive(pitLineEdit->text()) && factoryfsCheckBox->isChecked() && !IsArchive(factoryfsLineEdit->text()) && kernelCheckBox->isChecked() + && !IsArchive(kernelLineEdit->text()) && paramCheckBox->isChecked() && !IsArchive(paramLineEdit->text()) + && primaryBootCheckBox->isChecked() && !IsArchive(primaryBootLineEdit->text()) && secondaryBootCheckBox->isChecked() + && !IsArchive(secondaryBootLineEdit->text()) && modemCheckBox->isChecked() && !IsArchive(modemLineEdit->text())) + { + startFlashButton->setEnabled(true); + } + else + { + startFlashButton->setEnabled(false); + } + } + else + { + bool atLeastOneFile = false; + + if (factoryfsCheckBox->isChecked()) + { + atLeastOneFile = true; + + if (IsArchive(factoryfsLineEdit->text())) + { + startFlashButton->setEnabled(false); + return; + } + } + + if (kernelCheckBox->isChecked()) + { + atLeastOneFile = true; + + if (IsArchive(kernelLineEdit->text())) + { + startFlashButton->setEnabled(false); + return; + } + } + + if (paramCheckBox->isChecked()) + { + atLeastOneFile = true; + + if (IsArchive(paramLineEdit->text())) + { + startFlashButton->setEnabled(false); + return; + } + } + + if (primaryBootCheckBox->isChecked()) + { + atLeastOneFile = true; + + if (IsArchive(primaryBootLineEdit->text())) + { + startFlashButton->setEnabled(false); + return; + } + } + + if (secondaryBootCheckBox->isChecked()) + { + atLeastOneFile = true; + + if (IsArchive(secondaryBootLineEdit->text())) + { + startFlashButton->setEnabled(false); + return; + } + } + + if (cacheCheckBox->isChecked()) + { + atLeastOneFile = true; + + if (IsArchive(cacheLineEdit->text())) + { + startFlashButton->setEnabled(false); + return; + } + } + + if (databaseCheckBox->isChecked()) + { + atLeastOneFile = true; + + if (IsArchive(databaseLineEdit->text())) + { + startFlashButton->setEnabled(false); + return; + } + } + + if (modemCheckBox->isChecked()) + { + atLeastOneFile = true; + + if (IsArchive(modemLineEdit->text())) + { + startFlashButton->setEnabled(false); + return; + } + } + + if (recoveryCheckBox->isChecked()) + { + atLeastOneFile = true; + + if (IsArchive(recoveryLineEdit->text())) + { + startFlashButton->setEnabled(false); + return; + } + } + + startFlashButton->setEnabled(atLeastOneFile); + } +} + +MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) +{ + setupUi(this); + + heimdallRunning = false; + + lastDirectory = QDir::toNativeSeparators(QApplication::applicationDirPath()); + + QObject::connect(actionDonate, SIGNAL(triggered()), this, SLOT(OpenDonationWebpage())); + QObject::connect(actionAboutHeimdall, SIGNAL(triggered()), this, SLOT(ShowAbout())); + + QObject::connect(pitBrowseButton, SIGNAL(clicked()), this, SLOT(SelectPit())); + QObject::connect(factoryfsBrowseButton, SIGNAL(clicked()), this, SLOT(SelectFactoryfs())); + QObject::connect(kernelBrowseButton, SIGNAL(clicked()), this, SLOT(SelectKernel())); + QObject::connect(paramBrowseButton, SIGNAL(clicked()), this, SLOT(SelectParam())); + QObject::connect(primaryBootBrowseButton, SIGNAL(clicked()), this, SLOT(SelectPrimaryBootloader())); + QObject::connect(secondaryBootBrowseButton, SIGNAL(clicked()), this, SLOT(SelectSecondaryBootloader())); + QObject::connect(cacheBrowseButton, SIGNAL(clicked()), this, SLOT(SelectCache())); + QObject::connect(databaseBrowseButton, SIGNAL(clicked()), this, SLOT(SelectDatabase())); + QObject::connect(modemBrowseButton, SIGNAL(clicked()), this, SLOT(SelectModem())); + QObject::connect(recoveryBrowseButton, SIGNAL(clicked()), this, SLOT(SelectRecovery())); + + QObject::connect(repartitionCheckBox, SIGNAL(stateChanged(int)), this, SLOT(SetRepartionEnabled(int))); + QObject::connect(factoryfsCheckBox, SIGNAL(stateChanged(int)), this, SLOT(SetFactoryfsEnabled(int))); + QObject::connect(kernelCheckBox, SIGNAL(stateChanged(int)), this, SLOT(SetKernelEnabled(int))); + QObject::connect(paramCheckBox, SIGNAL(stateChanged(int)), this, SLOT(SetParamEnabled(int))); + QObject::connect(primaryBootCheckBox, SIGNAL(stateChanged(int)), this, SLOT(SetPrimaryBootloaderEnabled(int))); + QObject::connect(secondaryBootCheckBox, SIGNAL(stateChanged(int)), this, SLOT(SetSecondaryBootloaderEnabled(int))); + QObject::connect(cacheCheckBox, SIGNAL(stateChanged(int)), this, SLOT(SetCacheEnabled(int))); + QObject::connect(databaseCheckBox, SIGNAL(stateChanged(int)), this, SLOT(SetDatabaseEnabled(int))); + QObject::connect(modemCheckBox, SIGNAL(stateChanged(int)), this, SLOT(SetModemEnabled(int))); + QObject::connect(recoveryCheckBox, SIGNAL(stateChanged(int)), this, SLOT(SetRecoveryEnabled(int))); + + QObject::connect(startFlashButton, SIGNAL(clicked()), this, SLOT(StartFlash())); + + QObject::connect(&process, SIGNAL(readyRead()), this, SLOT(HandleHeimdallStdout())); + QObject::connect(&process, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(HandleHeimdallReturned(int, QProcess::ExitStatus))); + QObject::connect(&process, SIGNAL(error(QProcess::ProcessError)), this, SLOT(HandleHeimdallError(QProcess::ProcessError))); +} + +MainWindow::~MainWindow() +{ +} + +void MainWindow::OpenDonationWebpage(void) +{ + QDesktopServices::openUrl(QUrl("http://www.glassechidna.com.au/donate/", QUrl::StrictMode)); +} + +void MainWindow::ShowAbout(void) +{ + aboutForm.show(); +} + +void MainWindow::SelectPit(void) +{ + QString path = PromptFileSelection(); + pitLineEdit->setText(path); + + SetRepartionEnabled(path != ""); +} + +void MainWindow::SelectFactoryfs(void) +{ + QString path = PromptFileSelection(); + factoryfsLineEdit->setText(path); + + SetFactoryfsEnabled(path != ""); +} + +void MainWindow::SelectKernel(void) +{ + QString path = PromptFileSelection(); + kernelLineEdit->setText(path); + + SetKernelEnabled(path != ""); +} + +void MainWindow::SelectParam(void) +{ + QString path = PromptFileSelection(); + paramLineEdit->setText(path); + + SetParamEnabled(path != ""); +} + +void MainWindow::SelectPrimaryBootloader(void) +{ + QString path = PromptFileSelection(); + primaryBootLineEdit->setText(path); + + SetPrimaryBootloaderEnabled(path != ""); +} + +void MainWindow::SelectSecondaryBootloader(void) +{ + QString path = PromptFileSelection(); + secondaryBootLineEdit->setText(path); + + SetSecondaryBootloaderEnabled(path != ""); +} + +void MainWindow::SelectCache(void) +{ + QString path = PromptFileSelection(); + cacheLineEdit->setText(path); + + SetCacheEnabled(path != ""); +} + +void MainWindow::SelectDatabase(void) +{ + QString path = PromptFileSelection(); + databaseLineEdit->setText(path); + + SetDatabaseEnabled(path != ""); +} + +void MainWindow::SelectModem(void) +{ + QString path = PromptFileSelection(); + modemLineEdit->setText(path); + + SetModemEnabled(path != ""); +} + +void MainWindow::SelectRecovery(void) +{ + QString path = PromptFileSelection(); + recoveryLineEdit->setText(path); + + SetRecoveryEnabled(path != ""); +} + +void MainWindow::SetRepartionEnabled(int enabled) +{ + if (repartitionCheckBox->isChecked() != (enabled != 0)) + repartitionCheckBox->setChecked(enabled); + + if (enabled) + { + repartitionCheckBox->setEnabled(true); + pitLineEdit->setEnabled(true); + repartitionCheckBox->setChecked(true); + } + else + { + repartitionCheckBox->setEnabled(pitLineEdit->text() != ""); + pitLineEdit->setEnabled(false); + } + + UpdateStartButton(); +} + +void MainWindow::SetFactoryfsEnabled(int enabled) +{ + if (factoryfsCheckBox->isChecked() != (enabled != 0)) + factoryfsCheckBox->setChecked(enabled); + + if (enabled) + { + factoryfsCheckBox->setEnabled(true); + factoryfsLineEdit->setEnabled(true); + factoryfsCheckBox->setChecked(true); + } + else + { + factoryfsCheckBox->setEnabled(factoryfsLineEdit->text() != ""); + factoryfsLineEdit->setEnabled(false); + } + + UpdateStartButton(); +} + +void MainWindow::SetKernelEnabled(int enabled) +{ + if (kernelCheckBox->isChecked() != (enabled != 0)) + kernelCheckBox->setChecked(enabled); + + if (enabled) + { + kernelCheckBox->setEnabled(true); + kernelLineEdit->setEnabled(true); + kernelCheckBox->setChecked(true); + } + else + { + kernelCheckBox->setEnabled(kernelLineEdit->text() != ""); + kernelLineEdit->setEnabled(false); + } + + UpdateStartButton(); +} + +void MainWindow::SetParamEnabled(int enabled) +{ + if (paramCheckBox->isChecked() != (enabled != 0)) + paramCheckBox->setChecked(enabled); + + if (enabled) + { + paramCheckBox->setEnabled(true); + paramLineEdit->setEnabled(true); + paramCheckBox->setChecked(true); + } + else + { + paramCheckBox->setEnabled(paramLineEdit->text() != ""); + paramLineEdit->setEnabled(false); + } + + UpdateStartButton(); +} + +void MainWindow::SetPrimaryBootloaderEnabled(int enabled) +{ + if (primaryBootCheckBox->isChecked() != (enabled != 0)) + primaryBootCheckBox->setChecked(enabled); + + if (enabled) + { + primaryBootCheckBox->setEnabled(true); + primaryBootLineEdit->setEnabled(true); + primaryBootCheckBox->setChecked(true); + } + else + { + primaryBootCheckBox->setEnabled(primaryBootLineEdit->text() != ""); + primaryBootLineEdit->setEnabled(false); + } + + UpdateStartButton(); +} + +void MainWindow::SetSecondaryBootloaderEnabled(int enabled) +{ + if (secondaryBootCheckBox->isChecked() != (enabled != 0)) + secondaryBootCheckBox->setChecked(enabled); + + if (enabled) + { + secondaryBootCheckBox->setEnabled(true); + secondaryBootLineEdit->setEnabled(true); + secondaryBootCheckBox->setChecked(true); + } + else + { + secondaryBootCheckBox->setEnabled(secondaryBootLineEdit->text() != ""); + secondaryBootLineEdit->setEnabled(false); + } + + UpdateStartButton(); +} + +void MainWindow::SetCacheEnabled(int enabled) +{ + if (cacheCheckBox->isChecked() != (enabled != 0)) + cacheCheckBox->setChecked(enabled); + + if (enabled) + { + cacheCheckBox->setEnabled(true); + cacheLineEdit->setEnabled(true); + cacheCheckBox->setChecked(true); + } + else + { + cacheCheckBox->setEnabled(cacheLineEdit->text() != ""); + cacheLineEdit->setEnabled(false); + } + + UpdateStartButton(); +} + +void MainWindow::SetDatabaseEnabled(int enabled) +{ + if (databaseCheckBox->isChecked() != (enabled != 0)) + databaseCheckBox->setChecked(enabled); + + if (enabled) + { + databaseCheckBox->setEnabled(true); + databaseLineEdit->setEnabled(true); + databaseCheckBox->setChecked(true); + } + else + { + databaseCheckBox->setEnabled(databaseLineEdit->text() != ""); + databaseLineEdit->setEnabled(false); + } + + UpdateStartButton(); +} + +void MainWindow::SetModemEnabled(int enabled) +{ + if (modemCheckBox->isChecked() != (enabled != 0)) + modemCheckBox->setChecked(enabled); + + if (enabled) + { + modemCheckBox->setEnabled(true); + modemLineEdit->setEnabled(true); + modemCheckBox->setChecked(true); + } + else + { + modemCheckBox->setEnabled(databaseLineEdit->text() != ""); + modemLineEdit->setEnabled(false); + } + + UpdateStartButton(); +} + +void MainWindow::SetRecoveryEnabled(int enabled) +{ + if (recoveryCheckBox->isChecked() != (enabled != 0)) + recoveryCheckBox->setChecked(enabled); + + if (enabled) + { + recoveryCheckBox->setEnabled(true); + recoveryLineEdit->setEnabled(true); + recoveryCheckBox->setChecked(true); + } + else + { + recoveryCheckBox->setEnabled(databaseLineEdit->text() != ""); + recoveryLineEdit->setEnabled(false); + } + + UpdateStartButton(); +} + +void MainWindow::StartFlash(void) +{ + heimdallRunning = true; + heimdallFailed = false; + + QStringList arguments; + arguments.append("flash"); + + if (repartitionCheckBox->isChecked()) + { + arguments.append("--pit"); + arguments.append(pitLineEdit->text()); + } + + if (factoryfsCheckBox->isChecked()) + { + arguments.append("--factoryfs"); + arguments.append(factoryfsLineEdit->text()); + } + + if (kernelCheckBox->isChecked()) + { + arguments.append("--kernel"); + arguments.append(kernelLineEdit->text()); + } + + if (paramCheckBox->isChecked()) + { + arguments.append("--param"); + arguments.append(paramLineEdit->text()); + } + + if (primaryBootCheckBox->isChecked()) + { + arguments.append("--primary-boot"); + arguments.append(primaryBootLineEdit->text()); + } + + if (secondaryBootCheckBox->isChecked()) + { + arguments.append("--secondary-boot"); + arguments.append(secondaryBootLineEdit->text()); + } + + if (cacheCheckBox->isChecked()) + { + arguments.append("--cache"); + arguments.append(cacheLineEdit->text()); + } + + if (databaseCheckBox->isChecked()) + { + arguments.append("--dbdata"); + arguments.append(databaseLineEdit->text()); + } + + if (modemCheckBox->isChecked()) + { + arguments.append("--modem"); + arguments.append(modemLineEdit->text()); + } + + if (recoveryCheckBox->isChecked()) + { + arguments.append("--recovery"); + arguments.append(recoveryLineEdit->text()); + } + + if (repartitionCheckBox->isChecked()) + { + arguments.append("--repartition"); + } + + flashProgressBar->setEnabled(true); + UpdateStartButton(); + + int pathIndex = -1; + process.setReadChannel(QProcess::StandardOutput); + + process.start("heimdall", arguments); + process.waitForStarted(1000); + + // OS X was playing up and not finding heimdall, so we're manually checking the PATH. + if (heimdallFailed) + { + QStringList environment = QProcess::systemEnvironment(); + + QStringList paths; + // Ensure /usr/local/bin is in PATH + for (int i = 0; i < environment.length(); i++) + { + if (environment[i].left(5) == "PATH=") + { + paths = environment[i].mid(5).split(':'); + paths.prepend("/usr/local/bin"); + break; + } + } + + while (heimdallFailed && ++pathIndex < paths.length()) + { + QString heimdallPath = paths[pathIndex]; + + if (heimdallPath.length() > 0) + { + heimdallFailed = false; + + if (heimdallPath[heimdallPath.length() - 1] != QDir::separator()) + heimdallPath += QDir::separator(); + + heimdallPath += "heimdall"; + + process.start(heimdallPath, arguments); + process.waitForStarted(1000); + } + } + + if (heimdallFailed) + { + flashLabel->setText("Failed to start Heimdall!"); + + heimdallRunning = false; + flashProgressBar->setEnabled(false); + UpdateStartButton(); + } + } +} + +void MainWindow::HandleHeimdallStdout(void) +{ + QString output = process.read(1024); + + // We often receive multiple lots of output from Heimdall at one time. So we use regular expressions + // to ensure we don't miss out on any important information. + QRegExp uploadingExp("Uploading [^\n]+\n"); + if (output.lastIndexOf(uploadingExp) > -1) + flashLabel->setText(uploadingExp.cap().left(uploadingExp.cap().length() - 1)); + + QRegExp percentExp("[\b\n][0-9]+%"); + if (output.lastIndexOf(percentExp) > -1) + { + QString percentString = percentExp.cap(); + flashProgressBar->setValue(percentString.mid(1, percentString.length() - 2).toInt()); + } + + /*// Handle other information + + int endOfLastLine = output.length() - 1; + for (; endOfLastLine > -1; endOfLastLine--) + { + if (output[endOfLastLine] != '\n') + break; + } + + if (endOfLastLine < 0) + return; // Output was blank or just a bunch of new line characters. + + int startOfLastLine = endOfLastLine - 1; + for (; startOfLastLine > -1; startOfLastLine--) + { + if (output[startOfLastLine] == '\n') + break; + } + + startOfLastLine++; + + // Just look at the last line of the output + output = output.mid(startOfLastLine, endOfLastLine - startOfLastLine + 1); // Work with the last line only + + percentExp.setPattern("[0-9]+%"); + + // If the last line wasn't a uploading message or a percentage transferred then display it. + if (output.lastIndexOf(uploadingExp) < 0 && output.lastIndexOf(percentExp) < 0) + flashLabel->setText(output);*/ +} + +void MainWindow::HandleHeimdallReturned(int exitCode, QProcess::ExitStatus exitStatus) +{ + // This is a work-around for strange issues as a result of a exitCode being cast to + // a unsigned char. + char byteExitCode = exitCode; + + heimdallRunning = false; + flashProgressBar->setEnabled(false); + UpdateStartButton(); + + if (exitStatus == QProcess::NormalExit && byteExitCode >= 0) + { + flashLabel->setText("Flash completed sucessfully!"); + } + else + { + QString error = process.readAllStandardError(); + + int firstNewLineChar = error.indexOf('\n'); + + if (firstNewLineChar == 0) + error = error.mid(1); + else + error = error.left(firstNewLineChar); + + flashLabel->setText(error); + } +} + +void MainWindow::HandleHeimdallError(QProcess::ProcessError error) +{ + if (error == QProcess::FailedToStart || error == QProcess::Timedout) + { + heimdallFailed = true; + } + else if (error == QProcess::Crashed) + { + flashLabel->setText("Heimdall crashed!"); + + heimdallRunning = false; + flashProgressBar->setEnabled(false); + UpdateStartButton(); + } + else + { + flashLabel->setText("Heimdall reported an unknown error!"); + + heimdallRunning = false; + flashProgressBar->setEnabled(false); + UpdateStartButton(); + } +} diff --git a/heimdall-frontend/Source/mainwindow.h b/heimdall-frontend/Source/mainwindow.h new file mode 100644 index 0000000..added4e --- /dev/null +++ b/heimdall-frontend/Source/mainwindow.h @@ -0,0 +1,93 @@ +/* Copyright (c) 2010 Benjamin Dobell, Glass Echidna + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE.*/ + +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +// Heimdall Frontend +#include "aboutform.h" +#include "ui_mainwindow.h" + +// Qt +#include +#include + +namespace HeimdallFrontend +{ + class MainWindow : public QMainWindow, public Ui::MainWindow + { + Q_OBJECT + + private: + + AboutForm aboutForm; + + QString lastDirectory; + + bool heimdallFailed; + bool heimdallRunning; + QProcess process; + + bool IsArchive(QString path); + + QString PromptFileSelection(void); + void UpdateStartButton(void); + + public: + + explicit MainWindow(QWidget *parent = 0); + ~MainWindow(); + + public slots: + + void OpenDonationWebpage(void); + void ShowAbout(void); + + void SelectPit(void); + void SelectFactoryfs(void); + void SelectKernel(void); + void SelectParam(void); + void SelectPrimaryBootloader(void); + void SelectSecondaryBootloader(void); + void SelectCache(void); + void SelectDatabase(void); + void SelectModem(void); + void SelectRecovery(void); + + void SetRepartionEnabled(int enabled); + void SetFactoryfsEnabled(int enabled); + void SetKernelEnabled(int enabled); + void SetParamEnabled(int enabled); + void SetPrimaryBootloaderEnabled(int enabled); + void SetSecondaryBootloaderEnabled(int enabled); + void SetCacheEnabled(int enabled); + void SetDatabaseEnabled(int enabled); + void SetModemEnabled(int enabled); + void SetRecoveryEnabled(int enabled); + + void StartFlash(void); + + void HandleHeimdallStdout(void); + void HandleHeimdallReturned(int exitCode, QProcess::ExitStatus exitStatus); + void HandleHeimdallError(QProcess::ProcessError error); + }; +} + +#endif // MAINWINDOW_H diff --git a/heimdall-frontend/aboutform.ui b/heimdall-frontend/aboutform.ui new file mode 100644 index 0000000..80b7181 --- /dev/null +++ b/heimdall-frontend/aboutform.ui @@ -0,0 +1,348 @@ + + + AboutForm + + + Qt::ApplicationModal + + + + 0 + 0 + 622 + 561 + + + + + 0 + 0 + + + + + 561 + 551 + + + + + 700 + 600 + + + + About Heimdall Frontend 1.1 + + + + + 10 + 10 + 601 + 541 + + + + + + + + + 10 + 190 + 581 + 241 + + + + + 9 + + + + false + + + QFrame::NoFrame + + + QFrame::Plain + + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + Qt::PlainText + + + true + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + true + + + 0 + + + 2 + + + false + + + + + + 10 + 440 + 581 + 41 + + + + + 10 + + + + QFrame::NoFrame + + + QFrame::Plain + + + If you appreciate this software and you would like to support future development please consider donating: + + + Qt::PlainText + + + true + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + true + + + false + + + + + + 260 + 510 + 75 + 21 + + + + OK + + + + + + 10 + 10 + 581 + 101 + + + + + 9 + + + + Heimdall Frontend +Version 1.1.0 +Copyright © 2010 Benjamin Dobell, Glass Echidna + +Heimdall +Version 1.1.0 +Copyright © 2010 Benjamin Dobell, Glass Echidna + + + Qt::PlainText + + + true + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + false + + + + + + 10 + 118 + 581 + 16 + + + + + 10 + + + + Heimdall Homepage: + + + Qt::PlainText + + + true + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + 10 + 130 + 581 + 21 + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://www.glassechidna.com.au/products/heimdall/"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt; text-decoration: underline; color:#0000ff;">http://www.glassechidna.com.au/products/heimdall/</span></a></p></body></html> + + + Qt::RichText + + + true + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + true + + + + + + 10 + 150 + 581 + 16 + + + + + 10 + + + + Glass Echidna Homepage: + + + Qt::PlainText + + + true + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + + 10 + 162 + 581 + 21 + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://www.glassechidna.com.au/"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt; text-decoration: underline; color:#0000ff;">http://www.glassechidna.com.au/</span></a></p></body></html> + + + Qt::RichText + + + true + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + true + + + + + + 10 + 480 + 581 + 21 + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://www.glassechidna.com.au/donate/"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt; text-decoration: underline; color:#0000ff;">http://www.glassechidna.com.au/donate/</span></a></p></body></html> + + + Qt::RichText + + + true + + + true + + + + + + + + okPushButton + clicked() + AboutForm + close() + + + 247 + 520 + + + 245 + 275 + + + + + diff --git a/heimdall-frontend/description-pak b/heimdall-frontend/description-pak new file mode 100644 index 0000000..7f45876 --- /dev/null +++ b/heimdall-frontend/description-pak @@ -0,0 +1 @@ +Heimdall Frontend is the official graphical user interface for the Heimdall tool suite. diff --git a/heimdall-frontend/doc-pak/LICENSE b/heimdall-frontend/doc-pak/LICENSE new file mode 100644 index 0000000..a18336e --- /dev/null +++ b/heimdall-frontend/doc-pak/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2010 Benjamin Dobell, Glass Echidna + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/heimdall-frontend/doc-pak/README b/heimdall-frontend/doc-pak/README new file mode 100644 index 0000000..2c7952f --- /dev/null +++ b/heimdall-frontend/doc-pak/README @@ -0,0 +1,119 @@ +Heimdall (c) 2010 Benjamin Dobell, Glass Echidna +http://www.glassechidna.com.au/products/heimdall/ + +DISCLAIMER: + + This software attempts to flash your Galaxy S device. The very nature of + flashing is dangerous. As with all flashing software, Heimdall has the + potential to damage (brick) your phone if not used carefully. If you're + concerned, don't use this software. Flashing ROMs onto your phone may also + void your warranty. I am not responsible for the result of your actions. + + + +These instructions are for Linux operating systems. + +Installing Heimdall from Source: + + 1. First make sure you have installed build-tools and pkgconfig. + + 2. Open a terminal and navigate to the directory you extracted Heimdall to. + + 3. Then enter the following commands to compile and install libusb-1.0: + + cd libusb-1.0 + ./configure + make + sudo make install + cd .. + + If you have problems please consult http://www.libusb.org/ + + 4. Enter the following commands to compile and install Heimdall: + + cd heimdall + ./configure + make + sudo make install + cd .. + + NOTE: You can use "checkinstall" instead of "make install" in order + to generate a redistributable package. + + 5. Done + + + +Installing Heimdall Frontend from Source (Optional): + + 1. First make sure you have installed Qt 4.6 or above, + available from http://qt.nokia.com/. + + 2. Open a terminal and navigate to the directory you extracted Heimdall to. + + 3. Enter the following commands to compile and install Heimdall Frontend: + + cd heimdall-frontend + qmake heimdall-frontend.pro + make + + NOTE: You can use "checkinstall" instead of "make" in order to generate + a redistributable package. + + 4. The file output will be placed in the UNIX sub-directory. Move this file + to your preferred location. + + 5. Done + + + +Flashing Firmware with Heimdall Frontend: + + 1. Fully charge your device (use the wall charger as it's faster). + + 2. Download a decrypted Samsung Galaxy S ROM and extract it to a directory. + + 3. If the ROM is provided as one of more archives (nested or otherwise), + extract them all to the same location. + + NOTE: If you want to use the CSC then extract it last. + + 3. Open Heimdall Frontend. + + 4. Put your Galaxy S device into download mode. + + 5. For each file you wish to flash use "Browse" to select the file. + + 6. Press "Start". + + 7. Heimdall Frontend will display the progress and inform you when the + flash is complete. + + + +Flashing Firmware from Command Line / Terminal: + + 1. Fully charge your device (use the wall charger as it's faster). + + 2. Download a decrypted Samsung Galaxy S ROM and extract it to a directory. + + 3. If the ROM is provided as one of more archives (nested or otherwise), + extract them all to the same location. + + NOTE: If you want to use the CSC then extract it last. + + 4. Open a terminal and navigate to the directory where you extracted the + ROM files. + + 5. Type the following to list all the functionality Heimdall supports: + + heimdall help + + 8. Use the instructions to manually enter a command with all the files you + want to flash. + + Here is an example that does a full flash and repartition: + + heimdall flash --repartition --pit s1_odin_20100512.pit --factoryfs factoryfs.rfs --cache cache.rfs --dbdata dbdata.rfs --primary-boot boot.bin --secondary-boot Sbl.bin --param param.lfs --kernel zImage --modem modem.bin + + 9. Done diff --git a/heimdall-frontend/heimdall-frontend.pri b/heimdall-frontend/heimdall-frontend.pri new file mode 100644 index 0000000..63cf202 --- /dev/null +++ b/heimdall-frontend/heimdall-frontend.pri @@ -0,0 +1,12 @@ +# ---------------------------------------------------- +# This file is generated by the Qt Visual Studio Add-in. +# ------------------------------------------------------ + +HEADERS += ./Source/aboutform.h \ + ./Source/mainwindow.h +SOURCES += ./Source/aboutform.cpp \ + ./Source/main.cpp \ + ./Source/mainwindow.cpp +FORMS += ./mainwindow.ui \ + ./aboutform.ui +RESOURCES += mainwindow.qrc diff --git a/heimdall-frontend/heimdall-frontend.pro b/heimdall-frontend/heimdall-frontend.pro new file mode 100644 index 0000000..7e1049b --- /dev/null +++ b/heimdall-frontend/heimdall-frontend.pro @@ -0,0 +1,45 @@ +# ---------------------------------------------------- +# This file is generated by the Qt Visual Studio Add-in. +# ------------------------------------------------------ + +TEMPLATE = app +TARGET = heimdall-frontend + +macx { + DESTDIR = ../OSX +} else win32 { # It's recommended that Windows users compile via VS2010, but just in case... + DESTDIR = ../Win32 +} else { + DESTDIR = ../Linux +} + +macx { + PROPOSEDINSTALLDIR = /Applications +} else { + PROPOSEDINSTALLDIR = /usr/local/bin +} + +message("Install location:" $$PROPOSEDINSTALLDIR) +DESIREDINSTALLDIR = $$prompt("Press ENTER to use the default location or type an alternative") + +equals(DESIREDINSTALLDIR, "") { + target.path = $$PROPOSEDINSTALLDIR +} else { + target.path = $$DESIREDINSTALLDIR +} + + +INSTALLS += target + +QT += core gui +CONFIG += release +DEFINES += QT_LARGEFILE_SUPPORT +INCLUDEPATH += ./GeneratedFiles \ + ./GeneratedFiles/Release \ + . +DEPENDPATH += . +MOC_DIR += ./GeneratedFiles/release +OBJECTS_DIR += release +UI_DIR += ./GeneratedFiles +RCC_DIR += ./GeneratedFiles +include(heimdall-frontend.pri) diff --git a/heimdall-frontend/heimdall-frontend.vcxproj b/heimdall-frontend/heimdall-frontend.vcxproj new file mode 100644 index 0000000..e8206ed --- /dev/null +++ b/heimdall-frontend/heimdall-frontend.vcxproj @@ -0,0 +1,174 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {EAD352DF-7CDE-478C-8D70-B0E42A951DEF} + Qt4VSv1.0 + + + + Application + Unicode + + + Application + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + AllRules.ruleset + + + AllRules.ruleset + + + $(SolutionDir)$(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Configuration)\ + $(Configuration)\ + $(IncludePath) + false + $(IncludePath) + $(LibraryPath) + $(LibraryPath) + + + + UNICODE;WIN32;QT_LARGEFILE_SUPPORT;QT_CORE_LIB;QT_GUI_LIB;%(PreprocessorDefinitions) + .\GeneratedFiles;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\qtmain;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;.\;%(AdditionalIncludeDirectories) + Disabled + EditAndContinue + MultiThreadedDebugDLL + false + Level3 + true + + + Windows + $(OutDir)$(TargetName)$(TargetExt) + $(QTDIR)\lib;%(AdditionalLibraryDirectories) + true + qtmaind.lib;QtCored4.lib;QtGuid4.lib;%(AdditionalDependencies) + + + + + UNICODE;WIN32;QT_LARGEFILE_SUPPORT;QT_NO_DEBUG;NDEBUG;QT_CORE_LIB;QT_GUI_LIB;%(PreprocessorDefinitions) + .\GeneratedFiles;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\qtmain;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;.\;%(AdditionalIncludeDirectories) + + + MultiThreadedDLL + false + + + + + + + Windows + $(OutDir)$(TargetName)$(TargetExt) + $(QTDIR)\lib;%(AdditionalLibraryDirectories) + false + qtmain.lib;QtCore4.lib;QtGui4.lib;%(AdditionalDependencies) + + + + + true + + + + + + + + + true + + + + + + + + Document + $(QTDIR)\bin\uic.exe;%(AdditionalInputs) + Uic%27ing %(Identity)... + .\GeneratedFiles\ui_%(Filename).h;%(Outputs) + "$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)" + $(QTDIR)\bin\uic.exe;%(AdditionalInputs) + Uic%27ing %(Identity)... + .\GeneratedFiles\ui_%(Filename).h;%(Outputs) + "$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)" + + + + + + + + $(QTDIR)\bin\moc.exe;%(FullPath) + Moc%27ing %(Identity)... + .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_CORE_LIB -DQT_GUI_LIB -D_UNICODE "-I." "-I.\GeneratedFiles" "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\qtmain" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I." "-I." "-I." "-I." "-I." "-I." "Source\mainwindow.h" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" + $(QTDIR)\bin\moc.exe;%(FullPath) + Moc%27ing %(Identity)... + .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB "-I." "-I.\GeneratedFiles" "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\qtmain" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I." "-I." "-I." "-I." "-I." "Source\mainwindow.h" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" + + + + + Document + %(FullPath);%(AdditionalInputs) + Rcc%27ing %(Identity)... + .\GeneratedFiles\qrc_%(Filename).cpp;%(Outputs) + "$(QTDIR)\bin\rcc.exe" -name "%(Filename)" -no-compress "%(FullPath)" -o .\GeneratedFiles\qrc_%(Filename).cpp + %(FullPath);%(AdditionalInputs) + Rcc%27ing %(Identity)... + .\GeneratedFiles\qrc_%(Filename).cpp;%(Outputs) + "$(QTDIR)\bin\rcc.exe" -name "%(Filename)" -no-compress "%(FullPath)" -o .\GeneratedFiles\qrc_%(Filename).cpp + + + + + Document + $(QTDIR)\bin\uic.exe;%(AdditionalInputs) + Uic%27ing %(Identity)... + .\GeneratedFiles\ui_%(Filename).h;%(Outputs) + "$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)" + $(QTDIR)\bin\uic.exe;%(AdditionalInputs) + Uic%27ing %(Identity)... + .\GeneratedFiles\ui_%(Filename).h;%(Outputs) + "$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)" + + + + + + + + + + + \ No newline at end of file diff --git a/heimdall-frontend/heimdall-frontend.vcxproj.filters b/heimdall-frontend/heimdall-frontend.vcxproj.filters new file mode 100644 index 0000000..aff2885 --- /dev/null +++ b/heimdall-frontend/heimdall-frontend.vcxproj.filters @@ -0,0 +1,78 @@ + + + + + {99349809-55BA-4b9d-BF79-8FDBB0286EB3} + ui + + + {D9D6E242-F8AF-46E4-B9FD-80ECBC20BA3E} + qrc;* + false + + + {71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11} + moc;h;cpp + False + + + {ead127e5-64ec-4f27-8f35-5fb8f8b0b46e} + cpp;moc + False + + + {2a437972-0e31-44d0-be90-ea5d62a68ff5} + cpp;moc + False + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;cxx;c;def + + + + + Generated Files + + + Source + + + Source + + + Generated Files\Debug + + + Generated Files\Release + + + Source + + + + + Form Files + + + Resource Files + + + Source + + + Form Files + + + + + Generated Files + + + Generated Files + + + Source + + + \ No newline at end of file diff --git a/heimdall-frontend/mainwindow.qrc b/heimdall-frontend/mainwindow.qrc new file mode 100644 index 0000000..4479bd9 --- /dev/null +++ b/heimdall-frontend/mainwindow.qrc @@ -0,0 +1,4 @@ + + + + diff --git a/heimdall-frontend/mainwindow.ui b/heimdall-frontend/mainwindow.ui new file mode 100644 index 0000000..300be65 --- /dev/null +++ b/heimdall-frontend/mainwindow.ui @@ -0,0 +1,872 @@ + + + MainWindow + + + + 0 + 0 + 902 + 523 + + + + + 0 + 0 + + + + + 902 + 523 + + + + + 902 + 523 + + + + Heimdall Frontend 1.1 + + + + + + + + + + + + + + + + + + + + + QTabWidget::Rounded + + + + + 0 + 0 + + + + + MS Shell Dlg 2 + + + + + + 10 + 0 + 881 + 491 + + + + + 0 + 0 + + + + 0 + + + + Flash + + + + + 10 + 120 + 421 + 331 + + + + PDA/Code + + + + + 10 + 20 + 401 + 61 + + + + FactoryFS + + + + false + + + + 30 + 30 + 281 + 21 + + + + true + + + + + + 320 + 30 + 71 + 23 + + + + Browse + + + + + false + + + + 10 + 30 + 21 + 21 + + + + + + + + + + + 10 + 80 + 401 + 61 + + + + Kernel (zImage) + + + + false + + + + 30 + 30 + 281 + 21 + + + + true + + + + + + 320 + 30 + 71 + 23 + + + + Browse + + + + + false + + + + 10 + 30 + 21 + 21 + + + + + + + + + + + 10 + 200 + 401 + 61 + + + + Primary Bootloader + + + + false + + + + 30 + 30 + 281 + 21 + + + + true + + + + + + 320 + 30 + 71 + 23 + + + + Browse + + + + + false + + + + 10 + 30 + 21 + 21 + + + + + + + + + + + 10 + 260 + 401 + 61 + + + + Secondary Bootloader + + + + false + + + + 30 + 30 + 281 + 21 + + + + true + + + + + + 320 + 30 + 71 + 23 + + + + Browse + + + + + false + + + + 10 + 30 + 21 + 21 + + + + + + + + + + + 10 + 140 + 401 + 61 + + + + Param.lfs + + + + false + + + + 30 + 30 + 281 + 21 + + + + true + + + + + + 320 + 30 + 71 + 23 + + + + Browse + + + + + false + + + + 10 + 30 + 21 + 21 + + + + + + + + + + + + 440 + 10 + 421 + 151 + + + + CSC + + + + + 10 + 20 + 401 + 61 + + + + Cache + + + + false + + + + 30 + 30 + 281 + 21 + + + + true + + + + + + 320 + 30 + 71 + 23 + + + + Browse + + + + + false + + + + 10 + 30 + 21 + 21 + + + + + + + + + + + 10 + 80 + 401 + 61 + + + + Database Data + + + + false + + + + 30 + 30 + 281 + 21 + + + + true + + + + + + 320 + 30 + 71 + 23 + + + + Browse + + + + + false + + + + 10 + 30 + 21 + 21 + + + + + + + + + + + + 10 + 10 + 421 + 111 + + + + Repartition + + + + + 10 + 20 + 401 + 81 + + + + PIT + + + + false + + + + 10 + 50 + 301 + 21 + + + + true + + + + + true + + + + 320 + 50 + 71 + 23 + + + + Browse + + + + + false + + + + 10 + 20 + 381 + 17 + + + + Repartition Device + + + + + + + false + + + + 780 + 410 + 91 + 31 + + + + Start + + + + + false + + + + 460 + 410 + 311 + 31 + + + + 0 + + + + + + 440 + 160 + 421 + 151 + + + + + MS Shell Dlg 2 + + + + Other + + + + + 10 + 80 + 401 + 61 + + + + Recovery + + + + false + + + + 30 + 30 + 281 + 21 + + + + true + + + + + + 320 + 30 + 71 + 23 + + + + Browse + + + + + false + + + + 10 + 30 + 21 + 21 + + + + + + + + + + + 10 + 20 + 401 + 61 + + + + Modem + + + + false + + + + 30 + 30 + 281 + 21 + + + + true + + + + + + 320 + 30 + 71 + 23 + + + + Browse + + + + + false + + + + 10 + 30 + 21 + 21 + + + + + + + + + + + + 460 + 380 + 411 + 21 + + + + Ready + + + Qt::PlainText + + + Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft + + + + + + Download Firmware + + + + + 10 + 10 + 851 + 441 + + + + + + + + + 10 + 10 + 831 + 391 + + + + QFrame::NoFrame + + + QFrame::Plain + + + This functionality is still under development and will be included in a future release. + + + Qt::PlainText + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + true + + + + + + + + + + 0 + 0 + 902 + 21 + + + + + Help + + + + + + Donate + + + + + + + + + Help + + + + + About Heimdall + + + + + Donate to Glass Echidna + + + + + + + -- cgit v1.2.3