Fix manual URL in Rockbox Utility (FS#12346)

Targets with special case URL for the manual (i.e. targets that share the
manual with another target, f.e. h100 series) have been forgotten during the
target renaming. Update those names and convert the manual URL handling to
be template based.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30848 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dominik Riebeling 2011-10-28 20:21:41 +00:00
parent b8223d908b
commit b7547e5868
2 changed files with 22 additions and 17 deletions

View file

@ -26,7 +26,7 @@ release_font_url=http://download.rockbox.org/release/%RELEASEVER%/rockbox-fonts-
daily_font_url=http://download.rockbox.org/daily/fonts/rockbox-fonts.zip daily_font_url=http://download.rockbox.org/daily/fonts/rockbox-fonts.zip
; other ; other
manual_url=http://download.rockbox.org/daily/manual manual_url=http://download.rockbox.org/daily/manual/%MANUALBASENAME%.%EXTENSION%
doom_url=http://download.rockbox.org/useful/rockdoom.zip doom_url=http://download.rockbox.org/useful/rockdoom.zip
rbutil_url=http://download.rockbox.org/rbutil/ rbutil_url=http://download.rockbox.org/rbutil/
@ -109,7 +109,7 @@ name="Jukebox Recorder 6 / 10 / 15 / 20 (with 8MiB memory)"
buildserver_modelname=archosrecorder8mb buildserver_modelname=archosrecorder8mb
bootloadermethod=none bootloadermethod=none
bootloadername= bootloadername=
manualname=rockbox-recorder manualname=recorder
brand=Archos brand=Archos
configure_modelname=archosrecorder configure_modelname=archosrecorder
encoder=lame encoder=lame
@ -139,7 +139,7 @@ name="Jukebox Recorder FM (with 8MiB memory)"
buildserver_modelname=archosfmrecorder8mb buildserver_modelname=archosfmrecorder8mb
bootloadermethod=none bootloadermethod=none
bootloadername= bootloadername=
manualname=rockbox-fmrecorder manualname=archosfmrecorder
brand=Archos brand=Archos
configure_modelname=archosfmrecorder configure_modelname=archosfmrecorder
encoder=lame encoder=lame
@ -170,7 +170,7 @@ buildserver_modelname=iriverh100
bootloadermethod=hex bootloadermethod=hex
bootloadername=/iriver/bootloader-h100.bin bootloadername=/iriver/bootloader-h100.bin
bootloaderfile=/ihp_100.hex bootloaderfile=/ihp_100.hex
manualname=rockbox-h100 manualname=iriverh100
brand=Iriver brand=Iriver
usbid=0x10063001 usbid=0x10063001
configure_modelname=iriverh100 configure_modelname=iriverh100
@ -182,7 +182,7 @@ buildserver_modelname=iriverh120
bootloadermethod=hex bootloadermethod=hex
bootloadername=/iriver/bootloader-h120.bin bootloadername=/iriver/bootloader-h120.bin
bootloaderfile=/ihp_120.hex bootloaderfile=/ihp_120.hex
manualname=rockbox-h100 manualname=iriverh100
brand=Iriver brand=Iriver
usbid=0x10063002 usbid=0x10063002
configure_modelname=iriverh120 configure_modelname=iriverh120
@ -194,7 +194,7 @@ buildserver_modelname=iriverh300
bootloadermethod=hex bootloadermethod=hex
bootloadername=/iriver/bootloader-h300.bin bootloadername=/iriver/bootloader-h300.bin
bootloaderfile=/H300.hex bootloaderfile=/H300.hex
manualname=rockbox-h300 manualname=iriverh300
brand=Iriver brand=Iriver
usbid=0x10063003 usbid=0x10063003
configure_modelname=iriverh300 configure_modelname=iriverh300
@ -322,7 +322,7 @@ name="Ipod Mini (2nd gen)"
buildserver_modelname=ipodmini2g buildserver_modelname=ipodmini2g
bootloadermethod=ipod bootloadermethod=ipod
bootloadername=/ipod/bootloader-ipodmini2g.ipod bootloadername=/ipod/bootloader-ipodmini2g.ipod
manualname=rockbox-ipodmini1g manualname=ipodmini1g
brand=Apple brand=Apple
configure_modelname=ipodmini2g configure_modelname=ipodmini2g
encoder=rbspeex encoder=rbspeex

View file

@ -418,17 +418,22 @@ void RbUtilQt::updateManual()
{ {
if(RbSettings::value(RbSettings::Platform) != "") if(RbSettings::value(RbSettings::Platform) != "")
{ {
QString manual= SystemInfo::value(SystemInfo::CurManual).toString(); QString manual = SystemInfo::value(SystemInfo::CurManual).toString();
QString buildservermodel = SystemInfo::value(SystemInfo::CurBuildserverModel).toString();
QString pdfmanual = SystemInfo::value(SystemInfo::ManualUrl).toString();
QString htmlmanual = pdfmanual;
pdfmanual.replace("%EXTENSION%", "pdf");
htmlmanual.replace("%EXTENSION%", "html");
if(manual.isEmpty()) {
pdfmanual.replace("%MANUALBASENAME%", "rockbox-" + buildservermodel);
htmlmanual.replace("%MANUALBASENAME%", "rockbox-" + buildservermodel + "/rockbox-build");
}
else {
pdfmanual.replace("%MANUALBASENAME%", "rockbox-" + manual);
htmlmanual.replace("%MANUALBASENAME%", "rockbox-" + manual + "/rockbox-build");
}
if(manual == "")
manual = "rockbox-"
+ SystemInfo::value(SystemInfo::CurBuildserverModel).toString();
QString pdfmanual;
pdfmanual = SystemInfo::value(SystemInfo::ManualUrl).toString()
+ "/" + manual + ".pdf";
QString htmlmanual;
htmlmanual = SystemInfo::value(SystemInfo::ManualUrl).toString()
+ "/" + manual + "/rockbox-build.html";
ui.labelPdfManual->setText(tr("<a href='%1'>PDF Manual</a>") ui.labelPdfManual->setText(tr("<a href='%1'>PDF Manual</a>")
.arg(pdfmanual)); .arg(pdfmanual));
ui.labelHtmlManual->setText(tr("<a href='%1'>HTML Manual (opens in browser)</a>") ui.labelHtmlManual->setText(tr("<a href='%1'>HTML Manual (opens in browser)</a>")