mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
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
This commit is contained in:
parent
3e7594a1b5
commit
fae8e3fe4f
2 changed files with 22 additions and 4 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue