Skip to content

Commit

Permalink
- Removed legacy command line hard-coded partition name parameters.
Browse files Browse the repository at this point in the history
- As a result of the above two points, there are no "known boot
  partitions", and hence boot partitions are not automatically flashed
  last.
- Made partitions flash in the order in order in which partition arguments
  are specified. Hence, it's recommended that you specify boot partitions
  last.
- Added --usb-level argument that can be used for debugging libusbx, or
  flashing issues in general.
- Removed generally non-functional firmware dumping behaviour.
- Removed auto-resume functionality - Although this feature was definitely
  nice to have; I believe it may be responsible for flashing compatibility
  issues for a variety of devices.
- As a result of the above. In order perform another action after a
  --no-reboot action, you must provide the --resume flag.
- Heimdall Frontend also has support for specifying the --resume flag
  via a GUI. Heimdall Frontend also tries to keep track of your actions
  and enable "Resume" automatically after a "No Reboot" action.
- Refactored quite a few of the actions, and code responsible for flashing
  (particularly PIT file flashing).
- Bumped version to 1.4RC3 *however* this commit is not yet an official
  release candidate. It's still a WIP. In particular build files still
  have not been updated for Linux and OS X.
  • Loading branch information
Benjamin-Dobell committed Mar 7, 2013
1 parent 9d7008e commit ebbc3e7
Show file tree
Hide file tree
Showing 22 changed files with 749 additions and 825 deletions.
53 changes: 48 additions & 5 deletions heimdall-frontend/Source/mainwindow.cpp
Expand Up @@ -262,15 +262,18 @@ void MainWindow::UpdateFlashInterfaceAvailability(void)

flashProgressBar->setEnabled(false);
optionsGroup->setEnabled(true);
sessionGroup->setEnabled(true);
startFlashButton->setEnabled(validFlashSettings);
noRebootCheckBox->setEnabled(validFlashSettings);
resumeCheckbox->setEnabled(validFlashSettings);
}
else
{
partitionNameComboBox->setEnabled(false);

flashProgressBar->setEnabled(true);
optionsGroup->setEnabled(false);
startFlashButton->setEnabled(false);
sessionGroup->setEnabled(false);
}
}

Expand Down Expand Up @@ -314,10 +317,7 @@ void MainWindow::UpdateUtilitiesInterfaceAvailability(void)
closePcScreenButton->setEnabled(true);
pitSaveAsButton->setEnabled(true);

if (!pitDestinationLineEdit->text().isEmpty())
downloadPitButton->setEnabled(true);
else
downloadPitButton->setEnabled(false);
downloadPitButton->setEnabled(!pitDestinationLineEdit->text().isEmpty());

if (printPitDeviceRadioBox->isChecked())
{
Expand All @@ -331,6 +331,7 @@ void MainWindow::UpdateUtilitiesInterfaceAvailability(void)
printLocalPitGroup->setEnabled(true);
printLocalPitLineEdit->setEnabled(true);
printLocalPitBrowseButton->setEnabled(true);

printPitButton->setEnabled(!printLocalPitLineEdit->text().isEmpty());
}
}
Expand Down Expand Up @@ -420,6 +421,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
// Menu
QObject::connect(actionDonate, SIGNAL(triggered()), this, SLOT(OpenDonationWebpage()));
QObject::connect(actionVerboseOutput, SIGNAL(toggled(bool)), this, SLOT(SetVerboseOutput(bool)));
QObject::connect(actionResumeConnection, SIGNAL(toggled(bool)), this, SLOT(SetResume(bool)));
QObject::connect(actionAboutHeimdall, SIGNAL(triggered()), this, SLOT(ShowAbout()));

// Load Package Tab
Expand All @@ -439,7 +441,9 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
QObject::connect(pitBrowseButton, SIGNAL(clicked()), this, SLOT(SelectPit()));

QObject::connect(repartitionCheckBox, SIGNAL(stateChanged(int)), this, SLOT(SetRepartition(int)));

QObject::connect(noRebootCheckBox, SIGNAL(stateChanged(int)), this, SLOT(SetNoReboot(int)));
QObject::connect(resumeCheckbox, SIGNAL(stateChanged(int)), this, SLOT(SetResume(int)));

QObject::connect(startFlashButton, SIGNAL(clicked()), this, SLOT(StartFlash()));

Expand Down Expand Up @@ -882,13 +886,32 @@ void MainWindow::SelectPit(void)
}
}


void MainWindow::SetRepartition(int enabled)
{
workingPackageData.GetFirmwareInfo().SetRepartition(enabled);

repartitionCheckBox->setChecked(enabled);
}

void MainWindow::SetNoReboot(int enabled)
{
workingPackageData.GetFirmwareInfo().SetNoReboot(enabled);

noRebootCheckBox->setChecked(enabled);
}

void MainWindow::SetResume(bool enabled)
{
resume = enabled;

actionResumeConnection->setChecked(enabled);
resumeCheckbox->setChecked(enabled);
}

void MainWindow::SetResume(int enabled)
{
SetResume(enabled != 0);
}

void MainWindow::StartFlash(void)
Expand Down Expand Up @@ -922,6 +945,9 @@ void MainWindow::StartFlash(void)
if (firmwareInfo.GetNoReboot())
arguments.append("--no-reboot");

if (resume)
arguments.append("--resume");

if (verboseOutput)
arguments.append("--verbose");

Expand Down Expand Up @@ -1095,6 +1121,9 @@ void MainWindow::ClosePcScreen(void)

QStringList arguments;
arguments.append("close-pc-screen");

if (resume)
arguments.append("--resume");

if (verboseOutput)
arguments.append("--verbose");
Expand Down Expand Up @@ -1135,6 +1164,9 @@ void MainWindow::DownloadPit(void)

arguments.append("--no-reboot");

if (resume)
arguments.append("--resume");

if (verboseOutput)
arguments.append("--verbose");

Expand Down Expand Up @@ -1196,6 +1228,9 @@ void MainWindow::PrintPit(void)

arguments.append("--stdout-errors");
arguments.append("--no-reboot");

if (resume)
arguments.append("--resume");

if (verboseOutput)
arguments.append("--verbose");
Expand Down Expand Up @@ -1237,6 +1272,8 @@ void MainWindow::HandleHeimdallStdout(void)

void MainWindow::HandleHeimdallReturned(int exitCode, QProcess::ExitStatus exitStatus)
{
HandleHeimdallStdout();

if (exitStatus == QProcess::NormalExit && exitCode == 0)
{
if (heimdallState == MainWindow::kHeimdallStateFlashing)
Expand All @@ -1247,6 +1284,12 @@ void MainWindow::HandleHeimdallReturned(int exitCode, QProcess::ExitStatus exitS
{
deviceDetectedRadioButton->setChecked(true);
}

bool executedNoReboot = (heimdallState == kHeimdallStateFlashing && loadedPackageData.GetFirmwareInfo().GetNoReboot())
|| (heimdallState == kHeimdallStatePrintingPit && printPitDeviceRadioBox->isChecked()) || heimdallState == kHeimdallStateDownloadingPit;

if (executedNoReboot)
SetResume(true);
}
else
{
Expand Down
4 changes: 4 additions & 0 deletions heimdall-frontend/Source/mainwindow.h
Expand Up @@ -81,6 +81,7 @@ namespace HeimdallFrontend
QList<unsigned int> unusedPartitionIds;

bool verboseOutput;
bool resume;


void StartHeimdall(const QStringList& arguments);
Expand Down Expand Up @@ -133,7 +134,10 @@ namespace HeimdallFrontend
void SelectPit(void);

void SetRepartition(int enabled);

void SetNoReboot(int enabled);
void SetResume(bool enabled);
void SetResume(int enabled);

void StartFlash(void);

Expand Down
2 changes: 1 addition & 1 deletion heimdall-frontend/aboutform.ui
Expand Up @@ -114,7 +114,7 @@
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Heimdall Frontend&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Version 1.4 RC1&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Version 1.4 RC3&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Copyright © 2010-2012 Benjamin Dobell, Glass Echidna&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Heimdall (command line)&lt;/span&gt;&lt;/p&gt;
Expand Down

0 comments on commit ebbc3e7

Please sign in to comment.