From 6cd6b35c737e0e4042a8fd79af1decc9f10ed84b Mon Sep 17 00:00:00 2001 From: Benjamin Dobell Date: Mon, 1 Oct 2012 12:43:05 +1000 Subject: Heimdall 1.4 RC1: - Massive refactoring. - Support for Qualcomm based devices. - Print PIT from file. - Use partition names as arguments e.g. --HIDDEN, --KERNEL, --MOVINAND etc. - Heimdall Frontend UI improvements. - And much more... --- heimdall-frontend/Qt4VSPropertySheet.props | 15 - heimdall-frontend/Source/FirmwareInfo.cpp | 2 + heimdall-frontend/Source/Packaging.cpp | 25 +- heimdall-frontend/Source/aboutform.cpp | 95 +++++ heimdall-frontend/Source/aboutform.h | 17 + heimdall-frontend/Source/mainwindow.cpp | 384 ++++++++++++++------- heimdall-frontend/Source/mainwindow.h | 25 +- heimdall-frontend/aboutform.ui | 6 +- heimdall-frontend/doc-pak/LICENSE | 2 +- heimdall-frontend/doc-pak/README | 97 +++--- heimdall-frontend/heimdall-frontend.pro | 16 +- heimdall-frontend/heimdall-frontend.vcxproj | 20 +- .../heimdall-frontend.vcxproj.filters | 12 +- heimdall-frontend/mainwindow.ui | 139 ++++++-- 14 files changed, 624 insertions(+), 231 deletions(-) delete mode 100644 heimdall-frontend/Qt4VSPropertySheet.props (limited to 'heimdall-frontend') diff --git a/heimdall-frontend/Qt4VSPropertySheet.props b/heimdall-frontend/Qt4VSPropertySheet.props deleted file mode 100644 index 5f07ba6..0000000 --- a/heimdall-frontend/Qt4VSPropertySheet.props +++ /dev/null @@ -1,15 +0,0 @@ - - - - - D:\development\cpp\libraries\Qt\2010.05\qt - - - - - - $(QTDIR) - true - - - \ No newline at end of file diff --git a/heimdall-frontend/Source/FirmwareInfo.cpp b/heimdall-frontend/Source/FirmwareInfo.cpp index 741ea6c..e11a002 100644 --- a/heimdall-frontend/Source/FirmwareInfo.cpp +++ b/heimdall-frontend/Source/FirmwareInfo.cpp @@ -772,7 +772,9 @@ void FirmwareInfo::WriteXml(QXmlStreamWriter& xml) const xml.writeStartElement("files"); for (int i = 0; i < fileInfos.length(); i++) + { fileInfos[i].WriteXml(xml, Packaging::ClashlessFilename(fileInfos, i)); + } xml.writeEndElement(); diff --git a/heimdall-frontend/Source/Packaging.cpp b/heimdall-frontend/Source/Packaging.cpp index 79084e9..9bf7d46 100644 --- a/heimdall-frontend/Source/Packaging.cpp +++ b/heimdall-frontend/Source/Packaging.cpp @@ -301,7 +301,7 @@ bool Packaging::WriteTarEntry(const QString& filePath, QTemporaryFile *tarFile, // Note: We don't support base-256 encoding. Support could be added later. sprintf(tarHeader.fields.size, "%011llo", file.size()); - sprintf(tarHeader.fields.modifiedTime, "%011llo", qtFileInfo.lastModified().toMSecsSinceEpoch() / 1000); + sprintf(tarHeader.fields.modifiedTime, "%011llo", qtFileInfo.lastModified().toTime_t()); // Regular File tarHeader.fields.typeFlag = '0'; @@ -381,6 +381,24 @@ bool Packaging::CreateTar(const FirmwareInfo& firmwareInfo, QTemporaryFile *tarF for (int i = 0; i < fileInfos.length(); i++) { + // If the file was already compressed we don't compress it again. + bool skip = false; + + for (int j = 0; j < i; j++) + { + if (fileInfos[i].GetFilename() == fileInfos[j].GetFilename()) + { + skip = true; + break; + } + } + + if (skip) + { + progressDialog.setValue(i); + continue; + } + QString filename = ClashlessFilename(fileInfos, i); if (filename == "firmware.xml") @@ -389,7 +407,7 @@ bool Packaging::CreateTar(const FirmwareInfo& firmwareInfo, QTemporaryFile *tarF return (false); } - if (!WriteTarEntry(fileInfos[i].GetFilename(), tarFile, ClashlessFilename(fileInfos, i))) + if (!WriteTarEntry(fileInfos[i].GetFilename(), tarFile, filename)) { tarFile->resize(0); tarFile->close(); @@ -666,7 +684,8 @@ QString Packaging::ClashlessFilename(const QList& fileInfos, int fileI QString otherFilename = fileInfos[i].GetFilename().mid(lastSlash + 1); - if (filename == otherFilename) + // If the filenames are the same, but the files themselves aren't the same (i.e. not the same path), then rename. + if (filename == otherFilename && fileInfos[i].GetFilename() != fileInfos[fileInfoIndex].GetFilename()) renameIndex++; } diff --git a/heimdall-frontend/Source/aboutform.cpp b/heimdall-frontend/Source/aboutform.cpp index bce9791..9bb975a 100644 --- a/heimdall-frontend/Source/aboutform.cpp +++ b/heimdall-frontend/Source/aboutform.cpp @@ -18,12 +18,107 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ +// Qt +#include +#include + // Heimdall Frontend #include "aboutform.h" +#define UNUSED(x) (void)(x) + using namespace HeimdallFrontend; AboutForm::AboutForm(QWidget *parent) : QWidget(parent) { setupUi(this); + + // Heimdall Command Line + QObject::connect(&heimdallProcess, SIGNAL(readyRead()), this, SLOT(HandleHeimdallStdout())); + QObject::connect(&heimdallProcess, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(HandleHeimdallReturned(int, QProcess::ExitStatus))); + QObject::connect(&heimdallProcess, SIGNAL(error(QProcess::ProcessError)), this, SLOT(HandleHeimdallError(QProcess::ProcessError))); + + heimdallFailed = false; + + RetrieveHeimdallVersion(); +} + +void AboutForm::RetrieveHeimdallVersion(void) +{ + heimdallProcess.setReadChannel(QProcess::StandardOutput); + + heimdallProcess.start("heimdall", QStringList("version")); + heimdallProcess.waitForFinished(350); + + // 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/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/bin"); + break; + } + } + + int pathIndex = -1; + + 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"; + + heimdallProcess.start(heimdallPath, QStringList("version")); + heimdallProcess.waitForFinished(350); + } + } + + if (heimdallFailed) + versionCopyrightLabel->setText(versionCopyrightLabel->text().replace("%HEIMDALL-VERSION%", "")); + } +} + +void AboutForm::HandleHeimdallStdout(void) +{ + QString version = heimdallProcess.readAll(); + + if (version.length() > 0) + { + if (version.at(0) == QChar('v')) + version = version.mid(1); + + versionCopyrightLabel->setText(versionCopyrightLabel->text().replace("%HEIMDALL-VERSION%", "Version " + version + "
")); + } +} + +void AboutForm::HandleHeimdallReturned(int exitCode, QProcess::ExitStatus exitStatus) +{ + UNUSED(exitCode); + UNUSED(exitStatus); + + // If for some reason %HEIMDALL-VERSION% hasn't been replaced yet, we'll replace it with an empty string. + versionCopyrightLabel->setText(versionCopyrightLabel->text().replace("%HEIMDALL-VERSION%", "")); } + +void AboutForm::HandleHeimdallError(QProcess::ProcessError error) +{ + UNUSED(error); + + heimdallFailed = true; +} + diff --git a/heimdall-frontend/Source/aboutform.h b/heimdall-frontend/Source/aboutform.h index 12429ab..6223e3b 100644 --- a/heimdall-frontend/Source/aboutform.h +++ b/heimdall-frontend/Source/aboutform.h @@ -19,6 +19,7 @@ THE SOFTWARE.*/ // Qt +#include #include // Heimdall Frontend @@ -28,8 +29,24 @@ namespace HeimdallFrontend { class AboutForm : public QWidget, public Ui::AboutForm { + Q_OBJECT + + private: + + bool heimdallFailed; + QProcess heimdallProcess; + + void RetrieveHeimdallVersion(void); + public: explicit AboutForm(QWidget *parent = 0); + + public slots: + + // Heimdall Command Line + void HandleHeimdallStdout(void); + void HandleHeimdallReturned(int exitCode, QProcess::ExitStatus exitStatus); + void HandleHeimdallError(QProcess::ProcessError error); }; } diff --git a/heimdall-frontend/Source/mainwindow.cpp b/heimdall-frontend/Source/mainwindow.cpp index c3c97e1..621ac38 100644 --- a/heimdall-frontend/Source/mainwindow.cpp +++ b/heimdall-frontend/Source/mainwindow.cpp @@ -32,18 +32,18 @@ #include "mainwindow.h" #include "Packaging.h" +#define UNUSED(x) (void)(x) + using namespace HeimdallFrontend; void MainWindow::StartHeimdall(const QStringList& arguments) { - flashProgressBar->setEnabled(true); UpdateInterfaceAvailability(); + + heimdallProcess.setReadChannel(QProcess::StandardOutput); - int pathIndex = -1; - process.setReadChannel(QProcess::StandardOutput); - - process.start("heimdall", arguments); - process.waitForStarted(3000); + heimdallProcess.start("heimdall", arguments); + heimdallProcess.waitForStarted(3000); // OS X was playing up and not finding heimdall, so we're manually checking the PATH. if (heimdallFailed) @@ -63,6 +63,8 @@ void MainWindow::StartHeimdall(const QStringList& arguments) } } + int pathIndex = -1; + while (heimdallFailed && ++pathIndex < paths.length()) { QString heimdallPath = paths[pathIndex]; @@ -76,8 +78,8 @@ void MainWindow::StartHeimdall(const QStringList& arguments) heimdallPath += "heimdall"; - process.start(heimdallPath, arguments); - process.waitForStarted(3000); + heimdallProcess.start(heimdallPath, arguments); + heimdallProcess.waitForStarted(3000); } } @@ -86,7 +88,6 @@ void MainWindow::StartHeimdall(const QStringList& arguments) flashLabel->setText("Failed to start Heimdall!"); heimdallState = MainWindow::kHeimdallStateStopped; - flashProgressBar->setEnabled(false); UpdateInterfaceAvailability(); } } @@ -101,8 +102,8 @@ void MainWindow::UpdateUnusedPartitionIds(void) { const PitEntry *pitEntry = currentPitData.GetEntry(i); - if (!pitEntry->GetUnused() && strcmp(pitEntry->GetPartitionName(), "PIT") != 0) - unusedPartitionIds.append(pitEntry->GetPartitionIdentifier()); + if (pitEntry->GetBlockCount() > 0 && strcmp(pitEntry->GetPartitionName(), "PIT") != 0 && strcmp(pitEntry->GetPartitionName(), "PT") != 0) + unusedPartitionIds.append(pitEntry->GetIdentifier()); } // Remove any used partition IDs from unusedPartitionIds @@ -145,14 +146,9 @@ void MainWindow::UpdatePackageUserInterface(void) developerNamesLineEdit->clear(); platformLineEdit->clear(); - - developerHomepageButton->setEnabled(false); - developerDonateButton->setEnabled(false); repartitionRadioButton->setChecked(false); noRebootRadioButton->setChecked(false); - - loadFirmwareButton->setEnabled(false); } else { @@ -173,16 +169,6 @@ void MainWindow::UpdatePackageUserInterface(void) platformLineEdit->setText(loadedPackageData.GetFirmwareInfo().GetPlatformInfo().GetName() + " (" + loadedPackageData.GetFirmwareInfo().GetPlatformInfo().GetVersion() + ")"); - if (!loadedPackageData.GetFirmwareInfo().GetUrl().isEmpty()) - developerHomepageButton->setEnabled(true); - else - developerHomepageButton->setEnabled(false); - - if (!loadedPackageData.GetFirmwareInfo().GetDonateUrl().isEmpty()) - developerDonateButton->setEnabled(true); - else - developerDonateButton->setEnabled(false); - for (int i = 0; i < loadedPackageData.GetFirmwareInfo().GetDeviceInfos().length(); i++) { const DeviceInfo& deviceInfo = loadedPackageData.GetFirmwareInfo().GetDeviceInfos()[i]; @@ -197,9 +183,9 @@ void MainWindow::UpdatePackageUserInterface(void) repartitionRadioButton->setChecked(loadedPackageData.GetFirmwareInfo().GetRepartition()); noRebootRadioButton->setChecked(loadedPackageData.GetFirmwareInfo().GetNoReboot()); - - loadFirmwareButton->setEnabled(true); } + + UpdateLoadPackageInterfaceAvailability(); } bool MainWindow::IsArchive(QString path) @@ -209,9 +195,9 @@ bool MainWindow::IsArchive(QString path) || path.endsWith(".bz2", Qt::CaseInsensitive) || path.endsWith(".7z", Qt::CaseInsensitive) || path.endsWith(".rar", Qt::CaseInsensitive)); } -QString MainWindow::PromptFileSelection(void) +QString MainWindow::PromptFileSelection(const QString& caption, const QString& filter) { - QString path = QFileDialog::getOpenFileName(this, "Select File", lastDirectory); + QString path = QFileDialog::getOpenFileName(this, caption, lastDirectory, filter); if (path != "") lastDirectory = path.left(path.lastIndexOf('/') + 1); @@ -219,9 +205,9 @@ QString MainWindow::PromptFileSelection(void) return (path); } -QString MainWindow::PromptFileCreation(void) +QString MainWindow::PromptFileCreation(const QString& caption, const QString& filter) { - QString path = QFileDialog::getSaveFileName(this, "Save File", lastDirectory); + QString path = QFileDialog::getSaveFileName(this, caption, lastDirectory, filter); if (path != "") lastDirectory = path.left(path.lastIndexOf('/') + 1); @@ -229,49 +215,100 @@ QString MainWindow::PromptFileCreation(void) return (path); } -void MainWindow::UpdatePartitionNamesInterface(void) +void MainWindow::UpdateLoadPackageInterfaceAvailability(void) { - populatingPartitionNames = true; + if (loadedPackageData.IsCleared()) + { + developerHomepageButton->setEnabled(false); + developerDonateButton->setEnabled(false); - partitionNameComboBox->clear(); + loadFirmwareButton->setEnabled(false); + } + else + { + if (!loadedPackageData.GetFirmwareInfo().GetUrl().isEmpty()) + developerHomepageButton->setEnabled(true); + else + developerHomepageButton->setEnabled(false); - int partitionsListWidgetRow = partitionsListWidget->currentRow(); + if (!loadedPackageData.GetFirmwareInfo().GetDonateUrl().isEmpty()) + developerDonateButton->setEnabled(true); + else + developerDonateButton->setEnabled(false); - if (partitionsListWidgetRow >= 0) + loadFirmwareButton->setEnabled(heimdallState == MainWindow::kHeimdallStateStopped); + } +} + +void MainWindow::UpdateFlashInterfaceAvailability(void) +{ + if (heimdallState == MainWindow::kHeimdallStateStopped) { - const FileInfo& partitionInfo = workingPackageData.GetFirmwareInfo().GetFileInfos()[partitionsListWidget->currentRow()]; + partitionNameComboBox->setEnabled(partitionsListWidget->currentRow() >= 0); - for (int i = 0; i < unusedPartitionIds.length(); i++) - partitionNameComboBox->addItem(currentPitData.FindEntry(unusedPartitionIds[i])->GetPartitionName()); + bool allPartitionsValid = true; + QList& fileList = workingPackageData.GetFirmwareInfo().GetFileInfos(); - partitionNameComboBox->addItem(currentPitData.FindEntry(partitionInfo.GetPartitionId())->GetPartitionName()); - partitionNameComboBox->setCurrentIndex(unusedPartitionIds.length()); + for (int i = 0; i < fileList.length(); i++) + { + if (fileList[i].GetFilename().isEmpty()) + { + allPartitionsValid = false; + break; + } + } - partitionNameComboBox->setEnabled(true); + bool validFlashSettings = allPartitionsValid && fileList.length() > 0; + + flashProgressBar->setEnabled(false); + optionsGroup->setEnabled(true); + startFlashButton->setEnabled(validFlashSettings); } else { partitionNameComboBox->setEnabled(false); - } - populatingPartitionNames = false; + flashProgressBar->setEnabled(true); + optionsGroup->setEnabled(false); + startFlashButton->setEnabled(false); + } } -void MainWindow::UpdateInterfaceAvailability(void) +void MainWindow::UpdateCreatePackageInterfaceAvailability(void) { - if (heimdallState != MainWindow::kHeimdallStateStopped) + if (heimdallState == MainWindow::kHeimdallStateStopped) { - startFlashButton->setEnabled(false); + const FirmwareInfo& firmwareInfo = workingPackageData.GetFirmwareInfo(); - detectDeviceButton->setEnabled(false); - closePcScreenButton->setEnabled(false); - pitSaveAsButton->setEnabled(false); - downloadPitButton->setEnabled(false); - printPitButton->setEnabled(false); + if (firmwareInfo.GetName().isEmpty() || firmwareInfo.GetVersion().isEmpty() || firmwareInfo.GetPlatformInfo().GetName().isEmpty() + || firmwareInfo.GetPlatformInfo().GetVersion().isEmpty() || firmwareInfo.GetDevelopers().isEmpty() || firmwareInfo.GetDeviceInfos().isEmpty()) + { + buildPackageButton->setEnabled(false); + } + else + { + buildPackageButton->setEnabled(true); + } + + if (addDeveloperButton->text().isEmpty()) + addDeveloperButton->setEnabled(false); + else + addDeveloperButton->setEnabled(true); - return; + if (createDevelopersListWidget->currentRow() >= 0) + removeDeveloperButton->setEnabled(true); + else + removeDeveloperButton->setEnabled(false); } else + { + buildPackageButton->setEnabled(false); + } +} + +void MainWindow::UpdateUtilitiesInterfaceAvailability(void) +{ + if (heimdallState == MainWindow::kHeimdallStateStopped) { detectDeviceButton->setEnabled(true); closePcScreenButton->setEnabled(true); @@ -281,43 +318,86 @@ void MainWindow::UpdateInterfaceAvailability(void) downloadPitButton->setEnabled(true); else downloadPitButton->setEnabled(false); + + if (printPitDeviceRadioBox->isChecked()) + { + // Device + printLocalPitGroup->setEnabled(false); + printPitButton->setEnabled(true); + } + else + { + // Local File + printLocalPitGroup->setEnabled(true); + printLocalPitLineEdit->setEnabled(true); + printLocalPitBrowseButton->setEnabled(true); + printPitButton->setEnabled(!printLocalPitLineEdit->text().isEmpty()); + } + } + else + { + detectDeviceButton->setEnabled(false); + closePcScreenButton->setEnabled(false); + pitSaveAsButton->setEnabled(false); + downloadPitButton->setEnabled(false); - printPitButton->setEnabled(true); + printLocalPitGroup->setEnabled(false); + printPitButton->setEnabled(false); } +} + +void MainWindow::UpdateInterfaceAvailability(void) +{ + UpdateLoadPackageInterfaceAvailability(); + UpdateFlashInterfaceAvailability(); + UpdateCreatePackageInterfaceAvailability(); + UpdateUtilitiesInterfaceAvailability(); - bool allPartitionsValid = true; + if (heimdallState == MainWindow::kHeimdallStateStopped) + { + // Enable/disable tabs - QList& fileList = workingPackageData.GetFirmwareInfo().GetFileInfos(); + for (int i = 0; i < functionTabWidget->count(); i++) + functionTabWidget->setTabEnabled(i, true); - for (int i = 0; i < fileList.length(); i++) + functionTabWidget->setTabEnabled(functionTabWidget->indexOf(createPackageTab), startFlashButton->isEnabled()); + } + else { - if (fileList[i].GetFilename().isEmpty()) + // Disable non-current tabs + + for (int i = 0; i < functionTabWidget->count(); i++) { - allPartitionsValid = false; - break; + if (i == functionTabWidget->currentIndex()) + functionTabWidget->setTabEnabled(i, true); + else + functionTabWidget->setTabEnabled(i, false); } } - - bool validSettings = allPartitionsValid && fileList.length() > 0; - - startFlashButton->setEnabled(validSettings); - - functionTabWidget->setTabEnabled(functionTabWidget->indexOf(createPackageTab), validSettings); } -void MainWindow::UpdateBuildPackageButton(void) +void MainWindow::UpdatePartitionNamesInterface(void) { - const FirmwareInfo& firmwareInfo = workingPackageData.GetFirmwareInfo(); + populatingPartitionNames = true; - if (firmwareInfo.GetName().isEmpty() || firmwareInfo.GetVersion().isEmpty() || firmwareInfo.GetPlatformInfo().GetName().isEmpty() - || firmwareInfo.GetPlatformInfo().GetVersion().isEmpty() || firmwareInfo.GetDevelopers().isEmpty() || firmwareInfo.GetDeviceInfos().isEmpty()) - { - buildPackageButton->setEnabled(false); - } - else + partitionNameComboBox->clear(); + + int partitionsListWidgetRow = partitionsListWidget->currentRow(); + + if (partitionsListWidgetRow >= 0) { - buildPackageButton->setEnabled(true); + const FileInfo& partitionInfo = workingPackageData.GetFirmwareInfo().GetFileInfos()[partitionsListWidget->currentRow()]; + + for (int i = 0; i < unusedPartitionIds.length(); i++) + partitionNameComboBox->addItem(currentPitData.FindEntry(unusedPartitionIds[i])->GetPartitionName()); + + partitionNameComboBox->addItem(currentPitData.FindEntry(partitionInfo.GetPartitionId())->GetPartitionName()); + partitionNameComboBox->setCurrentIndex(unusedPartitionIds.length()); } + + populatingPartitionNames = false; + + UpdateFlashInterfaceAvailability(); } MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) @@ -388,15 +468,21 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) // Utilities Tab QObject::connect(detectDeviceButton, SIGNAL(clicked()), this, SLOT(DetectDevice())); + QObject::connect(closePcScreenButton, SIGNAL(clicked()), this, SLOT(ClosePcScreen())); + + QObject::connect(printPitDeviceRadioBox, SIGNAL(toggled(bool)), this, SLOT(DevicePrintPitToggled(bool))); + QObject::connect(printPitLocalFileRadioBox, SIGNAL(toggled(bool)), this, SLOT(LocalFilePrintPitToggled(bool))); + QObject::connect(printLocalPitBrowseButton, SIGNAL(clicked()), this, SLOT(SelectPrintPitFile())); QObject::connect(printPitButton, SIGNAL(clicked()), this, SLOT(PrintPit())); + QObject::connect(pitSaveAsButton, SIGNAL(clicked()), this, SLOT(SelectPitDestination())); QObject::connect(downloadPitButton, SIGNAL(clicked()), this, SLOT(DownloadPit())); // Heimdall Command Line - 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))); + QObject::connect(&heimdallProcess, SIGNAL(readyRead()), this, SLOT(HandleHeimdallStdout())); + QObject::connect(&heimdallProcess, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(HandleHeimdallReturned(int, QProcess::ExitStatus))); + QObject::connect(&heimdallProcess, SIGNAL(error(QProcess::ProcessError)), this, SLOT(HandleHeimdallError(QProcess::ProcessError))); } MainWindow::~MainWindow() @@ -429,7 +515,7 @@ void MainWindow::SelectFirmwarePackage(void) loadedPackageData.Clear(); UpdatePackageUserInterface(); - QString path = PromptFileSelection(); + QString path = PromptFileSelection("Select Package", "*.tar.gz"); firmwarePackageLineEdit->setText(path); if (firmwarePackageLineEdit->text() != "") @@ -458,7 +544,6 @@ void MainWindow::LoadFirmwarePackage(void) workingPackageData.Clear(); currentPitData.Clear(); - // Make flashSettings responsible for the temporary files workingPackageData.GetFiles().append(loadedPackageData.GetFiles()); loadedPackageData.RemoveAllFiles(); @@ -575,10 +660,18 @@ void MainWindow::SelectPartitionName(int index) unusedPartitionIds.append(fileInfo.GetPartitionId()); fileInfo.SetPartitionId(newPartitionIndex); + PitEntry *pitEntry = currentPitData.FindEntry(newPartitionIndex); + + QString title("File"); + + if (pitEntry && strlen(pitEntry->GetFlashFilename()) > 0) + title += " (" + QString(pitEntry->GetFlashFilename()) + ")"; + + partitionFileGroup->setTitle(title); + if (!fileInfo.GetFilename().isEmpty()) { - PitEntry *pitEntry = currentPitData.FindEntry(newPartitionIndex); - QString partitionFilename = pitEntry->GetFilename(); + QString partitionFilename = pitEntry->GetFlashFilename(); int lastPeriod = partitionFilename.lastIndexOf(QChar('.')); if (lastPeriod >= 0) @@ -610,7 +703,7 @@ void MainWindow::SelectPartitionFile(void) FileInfo& fileInfo = workingPackageData.GetFirmwareInfo().GetFileInfos()[partitionsListWidget->currentRow()]; PitEntry *pitEntry = currentPitData.FindEntry(fileInfo.GetPartitionId()); - QString partitionFilename = pitEntry->GetFilename(); + QString partitionFilename = pitEntry->GetFlashFilename(); int lastPeriod = partitionFilename.lastIndexOf(QChar('.')); if (lastPeriod >= 0) @@ -648,6 +741,15 @@ void MainWindow::SelectPartition(int row) partitionFileBrowseButton->setEnabled(true); removePartitionButton->setEnabled(true); + + QString title("File"); + + PitEntry *pitEntry = currentPitData.FindEntry(partitionInfo.GetPartitionId()); + + if (pitEntry && strlen(pitEntry->GetFlashFilename()) > 0) + title += " (" + QString(pitEntry->GetFlashFilename()) + ")"; + + partitionFileGroup->setTitle(title); } else { @@ -658,6 +760,8 @@ void MainWindow::SelectPartition(int row) partitionFileBrowseButton->setEnabled(false); removePartitionButton->setEnabled(false); + + partitionFileGroup->setTitle("File"); } } @@ -673,6 +777,7 @@ void MainWindow::AddPartition(void) partitionsListWidget->addItem(currentPitData.FindEntry(partitionInfo.GetPartitionId())->GetPartitionName()); partitionsListWidget->setCurrentRow(partitionsListWidget->count() - 1); partitionsListWidget->setEnabled(false); + UpdateInterfaceAvailability(); } @@ -693,7 +798,7 @@ void MainWindow::RemovePartition(void) void MainWindow::SelectPit(void) { - QString path = PromptFileSelection(); + QString path = PromptFileSelection("Select PIT", "*.pit"); bool validPit = path != ""; if (validPit) @@ -723,7 +828,7 @@ void MainWindow::SelectPit(void) if (pitEntry) { - fileInfos[partitionInfoIndex++].SetPartitionId(pitEntry->GetPartitionIdentifier()); + fileInfos[partitionInfoIndex++].SetPartitionId(pitEntry->GetIdentifier()); partitionsListWidget->addItem(pitEntry->GetPartitionName()); } else @@ -828,25 +933,25 @@ void MainWindow::StartFlash(void) void MainWindow::FirmwareNameChanged(const QString& text) { workingPackageData.GetFirmwareInfo().SetName(text); - UpdateBuildPackageButton(); + UpdateInterfaceAvailability(); } void MainWindow::FirmwareVersionChanged(const QString& text) { workingPackageData.GetFirmwareInfo().SetVersion(text); - UpdateBuildPackageButton(); + UpdateInterfaceAvailability(); } void MainWindow::PlatformNameChanged(const QString& text) { workingPackageData.GetFirmwareInfo().GetPlatformInfo().SetName(text); - UpdateBuildPackageButton(); + UpdateInterfaceAvailability(); } void MainWindow::PlatformVersionChanged(const QString& text) { workingPackageData.GetFirmwareInfo().GetPlatformInfo().SetVersion(text); - UpdateBuildPackageButton(); + UpdateInterfaceAvailability(); } void MainWindow::HomepageUrlChanged(const QString& text) @@ -861,18 +966,16 @@ void MainWindow::DonateUrlChanged(const QString& text) void MainWindow::DeveloperNameChanged(const QString& text) { - if (text.isEmpty()) - addDeveloperButton->setEnabled(false); - else - addDeveloperButton->setEnabled(true); + UNUSED(text); + + UpdateCreatePackageInterfaceAvailability(); } void MainWindow::SelectDeveloper(int row) { - if (row >= 0) - removeDeveloperButton->setEnabled(true); - else - removeDeveloperButton->setEnabled(false); + UNUSED(row); + + UpdateCreatePackageInterfaceAvailability(); } void MainWindow::AddDeveloper(void) @@ -881,8 +984,8 @@ void MainWindow::AddDeveloper(void) createDevelopersListWidget->addItem(createDeveloperNameLineEdit->text()); createDeveloperNameLineEdit->clear(); - - UpdateBuildPackageButton(); + + UpdateCreatePackageInterfaceAvailability(); } void MainWindow::RemoveDeveloper(void) @@ -894,12 +997,14 @@ void MainWindow::RemoveDeveloper(void) delete item; removeDeveloperButton->setEnabled(false); - - UpdateBuildPackageButton(); + + UpdateInterfaceAvailability(); } void MainWindow::DeviceInfoChanged(const QString& text) { + UNUSED(text); + if (deviceManufacturerLineEdit->text().isEmpty() || deviceNameLineEdit->text().isEmpty() || deviceProductCodeLineEdit->text().isEmpty()) addDeviceButton->setEnabled(false); else @@ -923,8 +1028,8 @@ void MainWindow::AddDevice(void) deviceManufacturerLineEdit->clear(); deviceNameLineEdit->clear(); deviceProductCodeLineEdit->clear(); - - UpdateBuildPackageButton(); + + UpdateInterfaceAvailability(); } void MainWindow::RemoveDevice(void) @@ -936,13 +1041,13 @@ void MainWindow::RemoveDevice(void) delete item; removeDeviceButton->setEnabled(false); - - UpdateBuildPackageButton(); + + UpdateInterfaceAvailability(); } void MainWindow::BuildPackage(void) { - QString packagePath = PromptFileCreation(); + QString packagePath = PromptFileCreation("Save Package", "*.tar.gz"); if (!packagePath.isEmpty()) { @@ -995,7 +1100,7 @@ void MainWindow::ClosePcScreen(void) void MainWindow::SelectPitDestination(void) { - QString path = PromptFileCreation(); + QString path = PromptFileCreation("Save PIT", "*.pit"); if (path != "") { @@ -1029,6 +1134,41 @@ void MainWindow::DownloadPit(void) StartHeimdall(arguments); } +void MainWindow::DevicePrintPitToggled(bool checked) +{ + if (checked) + { + if (printPitLocalFileRadioBox->isChecked()) + printPitLocalFileRadioBox->setChecked(false); + } + + UpdateUtilitiesInterfaceAvailability(); +} + +void MainWindow::LocalFilePrintPitToggled(bool checked) +{ + if (checked) + { + if (printPitDeviceRadioBox->isChecked()) + printPitDeviceRadioBox->setChecked(false); + } + + UpdateUtilitiesInterfaceAvailability(); +} + +void MainWindow::SelectPrintPitFile(void) +{ + QString path = PromptFileSelection("Select PIT", "*.pit"); + + if (path != "") + printLocalPitLineEdit->setText(path); + + if (printLocalPitLineEdit->text() != "") + printPitButton->setEnabled(true); + else + printPitButton->setEnabled(false); +} + void MainWindow::PrintPit(void) { utilityOutputPlainTextEdit->clear(); @@ -1039,14 +1179,21 @@ void MainWindow::PrintPit(void) QStringList arguments; arguments.append("print-pit"); + if (printPitLocalFileRadioBox->isChecked()) + { + arguments.append("--file"); + arguments.append(printLocalPitLineEdit->text()); + } + arguments.append("--stdout-errors"); + arguments.append("--no-reboot"); StartHeimdall(arguments); } void MainWindow::HandleHeimdallStdout(void) { - QString output = process.readAll(); + QString output = heimdallProcess.readAll(); // 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. @@ -1078,29 +1225,22 @@ void MainWindow::HandleHeimdallStdout(void) 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; - - if (exitStatus == QProcess::NormalExit && byteExitCode >= 0) + if (exitStatus == QProcess::NormalExit && exitCode == 0) { if (heimdallState == MainWindow::kHeimdallStateFlashing) { - if (byteExitCode == 1) - flashLabel->setText("Failed to detect compatible device!"); - else - flashLabel->setText("Flash completed sucessfully!"); + flashLabel->setText("Flash completed successfully!"); } else if (heimdallState == MainWindow::kHeimdallStateDetectingDevice) { - deviceDetectedRadioButton->setChecked(byteExitCode == 0); + deviceDetectedRadioButton->setChecked(true); } } else { if (heimdallState == MainWindow::kHeimdallStateFlashing) { - QString error = process.readAllStandardError(); + QString error = heimdallProcess.readAllStandardError(); int lastNewLineChar = error.lastIndexOf('\n'); @@ -1111,6 +1251,10 @@ void MainWindow::HandleHeimdallReturned(int exitCode, QProcess::ExitStatus exitS flashLabel->setText(error); } + else if (heimdallState == MainWindow::kHeimdallStateDetectingDevice) + { + deviceDetectedRadioButton->setChecked(false); + } } heimdallState = MainWindow::kHeimdallStateStopped; diff --git a/heimdall-frontend/Source/mainwindow.h b/heimdall-frontend/Source/mainwindow.h index 9d21978..bea15cd 100644 --- a/heimdall-frontend/Source/mainwindow.h +++ b/heimdall-frontend/Source/mainwindow.h @@ -56,6 +56,12 @@ namespace HeimdallFrontend kHeimdallStateCount }; + enum + { + kPrintPitSourceDevice = 0, + kPrintPitSourceLocalFile + }; + AboutForm aboutForm; QString lastDirectory; @@ -64,7 +70,7 @@ namespace HeimdallFrontend bool heimdallFailed; int heimdallState; - QProcess process; + QProcess heimdallProcess; PackageData loadedPackageData; @@ -76,6 +82,7 @@ namespace HeimdallFrontend bool verboseOutput; + void StartHeimdall(const QStringList& arguments); void UpdateUnusedPartitionIds(void); @@ -85,13 +92,16 @@ namespace HeimdallFrontend bool IsArchive(QString path); - QString PromptFileSelection(void); - QString PromptFileCreation(void); - - void UpdatePartitionNamesInterface(void); + QString PromptFileSelection(const QString& caption = QString("Select File"), const QString& filter = QString()); + QString PromptFileCreation(const QString& caption = QString("Save File"), const QString& filter = QString()); + + void UpdateLoadPackageInterfaceAvailability(void); + void UpdateFlashInterfaceAvailability(void); + void UpdateCreatePackageInterfaceAvailability(void); + void UpdateUtilitiesInterfaceAvailability(void); void UpdateInterfaceAvailability(void); - void UpdateBuildPackageButton(void); + void UpdatePartitionNamesInterface(void); public: @@ -155,6 +165,9 @@ namespace HeimdallFrontend void SelectPitDestination(void); void DownloadPit(void); + void DevicePrintPitToggled(bool checked); + void LocalFilePrintPitToggled(bool checked); + void SelectPrintPitFile(void); void PrintPit(void); // Heimdall Command Line diff --git a/heimdall-frontend/aboutform.ui b/heimdall-frontend/aboutform.ui index f6938ad..142de47 100644 --- a/heimdall-frontend/aboutform.ui +++ b/heimdall-frontend/aboutform.ui @@ -96,7 +96,7 @@ 0 - + 0 @@ -114,11 +114,11 @@ p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:10pt; 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;"><span style=" font-weight:600;">Heimdall Frontend</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Version 1.3.2</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Version 1.4 RC1</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Copyright © 2010-2012 Benjamin Dobell, Glass Echidna</p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Heimdall (command line)</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Copyright © 2010-2012 Benjamin Dobell, Glass Echidna</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">%HEIMDALL-VERSION%Copyright © 2010-2012 Benjamin Dobell, Glass Echidna</p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p></body></html> diff --git a/heimdall-frontend/doc-pak/LICENSE b/heimdall-frontend/doc-pak/LICENSE index 78dc138..680dad9 100644 --- a/heimdall-frontend/doc-pak/LICENSE +++ b/heimdall-frontend/doc-pak/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2010-2011 Benjamin Dobell, Glass Echidna +Copyright (c) 2010-2012 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 diff --git a/heimdall-frontend/doc-pak/README b/heimdall-frontend/doc-pak/README index 8dd296e..a181796 100644 --- a/heimdall-frontend/doc-pak/README +++ b/heimdall-frontend/doc-pak/README @@ -1,4 +1,4 @@ -Heimdall (c) 2010-2011 Benjamin Dobell, Glass Echidna +Heimdall (c) 2010-2012 Benjamin Dobell, Glass Echidna http://www.glassechidna.com.au/products/heimdall/ DISCLAIMER: @@ -23,8 +23,7 @@ Flashing Heimdall Firmware Package with Heimdall Frontend: 1. Fully charge your device (use the wall charger as it's faster). - 2. Open Heimdall Frontend, which can be done by entering the following - command in a terminal: + 2. Open the a terminal and run Heimdall Frontend by typing: heimdall-frontend @@ -82,14 +81,15 @@ Flashing Heimdall Firmware Package with Heimdall Frontend: Performing a Custom Flash with Heimdall Frontend: - This is the advanced means of flashing firmware to your device. You should - only flash firmware to your device this way if you know what you're doing. + This is the advanced means of flashing firmware to your device. If you're not an advanced user or a developer, in the event that a Heimdall - Firmware Package doesn't exist for the particular firmware you wish to - flash. I strongly recommend you get in touch with developer of the - firmware, or an advanced user, and politely ask them to create a Heimdall - Firmware Package for you. + Firmware Package doesn't exist for the particular firmware (or files) that + you wish to flash, then I strongly recommend you get in touch with the + developer of the firmware (or files) and politely ask them to create a + Heimdall Firmware Package for you. In doing so, you avoid the risk of + making mistakes due to inexperience. + If you're looking to customise an existing Heimdall Firmware Package then follow steps 1-8 of "Flashing Heimdall Firmware Package with Heimdall @@ -108,8 +108,7 @@ Performing a Custom Flash with Heimdall Frontend: NOTE: If you want to use the CSC then extract it last. If you're asked to overwrite files then do so. - 3. Open Heimdall Frontend, which can be done by entering the following - command in a terminal: + 3. Open the a terminal and run Heimdall Frontend by typing: heimdall-frontend @@ -119,11 +118,14 @@ Performing a Custom Flash with Heimdall Frontend: 5. Before you can chose which partitions you want to flash with particular files you MUST first select a PIT file. To do this click the "Browse" button in the "PIT" section. This will open a dialogue allowing you to - navigate to and select a valid PIT (.pit) file. + navigate to and select a valid PIT (.pit) file. - 6. If a valid PIT file has been selected then "Add" button below the list - box will become enabled. Press this button to add a partition to your - flash. + If you do not already have a valid PIT file stored on your computer you + can download your device's PIT file from the "Utilities" tab. + + 6. If a valid PIT file has been selected then the "Add" button below the + "Partitions (Files)" list-box will be enabled. Press this button to add + a partition to your flash. 7. When you first add a partition you will see the "Partition Name" and "Partition ID" be populated with information. Use the "Partition Name" @@ -221,7 +223,7 @@ How to Create a Heimdall Firmware Package: compressed with gzip. The only two real requirements are that a valid firmware.xml must be included (refer to Appendix A) and you can only include files (no directories, links etc.) As such if you'd like there is - nothing preventing you creating Heimdall packages manually. Of course + nothing preventing you from creating Heimdall packages manually. Of course Heimdall Frontend provides a simple user interface that takes care of all the hard work for you. @@ -229,12 +231,11 @@ How to Create a Heimdall Firmware Package: create a package from scratch, or you can load an existing package, apply modifications and then save the package. Creating a package from scratch is the preferred approach, by taking this approach you're far less likely - to run into file name length limitations, these are not Heimdall's own - limitation but rather a limitation of the TAR archive format. + to run into file name length limitations. Before you can access Heimdall Frontend's firmware creation functionality (available from the "Create Package" tab) you must first specify which - files will be included in your package as well as a few flashing options + files will be included in your package, as well as a few flashing options i.e. Whether or not users should repartition when flashing. This information must be filled out from the "Flash" tab in exactly the same fashion you would provide information to flash your device (see "Performing @@ -246,7 +247,7 @@ How to Create a Heimdall Firmware Package: firmware package the "Create Package" tab will become available. Clicking this tab will display additional information that you can include in your package. In order to continue you must fill out all sections except for the - URLs section, which is optional. The following is break-down of what all + URLs section, which is optional. The following is a break-down of what all these options mean. - General Firmware Information: - @@ -254,11 +255,11 @@ How to Create a Heimdall Firmware Package: Firmware Name - This is the name of your particular firmware. An example would be "Cyanogenmod". - Firmware Version - This is the particular version identifier for your - package. Any valid string will be accepted although a the inclusion - of decimal point version number is preferred releases i.e. "7.1". - If it makes sense then feel free to append a text string like "RC1" - or "Beta 1" to the decimal point version. + Firmware Version - This is the version identifier for your package. Any + valid string will be accepted, although the inclusion of decimal + point version number is preferred i.e. "7.1". If it makes sense + then feel free to append a text string like "RC1" or "Beta 1" to + the decimal point version. Platform Name - This is the name of platform (or operating system) that your firmware is based on. In most cases this will simply be @@ -295,9 +296,9 @@ How to Create a Heimdall Firmware Package: team name. Click "Add" and the developer will be added to the list on the right. If you make a mistake you can select a developer from the list and click "Remove". You can list as many developers as you - like however size constraints of the "Load Package" means only a - few will be visible. Where possible you may want to opt for team - names over listing individual team members. + like, however visual constraints of the "Load Package" tab means + only a few names will be visible. Where possible you may want to + opt for team names over listing individual team members. - Supported Devices - @@ -325,7 +326,7 @@ How to Create a Heimdall Firmware Package: Product Codes (or product IDs) are designated by manufacturers and are generally the definitive means of referring to a particular device. Examples are "GT-I9000", "GT-I9100" and "SCH-I897". If - you're unsure of a particular product code then Google and + you're unsure of a particular product code then both Google and GSMArena are your friends! @@ -339,7 +340,7 @@ How to Create a Heimdall Firmware Package: Once you've chosen a file name Heimdall Frontend will begin the process of building the firmware package. In doing so a valid firmware.xml file will - be generated from the information entered, all files will be archived in a + be generated from the information entered. All files will be archived in a single TAR file then the TAR archive will be compressed via gzip compression. Compression will take a little while but you will see progress bars so you know the application hasn't hung. When the progress bars @@ -359,12 +360,12 @@ for the format in their own software. All Heimdall Firmware Packages must contain a file called firmware.xml. This -file stores information stores meta-data for the package as well as information -about other files contained in the package that indicates how they should be -flashed. +file stores flash information and meta-data for the package as well as +information about other files contained within the package. + -The format is fairly straight-forward so it won't be explained in great detail, -nonetheless the following is an example of a valid firmware.xml file. +The format is fairly straight-forward so it won't be explained in great detail. +Nonetheless the following is an example of a valid firmware.xml file. @@ -461,17 +462,19 @@ be included. Appendix B - Installing Heimdall from Source: - 1. First make sure you have installed build-tools and pkgconfig. + 1. First make sure you have installed build-tools, pkgconfig, zlib-dev and + libusb-1.0-dev (v1.0.8 or newer). + + NOTE: Package names may not be absolutely identical to those above. 2. Open a terminal and navigate to the directory you downloaded, or extracted, Heimdall to. - 3. Enter the following commands to compile and install libusb-1.0: + 3. Enter the following commands to compile libpit: - cd libusb-1.0 - ./configure - make - sudo make install + cd libpit + ./configure + make cd .. If you have problems please consult http://www.libusb.org/ @@ -493,8 +496,12 @@ Appendix B - Installing Heimdall from Source: sudo make install cd .. - NOTE: You can use "checkinstall" instead of "make install" in order - to generate a redistributable package. + NOTE: As an alternative to "sudo make install" you may chose to generate + a package by typing the following: + + sudo checkinstall --pkgversion + + Where is the current Heimdall release e.g. 1.3.0 5. Done @@ -513,9 +520,9 @@ Appendix C - Installing Heimdall Frontend from Source: 4. Enter the following commands to compile and install Heimdall Frontend: cd heimdall-frontend - qmake heimdall-frontend.pro + qmake-qt4 heimdall-frontend.pro make - sudo make install + sudo make install NOTE: As an alternative to "sudo make install" you may chose to generate a package by typing the following: diff --git a/heimdall-frontend/heimdall-frontend.pro b/heimdall-frontend/heimdall-frontend.pro index faceed2..84093cc 100644 --- a/heimdall-frontend/heimdall-frontend.pro +++ b/heimdall-frontend/heimdall-frontend.pro @@ -17,34 +17,34 @@ macx { config += x86 x86_64 ppc - isEqual(OUTPUTDIR, "") { + isEmpty(OUTPUTDIR) { DESTDIR = /Applications } else { - DESTDIR = $$OUTPUTDIR + DESTDIR = $$(OUTPUTDIR) } } else { - win32 { # It's recommended that Windows users compile via VS2010, but just in case... + win32 { # It is recommended that Windows users compile via VS2010, but just in case... DESTDIR = ../Win32 - !isEqual(OUTPUTDIR, "") { - target.path = $$OUTPUTDIR + !isEmpty(OUTPUTDIR) { + target.path = $$(OUTPUTDIR) INSTALLS += target } } else { DESTDIR = ../Linux - isEqual(OUTPUTDIR, "") { + isEmpty(OUTPUTDIR) { target.path = /usr/local/bin } else { - target.path = $$OUTPUTDIR + target.path = $$(OUTPUTDIR) } INSTALLS += target } } -unix:LIBS += -lz ../libpit/libpit-1.3.a +unix:LIBS += -lz ../libpit/libpit-1.4.a win32:LIBS += ../Win32/Release/lib/libpit.lib QT += core gui xml diff --git a/heimdall-frontend/heimdall-frontend.vcxproj b/heimdall-frontend/heimdall-frontend.vcxproj index 5031b2b..d8bf204 100644 --- a/heimdall-frontend/heimdall-frontend.vcxproj +++ b/heimdall-frontend/heimdall-frontend.vcxproj @@ -69,7 +69,7 @@ $(OutDir)$(TargetName)$(TargetExt) $(QTDIR)\lib;$(SolutionDir)$(Platform)\$(Configuration)\lib\;%(AdditionalLibraryDirectories) true - qtmaind.lib;QtCored4.lib;QtGuid4.lib;QtXml4.lib;libpit.lib;%(AdditionalDependencies) + qtmaind.lib;QtCored4.lib;QtGuid4.lib;QtXmld4.lib;libpit.lib;%(AdditionalDependencies) @@ -94,6 +94,9 @@ + + true + true @@ -103,6 +106,9 @@ + + true + true @@ -130,7 +136,16 @@ - + + $(QTDIR)\bin\moc.exe;%(FullPath) + Moc%27ing %(Identity)... + .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\qtmain" "-I$(QTDIR)\include\QtXml" "-I." "-I.\..\libpit\Source" "-I.\GeneratedFiles" "-I.\GeneratedFiles\$(ConfigurationName)\." -D_UNICODE -DQT_CORE_LIB -DQT_GUI_LIB -DQT_LARGEFILE_SUPPORT -DUNICODE -DWIN32 + $(QTDIR)\bin\moc.exe;%(FullPath) + Moc%27ing %(Identity)... + .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\qtmain" "-I$(QTDIR)\include\QtXml" "-I." "-I.\..\libpit\Source" "-I.\GeneratedFiles" "-I.\GeneratedFiles\$(ConfigurationName)\." -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DUNICODE -DWIN32 + @@ -170,6 +185,7 @@ Uic%27ing %(Identity)... .\GeneratedFiles\ui_%(Filename).h;%(Outputs) "$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)" + Designer diff --git a/heimdall-frontend/heimdall-frontend.vcxproj.filters b/heimdall-frontend/heimdall-frontend.vcxproj.filters index e8006c1..90393f2 100644 --- a/heimdall-frontend/heimdall-frontend.vcxproj.filters +++ b/heimdall-frontend/heimdall-frontend.vcxproj.filters @@ -61,6 +61,12 @@ Source + + Generated Files\Debug + + + Generated Files\Release + @@ -75,6 +81,9 @@ Form Files + + Source + @@ -83,9 +92,6 @@ Generated Files - - Source - Source diff --git a/heimdall-frontend/mainwindow.ui b/heimdall-frontend/mainwindow.ui index 987a99e..6a165fb 100644 --- a/heimdall-frontend/mainwindow.ui +++ b/heimdall-frontend/mainwindow.ui @@ -414,9 +414,9 @@ - 320 + 350 130 - 301 + 271 31 @@ -451,7 +451,7 @@ 10 130 - 301 + 331 21 @@ -1348,7 +1348,7 @@ 10 80 - 471 + 461 141 @@ -1360,7 +1360,7 @@ 10 30 - 451 + 441 71 @@ -1375,7 +1375,7 @@ 10 30 - 321 + 311 21 @@ -1389,7 +1389,7 @@ - 350 + 340 30 91 23 @@ -1406,7 +1406,7 @@ - 330 + 320 110 101 23 @@ -1419,7 +1419,7 @@ - 440 + 430 110 21 23 @@ -1432,7 +1432,7 @@ - Download a devices PIT file. + Download and save a device's PIT file. QFrame::Panel @@ -1494,7 +1494,7 @@ 10 10 - 301 + 291 61 @@ -1504,7 +1504,7 @@ - 180 + 170 30 81 23 @@ -1525,7 +1525,7 @@ 10 30 - 161 + 151 21 @@ -1542,7 +1542,7 @@ - 270 + 260 30 21 23 @@ -1555,7 +1555,7 @@ - Detect for a device connected in download mode. + Detect whether or not a device is connected in download mode. @@ -1586,10 +1586,10 @@ - 490 + 480 10 - 161 - 61 + 291 + 211 @@ -1598,8 +1598,8 @@ - 40 - 30 + 160 + 180 81 23 @@ -1611,8 +1611,8 @@ - 130 - 30 + 250 + 180 21 23 @@ -1624,7 +1624,7 @@ - Print the contents of a device's PIT file. + Print the contents of a PIT file in a human readable fashion. QFrame::Panel @@ -1645,11 +1645,100 @@ Qt::AlignCenter + + + true + + + + 20 + 30 + 261 + 21 + + + + Device + + + true + + + true + + + + + true + + + + 20 + 60 + 261 + 21 + + + + Local File + + + true + + + + + false + + + + 10 + 100 + 271 + 71 + + + + PIT File + + + + false + + + + 10 + 30 + 171 + 21 + + + + true + + + + + false + + + + 190 + 30 + 71 + 23 + + + + Browse + + + - 320 + 310 10 161 61 @@ -1687,7 +1776,7 @@ - Close the device <--> PC screen displayed on a device. + Close the "device <--> PC" screen displayed on a device. QFrame::Panel -- cgit v1.2.3