From fae8e3fe4f558f7e689731b0c49d3edb31b31e13 Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Thu, 30 Aug 2007 19:08:25 +0000 Subject: When installing a build also save the platform information to the log file. This solves the detection issue on X5 / X5V (as they share the same build but not bootloader). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14539 a1c6a512-1295-4272-9138-f99709370657 --- rbutil/rbutilqt/autodetection.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'rbutil/rbutilqt/autodetection.cpp') diff --git a/rbutil/rbutilqt/autodetection.cpp b/rbutil/rbutilqt/autodetection.cpp index 08c471718d..2300a1bba1 100644 --- a/rbutil/rbutilqt/autodetection.cpp +++ b/rbutil/rbutilqt/autodetection.cpp @@ -28,15 +28,28 @@ bool Autodetection::detect() { m_device = ""; m_mountpoint = ""; - - // Try detection via rockbox.info + + // Try detection via rockbox.info / rbutil.log QStringList mountpoints = getMountpoints(); for(int i=0; i< mountpoints.size();i++) { + // do the file checking QDir dir(mountpoints.at(i)); if(dir.exists()) { + // check logfile first. + if(QFile(mountpoints.at(i) + "/.rockbox/rbutil.log").exists()) { + QSettings log(mountpoints.at(i) + "/.rockbox/rbutil.log", + QSettings::IniFormat, this); + if(!log.value("platform").toString().isEmpty()) { + m_device = log.value("platform").toString(); + m_mountpoint = mountpoints.at(i); + return true; + } + } + + // check rockbox-info.txt afterwards. QFile file(mountpoints.at(i) + "/.rockbox/rockbox-info.txt"); if(file.exists()) { @@ -51,6 +64,7 @@ bool Autodetection::detect() } } } + } int n; -- cgit v1.2.3