rbutil: Fix Xduoo bootloader installation.

- Don't try to unzip the bootloader file if we're actually looking for a
  zip file.
- Fix wrong bootloader file name for X3.
- There's no QThread::terminated() signal, don't connect it.

Change-Id: Iebfcc61d644c8443b60d9b37f4932d7b46098465
This commit is contained in:
Dominik Riebeling 2020-08-23 16:51:44 +02:00
parent 53dedd47b9
commit 0b5f0b9284
3 changed files with 12 additions and 4 deletions

View file

@ -224,11 +224,20 @@ void BootloaderInstallBase::setBlFile(QStringList sl)
bool BootloaderInstallBase::setOfFile(QString of, QStringList blfile)
{
bool found = false;
ArchiveUtil *util = 0;
ArchiveUtil *util = nullptr;
// check if we're actually looking for a zip file. If so we must avoid
// trying to unzip it.
bool wantZip = false;
for (int i = 0; i < blfile.size(); i++)
{
if (blfile.at(i).endsWith(".zip"))
wantZip = true;
}
// try ZIP first
ZipUtil *zu = new ZipUtil(this);
if(zu->open(of))
if(zu->open(of) && !wantZip)
{
emit logItem(tr("Zip file format detected"), LOGINFO);
util = zu;

View file

@ -110,7 +110,6 @@ void BootloaderInstallBSPatch::installStage2(void)
m_tempfile.close();
m_patchedFile.close();
connect(m_thread, SIGNAL(finished()), this, SLOT(installStage3()));
connect(m_thread, SIGNAL(terminated()), this, SLOT(installStage3()));
m_thread->start();
}

View file

@ -882,7 +882,7 @@ name="xDuoo X3"
buildserver_modelname=xduoox3
bootloadermethod=bspatch
bootloadername=/xduoo/X3-v11.bsdiff
bootloaderfile=update.zip
bootloaderfile=/update.zip
bootloaderfilter=*.zip
manualname=
brand=xDuoo