diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2020-08-23 16:51:44 +0200 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2020-08-23 16:55:28 +0200 |
commit | 0b5f0b92846d45bdb39f2ef0866f7f643b74c2da (patch) | |
tree | b3e864bb53e00ae1d66fba8bc317fe32f5a5480f | |
parent | 53dedd47b904bddfd38983ec3567acc60a3b986d (diff) | |
download | rockbox-0b5f0b92846d45bdb39f2ef0866f7f643b74c2da.tar.gz rockbox-0b5f0b92846d45bdb39f2ef0866f7f643b74c2da.zip |
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
-rw-r--r-- | rbutil/rbutilqt/base/bootloaderinstallbase.cpp | 13 | ||||
-rw-r--r-- | rbutil/rbutilqt/base/bootloaderinstallbspatch.cpp | 1 | ||||
-rw-r--r-- | rbutil/rbutilqt/rbutil.ini | 2 |
3 files changed, 12 insertions, 4 deletions
diff --git a/rbutil/rbutilqt/base/bootloaderinstallbase.cpp b/rbutil/rbutilqt/base/bootloaderinstallbase.cpp index 30f53ae810..5f8fd40d08 100644 --- a/rbutil/rbutilqt/base/bootloaderinstallbase.cpp +++ b/rbutil/rbutilqt/base/bootloaderinstallbase.cpp | |||
@@ -224,11 +224,20 @@ void BootloaderInstallBase::setBlFile(QStringList sl) | |||
224 | bool BootloaderInstallBase::setOfFile(QString of, QStringList blfile) | 224 | bool BootloaderInstallBase::setOfFile(QString of, QStringList blfile) |
225 | { | 225 | { |
226 | bool found = false; | 226 | bool found = false; |
227 | ArchiveUtil *util = 0; | 227 | ArchiveUtil *util = nullptr; |
228 | |||
229 | // check if we're actually looking for a zip file. If so we must avoid | ||
230 | // trying to unzip it. | ||
231 | bool wantZip = false; | ||
232 | for (int i = 0; i < blfile.size(); i++) | ||
233 | { | ||
234 | if (blfile.at(i).endsWith(".zip")) | ||
235 | wantZip = true; | ||
236 | } | ||
228 | 237 | ||
229 | // try ZIP first | 238 | // try ZIP first |
230 | ZipUtil *zu = new ZipUtil(this); | 239 | ZipUtil *zu = new ZipUtil(this); |
231 | if(zu->open(of)) | 240 | if(zu->open(of) && !wantZip) |
232 | { | 241 | { |
233 | emit logItem(tr("Zip file format detected"), LOGINFO); | 242 | emit logItem(tr("Zip file format detected"), LOGINFO); |
234 | util = zu; | 243 | util = zu; |
diff --git a/rbutil/rbutilqt/base/bootloaderinstallbspatch.cpp b/rbutil/rbutilqt/base/bootloaderinstallbspatch.cpp index c9cbd91abe..8b2ef97cd2 100644 --- a/rbutil/rbutilqt/base/bootloaderinstallbspatch.cpp +++ b/rbutil/rbutilqt/base/bootloaderinstallbspatch.cpp | |||
@@ -110,7 +110,6 @@ void BootloaderInstallBSPatch::installStage2(void) | |||
110 | m_tempfile.close(); | 110 | m_tempfile.close(); |
111 | m_patchedFile.close(); | 111 | m_patchedFile.close(); |
112 | connect(m_thread, SIGNAL(finished()), this, SLOT(installStage3())); | 112 | connect(m_thread, SIGNAL(finished()), this, SLOT(installStage3())); |
113 | connect(m_thread, SIGNAL(terminated()), this, SLOT(installStage3())); | ||
114 | m_thread->start(); | 113 | m_thread->start(); |
115 | } | 114 | } |
116 | 115 | ||
diff --git a/rbutil/rbutilqt/rbutil.ini b/rbutil/rbutilqt/rbutil.ini index e187dda7e7..9ef6a1b208 100644 --- a/rbutil/rbutilqt/rbutil.ini +++ b/rbutil/rbutilqt/rbutil.ini | |||
@@ -882,7 +882,7 @@ name="xDuoo X3" | |||
882 | buildserver_modelname=xduoox3 | 882 | buildserver_modelname=xduoox3 |
883 | bootloadermethod=bspatch | 883 | bootloadermethod=bspatch |
884 | bootloadername=/xduoo/X3-v11.bsdiff | 884 | bootloadername=/xduoo/X3-v11.bsdiff |
885 | bootloaderfile=update.zip | 885 | bootloaderfile=/update.zip |
886 | bootloaderfilter=*.zip | 886 | bootloaderfilter=*.zip |
887 | manualname= | 887 | manualname= |
888 | brand=xDuoo | 888 | brand=xDuoo |