mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-17 17:12:39 -05:00
rbutil: warn when you install a build for a different target then already installed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17769 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
d0e95cf077
commit
6b0a1ec2a1
6 changed files with 83 additions and 1 deletions
|
|
@ -180,6 +180,28 @@ QString installedVersion(QString mountpoint)
|
|||
return "";
|
||||
}
|
||||
|
||||
int installedTargetId(QString mountpoint)
|
||||
{
|
||||
// read rockbox-info.txt
|
||||
QFile info(mountpoint +"/.rockbox/rockbox-info.txt");
|
||||
if(!info.open(QIODevice::ReadOnly))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
QString target, features,version;
|
||||
while (!info.atEnd()) {
|
||||
QString line = info.readLine();
|
||||
|
||||
if(line.contains("Target id:"))
|
||||
{
|
||||
return line.remove("Target id:").trimmed().toInt();
|
||||
}
|
||||
}
|
||||
info.close();
|
||||
return -1;
|
||||
|
||||
}
|
||||
|
||||
QString getUserName(void)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue