mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-07-10 13:29:52 -04:00
rbutil: Move all URLs other than build-info out of rbutil.ini
Now there is zero overlap between what can be found in rbutil.ini and the downloadable build-info. Change-Id: Iba84dec39b062f69098bea62a286acfd36479226
This commit is contained in:
parent
fba3021ffd
commit
39e7f3f29d
5 changed files with 28 additions and 24 deletions
|
|
@ -36,14 +36,23 @@ const static struct {
|
|||
const char* name;
|
||||
} ServerInfoList[] = {
|
||||
{ PlayerBuildInfo::BuildVoiceLangs, "voices/:version:" },
|
||||
{ PlayerBuildInfo::BuildVersion, ":build:/:target:" },
|
||||
{ PlayerBuildInfo::BuildVersion, ":build:/:target:" },
|
||||
{ PlayerBuildInfo::BuildUrl, ":build:/build_url" },
|
||||
{ PlayerBuildInfo::BuildVoiceUrl, ":build:/voice_url" },
|
||||
{ PlayerBuildInfo::BuildManualUrl, ":build:/manual_url" },
|
||||
{ PlayerBuildInfo::BuildSourceUrl, ":build:/source_url" },
|
||||
{ PlayerBuildInfo::BuildFontUrl, ":build:/font_url" },
|
||||
|
||||
// other URLs -- those are not directly related to the build, but handled here.
|
||||
// system URLs -- not directly related to build but pulled out of build-info
|
||||
{ PlayerBuildInfo::BootloaderUrl, "bootloader/download_url" },
|
||||
{ PlayerBuildInfo::GenlangUrl, "genlang_url" },
|
||||
{ PlayerBuildInfo::ThemesUrl, "themes_url" },
|
||||
{ PlayerBuildInfo::ThemesInfoUrl, "themes_info_url" },
|
||||
{ PlayerBuildInfo::RbutilUrl, "rbutil_url" },
|
||||
{ PlayerBuildInfo::RbutilIniUrl, "rbutilini_url" },
|
||||
{ PlayerBuildInfo::VoiceCorrectionsUrl, "voicecorrections_url" },
|
||||
|
||||
// other URLs -- those are not directly related to the build either .
|
||||
{ PlayerBuildInfo::DoomUrl, "other/doom_url" },
|
||||
{ PlayerBuildInfo::Duke3DUrl, "other/duke3d_url" },
|
||||
{ PlayerBuildInfo::PuzzFontsUrl, "other/puzzfonts_url" },
|
||||
|
|
@ -81,12 +90,7 @@ const static struct {
|
|||
PlayerBuildInfo::SystemUrl item;
|
||||
const char* name;
|
||||
} PlayerSystemUrls[] = {
|
||||
{ PlayerBuildInfo::BootloaderUrl, "bootloader/download_url" },
|
||||
{ PlayerBuildInfo::BuildInfoUrl, "build_info_url" },
|
||||
{ PlayerBuildInfo::GenlangUrl, "genlang_url" },
|
||||
{ PlayerBuildInfo::ThemesUrl, "themes_url" },
|
||||
{ PlayerBuildInfo::ThemesInfoUrl, "themes_info_url" },
|
||||
{ PlayerBuildInfo::RbutilUrl, "rbutil_url" },
|
||||
};
|
||||
|
||||
PlayerBuildInfo::PlayerBuildInfo() :
|
||||
|
|
@ -107,6 +111,11 @@ void PlayerBuildInfo::setBuildInfo(QString file)
|
|||
serverInfo = new QSettings(file, QSettings::IniFormat);
|
||||
}
|
||||
|
||||
QVariant PlayerBuildInfo::value(BuildInfo item)
|
||||
{
|
||||
return value(item, TypeRelease);
|
||||
}
|
||||
|
||||
QVariant PlayerBuildInfo::value(BuildInfo item, BuildType type)
|
||||
{
|
||||
// locate setting item in server info file
|
||||
|
|
|
|||
|
|
@ -49,6 +49,14 @@ public:
|
|||
BuildSourceUrl,
|
||||
BuildFontUrl,
|
||||
|
||||
BootloaderUrl,
|
||||
GenlangUrl,
|
||||
ThemesUrl,
|
||||
ThemesInfoUrl,
|
||||
RbutilUrl,
|
||||
RbutilIniUrl,
|
||||
VoiceCorrectionsUrl,
|
||||
|
||||
DoomUrl,
|
||||
Duke3DUrl,
|
||||
PuzzFontsUrl,
|
||||
|
|
@ -81,12 +89,7 @@ public:
|
|||
};
|
||||
|
||||
enum SystemUrl {
|
||||
BootloaderUrl,
|
||||
BuildInfoUrl,
|
||||
GenlangUrl,
|
||||
ThemesUrl,
|
||||
ThemesInfoUrl,
|
||||
RbutilUrl,
|
||||
};
|
||||
|
||||
static PlayerBuildInfo* instance();
|
||||
|
|
@ -103,6 +106,7 @@ public:
|
|||
|
||||
// Get build information for currently selected player.
|
||||
QVariant value(BuildInfo item, BuildType type);
|
||||
QVariant value(BuildInfo item);
|
||||
|
||||
// Get fixed download URL information
|
||||
QVariant value(SystemUrl item);
|
||||
|
|
|
|||
|
|
@ -95,6 +95,7 @@ bool VoiceFileCreator::createVoiceFile()
|
|||
emit logItem(tr("Extracted voice corrections file from installation"), LOGINFO);
|
||||
corrFile = &corrfileT;
|
||||
} else {
|
||||
// XXX try to fetch an updated file via voicecorrections_url ?
|
||||
corrfileT.close();
|
||||
emit logItem(tr("Using internal voice corrections file"), LOGINFO);
|
||||
QFile corrfile(":/builtin/voice-corrections.txt");
|
||||
|
|
|
|||
|
|
@ -1,15 +1,5 @@
|
|||
[general]
|
||||
; server information
|
||||
build_info_url=https://download.rockbox.org/build-info
|
||||
; genlang -- used to get list of strings (only really old builds)
|
||||
genlang_url=https://www.rockbox.org/genlang/?lang=%LANG%&t=%TARGET%&rev=%REVISION%&f=%FEATURES%
|
||||
; themes
|
||||
themes_url=https://themes.rockbox.org/
|
||||
themes_info_url=https://themes.rockbox.org/rbutilqt.php?target=%TARGET%&release=%RELEASE%&revision=%REVISION%&rbutilver=%RBUTILVER%
|
||||
|
||||
[bootloader]
|
||||
info_url=https://download.rockbox.org/bootloader/bootloaders-info
|
||||
download_url=https://download.rockbox.org/bootloader
|
||||
|
||||
; [platforms] is used to determine the order in the device tree.
|
||||
; Only devices present in this section will get displayed!
|
||||
|
|
|
|||
|
|
@ -117,6 +117,7 @@ RbUtilQt::RbUtilQt(QWidget *parent) : QMainWindow(parent)
|
|||
#endif
|
||||
updateDevice();
|
||||
downloadInfo();
|
||||
// XXX download latest rbutil.ini via rbutilini_url
|
||||
|
||||
m_gotInfo = false;
|
||||
m_auto = false;
|
||||
|
|
@ -669,7 +670,7 @@ void RbUtilQt::downloadUpdateDone(QNetworkReply::NetworkError error)
|
|||
for(int i=0; i < rbutilList.size(); i++)
|
||||
{
|
||||
QString item = rbutilList.at(i);
|
||||
#if defined(Q_OS_LINUX)
|
||||
#if defined(Q_OS_LINUX)
|
||||
#if defined(__amd64__)
|
||||
// skip if it isn't a 64 bit build
|
||||
if( !item.contains("64bit"))
|
||||
|
|
@ -748,4 +749,3 @@ void RbUtilQt::eject(void)
|
|||
"fails please use your computers eject funtionality."));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue