summaryrefslogtreecommitdiffstats
path: root/rbutil
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2007-08-30 19:08:25 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2007-08-30 19:08:25 +0000
commitfae8e3fe4f558f7e689731b0c49d3edb31b31e13 (patch)
treea8969a0391d2ea82591e53e5fbf36b1bd1ec9f21 /rbutil
parent3e7594a1b5ea9831456c972900143d214b59d22d (diff)
downloadrockbox-fae8e3fe4f558f7e689731b0c49d3edb31b31e13.tar.gz
rockbox-fae8e3fe4f558f7e689731b0c49d3edb31b31e13.zip
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
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/rbutilqt/autodetection.cpp18
-rw-r--r--rbutil/rbutilqt/install.cpp8
2 files changed, 22 insertions, 4 deletions
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;
diff --git a/rbutil/rbutilqt/install.cpp b/rbutil/rbutilqt/install.cpp
index 24ce44b6b9..76baac44e0 100644
--- a/rbutil/rbutilqt/install.cpp
+++ b/rbutil/rbutilqt/install.cpp
@@ -125,8 +125,12 @@ void Install::done(bool error)
}
// no error, close the window, when the logger is closed
- connect(logger,SIGNAL(closed()),this,SLOT(close()));
-
+ connect(logger,SIGNAL(closed()),this,SLOT(close()));
+ // add platform info to log file for later detection
+ QSettings installlog(userSettings->value("defaults/mountpoint").toString()
+ + "/.rockbox/rbutil.log", QSettings::IniFormat, 0);
+ installlog.setValue("platform", userSettings->value("defaults/platform").toString());
+ installlog.sync();
}