From 8cb7f6ee8f872938e257541c07d0e4b2ad0e3f35 Mon Sep 17 00:00:00 2001 From: Benjamin Dobell Date: Sun, 17 Jul 2011 19:50:07 +1000 Subject: - Added Utilities tab to Heimdall Frontend. - Fixed Heimdall command line support for PIT files without a reference to themselves. - Added tool tips to Heimdall Frontend. - Added heimdall 'info' and 'download-pit' actions. - Made 'detect' action return 0 if a device is detected, 1 otherwise. --- heimdall-frontend/Source/mainwindow.cpp | 360 ++++++++++---- heimdall-frontend/Source/mainwindow.h | 34 +- heimdall-frontend/heimdall-frontend.vcxproj | 56 +-- heimdall-frontend/mainwindow.ui | 695 ++++++++++++++++++++++++---- 4 files changed, 900 insertions(+), 245 deletions(-) (limited to 'heimdall-frontend') diff --git a/heimdall-frontend/Source/mainwindow.cpp b/heimdall-frontend/Source/mainwindow.cpp index a777c77..b71aef1 100644 --- a/heimdall-frontend/Source/mainwindow.cpp +++ b/heimdall-frontend/Source/mainwindow.cpp @@ -34,6 +34,64 @@ using namespace HeimdallFrontend; +void MainWindow::StartHeimdall(const QStringList& arguments) +{ + flashProgressBar->setEnabled(true); + UpdateInterfaceAvailability(); + + int pathIndex = -1; + process.setReadChannel(QProcess::StandardOutput); + + process.start("heimdall", arguments); + process.waitForStarted(3000); + + // 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; + } + } + + 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(3000); + } + } + + if (heimdallFailed) + { + flashLabel->setText("Failed to start Heimdall!"); + + heimdallState = MainWindow::kHeimdallStateStopped; + flashProgressBar->setEnabled(false); + UpdateInterfaceAvailability(); + } + } +} + void MainWindow::UpdateUnusedPartitionIds(void) { unusedPartitionIds.clear(); @@ -199,13 +257,33 @@ void MainWindow::UpdatePartitionNamesInterface(void) populatingPartitionNames = false; } -void MainWindow::UpdateStartButton(void) +void MainWindow::UpdateInterfaceAvailability(void) { - if (heimdallRunning) + if (heimdallState != MainWindow::kHeimdallStateStopped) { startFlashButton->setEnabled(false); + + detectDeviceButton->setEnabled(false); + closePcScreenButton->setEnabled(false); + pitSaveAsButton->setEnabled(false); + downloadPitButton->setEnabled(false); + printPitButton->setEnabled(false); + return; } + else + { + detectDeviceButton->setEnabled(true); + closePcScreenButton->setEnabled(true); + pitSaveAsButton->setEnabled(true); + + if (!pitDestinationLineEdit->text().isEmpty()) + downloadPitButton->setEnabled(true); + else + downloadPitButton->setEnabled(false); + + printPitButton->setEnabled(true); + } bool allPartitionsValid = true; @@ -223,6 +301,7 @@ void MainWindow::UpdateStartButton(void) bool validSettings = allPartitionsValid && fileList.length() > 0; startFlashButton->setEnabled(validSettings); + functionTabWidget->setTabEnabled(functionTabWidget->indexOf(createPackageTab), validSettings); } @@ -245,7 +324,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) { setupUi(this); - heimdallRunning = false; + heimdallState = MainWindow::kHeimdallStateStopped; lastDirectory = QDir::toNativeSeparators(QApplication::applicationDirPath()); @@ -253,12 +332,17 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) verboseOutput = false; + tabIndex = functionTabWidget->currentIndex(); functionTabWidget->setTabEnabled(functionTabWidget->indexOf(createPackageTab), false); + QObject::connect(functionTabWidget, SIGNAL(currentChanged(int)), this, SLOT(FunctionTabChanged(int))); + + // Menu QObject::connect(actionDonate, SIGNAL(triggered()), this, SLOT(OpenDonationWebpage())); QObject::connect(actionVerboseOutput, SIGNAL(toggled(bool)), this, SLOT(SetVerboseOutput(bool))); QObject::connect(actionAboutHeimdall, SIGNAL(triggered()), this, SLOT(ShowAbout())); + // Load Package Tab QObject::connect(browseFirmwarePackageButton, SIGNAL(clicked()), this, SLOT(SelectFirmwarePackage())); QObject::connect(developerHomepageButton, SIGNAL(clicked()), this, SLOT(OpenDeveloperHomepage())); QObject::connect(developerDonateButton, SIGNAL(clicked()), this, SLOT(OpenDeveloperDonationWebpage())); @@ -268,6 +352,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) QObject::connect(addPartitionButton, SIGNAL(clicked()), this, SLOT(AddPartition())); QObject::connect(removePartitionButton, SIGNAL(clicked()), this, SLOT(RemovePartition())); + // Flash Tab QObject::connect(partitionNameComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(SelectPartitionName(int))); QObject::connect(partitionFileBrowseButton, SIGNAL(clicked()), this, SLOT(SelectPartitionFile())); @@ -278,6 +363,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) QObject::connect(startFlashButton, SIGNAL(clicked()), this, SLOT(StartFlash())); + // Create Package Tab QObject::connect(createFirmwareNameLineEdit, SIGNAL(textChanged(const QString&)), this, SLOT(FirmwareNameChanged(const QString&))); QObject::connect(createFirmwareVersionLineEdit, SIGNAL(textChanged(const QString&)), this, SLOT(FirmwareVersionChanged(const QString&))); QObject::connect(createPlatformNameLineEdit, SIGNAL(textChanged(const QString&)), this, SLOT(PlatformNameChanged(const QString&))); @@ -300,6 +386,14 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) QObject::connect(buildPackageButton, SIGNAL(clicked()), this, SLOT(BuildPackage())); + // Utilities Tab + QObject::connect(detectDeviceButton, SIGNAL(clicked()), this, SLOT(DetectDevice())); + QObject::connect(closePcScreenButton, SIGNAL(clicked()), this, SLOT(ClosePcScreen())); + 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))); @@ -324,6 +418,12 @@ void MainWindow::ShowAbout(void) aboutForm.show(); } +void MainWindow::FunctionTabChanged(int index) +{ + tabIndex = index; + deviceDetectedRadioButton->setChecked(false); +} + void MainWindow::SelectFirmwarePackage(void) { loadedPackageData.Clear(); @@ -461,7 +561,7 @@ void MainWindow::LoadFirmwarePackage(void) functionTabWidget->setCurrentWidget(flashTab); - UpdateStartButton(); + UpdateInterfaceAvailability(); } void MainWindow::SelectPartitionName(int index) @@ -495,7 +595,7 @@ void MainWindow::SelectPartitionFile(void) pitBrowseButton->setEnabled(true); partitionsListWidget->setEnabled(true); - UpdateStartButton(); + UpdateInterfaceAvailability(); if (unusedPartitionIds.length() > 0) addPartitionButton->setEnabled(true); @@ -540,7 +640,7 @@ void MainWindow::AddPartition(void) partitionsListWidget->addItem(currentPitData.FindEntry(partitionInfo.GetPartitionId())->GetPartitionName()); partitionsListWidget->setCurrentRow(partitionsListWidget->count() - 1); partitionsListWidget->setEnabled(false); - UpdateStartButton(); + UpdateInterfaceAvailability(); } void MainWindow::RemovePartition(void) @@ -555,7 +655,7 @@ void MainWindow::RemovePartition(void) pitBrowseButton->setEnabled(true); addPartitionButton->setEnabled(true); partitionsListWidget->setEnabled(true); - UpdateStartButton(); + UpdateInterfaceAvailability(); } void MainWindow::SelectPit(void) @@ -640,7 +740,7 @@ void MainWindow::SelectPit(void) addPartitionButton->setEnabled(validPit); removePartitionButton->setEnabled(validPit && partitionsListWidget->currentRow() >= 0); - UpdateStartButton(); + UpdateInterfaceAvailability(); } } @@ -657,7 +757,7 @@ void MainWindow::StartFlash(void) { outputPlainTextEdit->clear(); - heimdallRunning = true; + heimdallState = MainWindow::kHeimdallStateFlashing; heimdallFailed = false; const FirmwareInfo& firmwareInfo = workingPackageData.GetFirmwareInfo(); @@ -689,59 +789,7 @@ void MainWindow::StartFlash(void) arguments.append("--stdout-errors"); - 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/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; - } - } - - 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(); - } - } + StartHeimdall(arguments); } void MainWindow::FirmwareNameChanged(const QString& text) @@ -863,19 +911,102 @@ void MainWindow::BuildPackage(void) { QString packagePath = PromptFileCreation(); - if (!packagePath.endsWith(".tar.gz", Qt::CaseInsensitive)) + if (!packagePath.isEmpty()) { - if (packagePath.endsWith(".tar", Qt::CaseInsensitive)) - packagePath.append(".gz"); - else if (packagePath.endsWith(".gz", Qt::CaseInsensitive)) - packagePath.replace(packagePath.length() - 3, ".tar.gz"); - else if (packagePath.endsWith(".tgz", Qt::CaseInsensitive)) - packagePath.replace(packagePath.length() - 4, ".tar.gz"); - else - packagePath.append(".tar.gz"); + if (!packagePath.endsWith(".tar.gz", Qt::CaseInsensitive)) + { + if (packagePath.endsWith(".tar", Qt::CaseInsensitive)) + packagePath.append(".gz"); + else if (packagePath.endsWith(".gz", Qt::CaseInsensitive)) + packagePath.replace(packagePath.length() - 3, ".tar.gz"); + else if (packagePath.endsWith(".tgz", Qt::CaseInsensitive)) + packagePath.replace(packagePath.length() - 4, ".tar.gz"); + else + packagePath.append(".tar.gz"); + } + + Packaging::BuildPackage(packagePath, workingPackageData.GetFirmwareInfo()); + } +} + +void MainWindow::DetectDevice(void) +{ + deviceDetectedRadioButton->setChecked(false); + utilityOutputPlainTextEdit->clear(); + + heimdallState = MainWindow::kHeimdallStateDetectingDevice; + heimdallFailed = false; + + QStringList arguments; + arguments.append("detect"); + + arguments.append("--stdout-errors"); + + StartHeimdall(arguments); +} + +void MainWindow::ClosePcScreen(void) +{ + utilityOutputPlainTextEdit->clear(); + + heimdallState = MainWindow::kHeimdallStateClosingPcScreen; + heimdallFailed = false; + + QStringList arguments; + arguments.append("close-pc-screen"); + + arguments.append("--stdout-errors"); + + StartHeimdall(arguments); +} + +void MainWindow::SelectPitDestination(void) +{ + QString path = PromptFileCreation(); + + if (path != "") + { + if (!path.endsWith(".pit")) + path.append(".pit"); + + pitDestinationLineEdit->setText(path); + + UpdateInterfaceAvailability(); } +} + +void MainWindow::DownloadPit(void) +{ + deviceDetectedRadioButton->setChecked(false); + utilityOutputPlainTextEdit->clear(); - Packaging::BuildPackage(packagePath, workingPackageData.GetFirmwareInfo()); + heimdallState = MainWindow::kHeimdallStateDetectingDevice; + heimdallFailed = false; + + QStringList arguments; + arguments.append("download-pit"); + + arguments.append("--output"); + arguments.append(pitDestinationLineEdit->text()); + + arguments.append("--stdout-errors"); + + StartHeimdall(arguments); +} + +void MainWindow::PrintPit(void) +{ + utilityOutputPlainTextEdit->clear(); + + heimdallState = MainWindow::kHeimdallStatePrintingPit; + heimdallFailed = false; + + QStringList arguments; + arguments.append("print-pit"); + + arguments.append("--stdout-errors"); + + StartHeimdall(arguments); } void MainWindow::HandleHeimdallStdout(void) @@ -897,8 +1028,17 @@ void MainWindow::HandleHeimdallStdout(void) output.remove(QChar('\b')); output.replace(QChar('%'), QString("%\n")); - outputPlainTextEdit->insertPlainText(output); - outputPlainTextEdit->ensureCursorVisible(); + + if (heimdallState == MainWindow::kHeimdallStateFlashing) + { + outputPlainTextEdit->insertPlainText(output); + outputPlainTextEdit->ensureCursorVisible(); + } + else + { + utilityOutputPlainTextEdit->insertPlainText(output); + utilityOutputPlainTextEdit->ensureCursorVisible(); + } } void MainWindow::HandleHeimdallReturned(int exitCode, QProcess::ExitStatus exitStatus) @@ -906,50 +1046,82 @@ void MainWindow::HandleHeimdallReturned(int exitCode, QProcess::ExitStatus exitS // 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!"); + if (heimdallState == MainWindow::kHeimdallStateFlashing) + flashLabel->setText("Flash completed sucessfully!"); + else if (heimdallState == MainWindow::kHeimdallStateDetectingDevice) + deviceDetectedRadioButton->setChecked(byteExitCode == 0); } else { - QString error = process.readAllStandardError(); + if (heimdallState == MainWindow::kHeimdallStateFlashing) + { + QString error = process.readAllStandardError(); - int lastNewLineChar = error.lastIndexOf('\n'); + int lastNewLineChar = error.lastIndexOf('\n'); - if (lastNewLineChar == 0) - error = error.mid(1).remove("ERROR: "); - else - error = error.left(lastNewLineChar).remove("ERROR: "); + if (lastNewLineChar == 0) + error = error.mid(1).remove("ERROR: "); + else + error = error.left(lastNewLineChar).remove("ERROR: "); - flashLabel->setText(error); + flashLabel->setText(error); + } } + + heimdallState = MainWindow::kHeimdallStateStopped; + flashProgressBar->setEnabled(false); + UpdateInterfaceAvailability(); } void MainWindow::HandleHeimdallError(QProcess::ProcessError error) { if (error == QProcess::FailedToStart || error == QProcess::Timedout) { + if (heimdallState == kHeimdallStateFlashing) + { + flashLabel->setText("Failed to start Heimdall!"); + flashProgressBar->setEnabled(false); + } + else + { + utilityOutputPlainTextEdit->setPlainText("\nFRONTEND ERROR: Failed to start Heimdall!"); + } + heimdallFailed = true; + heimdallState = MainWindow::kHeimdallStateStopped; + UpdateInterfaceAvailability(); } else if (error == QProcess::Crashed) { - flashLabel->setText("Heimdall crashed!"); + if (heimdallState == kHeimdallStateFlashing) + { + flashLabel->setText("Heimdall crashed!"); + flashProgressBar->setEnabled(false); + } + else + { + utilityOutputPlainTextEdit->appendPlainText("\nFRONTEND ERROR: Heimdall crashed!"); + } - heimdallRunning = false; - flashProgressBar->setEnabled(false); - UpdateStartButton(); + heimdallState = MainWindow::kHeimdallStateStopped; + UpdateInterfaceAvailability(); } else { - flashLabel->setText("Heimdall reported an unknown error!"); + if (heimdallState == kHeimdallStateFlashing) + { + flashLabel->setText("Heimdall reported an unknown error!"); + flashProgressBar->setEnabled(false); + } + else + { + utilityOutputPlainTextEdit->appendPlainText("\nFRONTEND ERROR: Heimdall reported an unknown error!"); + } - heimdallRunning = false; - flashProgressBar->setEnabled(false); - UpdateStartButton(); + heimdallState = MainWindow::kHeimdallStateStopped; + UpdateInterfaceAvailability(); } } diff --git a/heimdall-frontend/Source/mainwindow.h b/heimdall-frontend/Source/mainwindow.h index b041dab..e4ca08d 100644 --- a/heimdall-frontend/Source/mainwindow.h +++ b/heimdall-frontend/Source/mainwindow.h @@ -45,12 +45,25 @@ namespace HeimdallFrontend private: + enum + { + kHeimdallStateStopped = 0, + kHeimdallStateFlashing, + kHeimdallStateDetectingDevice, + kHeimdallStateClosingPcScreen, + kHeimdallStatePrintingPit, + kHeimdallStateDownloadingPit, + kHeimdallStateCount + }; + AboutForm aboutForm; QString lastDirectory; + int tabIndex; + bool heimdallFailed; - bool heimdallRunning; + int heimdallState; QProcess process; PackageData loadedPackageData; @@ -63,6 +76,8 @@ namespace HeimdallFrontend bool verboseOutput; + void StartHeimdall(const QStringList& arguments); + void UpdateUnusedPartitionIds(void); bool ReadPit(QFile *file); @@ -74,7 +89,7 @@ namespace HeimdallFrontend QString PromptFileCreation(void); void UpdatePartitionNamesInterface(void); - void UpdateStartButton(void); + void UpdateInterfaceAvailability(void); void UpdateBuildPackageButton(void); @@ -89,11 +104,15 @@ namespace HeimdallFrontend void SetVerboseOutput(bool enabled); void ShowAbout(void); + void FunctionTabChanged(int index); + + // Load Package Tab void SelectFirmwarePackage(void); void OpenDeveloperHomepage(void); void OpenDeveloperDonationWebpage(void); void LoadFirmwarePackage(void); + // Flash Tab void SelectPartitionName(int index); void SelectPartitionFile(void); @@ -108,6 +127,7 @@ namespace HeimdallFrontend void StartFlash(void); + // Create Package Tab void FirmwareNameChanged(const QString& text); void FirmwareVersionChanged(const QString& text); void PlatformNameChanged(const QString& text); @@ -128,6 +148,16 @@ namespace HeimdallFrontend void BuildPackage(void); + // Utilities Tab + void DetectDevice(void); + void ClosePcScreen(void); + + void SelectPitDestination(void); + void DownloadPit(void); + + void PrintPit(void); + + // Heimdall Command Line void HandleHeimdallStdout(void); void HandleHeimdallReturned(int exitCode, QProcess::ExitStatus exitStatus); void HandleHeimdallError(QProcess::ProcessError error); diff --git a/heimdall-frontend/heimdall-frontend.vcxproj b/heimdall-frontend/heimdall-frontend.vcxproj index bb7e184..87be4e2 100644 --- a/heimdall-frontend/heimdall-frontend.vcxproj +++ b/heimdall-frontend/heimdall-frontend.vcxproj @@ -26,9 +26,6 @@ Application - - Application - @@ -40,10 +37,6 @@ - - - - <_ProjectFileVersion>10.0.30319.1 @@ -51,24 +44,16 @@ AllRules.ruleset - AllRules.ruleset - - $(SolutionDir)$(Platform)\$(Configuration)\ $(SolutionDir)$(Platform)\$(Configuration)\ - $(SolutionDir)$(Platform)\$(Configuration)\ $(Configuration)\ - $(Configuration)\ $(Configuration)\ $(ProjectDir)include;$(SolutionDir)libpit\Source;$(IncludePath) false - false $(ProjectDir)include;$(SolutionDir)libpit\Source;$(IncludePath) - $(ProjectDir)include;$(SolutionDir)libpit\Source;$(IncludePath) - $(LibraryPath) - $(LibraryPath) + $(ProjectDir)lib\win32;$(LibraryPath) $(ProjectDir)lib\win32;$(LibraryPath) $(SourcePath) @@ -112,27 +97,6 @@ qtmain.lib;QtCore4.lib;QtGui4.lib;QtXml4.lib;libpit.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;$(QTDIR)\include\QtXml;..\libpit\Source;.\;%(AdditionalIncludeDirectories) - - - MultiThreaded - false - - - - - - - Windows - $(OutDir)$(TargetName)$(TargetExt) - $(QTDIR)\lib;$(SolutionDir)$(Platform)\$(Configuration)\lib\;%(AdditionalLibraryDirectories) - false - qtmains.lib;QtCore4s.lib;QtGui4s.lib;QtXml4s.lib;libpit.lib;%(AdditionalDependencies) - - true @@ -143,8 +107,6 @@ - - true @@ -166,13 +128,9 @@ .\GeneratedFiles\ui_%(Filename).h;%(Outputs) "$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)" $(QTDIR)\bin\uic.exe;%(AdditionalInputs) - $(QTDIR)\bin\uic.exe;%(AdditionalInputs) Uic%27ing %(Identity)... - Uic%27ing %(Identity)... .\GeneratedFiles\ui_%(Filename).h;%(Outputs) - .\GeneratedFiles\ui_%(Filename).h;%(Outputs) "$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)" - "$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)" @@ -189,13 +147,9 @@ .\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$(QTDIR)\include\QtXml" "-I.\..\libpit\Source" "-I." "-I." "-I." "-I." "-I." "-I." "Source\mainwindow.h" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" $(QTDIR)\bin\moc.exe;%(FullPath) - $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing %(Identity)... - Moc%27ing %(Identity)... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - .\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$(QTDIR)\include\QtXml" "-I.\..\libpit\Source" "-I." "-I." "-I." "-I." "-I." "Source\mainwindow.h" -o ".\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$(QTDIR)\include\QtXml" "-I.\..\libpit\Source" "-I." "-I." "-I." "-I." "-I." "Source\mainwindow.h" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" @@ -206,13 +160,9 @@ .\GeneratedFiles\qrc_%(Filename).cpp;%(Outputs) "$(QTDIR)\bin\rcc.exe" -name "%(Filename)" -no-compress "%(FullPath)" -o .\GeneratedFiles\qrc_%(Filename).cpp %(FullPath);%(AdditionalInputs) - %(FullPath);%(AdditionalInputs) Rcc%27ing %(Identity)... - Rcc%27ing %(Identity)... .\GeneratedFiles\qrc_%(Filename).cpp;%(Outputs) - .\GeneratedFiles\qrc_%(Filename).cpp;%(Outputs) "$(QTDIR)\bin\rcc.exe" -name "%(Filename)" -no-compress "%(FullPath)" -o .\GeneratedFiles\qrc_%(Filename).cpp - "$(QTDIR)\bin\rcc.exe" -name "%(Filename)" -no-compress "%(FullPath)" -o .\GeneratedFiles\qrc_%(Filename).cpp @@ -223,13 +173,9 @@ .\GeneratedFiles\ui_%(Filename).h;%(Outputs) "$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)" $(QTDIR)\bin\uic.exe;%(AdditionalInputs) - $(QTDIR)\bin\uic.exe;%(AdditionalInputs) Uic%27ing %(Identity)... - Uic%27ing %(Identity)... .\GeneratedFiles\ui_%(Filename).h;%(Outputs) - .\GeneratedFiles\ui_%(Filename).h;%(Outputs) "$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)" - "$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)" diff --git a/heimdall-frontend/mainwindow.ui b/heimdall-frontend/mainwindow.ui index 0dba976..985fe10 100644 --- a/heimdall-frontend/mainwindow.ui +++ b/heimdall-frontend/mainwindow.ui @@ -7,7 +7,7 @@ 0 0 788 - 505 + 525 @@ -19,13 +19,13 @@ 788 - 505 + 525 788 - 505 + 525 @@ -73,7 +73,7 @@ 5 0 780 - 481 + 501 @@ -162,7 +162,7 @@ 10 220 491 - 231 + 241 @@ -172,7 +172,7 @@ 10 - 20 + 30 471 201 @@ -186,7 +186,7 @@ 520 - 350 + 360 241 21 @@ -202,7 +202,7 @@ 550 - 410 + 420 171 31 @@ -382,7 +382,7 @@ 520 - 380 + 390 241 21 @@ -400,7 +400,7 @@ 10 - 280 + 300 751 171 @@ -414,7 +414,7 @@ - 320 + 310 130 311 31 @@ -451,7 +451,7 @@ 10 130 - 301 + 291 21 @@ -474,7 +474,7 @@ - 640 + 620 130 91 31 @@ -484,6 +484,43 @@ Start + + + + 720 + 130 + 21 + 23 + + + + + 75 + true + + + + The "Start" button will remain inactive until at least one partition/file is added. + + + QFrame::Panel + + + QFrame::Raised + + + 2 + + + 0 + + + ? + + + Qt::AlignCenter + + @@ -491,7 +528,7 @@ 10 10 751 - 271 + 281 @@ -502,7 +539,7 @@ 10 20 - 381 + 391 61 @@ -517,7 +554,7 @@ 10 30 - 281 + 261 21 @@ -531,7 +568,7 @@ - 300 + 280 30 71 23 @@ -541,34 +578,64 @@ Browse - - - - false - - - - 660 - 240 - 81 - 23 - - - - Remove - + + + true + + + + 360 + 30 + 21 + 23 + + + + + 75 + true + + + + You can retrieve/download your device's PIT file from the Utilities tab. + + + + + + + + + QFrame::Panel + + + QFrame::Raised + + + 2 + + + 0 + + + ? + + + Qt::AlignCenter + + 10 120 - 381 - 141 + 391 + 151 - File / Partition + Partition Details @@ -576,7 +643,7 @@ - 110 + 120 30 261 22 @@ -588,7 +655,7 @@ 10 30 - 91 + 101 16 @@ -601,7 +668,7 @@ 10 60 - 91 + 101 16 @@ -614,8 +681,8 @@ 10 80 - 361 - 51 + 371 + 61 @@ -628,8 +695,8 @@ 10 - 20 - 261 + 30 + 271 21 @@ -643,8 +710,8 @@ - 280 - 20 + 290 + 30 71 23 @@ -660,7 +727,7 @@ - 110 + 120 60 261 21 @@ -671,47 +738,21 @@ - - - false - - - - 400 - 240 - 81 - 23 - - - - Add - - - - - false - - - - 400 - 30 - 341 - 201 - - - false - 150 + 250 90 - 121 + 151 21 + + Can be enabled to prevent your device rebooting after the flash finishes. + No Reboot @@ -724,14 +765,112 @@ 20 90 - 121 + 151 21 + + Repartitioning will wipe all data for your phone and install the selected PIT file. + Repartition + + + + 410 + 20 + 331 + 251 + + + + Partitions (Files) + + + + false + + + + 10 + 220 + 81 + 23 + + + + Add + + + + + false + + + + 10 + 20 + 311 + 191 + + + + + + false + + + + 240 + 220 + 81 + 23 + + + + Remove + + + + + + 100 + 220 + 21 + 23 + + + + + 75 + true + + + + Use the "Add" button to add additional files to be flashed. + + + QFrame::Panel + + + QFrame::Raised + + + 2 + + + 0 + + + ? + + + Qt::AlignCenter + + + @@ -747,7 +886,7 @@ 0 230 491 - 221 + 231 @@ -759,7 +898,7 @@ 10 30 471 - 151 + 161 @@ -770,7 +909,7 @@ 350 - 190 + 200 131 23 @@ -785,7 +924,7 @@ 240 10 - 141 + 151 61 @@ -800,7 +939,7 @@ 10 30 - 121 + 131 21 @@ -812,9 +951,9 @@ - 450 + 430 10 - 161 + 171 61 @@ -829,7 +968,7 @@ 10 30 - 141 + 151 21 @@ -1041,9 +1180,9 @@ - 620 + 610 10 - 141 + 151 61 @@ -1058,7 +1197,7 @@ 10 30 - 121 + 131 21 @@ -1071,7 +1210,7 @@ 500 - 250 + 240 271 151 @@ -1200,6 +1339,377 @@ + + + Utilities + + + + + 10 + 80 + 471 + 141 + + + + Download PIT + + + + + 10 + 30 + 451 + 71 + + + + Destination File + + + + false + + + + 10 + 30 + 341 + 21 + + + + true + + + + + true + + + + 360 + 30 + 81 + 23 + + + + Save As... + + + + + + false + + + + 340 + 110 + 91 + 23 + + + + Download + + + + + + 440 + 110 + 21 + 23 + + + + + 75 + true + + + + Download a devices PIT file. + + + QFrame::Panel + + + QFrame::Raised + + + 2 + + + 0 + + + ? + + + Qt::AlignCenter + + + + + + + 10 + 230 + 751 + 241 + + + + Output + + + + true + + + + 10 + 30 + 731 + 201 + + + + false + + + true + + + + + + + + + + 10 + 10 + 301 + 61 + + + + Detect Device + + + + + 180 + 30 + 81 + 23 + + + + + + + Detect + + + + + false + + + + 10 + 30 + 161 + 21 + + + + Device Detected + + + true + + + + + true + + + + 270 + 30 + 21 + 23 + + + + + 75 + true + + + + Detect for a device connected in download mode. + + + + + + + + + QFrame::Panel + + + QFrame::Raised + + + 2 + + + 0 + + + ? + + + Qt::AlignCenter + + + + + + + 490 + 10 + 161 + 61 + + + + Print PIT + + + + + 40 + 30 + 81 + 23 + + + + Print + + + + + + 130 + 30 + 21 + 23 + + + + + 75 + true + + + + Print the contents of a device's PIT file. + + + QFrame::Panel + + + QFrame::Raised + + + 2 + + + 0 + + + ? + + + Qt::AlignCenter + + + + + + + 320 + 10 + 161 + 61 + + + + Close PC Screen + + + + + 40 + 30 + 81 + 23 + + + + Close + + + + + + 130 + 30 + 21 + 23 + + + + + 75 + true + + + + Close the device <--> PC screen displayed on a device. + + + QFrame::Panel + + + QFrame::Raised + + + 2 + + + 0 + + + ? + + + Qt::AlignCenter + + + + @@ -1208,7 +1718,7 @@ 0 0 788 - 22 + 21 @@ -1283,9 +1793,6 @@ partitionIdLineEdit partitionFileLineEdit partitionFileBrowseButton - partitionsListWidget - addPartitionButton - removePartitionButton outputPlainTextEdit startFlashButton createFirmwareNameLineEdit -- cgit v1.2.3