1
0
Fork 0
forked from len0rd/rockbox

Support for Theme installing in rbUtil. FS#6709

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12781 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dominik Wenger 2007-03-15 14:02:37 +00:00
parent 1625c91fbd
commit 994a6d6c4c
14 changed files with 1218 additions and 705 deletions

View file

@ -42,14 +42,14 @@ bool ipodpatcher(int mode)
// downloading files // downloading files
if(mode == BOOTLOADER_ADD) if(mode == BOOTLOADER_ADD)
{ {
src.Printf("%s/ipod/%s.ipod", gv->bootloader_url.c_str(),gv->curbootloader.c_str()); src.Printf(wxT("%s/ipod/%s.ipod"), gv->bootloader_url.c_str(),gv->curbootloader.c_str());
dest.Printf("%s" PATH_SEP "download" PATH_SEP "%s", dest.Printf(wxT("%s" PATH_SEP "download" PATH_SEP "%s"),
gv->stdpaths->GetUserDataDir().c_str(),gv->curbootloader.c_str()); gv->stdpaths->GetUserDataDir().c_str(),gv->curbootloader.c_str());
if ( DownloadURL(src, dest) ) if ( DownloadURL(src, dest) )
{ {
wxRemoveFile(dest); wxRemoveFile(dest);
buf.Printf(_("Unable to download %s"), src.c_str() ); buf.Printf(wxT("Unable to download %s"), src.c_str() );
ERR_DIALOG(buf, _("Install")); ERR_DIALOG(buf, wxT("Install"));
return false; return false;
} }
} }
@ -59,45 +59,45 @@ bool ipodpatcher(int mode)
int n = ipod_scan(&ipod); int n = ipod_scan(&ipod);
if (n == 0) if (n == 0)
{ {
ERR_DIALOG("[ERR] No ipods found.", _("Scanning for Ipods")); ERR_DIALOG(wxT("[ERR] No ipods found."), wxT("Scanning for Ipods"));
return false; return false;
} }
if (n > 1) if (n > 1)
{ {
ERR_DIALOG("[ERR] to many ipods found.", _("Scanning for Ipods")); ERR_DIALOG(wxT("[ERR] to many ipods found."), wxT("Scanning for Ipods"));
return false; return false;
} }
if (ipod_open(&ipod, 0) < 0) if (ipod_open(&ipod, 0) < 0)
{ {
ERR_DIALOG("[ERR] could not open ipod", _("open Ipod")); ERR_DIALOG(wxT("[ERR] could not open ipod"), wxT("open Ipod"));
return false; return false;
} }
if (read_partinfo(&ipod,0) < 0) if (read_partinfo(&ipod,0) < 0)
{ {
ERR_DIALOG("[ERR] could not read partitiontable", _("reading partitiontable")); ERR_DIALOG(wxT("[ERR] could not read partitiontable"), wxT("reading partitiontable"));
return false; return false;
} }
if (ipod.pinfo[0].start==0) if (ipod.pinfo[0].start==0)
{ {
ERR_DIALOG("[ERR] No partition 0 on disk", _("reading partitiontable")); ERR_DIALOG(wxT("[ERR] No partition 0 on disk"), wxT("reading partitiontable"));
int i; int i;
double sectors_per_MB = (1024.0*1024.0)/ipod.sector_size; double sectors_per_MB = (1024.0*1024.0)/ipod.sector_size;
buf.Printf("[INFO] Part Start Sector End Sector Size (MB) Type\n"); buf.Printf(wxT("[INFO] Part Start Sector End Sector Size (MB) Type\n"));
ERR_DIALOG(buf, _("reading partitiontable")); ERR_DIALOG(buf, wxT("reading partitiontable"));
for ( i = 0; i < 4; i++ ) { for ( i = 0; i < 4; i++ ) {
if (ipod.pinfo[i].start != 0) { if (ipod.pinfo[i].start != 0) {
buf.Printf("[INFO] %d %10ld %10ld %10.1f %s (0x%02x)\n", buf.Printf(wxT("[INFO] %d %10ld %10ld %10.1f %s (0x%02x)\n"),
i, i,
ipod.pinfo[i].start, ipod.pinfo[i].start,
ipod.pinfo[i].start+ipod.pinfo[i].size-1, ipod.pinfo[i].start+ipod.pinfo[i].size-1,
ipod.pinfo[i].size/sectors_per_MB, ipod.pinfo[i].size/sectors_per_MB,
get_parttype(ipod.pinfo[i].type), get_parttype(ipod.pinfo[i].type),
ipod.pinfo[i].type); ipod.pinfo[i].type);
ERR_DIALOG(buf, _("reading partitiontable")); ERR_DIALOG(buf, wxT("reading partitiontable"));
} }
} }
return false; return false;
@ -107,52 +107,52 @@ bool ipodpatcher(int mode)
if (ipod.nimages <= 0) if (ipod.nimages <= 0)
{ {
ERR_DIALOG("[ERR] Failed to read firmware directory", _("reading directory")); ERR_DIALOG(wxT("[ERR] Failed to read firmware directory"), wxT("reading directory"));
return false; return false;
} }
if (getmodel(&ipod,(ipod.ipod_directory[0].vers>>8)) < 0) if (getmodel(&ipod,(ipod.ipod_directory[0].vers>>8)) < 0)
{ {
buf.Printf(_("[ERR] Unknown version number in firmware (%08x)\n"), buf.Printf(wxT("[ERR] Unknown version number in firmware (%08x)\n"),
ipod.ipod_directory[0].vers ); ipod.ipod_directory[0].vers );
ERR_DIALOG(buf, _("reading directory")); ERR_DIALOG(buf, wxT("reading directory"));
return false; return false;
} }
if (ipod.macpod) if (ipod.macpod)
{ {
WARN_DIALOG("Warning this is a MacPod, Rockbox doesnt work on this. Convert it to WinPod",_("MacPod")); WARN_DIALOG(wxT("Warning this is a MacPod, Rockbox doesnt work on this. Convert it to WinPod"),wxT("MacPod"));
} }
if(mode == BOOTLOADER_ADD) if(mode == BOOTLOADER_ADD)
{ {
if (ipod_reopen_rw(&ipod) < 0) { if (ipod_reopen_rw(&ipod) < 0) {
ERR_DIALOG("[ERR] Could not open Ipod in RW mode", _("Bootloader add")); ERR_DIALOG(wxT("[ERR] Could not open Ipod in RW mode"), wxT("Bootloader add"));
return false; return false;
} }
if (add_bootloader(&ipod, (char*)dest.c_str(), FILETYPE_DOT_IPOD)==0) { if (add_bootloader(&ipod, (char*)dest.c_str(), FILETYPE_DOT_IPOD)==0) {
} else { } else {
ERR_DIALOG("[ERR] failed to add Bootloader", _("Bootloader add")); ERR_DIALOG(wxT("[ERR] failed to add Bootloader"), wxT("Bootloader add"));
return false; return false;
} }
} }
else if(mode == BOOTLOADER_REM) else if(mode == BOOTLOADER_REM)
{ {
if (ipod_reopen_rw(&ipod) < 0) { if (ipod_reopen_rw(&ipod) < 0) {
ERR_DIALOG("[ERR] Could not open Ipod in RW mode", _("Bootloader add")); ERR_DIALOG(wxT("[ERR] Could not open Ipod in RW mode"), wxT("Bootloader add"));
return false; return false;
} }
if (ipod.ipod_directory[0].entryOffset==0) { if (ipod.ipod_directory[0].entryOffset==0) {
ERR_DIALOG("[ERR] No bootloader detected.\n", _("Bootloader del")); ERR_DIALOG(wxT("[ERR] No bootloader detected.\n"), wxT("Bootloader del"));
return false; return false;
} else { } else {
if (delete_bootloader(&ipod)==0) { if (delete_bootloader(&ipod)==0) {
} else { } else {
ERR_DIALOG("[ERR] --delete-bootloader failed.\n", _("Bootloader del")); ERR_DIALOG(wxT("[ERR] --delete-bootloader failed.\n"), wxT("Bootloader del"));
return false; return false;
} }
} }
@ -169,65 +169,65 @@ bool gigabeatf(int mode)
wxString err; wxString err;
wxString src,dest; wxString src,dest;
path1.Printf("%s" PATH_SEP "GBSYSTEM" PATH_SEP "FWIMG" PATH_SEP "FWIMG01.DAT",gv->curdestdir.c_str()); path1.Printf(wxT("%s" PATH_SEP "GBSYSTEM" PATH_SEP "FWIMG" PATH_SEP "FWIMG01.DAT"),gv->curdestdir.c_str());
if(mode == BOOTLOADER_ADD) if(mode == BOOTLOADER_ADD)
{ {
//Files downloaden //Files downloaden
src.Printf("%s/gigabeat/%s", gv->bootloader_url.c_str(),gv->curbootloader.c_str()); src.Printf(wxT("%s/gigabeat/%s"), gv->bootloader_url.c_str(),gv->curbootloader.c_str());
dest.Printf("%s" PATH_SEP "download" PATH_SEP "%s", dest.Printf(wxT("%s" PATH_SEP "download" PATH_SEP "%s"),
gv->stdpaths->GetUserDataDir().c_str(),gv->curbootloader.c_str()); gv->stdpaths->GetUserDataDir().c_str(),gv->curbootloader.c_str());
if( DownloadURL(src, dest) ) if( DownloadURL(src, dest) )
{ {
wxRemoveFile(dest); wxRemoveFile(dest);
err.Printf(_("Unable to download %s"), src.c_str() ); err.Printf(wxT("Unable to download %s"), src.c_str() );
ERR_DIALOG(err, _("Install")); ERR_DIALOG(err, wxT("Install"));
return false; return false;
} }
if(!wxFileExists(path1)) if(!wxFileExists(path1))
{ {
err.Printf("[ERR] Coud not find %s",path1.c_str()); err.Printf(wxT("[ERR] Coud not find %s"),path1.c_str());
ERR_DIALOG(err, _("Bootloader add")); ERR_DIALOG(err, wxT("Bootloader add"));
return false; return false;
} }
path2 = path1; path2 = path1;
path2.Append(".ORIG"); path2.Append(wxT(".ORIG"));
if(wxFileExists(path2)) if(wxFileExists(path2))
{ {
err = "Its seems there is already a Bootloader install, if not, delete the *.IMG.ORIG file"; err = wxT("Its seems there is already a Bootloader install, if not, delete the *.IMG.ORIG file");
ERR_DIALOG(err, _("Bootloader add")); ERR_DIALOG(err, wxT("Bootloader add"));
return false; return false;
} }
if(!wxRenameFile(path1,path2,false)) if(!wxRenameFile(path1,path2,false))
{ {
err.Printf("[ERR] Coud not rename %s to %s",path1.c_str(),path2.c_str()); err.Printf(wxT("[ERR] Coud not rename %s to %s"),path1.c_str(),path2.c_str());
ERR_DIALOG(err, _("Bootloader add")); ERR_DIALOG(err, wxT("Bootloader add"));
return false; return false;
} }
if(!wxCopyFile(dest,path1)) if(!wxCopyFile(dest,path1))
{ {
err.Printf("[ERR] Coud not copy %s to %s",dest.c_str(),path2.c_str()); err.Printf(wxT("[ERR] Coud not copy %s to %s"),dest.c_str(),path2.c_str());
ERR_DIALOG(err, _("Bootloader add")); ERR_DIALOG(err, wxT("Bootloader add"));
return false; return false;
} }
} }
else if(mode == BOOTLOADER_REM) else if(mode == BOOTLOADER_REM)
{ {
path2 = path1; path2 = path1;
path2.Append(".ORIG"); path2.Append(wxT(".ORIG"));
if(!wxFileExists(path2)) if(!wxFileExists(path2))
{ {
err.Printf("[ERR] Coud not find %s",path1.c_str()); err.Printf(wxT("[ERR] Coud not find %s"),path1.c_str());
ERR_DIALOG(err, _("Bootloader del")); ERR_DIALOG(err, wxT("Bootloader del"));
return false; return false;
} }
if(!wxRenameFile(path2,path1,true)) if(!wxRenameFile(path2,path1,true))
{ {
err.Printf("[ERR] Coud not rename %s to %s",path1.c_str(),path2.c_str()); err.Printf(wxT("[ERR] Coud not rename %s to %s"),path1.c_str(),path2.c_str());
ERR_DIALOG(err, _("Bootloader del")); ERR_DIALOG(err, wxT("Bootloader del"));
return false; return false;
} }
} }
@ -241,27 +241,27 @@ bool iaudiox5(int mode)
wxString err; wxString err;
wxString src,dest; wxString src,dest;
path1.Printf("%s" PATH_SEP "FIRMWARE" PATH_SEP "%s",gv->curdestdir.c_str(),gv->curbootloader.c_str()); path1.Printf(wxT("%s" PATH_SEP "FIRMWARE" PATH_SEP "%s"),gv->curdestdir.c_str(),gv->curbootloader.c_str());
if(mode == BOOTLOADER_ADD) if(mode == BOOTLOADER_ADD)
{ {
//Files downloaden //Files downloaden
src.Printf("%s/iaudio/%s", gv->bootloader_url.c_str(),gv->curbootloader.c_str()); src.Printf(wxT("%s/iaudio/%s"), gv->bootloader_url.c_str(),gv->curbootloader.c_str());
dest.Printf("%s" PATH_SEP "download" PATH_SEP "%s", dest.Printf(wxT("%s" PATH_SEP "download" PATH_SEP "%s"),
gv->stdpaths->GetUserDataDir().c_str(),gv->curbootloader.c_str()); gv->stdpaths->GetUserDataDir().c_str(),gv->curbootloader.c_str());
if( DownloadURL(src, dest) ) if( DownloadURL(src, dest) )
{ {
wxRemoveFile(dest); wxRemoveFile(dest);
err.Printf(_("Unable to download %s"), src.c_str() ); err.Printf(wxT("Unable to download %s"), src.c_str() );
ERR_DIALOG(err, _("Install")); ERR_DIALOG(err, wxT("Install"));
return false; return false;
} }
// copy file // copy file
if(!wxCopyFile(dest,path1)) if(!wxCopyFile(dest,path1))
{ {
err.Printf("[ERR] Coud not copy %s to %s",dest.c_str(),path2.c_str()); err.Printf(wxT("[ERR] Coud not copy %s to %s"),dest.c_str(),path2.c_str());
ERR_DIALOG(err, _("Bootloader add")); ERR_DIALOG(err, wxT("Bootloader add"));
return false; return false;
} }
@ -284,46 +284,46 @@ bool h10(int mode)
if(mode == BOOTLOADER_ADD) if(mode == BOOTLOADER_ADD)
{ {
//Files downloaden //Files downloaden
src.Printf("%s/iriver/%s", gv->bootloader_url.c_str(),gv->curbootloader.c_str()); src.Printf(wxT("%s/iriver/%s"), gv->bootloader_url.c_str(),gv->curbootloader.c_str());
dest.Printf("%s" PATH_SEP "download" PATH_SEP "%s", dest.Printf(wxT("%s" PATH_SEP "download" PATH_SEP "%s"),
gv->stdpaths->GetUserDataDir().c_str(),firmwarename.c_str()); gv->stdpaths->GetUserDataDir().c_str(),firmwarename.c_str());
if( DownloadURL(src, dest) ) if( DownloadURL(src, dest) )
{ {
wxRemoveFile(dest); wxRemoveFile(dest);
err.Printf(_("Unable to download %s"), src.c_str() ); err.Printf(wxT("Unable to download %s"), src.c_str() );
ERR_DIALOG(err, _("Install")); ERR_DIALOG(err, wxT("Install"));
return false; return false;
} }
path1.Printf("%sSYSTEM" PATH_SEP "%s",gv->curdestdir.c_str(),firmwarename.c_str()); path1.Printf(wxT("%sSYSTEM" PATH_SEP "%s"),gv->curdestdir.c_str(),firmwarename.c_str());
path2.Printf("%sSYSTEM" PATH_SEP "Original.mi4",gv->curdestdir.c_str()); path2.Printf(wxT("%sSYSTEM" PATH_SEP "Original.mi4"),gv->curdestdir.c_str());
if(!wxFileExists(path1)) //Firmware dosent exists on player if(!wxFileExists(path1)) //Firmware dosent exists on player
{ {
path1.Printf("%sSYSTEM" PATH_SEP "H10EMP.mi4"); //attempt other firmwarename path1.Printf(wxT("%sSYSTEM" PATH_SEP "H10EMP.mi4")); //attempt other firmwarename
if(!wxFileExists(path1)) //Firmware dosent exists on player if(!wxFileExists(path1)) //Firmware dosent exists on player
{ {
err.Printf("[ERR] File %s does not Exist",path1.c_str()); err.Printf(wxT("[ERR] File %s does not Exist"),path1.c_str());
ERR_DIALOG(err, _("Bootloader add")); ERR_DIALOG(err, wxT("Bootloader add"));
return false; return false;
} }
} }
if(wxFileExists(path2)) //there is already a original firmware if(wxFileExists(path2)) //there is already a original firmware
{ {
err.Printf("[ERR2] File %s does Exist",path2.c_str()); err.Printf(wxT("[ERR2] File %s does Exist"),path2.c_str());
ERR_DIALOG(err, _("Bootloader add")); ERR_DIALOG(err, wxT("Bootloader add"));
return false; return false;
} }
if(!wxRenameFile(path1,path2,false)) //rename Firmware to Original if(!wxRenameFile(path1,path2,false)) //rename Firmware to Original
{ {
err.Printf("[ERR] Coud not rename %s to %s",path1.c_str(),path2.c_str()); err.Printf(wxT("[ERR] Coud not rename %s to %s"),path1.c_str(),path2.c_str());
ERR_DIALOG(err, _("Bootloader add")); ERR_DIALOG(err, wxT("Bootloader add"));
return false; return false;
} }
if(!wxCopyFile(dest,path1)) // copy file if(!wxCopyFile(dest,path1)) // copy file
{ {
err.Printf("[ERR] Coud not copy %s to %s",dest.c_str(),path1.c_str()); err.Printf(wxT("[ERR] Coud not copy %s to %s"),dest.c_str(),path1.c_str());
ERR_DIALOG(err, _("Bootloader add")); ERR_DIALOG(err,wxT("Bootloader add"));
return false; return false;
} }
@ -332,30 +332,30 @@ bool h10(int mode)
} }
else if(mode == BOOTLOADER_REM) else if(mode == BOOTLOADER_REM)
{ {
path1.Printf("%sSYSTEM" PATH_SEP "%s",gv->curdestdir.c_str(),firmwarename.c_str()); path1.Printf(wxT("%sSYSTEM" PATH_SEP "%s"),gv->curdestdir.c_str(),firmwarename.c_str());
path2.Printf("%sSYSTEM" PATH_SEP "Original.mi4",gv->curdestdir.c_str()); path2.Printf(wxT("%sSYSTEM" PATH_SEP "Original.mi4"),gv->curdestdir.c_str());
if(!wxFileExists(path1)) //Firmware dosent exists on player if(!wxFileExists(path1)) //Firmware dosent exists on player
{ {
path1.Printf("%s" PATH_SEP "SYSTEM" PATH_SEP "H10EMP.mi4"); //attempt other firmwarename path1.Printf(wxT("%s" PATH_SEP "SYSTEM" PATH_SEP "H10EMP.mi4")); //attempt other firmwarename
if(!wxFileExists(path1)) //Firmware dosent exists on player if(!wxFileExists(path1)) //Firmware dosent exists on player
{ {
err.Printf("[ERR] File %s does not Exist",path1.c_str()); err.Printf(wxT("[ERR] File %s does not Exist"),path1.c_str());
ERR_DIALOG(err, _("Bootloader rem")); ERR_DIALOG(err, wxT("Bootloader rem"));
return false; return false;
} }
} }
if(!wxFileExists(path2)) //Original Firmware dosent exists on player if(!wxFileExists(path2)) //Original Firmware dosent exists on player
{ {
err.Printf("[ERR] File %s does not Exist",path2.c_str()); err.Printf(wxT("[ERR] File %s does not Exist"),path2.c_str());
ERR_DIALOG(err, _("Bootloader rem")); ERR_DIALOG(err, wxT("Bootloader rem"));
return false; return false;
} }
if(!wxRenameFile(path2,path1,true)) //rename Firmware to Original if(!wxRenameFile(path2,path1,true)) //rename Firmware to Original
{ {
err.Printf("[ERR] Coud not rename %s to %s",path2.c_str(),path1.c_str()); err.Printf(wxT("[ERR] Coud not rename %s to %s"),path2.c_str(),path1.c_str());
ERR_DIALOG(err, _("Bootloader add")); ERR_DIALOG(err, wxT("Bootloader add"));
return false; return false;
} }
@ -372,7 +372,7 @@ bool fwpatcher(int mode)
int series,table_entry; int series,table_entry;
if (!FileMD5(gv->curfirmware, &md5sum_str)) { if (!FileMD5(gv->curfirmware, &md5sum_str)) {
ERR_DIALOG("Could not open firmware", _("Open Firmware")); ERR_DIALOG(wxT("Could not open firmware"), wxT("Open Firmware"));
return false; return false;
} }
else { else {
@ -398,44 +398,44 @@ bool fwpatcher(int mode)
} }
} }
if (series == 0) { if (series == 0) {
ERR_DIALOG("Could not detect firmware type", _("Detect Player out of Firmware")); ERR_DIALOG(wxT("Could not detect firmware type"), wxT("Detect Player out of Firmware"));
return false; return false;
} }
else else
{ {
//Download bootloader //Download bootloader
src.Printf("%s/iriver/%s", gv->bootloader_url.c_str(),gv->curbootloader.c_str()); src.Printf(wxT("%s/iriver/%s"), gv->bootloader_url.c_str(),gv->curbootloader.c_str());
dest.Printf("%s" PATH_SEP "download" PATH_SEP "%s", dest.Printf(wxT("%s" PATH_SEP "download" PATH_SEP "%s"),
gv->stdpaths->GetUserDataDir().c_str(),gv->curbootloader.c_str()); gv->stdpaths->GetUserDataDir().c_str(),gv->curbootloader.c_str());
if( DownloadURL(src, dest) ) if( DownloadURL(src, dest) )
{ {
wxRemoveFile(dest); wxRemoveFile(dest);
err.Printf(_("Unable to download %s"), src.c_str() ); err.Printf(wxT("Unable to download %s"), src.c_str() );
ERR_DIALOG(err, _("Install")); ERR_DIALOG(err, wxT("Install"));
return false; return false;
} }
if(!PatchFirmware(gv->curfirmware,dest,series, table_entry)) // Patch firmware if(!PatchFirmware(gv->curfirmware,dest,series, table_entry)) // Patch firmware
{ {
ERR_DIALOG("Patching Firmware failed", _("Patching Firmware")); ERR_DIALOG(wxT("Patching Firmware failed"), wxT("Patching Firmware"));
return false; return false;
} }
} }
// Load patched Firmware to player // Load patched Firmware to player
src.Printf("%s" PATH_SEP "download" PATH_SEP "new.hex", src.Printf(wxT("%s" PATH_SEP "download" PATH_SEP "new.hex"),
gv->stdpaths->GetUserDataDir().c_str()); gv->stdpaths->GetUserDataDir().c_str());
if(gv->curplat == "h100") if(gv->curplat == "h100")
dest.Printf("%s" PATH_SEP "ihp_100.hex",gv->curdestdir.c_str()); dest.Printf(wxT("%s" PATH_SEP "ihp_100.hex"),gv->curdestdir.c_str());
else if(gv->curplat == "h120") else if(gv->curplat == "h120")
dest.Printf("%s" PATH_SEP "ihp_120.hex",gv->curdestdir.c_str()); dest.Printf(wxT("%s" PATH_SEP "ihp_120.hex"),gv->curdestdir.c_str());
else if(gv->curplat == "h300") else if(gv->curplat == "h300")
dest.Printf("%s" PATH_SEP "H300.hex",gv->curdestdir.c_str()); dest.Printf(wxT("%s" PATH_SEP "H300.hex"),gv->curdestdir.c_str());
if(!wxRenameFile(src,dest)) if(!wxRenameFile(src,dest))
{ {
ERR_DIALOG("Copying Firmware to Device failed", _("Copying Firmware")); ERR_DIALOG(wxT("Copying Firmware to Device failed"), wxT("Copying Firmware"));
return false; return false;
} }
else else

View file

@ -22,7 +22,7 @@
#define CREDITS_H_INCLUDED #define CREDITS_H_INCLUDED
#define RBUTIL_FULLNAME "The Rockbox Utility" #define RBUTIL_FULLNAME "The Rockbox Utility"
#define RBUTIL_VERSION "Version 0.2.1.1" #define RBUTIL_VERSION "Version 0.3.0.0"
static const char* rbutil_developers[] = { static const char* rbutil_developers[] = {
"Christi Alice Scarborough", "Christi Alice Scarborough",

View file

@ -61,13 +61,13 @@ bool mkboot(wxString infile, wxString outfile,wxString bootloader,int origin)
wxFile f; wxFile f;
if(!f.Open(infile)) if(!f.Open(infile))
{ {
err.Printf("Could not open: %s",infile.c_str()); err.Printf(wxT("Could not open: %s"),infile.c_str());
ERR_DIALOG(err, _("mkboot")); ERR_DIALOG(err, wxT("mkboot"));
return false; return false;
} }
i = f.Read(image,16); i = f.Read(image,16);
if(i < 16) { if(i < 16) {
ERR_DIALOG("reading header failed", _("mkboot")); ERR_DIALOG(wxT("reading header failed"), wxT("mkboot"));
return false; return false;
} }
@ -80,7 +80,7 @@ bool mkboot(wxString infile, wxString outfile,wxString bootloader,int origin)
len = binary_length+0x200-16; len = binary_length+0x200-16;
i = f.Read(image+16, len); i = f.Read(image+16, len);
if(i < len) { if(i < len) {
ERR_DIALOG("reading firmware failed", _("mkboot")); ERR_DIALOG(wxT("reading firmware failed"),wxT("mkboot"));
return false; return false;
} }
@ -88,8 +88,8 @@ bool mkboot(wxString infile, wxString outfile,wxString bootloader,int origin)
/* Now, read the boot loader into the image */ /* Now, read the boot loader into the image */
if(!f.Open(bootloader)) if(!f.Open(bootloader))
{ {
err.Printf("Could not open: %s",bootloader.c_str()); err.Printf(wxT("Could not open: %s"),bootloader.c_str());
ERR_DIALOG(err, _("mkboot")); ERR_DIALOG(err, wxT("mkboot"));
return false; return false;
} }
@ -97,7 +97,7 @@ bool mkboot(wxString infile, wxString outfile,wxString bootloader,int origin)
i = f.Read(image+0x220 + origin, bllen); i = f.Read(image+0x220 + origin, bllen);
if(i < bllen) { if(i < bllen) {
ERR_DIALOG("reading bootloader failed", _("mkboot")); ERR_DIALOG(wxT("reading bootloader failed"), wxT("mkboot"));
return false; return false;
} }
@ -105,8 +105,8 @@ bool mkboot(wxString infile, wxString outfile,wxString bootloader,int origin)
if(!f.Open(outfile,wxFile::write)) if(!f.Open(outfile,wxFile::write))
{ {
err.Printf("Could not open: %s",outfile.c_str()); err.Printf(wxT("Could not open: %s"),outfile.c_str());
ERR_DIALOG(err, _("mkboot")); ERR_DIALOG(err, wxT("mkboot"));
return false; return false;
} }
@ -158,7 +158,7 @@ bool mkboot(wxString infile, wxString outfile,wxString bootloader,int origin)
i = f.Write(image,total_length); i = f.Write(image,total_length);
if(i < total_length) { if(i < total_length) {
ERR_DIALOG("writing bootloader failed", _("mkboot")); ERR_DIALOG(wxT("writing bootloader failed"), wxT("mkboot"));
return false; return false;
} }
@ -230,21 +230,21 @@ int iriver_decode(wxString infile_name, wxString outfile_name, unsigned int modi
if(!infile.Open(infile_name)) if(!infile.Open(infile_name))
{ {
err.Printf("Could not open: %s",infile_name.c_str()); err.Printf(wxT("Could not open: %s"),infile_name.c_str());
ERR_DIALOG(err, _("iriver_decode")); ERR_DIALOG(err, wxT("iriver_decode"));
return -1; return -1;
} }
if(!outfile.Open(outfile_name,wxFile::write)) if(!outfile.Open(outfile_name,wxFile::write))
{ {
err.Printf("Could not open: %s",outfile_name.c_str()); err.Printf(wxT("Could not open: %s"),outfile_name.c_str());
ERR_DIALOG(err, _("iriver_decode")); ERR_DIALOG(err, wxT("iriver_decode"));
return -1; return -1;
} }
lenread = infile.Read( headerdata, 512); lenread = infile.Read( headerdata, 512);
if( lenread != 512 ) if( lenread != 512 )
{ {
ERR_DIALOG(_("This doesn't look like a valid encrypted iHP " ERR_DIALOG(wxT("This doesn't look like a valid encrypted iHP "
"firmware - reason: header length\n"),_("iriver_decode")); "firmware - reason: header length\n"),wxT("iriver_decode"));
infile.Close(); infile.Close();
outfile.Close(); outfile.Close();
@ -254,8 +254,8 @@ int iriver_decode(wxString infile_name, wxString outfile_name, unsigned int modi
i = testheader( headerdata ); i = testheader( headerdata );
if( i == -1 ) if( i == -1 )
{ {
ERR_DIALOG( _( "This firmware is for an unknown model, or is not" ERR_DIALOG( wxT( "This firmware is for an unknown model, or is not"
" a valid encrypted iHP firmware\n" ),_("iriver_decode")); " a valid encrypted iHP firmware\n" ),wxT("iriver_decode"));
infile.Close(); infile.Close();
outfile.Close(); outfile.Close();
return -1; return -1;
@ -277,8 +277,8 @@ int iriver_decode(wxString infile_name, wxString outfile_name, unsigned int modi
dwLength2>>9 != dwLength3 || dwLength2>>9 != dwLength3 ||
dwLength2+dwLength3+512 != dwLength1 ) dwLength2+dwLength3+512 != dwLength1 )
{ {
ERR_DIALOG( _( "This doesn't look like a valid encrypted " ERR_DIALOG( wxT( "This doesn't look like a valid encrypted "
"iHP firmware - reason: file 'length' data\n" ),_("iriver_decode")); "iHP firmware - reason: file 'length' data\n" ),wxT("iriver_decode"));
infile.Close(); infile.Close();
outfile.Close(); outfile.Close();
return -1; return -1;
@ -339,8 +339,8 @@ int iriver_decode(wxString infile_name, wxString outfile_name, unsigned int modi
if( fp != dwLength2 ) if( fp != dwLength2 )
{ {
ERR_DIALOG( _( "This doesn't look like a valid encrypted " ERR_DIALOG( wxT( "This doesn't look like a valid encrypted "
"iHP firmware - reason: 'length2' mismatch\n" ),_("iriver_decode")); "iHP firmware - reason: 'length2' mismatch\n" ),wxT("iriver_decode"));
infile.Close(); infile.Close();
outfile.Close(); outfile.Close();
return -1; return -1;
@ -356,8 +356,8 @@ int iriver_decode(wxString infile_name, wxString outfile_name, unsigned int modi
outfile.Write( blockdata, lenread ); outfile.Write( blockdata, lenread );
if( memcmp( ppChecksums, blockdata, lenread ) != 0 ) if( memcmp( ppChecksums, blockdata, lenread ) != 0 )
{ {
ERR_DIALOG( _( "This doesn't look like a valid encrypted " ERR_DIALOG( wxT( "This doesn't look like a valid encrypted "
"iHP firmware - reason: Checksum mismatch!" ),_("iriver_decode")); "iHP firmware - reason: Checksum mismatch!" ),wxT("iriver_decode"));
infile.Close(); infile.Close();
outfile.Close(); outfile.Close();
return -1; return -1;
@ -367,8 +367,8 @@ int iriver_decode(wxString infile_name, wxString outfile_name, unsigned int modi
if( fp != dwLength3 ) if( fp != dwLength3 )
{ {
ERR_DIALOG(_( "This doesn't look like a valid encrypted " ERR_DIALOG(wxT( "This doesn't look like a valid encrypted "
"iHP firmware - reason: 'length3' mismatch\n" ),_("iriver_decode")); "iHP firmware - reason: 'length3' mismatch\n" ),wxT("iriver_decode"));
infile.Close(); infile.Close();
outfile.Close(); outfile.Close();
return -1; return -1;
@ -419,22 +419,22 @@ int iriver_encode(wxString infile_name, wxString outfile_name, unsigned int modi
if(!infile.Open(infile_name,wxFile::read)) if(!infile.Open(infile_name,wxFile::read))
{ {
err.Printf("Could not open: %s",infile_name.c_str()); err.Printf(wxT("Could not open: %s"),infile_name.c_str());
ERR_DIALOG(err, _("iriver_decode")); ERR_DIALOG(err, wxT("iriver_decode"));
return -1; return -1;
} }
if(!outfile.Open(outfile_name,wxFile::write)) if(!outfile.Open(outfile_name,wxFile::write))
{ {
err.Printf("Could not open: %s",outfile_name.c_str()); err.Printf(wxT("Could not open: %s"),outfile_name.c_str());
ERR_DIALOG(err, _("iriver_decode")); ERR_DIALOG(err, wxT("iriver_decode"));
return -1; return -1;
} }
lenread = infile.Read( headerdata, 512 ); lenread = infile.Read( headerdata, 512 );
if( lenread != 512 ) if( lenread != 512 )
{ {
ERR_DIALOG("This doesn't look like a valid decoded " ERR_DIALOG(wxT("This doesn't look like a valid decoded "
"iHP firmware - reason: header length\n", _("iriver_decode")); "iHP firmware - reason: header length\n"), wxT("iriver_decode"));
infile.Close(); infile.Close();
outfile.Close(); outfile.Close();
}; };
@ -447,8 +447,8 @@ int iriver_encode(wxString infile_name, wxString outfile_name, unsigned int modi
i = testheader( headerdata ); i = testheader( headerdata );
if( i == -1 ) if( i == -1 )
{ {
ERR_DIALOG("This firmware is for an unknown model, or is not" ERR_DIALOG(wxT("This firmware is for an unknown model, or is not"
" a valid decoded iHP firmware\n", _("iriver_decode")); " a valid decoded iHP firmware\n"), wxT("iriver_decode"));
infile.Close(); infile.Close();
outfile.Close(); outfile.Close();
}; };
@ -468,8 +468,8 @@ int iriver_encode(wxString infile_name, wxString outfile_name, unsigned int modi
dwLength3 > dwLength1 || dwLength3 > dwLength1 ||
dwLength2+dwLength3+512 != dwLength1 ) dwLength2+dwLength3+512 != dwLength1 )
{ {
ERR_DIALOG("This doesn't look like a valid decoded iHP" ERR_DIALOG(wxT("This doesn't look like a valid decoded iHP"
" firmware - reason: file 'length' data\n", _("iriver_decode")); " firmware - reason: file 'length' data\n"), wxT("iriver_decode"));
infile.Close(); infile.Close();
outfile.Close(); outfile.Close();
}; };
@ -506,8 +506,8 @@ int iriver_encode(wxString infile_name, wxString outfile_name, unsigned int modi
if( fp != dwLength2 ) if( fp != dwLength2 )
{ {
ERR_DIALOG("This doesn't look like a valid decoded " ERR_DIALOG(wxT("This doesn't look like a valid decoded "
"iHP firmware - reason: 'length1' mismatch\n", _("iriver_decode")); "iHP firmware - reason: 'length1' mismatch\n"), wxT("iriver_decode"));
infile.Close(); infile.Close();
outfile.Close(); outfile.Close();
}; };
@ -526,8 +526,8 @@ int iriver_encode(wxString infile_name, wxString outfile_name, unsigned int modi
if( fp != dwLength3 ) if( fp != dwLength3 )
{ {
ERR_DIALOG("This doesn't look like a valid decoded " ERR_DIALOG(wxT("This doesn't look like a valid decoded "
"iHP firmware - reason: 'length2' mismatch\n", _("iriver_decode")); "iHP firmware - reason: 'length2' mismatch\n"), wxT("iriver_decode"));
infile.Close(); infile.Close();
outfile.Close(); outfile.Close();
}; };
@ -565,30 +565,30 @@ bool PatchFirmware(wxString firmware,wxString bootloader,int series, int table_e
break; break;
} }
name1.Printf("%s" PATH_SEP "download" PATH_SEP "firmware.bin", name1.Printf(wxT("%s" PATH_SEP "download" PATH_SEP "firmware.bin"),
gv->stdpaths->GetUserDataDir().c_str()); gv->stdpaths->GetUserDataDir().c_str());
/* descrambled file */ /* descrambled file */
name2.Printf("%s" PATH_SEP "download" PATH_SEP "new.bin", name2.Printf(wxT("%s" PATH_SEP "download" PATH_SEP "new.bin"),
gv->stdpaths->GetUserDataDir().c_str()); gv->stdpaths->GetUserDataDir().c_str());
/* patched file */ /* patched file */
name3.Printf("%s" PATH_SEP "download" PATH_SEP "new.hex", name3.Printf(wxT("%s" PATH_SEP "download" PATH_SEP "new.hex"),
gv->stdpaths->GetUserDataDir().c_str()); gv->stdpaths->GetUserDataDir().c_str());
if (iriver_decode(firmware, name1, FALSE, STRIP_NONE) == -1) { if (iriver_decode(firmware, name1, FALSE, STRIP_NONE) == -1) {
ERR_DIALOG("Error in descramble", _("Descramble Firmware")); ERR_DIALOG(wxT("Error in descramble"), wxT("Descramble Firmware"));
wxRemoveFile(name1); wxRemoveFile(name1);
wxRemoveFile(name2); wxRemoveFile(name2);
wxRemoveFile(name3); wxRemoveFile(name3);
return false; return false;
} }
if (!mkboot(name1, name2, bootloader, origin)) { if (!mkboot(name1, name2, bootloader, origin)) {
ERR_DIALOG("Error in patching",_("Patching Firmware")); ERR_DIALOG(wxT("Error in patching"),wxT("Patching Firmware"));
wxRemoveFile(name1); wxRemoveFile(name1);
wxRemoveFile(name2); wxRemoveFile(name2);
wxRemoveFile(name3); wxRemoveFile(name3);
return false; return false;
} }
if (iriver_encode(name2, name3, FALSE) == -1) { if (iriver_encode(name2, name3, FALSE) == -1) {
ERR_DIALOG("Error in scramble",_("Scramble Firmware")); ERR_DIALOG(wxT("Error in scramble"),wxT("Scramble Firmware"));
wxRemoveFile(name1); wxRemoveFile(name1);
wxRemoveFile(name2); wxRemoveFile(name2);
wxRemoveFile(name3); wxRemoveFile(name3);
@ -596,7 +596,7 @@ bool PatchFirmware(wxString firmware,wxString bootloader,int series, int table_e
} }
/* now md5sum it */ /* now md5sum it */
if (!FileMD5(name3, &md5sum_str)) { if (!FileMD5(name3, &md5sum_str)) {
ERR_DIALOG("Error in checksumming",_("Checksumming Firmware")); ERR_DIALOG(wxT("Error in checksumming"),wxT("Checksumming Firmware"));
wxRemoveFile(name1); wxRemoveFile(name1);
wxRemoveFile(name2); wxRemoveFile(name2);
wxRemoveFile(name3); wxRemoveFile(name3);

View file

@ -1,8 +1,8 @@
#define RBUTIL 1 #define RBUTIL 1
#include <wx/msw/wx.rc> #include <wx/msw/wx.rc>
RBUTIL VERSIONINFO RBUTIL VERSIONINFO
FILEVERSION 0,2,1,1 FILEVERSION 0,3,0,0
PRODUCTVERSION 0,2,1,1 PRODUCTVERSION 0,3,0,0
FILEOS 0x00000004 FILEOS 0x00000004
FILETYPE 0x00000001 FILETYPE 0x00000001
BEGIN BEGIN
@ -10,12 +10,12 @@ BEGIN
BEGIN BEGIN
BLOCK "FFFF0000" BLOCK "FFFF0000"
BEGIN BEGIN
VALUE "FileVersion", "0.2.1.1\0" VALUE "FileVersion", "0.3.0.0\0"
VALUE "ProductVersion", "0.2.1.1\0" VALUE "ProductVersion", "0.3.0.0\0"
VALUE "CompanyName", "Rockbox Team\0" VALUE "CompanyName", "Rockbox Team\0"
VALUE "FileDescription", "Rockbox Utility\0" VALUE "FileDescription", "Rockbox Utility\0"
VALUE "InternalName", "rbutil\0" VALUE "InternalName", "rbutil\0"
VALUE "LegalCopyright", "(C) 2005,6 Rockbox Team\0" VALUE "LegalCopyright", "(C) 2005 - 2007 Rockbox Team\0"
VALUE "ProductName", "Rockbox Utility\0" VALUE "ProductName", "Rockbox Utility\0"
END END
END END

View file

@ -82,6 +82,10 @@
<Add library="oleaut32" /> <Add library="oleaut32" />
<Add library="uuid" /> <Add library="uuid" />
<Add library="libwxzlib" /> <Add library="libwxzlib" />
<Add library="libwxregex" />
<Add library="libwxpng" />
<Add library="libwxjpeg" />
<Add library="libwxtiff" />
<Add directory="$(#WX.lib)\gcc_lib$(WX_CFG)" /> <Add directory="$(#WX.lib)\gcc_lib$(WX_CFG)" />
<Add directory="$(#WX.lib)" /> <Add directory="$(#WX.lib)" />
<Add directory=".\" /> <Add directory=".\" />
@ -127,8 +131,10 @@
<Unit filename="rbutilFrm.cpp" /> <Unit filename="rbutilFrm.cpp" />
<Unit filename="rbutilFrm.h" /> <Unit filename="rbutilFrm.h" />
<Unit filename="rbutilFrm_XPM.xpm" /> <Unit filename="rbutilFrm_XPM.xpm" />
<Unit filename="themes_3d.xpm" />
<Unit filename="tools2_3d.xpm" /> <Unit filename="tools2_3d.xpm" />
<Unit filename="uninstall_3d.xpm" /> <Unit filename="uninstall_3d.xpm" />
<Unit filename="untools2_3d.xpm" />
<Unit filename="wizard.xpm" /> <Unit filename="wizard.xpm" />
<Unit filename="wizard_pages.cpp" /> <Unit filename="wizard_pages.cpp" />
<Unit filename="wizard_pages.h" /> <Unit filename="wizard_pages.h" />

View file

@ -58,15 +58,70 @@ const wxChar* _rootmatch[] = {
const wxArrayString* rootmatch = new wxArrayString( const wxArrayString* rootmatch = new wxArrayString(
(size_t) (sizeof(_rootmatch) / sizeof(wxChar*)), _rootmatch); (size_t) (sizeof(_rootmatch) / sizeof(wxChar*)), _rootmatch);
bool InstallTheme(wxString Themesrc)
{
wxString dest,src,err;
int pos = Themesrc.Find('/',true);
wxString themename = Themesrc.SubString(pos+1,Themesrc.Length());
src.Printf(wxT("%s/%s"), gv->themes_url.c_str(),Themesrc.c_str());
dest.Printf(wxT("%s" PATH_SEP "download" PATH_SEP "%s"),
gv->stdpaths->GetUserDataDir().c_str(),themename.c_str());
if( DownloadURL(src, dest) )
{
wxRemoveFile(dest);
err.Printf(wxT("Unable to download %s"), src.c_str() );
ERR_DIALOG(err, wxT("Install Theme"));
return false;
}
if(!checkZip(dest))
{
err.Printf(wxT("The Zip %s does not contain the correct dir structure"), dest.c_str());
ERR_DIALOG(err, wxT("Install Theme"));
return false;
}
if(UnzipFile(dest,gv->curdestdir, true))
{
err.Printf(wxT("Unable to unzip %s to %s"), dest.c_str(), gv->curdestdir.c_str());
ERR_DIALOG(err, wxT("Install Theme"));
return false;
}
return true;
}
bool checkZip(wxString zipname)
{
wxZipEntryPtr entry;
wxFFileInputStream* in_file = new wxFFileInputStream(zipname);
wxZipInputStream* in_zip = new wxZipInputStream(*in_file);
entry.reset(in_zip->GetNextEntry());
wxString name = entry->GetName();
if(entry->IsDir())
{
if(name.Contains(wxT(".rockbox\\")))
{
return true;
}
}
return false;
}
int DownloadURL(wxString src, wxString dest) int DownloadURL(wxString src, wxString dest)
{ {
int input, errnum = 0, success = false; int input, errnum = 0, success = false;
wxString buf, errstr; wxString buf, errstr;
wxLogVerbose(_("=== begin DownloadURL(%s,%s)"), src.c_str(), wxLogVerbose(wxT("=== begin DownloadURL(%s,%s)"), src.c_str(),
dest.c_str()); dest.c_str());
buf.Printf(_("Fetching %s"), src.c_str()); buf.Printf(wxT("Fetching %s"), src.c_str());
wxProgressDialog* progress = new wxProgressDialog(_("Downloading"), wxProgressDialog* progress = new wxProgressDialog(wxT("Downloading"),
buf, 100, NULL, wxPD_APP_MODAL | buf, 100, NULL, wxPD_APP_MODAL |
wxPD_AUTO_HIDE | wxPD_SMOOTH | wxPD_ELAPSED_TIME | wxPD_AUTO_HIDE | wxPD_SMOOTH | wxPD_ELAPSED_TIME |
wxPD_REMAINING_TIME | wxPD_CAN_ABORT); wxPD_REMAINING_TIME | wxPD_CAN_ABORT);
@ -105,7 +160,7 @@ int DownloadURL(wxString src, wxString dest)
current += os->LastWrite(); current += os->LastWrite();
if (!progress->Update(current * 100 / filesize)) if (!progress->Update(current * 100 / filesize))
{ {
errstr = _("Download aborted by user"); errstr = wxT("Download aborted by user");
errnum = 1000; errnum = 1000;
break; break;
} }
@ -113,7 +168,7 @@ int DownloadURL(wxString src, wxString dest)
} else } else
{ {
errnum = os->GetLastError(); errnum = os->GetLastError();
errstr.Printf(_("Can't write to output stream (%s)"), errstr.Printf(wxT("Can't write to output stream (%s)"),
stream_err_str(errnum).c_str() ); stream_err_str(errnum).c_str() );
break; break;
@ -127,7 +182,7 @@ int DownloadURL(wxString src, wxString dest)
errnum = 0; errnum = 0;
break; break;
} }
errstr.Printf(_("Can't read from input stream (%s)"), errstr.Printf(wxT("Can't read from input stream (%s)"),
stream_err_str(errnum).c_str() ); stream_err_str(errnum).c_str() );
} }
} }
@ -136,7 +191,7 @@ int DownloadURL(wxString src, wxString dest)
if (! errnum) if (! errnum)
{ {
errnum = os->GetLastError(); errnum = os->GetLastError();
errstr.Printf(_("Can't close output file (%s)"), errstr.Printf(wxT("Can't close output file (%s)"),
stream_err_str(errnum).c_str() ); stream_err_str(errnum).c_str() );
input = false; input = false;
@ -147,26 +202,26 @@ int DownloadURL(wxString src, wxString dest)
} else } else
{ {
errnum = is->GetLastError(); errnum = is->GetLastError();
errstr.Printf(_("Can't get input stream size (%s)"), errstr.Printf(wxT("Can't get input stream size (%s)"),
stream_err_str(errnum).c_str() ); stream_err_str(errnum).c_str() );
} }
} else } else
{ {
errnum = in_http->GetError(); errnum = in_http->GetError();
errstr.Printf(_("Can't get input stream (%d)"), errnum); errstr.Printf(wxT("Can't get input stream (%d)"), errnum);
} }
delete is; delete is;
} else } else
{ {
errnum = os->GetLastError(); errnum = os->GetLastError();
errstr.Printf(_("Can't create output stream (%s)"), errstr.Printf(wxT("Can't create output stream (%s)"),
stream_err_str(errnum).c_str() ); stream_err_str(errnum).c_str() );
} }
delete os; delete os;
} else } else
{ {
errstr.Printf(_("Can't open URL %s (%d)"), src.c_str(), errstr.Printf(wxT("Can't open URL %s (%d)"), src.c_str(),
in_http->GetError() ); in_http->GetError() );
errnum = 100; errnum = 100;
} }
@ -179,19 +234,19 @@ int DownloadURL(wxString src, wxString dest)
if (errnum == 0) errnum = 999; if (errnum == 0) errnum = 999;
if (input) if (input)
{ {
buf.Printf(_("%s reading\n%s"), buf.Printf(wxT("%s reading\n%s"),
errstr.c_str(), src.c_str()); errstr.c_str(), src.c_str());
ERR_DIALOG(buf, _("Download URL")); ERR_DIALOG(buf, wxT("Download URL"));
} else } else
{ {
buf.Printf(_("%s writing to download\n/%s"), buf.Printf(wxT("%s writing to download\n/%s"),
errstr.c_str(), dest.c_str()); errstr.c_str(), dest.c_str());
ERR_DIALOG(buf, _("Download URL")); ERR_DIALOG(buf, wxT("Download URL"));
} }
} }
wxLogVerbose(_("=== end DownloadURL")); wxLogVerbose(wxT("=== end DownloadURL"));
return errnum; return errnum;
} }
@ -202,7 +257,7 @@ int UnzipFile(wxString src, wxString destdir, bool isInstall)
int errnum = 0, curfile = 0, totalfiles = 0; int errnum = 0, curfile = 0, totalfiles = 0;
InstallLog* log = NULL; InstallLog* log = NULL;
wxLogVerbose(_("===begin UnzipFile(%s,%s,%i)"), wxLogVerbose(wxT("===begin UnzipFile(%s,%s,%i)"),
src.c_str(), destdir.c_str(), isInstall); src.c_str(), destdir.c_str(), isInstall);
wxFFileInputStream* in_file = new wxFFileInputStream(src); wxFFileInputStream* in_file = new wxFFileInputStream(src);
@ -212,9 +267,9 @@ int UnzipFile(wxString src, wxString destdir, bool isInstall)
if (! in_zip->IsOk() ) if (! in_zip->IsOk() )
{ {
errnum = in_zip->GetLastError(); errnum = in_zip->GetLastError();
buf.Printf(_("Can't open ZIP stream %s for reading (%s)"), buf.Printf(wxT("Can't open ZIP stream %s for reading (%s)"),
src.c_str(), stream_err_str(errnum).c_str() ); src.c_str(), stream_err_str(errnum).c_str() );
ERR_DIALOG(buf, _("Unzip File") ); ERR_DIALOG(buf, wxT("Unzip File") );
delete in_zip; delete in_zip;
delete in_file; delete in_file;
return true; return true;
@ -224,9 +279,9 @@ int UnzipFile(wxString src, wxString destdir, bool isInstall)
if (! in_zip->IsOk() ) if (! in_zip->IsOk() )
{ {
errnum = in_zip->GetLastError(); errnum = in_zip->GetLastError();
buf.Printf(_("Error Getting total ZIP entries for %s (%s)"), buf.Printf(wxT("Error Getting total ZIP entries for %s (%s)"),
src.c_str(), stream_err_str(errnum).c_str() ); src.c_str(), stream_err_str(errnum).c_str() );
ERR_DIALOG(buf, _("Unzip File") ); ERR_DIALOG(buf, wxT("Unzip File") );
delete in_zip; delete in_zip;
delete in_file; delete in_file;
return true; return true;
@ -234,16 +289,16 @@ int UnzipFile(wxString src, wxString destdir, bool isInstall)
} else } else
{ {
errnum = in_file->GetLastError(); errnum = in_file->GetLastError();
buf.Printf(_("Can't open %s (%s)"), src.c_str(), buf.Printf(wxT("Can't open %s (%s)"), src.c_str(),
stream_err_str(errnum).c_str() ); stream_err_str(errnum).c_str() );
ERR_DIALOG(buf, _("Unzip File") ); ERR_DIALOG(buf, wxT("Unzip File") );
delete in_zip; delete in_zip;
delete in_file; delete in_file;
return true; return true;
} }
wxProgressDialog* progress = new wxProgressDialog(_("Unpacking archive"), wxProgressDialog* progress = new wxProgressDialog(wxT("Unpacking archive"),
_("Preparing to unpack the downloaded files to your audio" wxT("Preparing to unpack the downloaded files to your audio"
"device"), totalfiles, NULL, wxPD_APP_MODAL | "device"), totalfiles, NULL, wxPD_APP_MODAL |
wxPD_AUTO_HIDE | wxPD_SMOOTH | wxPD_ELAPSED_TIME | wxPD_AUTO_HIDE | wxPD_SMOOTH | wxPD_ELAPSED_TIME |
wxPD_REMAINING_TIME | wxPD_CAN_ABORT); wxPD_REMAINING_TIME | wxPD_CAN_ABORT);
@ -262,9 +317,9 @@ int UnzipFile(wxString src, wxString destdir, bool isInstall)
curfile++; curfile++;
wxString name = entry->GetName(); wxString name = entry->GetName();
progress_msg.Printf(_("Unpacking %s"), name.c_str()); progress_msg.Printf(wxT("Unpacking %s"), name.c_str());
if (! progress->Update(curfile, progress_msg) ) { if (! progress->Update(curfile, progress_msg) ) {
buf.Printf(_("Unpacking cancelled by user")); buf.Printf(wxT("Unpacking cancelled by user"));
MESG_DIALOG(buf); MESG_DIALOG(buf);
errnum = 1000; errnum = 1000;
break; break;
@ -275,7 +330,7 @@ int UnzipFile(wxString src, wxString destdir, bool isInstall)
if (entry->IsDir() ) { if (entry->IsDir() ) {
if (!wxDirExists(in_str) ) { if (!wxDirExists(in_str) ) {
if (! wxMkdir(in_str, 0777) ) { if (! wxMkdir(in_str, 0777) ) {
buf.Printf(_("Unable to create directory %s"), buf.Printf(wxT("Unable to create directory %s"),
in_str.c_str() ); in_str.c_str() );
errnum = 100; errnum = 100;
break; break;
@ -288,7 +343,7 @@ int UnzipFile(wxString src, wxString destdir, bool isInstall)
wxFFileOutputStream* out = new wxFFileOutputStream(in_str); wxFFileOutputStream* out = new wxFFileOutputStream(in_str);
if (! out->IsOk() ) if (! out->IsOk() )
{ {
buf.Printf(_("Can't open file %s for writing"), in_str.c_str() ); buf.Printf(wxT("Can't open file %s for writing"), in_str.c_str() );
delete out; delete out;
return 100; return 100;
} else if (isInstall) } else if (isInstall)
@ -298,19 +353,19 @@ int UnzipFile(wxString src, wxString destdir, bool isInstall)
in_zip->Read(*out); in_zip->Read(*out);
if (! out->IsOk()) { if (! out->IsOk()) {
buf.Printf(_("Can't write to %s (%d)"), in_str.c_str(), buf.Printf(wxT("Can't write to %s (%d)"), in_str.c_str(),
errnum = out->GetLastError() ); errnum = out->GetLastError() );
} }
if (!in_zip->IsOk() && ! in_file->GetLastError() == wxSTREAM_EOF) if (!in_zip->IsOk() && ! in_file->GetLastError() == wxSTREAM_EOF)
{ {
buf.Printf(_("Can't read from %s (%d)"), src.c_str(), buf.Printf(wxT("Can't read from %s (%d)"), src.c_str(),
errnum = in_file->GetLastError() ); errnum = in_file->GetLastError() );
} }
if (! out->Close() && errnum == 0) if (! out->Close() && errnum == 0)
{ {
buf.Printf(_("Unable to close %s (%d)"), in_str.c_str(), buf.Printf(wxT("Unable to close %s (%d)"), in_str.c_str(),
errnum = out->GetLastError() ); errnum = out->GetLastError() );
} }
@ -323,11 +378,11 @@ int UnzipFile(wxString src, wxString destdir, bool isInstall)
if (errnum) if (errnum)
{ {
ERR_DIALOG(buf, _("Unzip File")); ERR_DIALOG(buf, wxT("Unzip File"));
} }
if (log) delete log; if (log) delete log;
wxLogVerbose(_("=== end UnzipFile")); wxLogVerbose(wxT("=== end UnzipFile"));
return(errnum); return(errnum);
} }
@ -339,10 +394,10 @@ int Uninstall(const wxString dir, bool isFullUninstall) {
InstallLog *log = NULL; InstallLog *log = NULL;
wxArrayString* FilesToRemove = NULL; wxArrayString* FilesToRemove = NULL;
wxLogVerbose(_("=== begin Uninstall(%s,%i)"), dir.c_str(), isFullUninstall); wxLogVerbose(wxT("=== begin Uninstall(%s,%i)"), dir.c_str(), isFullUninstall);
wxProgressDialog* progress = new wxProgressDialog(_("Uninstalling"), wxProgressDialog* progress = new wxProgressDialog(wxT("Uninstalling"),
_("Reading uninstall data from jukebox"), 100, NULL, wxT("Reading uninstall data from jukebox"), 100, NULL,
wxPD_APP_MODAL | wxPD_AUTO_HIDE | wxPD_SMOOTH | wxPD_APP_MODAL | wxPD_AUTO_HIDE | wxPD_SMOOTH |
wxPD_ELAPSED_TIME | wxPD_REMAINING_TIME | wxPD_CAN_ABORT); wxPD_ELAPSED_TIME | wxPD_REMAINING_TIME | wxPD_CAN_ABORT);
progress->Update(0); progress->Update(0);
@ -358,19 +413,19 @@ int Uninstall(const wxString dir, bool isFullUninstall) {
if (FilesToRemove == NULL || FilesToRemove->GetCount() < 1) { if (FilesToRemove == NULL || FilesToRemove->GetCount() < 1) {
wxLogNull lognull; wxLogNull lognull;
if ( wxMessageDialog(NULL, if ( wxMessageDialog(NULL,
_("Rockbox Utility can't find any uninstall data on this " wxT("Rockbox Utility can't find any uninstall data on this "
"jukebox.\n" "jukebox.\n"
"Would you like to attempt a full uninstall?\n" "Would you like to attempt a full uninstall?\n"
"(WARNING: A full uninstall removes all files in your Rockbox " "(WARNING: A full uninstall removes all files in your Rockbox "
"folder)"), "folder)"),
_("Standard uninstall not possible"), wxT("Standard uninstall not possible"),
wxICON_EXCLAMATION | wxYES_NO | wxNO_DEFAULT).ShowModal() wxICON_EXCLAMATION | wxYES_NO | wxNO_DEFAULT).ShowModal()
== wxID_YES) == wxID_YES)
{ {
isFullUninstall = true; isFullUninstall = true;
} }
else { else {
MESG_DIALOG(_("Uninstall cancelled by user")); MESG_DIALOG(wxT("Uninstall cancelled by user"));
delete progress; delete progress;
return 1000; return 1000;
} }
@ -382,8 +437,8 @@ int Uninstall(const wxString dir, bool isFullUninstall) {
buf.Printf(wxT("%s" PATH_SEP ".rockbox"), dir.c_str()); buf.Printf(wxT("%s" PATH_SEP ".rockbox"), dir.c_str());
if (rm_rf(buf) ) if (rm_rf(buf) )
{ {
WARN_DIALOG(_("Unable to completely remove Rockbox directory"), WARN_DIALOG(wxT("Unable to completely remove Rockbox directory"),
_("Full uninstall") ); wxT("Full uninstall") );
errflag = true; errflag = true;
} }
@ -413,8 +468,8 @@ int Uninstall(const wxString dir, bool isFullUninstall) {
{ {
if (! wxRemoveFile((*special)[i]) ) if (! wxRemoveFile((*special)[i]) )
{ {
buf.Printf(_("Can't delete %s"), (*special)[i].c_str()); buf.Printf(wxT("Can't delete %s"), (*special)[i].c_str());
WARN_DIALOG(buf.c_str(), _("Full uninstall")); WARN_DIALOG(buf.c_str(), wxT("Full uninstall"));
errflag = true; errflag = true;
} }
} }
@ -441,11 +496,11 @@ int Uninstall(const wxString dir, bool isFullUninstall) {
wxString* buf2 = new wxString; wxString* buf2 = new wxString;
buf.Printf("%s%s", dir.c_str() , FilesToRemove->Item(i).c_str() ); buf.Printf("%s%s", dir.c_str() , FilesToRemove->Item(i).c_str() );
buf2->Format(_("Deleting %s"), buf.c_str()); buf2->Format(wxT("Deleting %s"), buf.c_str());
if (! progress->Update((i + 1) * 100 / totalfiles, *buf2) ) if (! progress->Update((i + 1) * 100 / totalfiles, *buf2) )
{ {
WARN_DIALOG(_("Cancelled by user"), _("Normal Uninstall")); WARN_DIALOG(wxT("Cancelled by user"), wxT("Normal Uninstall"));
delete progress; delete progress;
return true; return true;
} }
@ -463,41 +518,41 @@ int Uninstall(const wxString dir, bool isFullUninstall) {
if ( rc = ! wxRmdir(buf) ) if ( rc = ! wxRmdir(buf) )
{ {
buf = buf.Format(_("Can't remove directory %s"), buf = buf.Format(wxT("Can't remove directory %s"),
buf.c_str()); buf.c_str());
errflag = true; errflag = true;
WARN_DIALOG(buf.c_str(), _("Standard uninstall")); WARN_DIALOG(buf.c_str(), wxT("Standard uninstall"));
} }
} else if (wxFileExists(buf) ) } else if (wxFileExists(buf) )
{ {
if ( rc = ! wxRemoveFile(buf) ) if ( rc = ! wxRemoveFile(buf) )
{ {
buf = buf.Format(_("Can't delete file %s"), buf = buf.Format(wxT("Can't delete file %s"),
buf.c_str()); buf.c_str());
errflag = true; errflag = true;
WARN_DIALOG(buf.c_str(), _("Standard uninstall")); WARN_DIALOG(buf.c_str(), wxT("Standard uninstall"));
} }
} else } else
{ {
errflag = true; errflag = true;
buf = buf.Format(_("Can't find file or directory %s"), buf = buf.Format(wxT("Can't find file or directory %s"),
buf.c_str() ); buf.c_str() );
WARN_DIALOG(buf.c_str(), _("Standard uninstall") ); WARN_DIALOG(buf.c_str(), wxT("Standard uninstall") );
} }
uninst = uninst.AfterFirst('\n'); uninst = uninst.AfterFirst('\n');
} }
if (errflag) if (errflag)
{ {
ERR_DIALOG(_("Unable to remove some files"), ERR_DIALOG(wxT("Unable to remove some files"),
_("Standard uninstall")) ; wxT("Standard uninstall")) ;
} }
if (FilesToRemove != NULL) delete FilesToRemove; if (FilesToRemove != NULL) delete FilesToRemove;
} }
delete progress; delete progress;
wxLogVerbose(_("=== end Uninstall")); wxLogVerbose(wxT("=== end Uninstall"));
return errflag; return errflag;
} }
@ -553,8 +608,8 @@ bool InstallRbutil(wxString dest)
if (! wxMkdir(destdir, 0777) ) if (! wxMkdir(destdir, 0777) )
{ {
buf.Printf(wxT("%s (%s)"), buf.Printf(wxT("%s (%s)"),
_("Unable to create directory for installer"), destdir.c_str()); wxT("Unable to create directory for installer"), destdir.c_str());
WARN_DIALOG(buf , _("Portable install") ); WARN_DIALOG(buf , wxT("Portable install") );
return false; return false;
} }
log->WriteFile(wxT("RockboxUtility"), true); log->WriteFile(wxT("RockboxUtility"), true);
@ -564,7 +619,7 @@ bool InstallRbutil(wxString dest)
wxDIR_FILES); wxDIR_FILES);
if (filestocopy.GetCount() < 1) if (filestocopy.GetCount() < 1)
{ {
WARN_DIALOG(_("No files to copy"), _("Portable install") ); WARN_DIALOG(wxT("No files to copy"), wxT("Portable install") );
return false; return false;
} }
@ -581,8 +636,8 @@ bool InstallRbutil(wxString dest)
if (! wxCopyFile(filestocopy[i], dstr) ) if (! wxCopyFile(filestocopy[i], dstr) )
{ {
buf.Printf(wxT("%s (%s -> %s)"), buf.Printf(wxT("%s (%s -> %s)"),
_("Error copying file"), filestocopy[i].c_str(), dstr.c_str()); wxT("Error copying file"), filestocopy[i].c_str(), dstr.c_str());
WARN_DIALOG(buf, _("Portable Install") ); WARN_DIALOG(buf, wxT("Portable Install") );
return false; return false;
} }
buf = dstr; buf = dstr;
@ -599,7 +654,7 @@ bool InstallRbutil(wxString dest)
{ {
buf.Printf(wxT("Can't copy program binary %s -> %s"), buf.Printf(wxT("Can't copy program binary %s -> %s"),
str.c_str(), dstr.c_str() ); str.c_str(), dstr.c_str() );
WARN_DIALOG(buf, _("Portable Install") ); WARN_DIALOG(buf, wxT("Portable Install") );
return false; return false;
} }
buf = dstr; buf = dstr;
@ -613,9 +668,9 @@ bool InstallRbutil(wxString dest)
if (! wxCopyFile(gv->UserConfigFile, dstr) ) if (! wxCopyFile(gv->UserConfigFile, dstr) )
{ {
buf.Printf(wxT("%s (%s -> %s)"), buf.Printf(wxT("%s (%s -> %s)"),
_("Unable to install user config file"), gv->UserConfigFile.c_str(), wxT("Unable to install user config file"), gv->UserConfigFile.c_str(),
dstr.c_str() ); dstr.c_str() );
WARN_DIALOG(buf, _("Portable Install") ); WARN_DIALOG(buf, wxT("Portable Install") );
return false; return false;
} }
buf = dstr; buf = dstr;
@ -628,7 +683,7 @@ bool InstallRbutil(wxString dest)
bool rm_rf(wxString file) bool rm_rf(wxString file)
{ {
wxLogVerbose(_("=== begin rm-rf(%s)"), file.c_str() ); wxLogVerbose(wxT("=== begin rm-rf(%s)"), file.c_str() );
wxString buf; wxString buf;
wxArrayString selected; wxArrayString selected;
@ -649,8 +704,8 @@ bool rm_rf(wxString file)
selected.Sort(true); selected.Sort(true);
selected.Add(file); selected.Add(file);
wxProgressDialog* progress = new wxProgressDialog(_("Removing files"), wxProgressDialog* progress = new wxProgressDialog(wxT("Removing files"),
_("Deleting files"), selected.GetCount(), NULL, wxT("Deleting files"), selected.GetCount(), NULL,
wxPD_APP_MODAL | wxPD_AUTO_HIDE | wxPD_SMOOTH | wxPD_APP_MODAL | wxPD_AUTO_HIDE | wxPD_SMOOTH |
wxPD_ELAPSED_TIME | wxPD_REMAINING_TIME | wxPD_CAN_ABORT); wxPD_ELAPSED_TIME | wxPD_REMAINING_TIME | wxPD_CAN_ABORT);
@ -659,10 +714,10 @@ bool rm_rf(wxString file)
wxLogVerbose(selected[i]); wxLogVerbose(selected[i]);
if (progress != NULL) if (progress != NULL)
{ {
buf.Printf(_("Deleting %s"), selected[i].c_str() ); buf.Printf(wxT("Deleting %s"), selected[i].c_str() );
if (! progress->Update(i, buf)) if (! progress->Update(i, buf))
{ {
WARN_DIALOG(_("Cancelled by user"), _("Erase Files")); WARN_DIALOG(wxT("Cancelled by user"), wxT("Erase Files"));
delete progress; delete progress;
return true; return true;
} }
@ -672,27 +727,27 @@ bool rm_rf(wxString file)
{ {
if (rc = ! wxRmdir(selected[i]) ) if (rc = ! wxRmdir(selected[i]) )
{ {
buf.Printf(_("Can't remove directory %s"), buf.Printf(wxT("Can't remove directory %s"),
selected[i].c_str()); selected[i].c_str());
errflag = true; errflag = true;
WARN_DIALOG(buf.c_str(), _("Erase files")); WARN_DIALOG(buf.c_str(), wxT("Erase files"));
} }
} else if (rc = ! wxRemoveFile(selected[i]) ) } else if (rc = ! wxRemoveFile(selected[i]) )
{ {
buf.Printf(_("Error deleting file %s"), selected[i].c_str() ); buf.Printf(wxT("Error deleting file %s"), selected[i].c_str() );
errflag = true; errflag = true;
WARN_DIALOG(buf.c_str(),_("Erase files")); WARN_DIALOG(buf.c_str(),wxT("Erase files"));
} }
} }
delete progress; delete progress;
} else } else
{ {
buf.Printf(_("Can't find expected file %s"), file.c_str()); buf.Printf(wxT("Can't find expected file %s"), file.c_str());
WARN_DIALOG(buf.c_str(), _("Erase files")); WARN_DIALOG(buf.c_str(), wxT("Erase files"));
return true; return true;
} }
wxLogVerbose(_("=== end rm-rf")); wxLogVerbose(wxT("=== end rm-rf"));
return rc ? true : false; return rc ? true : false;
} }

View file

@ -90,6 +90,7 @@ public:
wxArrayString plat_bootloadername; wxArrayString plat_bootloadername;
wxArrayInt plat_autodetect; wxArrayInt plat_autodetect;
wxArrayString plat_combinedname; wxArrayString plat_combinedname;
wxArrayString plat_resolution;
wxString download_url; wxString download_url;
wxString daily_url; wxString daily_url;
wxString bleeding_url; wxString bleeding_url;
@ -98,6 +99,7 @@ public:
wxString last_release; wxString last_release;
wxString prog_name; wxString prog_name;
wxString bootloader_url; wxString bootloader_url;
wxString themes_url;
// User configuration data. // User configuration data.
wxString curplat; wxString curplat;
@ -110,6 +112,8 @@ public:
wxString curbootloadermethod; wxString curbootloadermethod;
wxString curbootloader; wxString curbootloader;
wxString curfirmware; wxString curfirmware;
wxString curresolution;
wxArrayString themesToInstall;
// Global system variables // Global system variables
wxFFile* logfile; wxFFile* logfile;
@ -126,6 +130,8 @@ int DownloadURL(wxString src, wxString dest);
int UnzipFile(wxString src, wxString destdir, bool isInstall = false); int UnzipFile(wxString src, wxString destdir, bool isInstall = false);
int Uninstall(const wxString dir, bool isFullUninstall = false); int Uninstall(const wxString dir, bool isFullUninstall = false);
bool InstallRbutil(wxString dest); bool InstallRbutil(wxString dest);
bool InstallTheme(wxString src);
bool checkZip(wxString zipname);
wxString stream_err_str(int errnum); wxString stream_err_str(int errnum);
bool rm_rf(wxString file); bool rm_rf(wxString file);

View file

@ -7,6 +7,7 @@ font_url=http://www.rockbox.org/daily/fonts/rockbox-fonts-
last_release=2.5 last_release=2.5
prog_name=rockbox prog_name=rockbox
bootloader_url=http://download.rockbox.org/bootloader bootloader_url=http://download.rockbox.org/bootloader
themes_url=http://www.rockbox-themes.org/
[platforms] [platforms]
platform1=player platform1=player
@ -44,6 +45,7 @@ bootloadermethod=
bootloadername= bootloadername=
autodetect=no autodetect=no
combinedname= combinedname=
resolution=11x2x1
[recorder] [recorder]
name=Archos Jukebox Recorder 10, 20 name=Archos Jukebox Recorder 10, 20
@ -54,6 +56,7 @@ bootloadermethod=
bootloadername= bootloadername=
autodetect=no autodetect=no
combinedname= combinedname=
resolution=112x64x1
[recorder8mb] [recorder8mb]
name=Archos Jukebox Recorder 10, 20 (with 8mb memory) name=Archos Jukebox Recorder 10, 20 (with 8mb memory)
@ -64,6 +67,7 @@ bootloadermethod=
bootloadername= bootloadername=
autodetect=no autodetect=no
combinedname= combinedname=
resolution=112x64x1
[recorderv2] [recorderv2]
name=Archos Jukebox Recorder v2 (20GB) name=Archos Jukebox Recorder v2 (20GB)
@ -74,6 +78,7 @@ bootloadermethod=
bootloadername= bootloadername=
autodetect=no autodetect=no
combinedname= combinedname=
resolution=112x64x1
[fmrecorder] [fmrecorder]
name=Archos Jukebox Recorder FM name=Archos Jukebox Recorder FM
@ -84,6 +89,7 @@ bootloadermethod=
bootloadername= bootloadername=
autodetect=no autodetect=no
combinedname= combinedname=
resolution=112x64x1
[fmrecorder8mb] [fmrecorder8mb]
name=Archos Jukebox Recorder FM (with 8mb memory) name=Archos Jukebox Recorder FM (with 8mb memory)
@ -94,6 +100,7 @@ bootloadermethod=
bootloadername= bootloadername=
autodetect=no autodetect=no
combinedname= combinedname=
resolution=112x64x1
[ondiosp] [ondiosp]
name=Archos Ondio SP name=Archos Ondio SP
@ -104,6 +111,7 @@ bootloadermethod=
bootloadername= bootloadername=
autodetect=no autodetect=no
combinedname= combinedname=
resolution=112x64x1
[ondiofm] [ondiofm]
name=Archos Ondio FM name=Archos Ondio FM
@ -114,6 +122,7 @@ bootloadermethod=
bootloadername= bootloadername=
autodetect=no autodetect=no
combinedname= combinedname=
resolution=112x64x1
[h100] [h100]
name=Iriver iHP100, iHP110 name=Iriver iHP100, iHP110
@ -124,6 +133,7 @@ bootloadermethod=fwpatcher
bootloadername=bootloader-h100.bin bootloadername=bootloader-h100.bin
autodetect=no autodetect=no
combinedname= combinedname=
resolution=160x128x2
[h120] [h120]
name=Iriver iHP120, iHP140, H120, H140 name=Iriver iHP120, iHP140, H120, H140
@ -134,6 +144,7 @@ bootloadermethod=fwpatcher
bootloadername=bootloader-h120.bin bootloadername=bootloader-h120.bin
autodetect=no autodetect=no
combinedname= combinedname=
resolution=160x128x2
[h300] [h300]
name=Iriver H320, H340 name=Iriver H320, H340
@ -144,9 +155,10 @@ bootloadermethod=fwpatcher
bootloadername=bootloader-h300.bin bootloadername=bootloader-h300.bin
autodetect=no autodetect=no
combinedname= combinedname=
resolution=220x176x16
[h10_5gbums] [h10_5gbums]
name=Iriver H10 (5GB) UMS name=Iriver H10 (5/6GB) UMS
platform=h10_5gb platform=h10_5gb
released=no released=no
needsbootloader=yes needsbootloader=yes
@ -154,9 +166,10 @@ bootloadermethod=h10
bootloadername=H10.mi4 bootloadername=H10.mi4
autodetect=no autodetect=no
combinedname= combinedname=
resolution=128x128x16
[h10_5gbmtp] [h10_5gbmtp]
name=Iriver H10 (5GB) MTP name=Iriver H10 (5/6GB) MTP
platform=h10_5gb platform=h10_5gb
released=no released=no
needsbootloader=yes needsbootloader=yes
@ -164,6 +177,7 @@ bootloadermethod=h10
bootloadername=H10_5GB-MTP/H10.mi4 bootloadername=H10_5GB-MTP/H10.mi4
autodetect=no autodetect=no
combinedname= combinedname=
resolution=128x128x16
[h10] [h10]
name=Iriver H10 (20GB) name=Iriver H10 (20GB)
@ -174,6 +188,7 @@ bootloadermethod=h10
bootloadername=H10_20GC.mi4 bootloadername=H10_20GC.mi4
autodetect=no autodetect=no
combinedname= combinedname=
resolution=160x128x16
[ipodcolor] [ipodcolor]
name=Apple Ipod Colour/Photo/U2 (4th gen) name=Apple Ipod Colour/Photo/U2 (4th gen)
@ -184,6 +199,7 @@ bootloadermethod=ipodpatcher
bootloadername=none bootloadername=none
autodetect=yes autodetect=yes
combinedname=Ipod mini 1g, mini 2g, 3g, 4g, color, video, nano 1g combinedname=Ipod mini 1g, mini 2g, 3g, 4g, color, video, nano 1g
resolution=220x176x16
[ipodnano] [ipodnano]
name=Apple Ipod Nano (1st gen) name=Apple Ipod Nano (1st gen)
@ -194,6 +210,7 @@ bootloadermethod=ipodpatcher
bootloadername=none bootloadername=none
autodetect=yes autodetect=yes
combinedname=Ipod mini 1g, mini 2g, 3g, 4g, color, video, nano 1g combinedname=Ipod mini 1g, mini 2g, 3g, 4g, color, video, nano 1g
resolution=176x132x16
[ipod4gray] [ipod4gray]
name=Apple Ipod (4th gen, greyscale) name=Apple Ipod (4th gen, greyscale)
@ -204,6 +221,7 @@ bootloadermethod=ipodpatcher
bootloadername=none bootloadername=none
autodetect=yes autodetect=yes
combinedname=Ipod mini 1g, mini 2g, 3g, 4g, color, video, nano 1g combinedname=Ipod mini 1g, mini 2g, 3g, 4g, color, video, nano 1g
resolution=160x128x2
[ipodvideo] [ipodvideo]
name=Apple Ipod Video (5th gen) name=Apple Ipod Video (5th gen)
@ -214,6 +232,7 @@ bootloadermethod=ipodpatcher
bootloadername=none bootloadername=none
autodetect=yes autodetect=yes
combinedname=Ipod mini 1g, mini 2g, 3g, 4g, color, video, nano 1g combinedname=Ipod mini 1g, mini 2g, 3g, 4g, color, video, nano 1g
resolution=320x240x16
[ipod3g] [ipod3g]
name=Apple Ipod (3rd gen) name=Apple Ipod (3rd gen)
@ -224,6 +243,7 @@ bootloadermethod=ipodpatcher
bootloadername=none bootloadername=none
autodetect=yes autodetect=yes
combinedname=Ipod mini 1g, mini 2g, 3g, 4g, color, video, nano 1g combinedname=Ipod mini 1g, mini 2g, 3g, 4g, color, video, nano 1g
resolution=160x128x2
[ipodmini1g] [ipodmini1g]
name=Apple Ipod Mini (1st gen) name=Apple Ipod Mini (1st gen)
@ -234,6 +254,7 @@ bootloadermethod=ipodpatcher
bootloadername=none bootloadername=none
autodetect=yes autodetect=yes
combinedname=Ipod mini 1g, mini 2g, 3g, 4g, color, video, nano 1g combinedname=Ipod mini 1g, mini 2g, 3g, 4g, color, video, nano 1g
resolution=138x110x2
[ipodmini2g] [ipodmini2g]
name=Apple Ipod Mini (2nd gen) name=Apple Ipod Mini (2nd gen)
@ -244,6 +265,7 @@ bootloadermethod=ipodpatcher
bootloadername=none bootloadername=none
autodetect=yes autodetect=yes
combinedname=Ipod mini 1g, mini 2g, 3g, 4g, color, video, nano 1g combinedname=Ipod mini 1g, mini 2g, 3g, 4g, color, video, nano 1g
resolution=138x110x2
[iaudiox5] [iaudiox5]
name=Cowon iAudio X5 , X5L name=Cowon iAudio X5 , X5L
@ -254,6 +276,7 @@ bootloadermethod=iaudio
bootloadername=x5_fw.bin bootloadername=x5_fw.bin
autodetect=no autodetect=no
combinedname= combinedname=
resolution=160x128x16
[iaudiox5v] [iaudiox5v]
name=Cowon iAudio X5V name=Cowon iAudio X5V
@ -264,6 +287,7 @@ bootloadermethod=iaudio
bootloadername=x5v_fw.bin bootloadername=x5v_fw.bin
autodetect=no autodetect=no
combinedname= combinedname=
resolution=160x128x2
[iaudiom5] [iaudiom5]
name=Cowon iAudio M5 , M5L name=Cowon iAudio M5 , M5L
@ -274,6 +298,7 @@ bootloadermethod=iaudio
bootloadername=m5_fw.bin bootloadername=m5_fw.bin
autodetect=no autodetect=no
combinedname= combinedname=
resolution=160x128x16
[gigabeatf] [gigabeatf]
name=Toshiba Gigabeat F , X name=Toshiba Gigabeat F , X
@ -283,3 +308,4 @@ bootloadermethod=gigabeatf
bootloadername=FWIMG01.DAT bootloadername=FWIMG01.DAT
autodetect=no autodetect=no
combinedname= combinedname=
resolution=240x320x16

View file

@ -27,7 +27,7 @@ IMPLEMENT_APP(rbutilFrmApp)
bool rbutilFrmApp::OnInit() bool rbutilFrmApp::OnInit()
{ {
wxString buf = ""; wxString buf = wxT("");
wxLogVerbose(wxT("=== begin rbutilFrmApp::Oninit()")); wxLogVerbose(wxT("=== begin rbutilFrmApp::Oninit()"));
@ -48,7 +48,7 @@ bool rbutilFrmApp::OnInit()
wxLogNull lognull; wxLogNull lognull;
if (! wxMkdir(buf, 0777)) if (! wxMkdir(buf, 0777))
{ {
wxLogFatalError(_("Can't create data directory %s"), wxLogFatalError(wxT("Can't create data directory %s"),
buf.c_str()); buf.c_str());
} }
} }
@ -56,7 +56,7 @@ bool rbutilFrmApp::OnInit()
buf += wxT(PATH_SEP "rbutil.log"); buf += wxT(PATH_SEP "rbutil.log");
gv->logfile = new wxFFile(buf, "w"); gv->logfile = new wxFFile(buf, "w");
if (! gv->logfile->IsOpened() ) if (! gv->logfile->IsOpened() )
wxLogFatalError(_("Unable to open log file")); wxLogFatalError(wxT("Unable to open log file"));
gv->loggui = new wxLogGui(); gv->loggui = new wxLogGui();
gv->loggui->SetActiveTarget(gv->loggui); gv->loggui->SetActiveTarget(gv->loggui);
@ -73,7 +73,7 @@ bool rbutilFrmApp::OnInit()
if (!ReadGlobalConfig(NULL)) if (!ReadGlobalConfig(NULL))
{ {
ERR_DIALOG(gv->ErrStr->GetData(), _("Rockbox Utility")); ERR_DIALOG(gv->ErrStr->GetData(), wxT("Rockbox Utility"));
return FALSE; return FALSE;
} }
ReadUserConfig(); ReadUserConfig();
@ -83,6 +83,8 @@ bool rbutilFrmApp::OnInit()
myFrame->Show(TRUE); myFrame->Show(TRUE);
initIpodpatcher(); // reserve mem for ipodpatcher initIpodpatcher(); // reserve mem for ipodpatcher
wxInitAllImageHandlers(); //init Image handlers
wxLogVerbose(wxT("=== end rbUtilFrmApp::OnInit()")); wxLogVerbose(wxT("=== end rbUtilFrmApp::OnInit()"));
return TRUE; return TRUE;
} }
@ -136,7 +138,7 @@ bool rbutilFrmApp::ReadGlobalConfig(rbutilFrm* myFrame)
wxFileInputStream* cfgis = new wxFileInputStream(buf); wxFileInputStream* cfgis = new wxFileInputStream(buf);
if (!cfgis->CanRead()) { if (!cfgis->CanRead()) {
gv->ErrStr = new wxString(_("Unable to open configuration file")); gv->ErrStr = new wxString(wxT("Unable to open configuration file"));
return false; return false;
} }
@ -175,6 +177,9 @@ bool rbutilFrmApp::ReadGlobalConfig(rbutilFrm* myFrame)
gv->GlobalConfig->Read(buf.Format(wxT("/%s/combinedname"), gv->GlobalConfig->Read(buf.Format(wxT("/%s/combinedname"),
cur.c_str()), &tmpstr); cur.c_str()), &tmpstr);
gv->plat_combinedname.Add(tmpstr); gv->plat_combinedname.Add(tmpstr);
gv->GlobalConfig->Read(buf.Format(wxT("/%s/resolution"),
cur.c_str()), &tmpstr);
gv->plat_resolution.Add(tmpstr);
i++; i++;
} }
@ -210,6 +215,9 @@ bool rbutilFrmApp::ReadGlobalConfig(rbutilFrm* myFrame)
gv->GlobalConfig->Read(wxT("bootloader_url"), &tmpstr); gv->GlobalConfig->Read(wxT("bootloader_url"), &tmpstr);
gv->bootloader_url = tmpstr; gv->bootloader_url = tmpstr;
gv->GlobalConfig->Read(wxT("themes_url"), &tmpstr);
gv->themes_url = tmpstr;
#ifdef __WXMSW__ #ifdef __WXMSW__
gv->curdestdir = wxT("D:\\"); gv->curdestdir = wxT("D:\\");
#else #else

View file

@ -27,6 +27,8 @@
#include "fonts_3d.xpm" #include "fonts_3d.xpm"
#include "tools2_3d.xpm" #include "tools2_3d.xpm"
#include "rblogo.xpm" #include "rblogo.xpm"
#include "untools2_3d.xpm"
#include "themes_3d.xpm"
#include "bootloaders.h" #include "bootloaders.h"
@ -40,6 +42,7 @@ BEGIN_EVENT_TABLE(rbutilFrm,wxFrame)
EVT_BUTTON (ID_INSTALL_BTN, rbutilFrm::OnInstallBtn) EVT_BUTTON (ID_INSTALL_BTN, rbutilFrm::OnInstallBtn)
EVT_BUTTON (ID_REMOVE_BTN, rbutilFrm::OnRemoveBtn) EVT_BUTTON (ID_REMOVE_BTN, rbutilFrm::OnRemoveBtn)
EVT_BUTTON (ID_FONT_BTN, rbutilFrm::OnFontBtn) EVT_BUTTON (ID_FONT_BTN, rbutilFrm::OnFontBtn)
EVT_BUTTON (ID_THEMES_BTN, rbutilFrm::OnThemesBtn)
EVT_BUTTON (ID_BOOTLOADER_BTN, rbutilFrm::OnBootloaderBtn) EVT_BUTTON (ID_BOOTLOADER_BTN, rbutilFrm::OnBootloaderBtn)
EVT_BUTTON (ID_BOOTLOADERREMOVE_BTN, rbutilFrm::OnBootloaderRemoveBtn) EVT_BUTTON (ID_BOOTLOADERREMOVE_BTN, rbutilFrm::OnBootloaderRemoveBtn)
@ -83,7 +86,7 @@ void rbutilFrm::CreateGUIControls(void)
WxBoxSizer2->Add(WxStaticBitmap1,0,wxALIGN_CENTER_HORIZONTAL | wxALL,5); WxBoxSizer2->Add(WxStaticBitmap1,0,wxALIGN_CENTER_HORIZONTAL | wxALL,5);
wxStaticBox* WxStaticBoxSizer3_StaticBoxObj = new wxStaticBox(WxPanel1, wxStaticBox* WxStaticBoxSizer3_StaticBoxObj = new wxStaticBox(WxPanel1,
wxID_ANY, _("Please choose an option")); wxID_ANY, wxT("Please choose an option"));
wxStaticBoxSizer* WxStaticBoxSizer3 = wxStaticBoxSizer* WxStaticBoxSizer3 =
new wxStaticBoxSizer(WxStaticBoxSizer3_StaticBoxObj,wxHORIZONTAL); new wxStaticBoxSizer(WxStaticBoxSizer3_StaticBoxObj,wxHORIZONTAL);
WxBoxSizer2->Add(WxStaticBoxSizer3,1,wxALIGN_CENTER_HORIZONTAL | wxALL, 5); WxBoxSizer2->Add(WxStaticBoxSizer3,1,wxALIGN_CENTER_HORIZONTAL | wxALL, 5);
@ -95,13 +98,13 @@ void rbutilFrm::CreateGUIControls(void)
WxBitmapButton4 = new wxBitmapButton(WxPanel1, ID_BOOTLOADER_BTN, WxBitmapButton4 = new wxBitmapButton(WxPanel1, ID_BOOTLOADER_BTN,
BootloaderInstallButton, wxPoint(0,0), wxSize(64,54), BootloaderInstallButton, wxPoint(0,0), wxSize(64,54),
wxRAISED_BORDER | wxBU_AUTODRAW); wxRAISED_BORDER | wxBU_AUTODRAW);
WxBitmapButton4->SetToolTip(_("Instructions for installing the " WxBitmapButton4->SetToolTip(wxT("Instructions for installing the "
"Rockbox bootloader on your audio device")); "Rockbox bootloader on your audio device"));
WxFlexGridSizer1->Add(WxBitmapButton4, 0, WxFlexGridSizer1->Add(WxBitmapButton4, 0,
wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxALL,5); wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxALL,5);
wxStaticText* WxStaticText5 = new wxStaticText(WxPanel1, wxID_ANY, wxStaticText* WxStaticText5 = new wxStaticText(WxPanel1, wxID_ANY,
_("Bootloader installation instructions\n\n" wxT("Bootloader installation instructions\n\n"
"Before Rockbox can be installed on your audio player, you " "Before Rockbox can be installed on your audio player, you "
"may have to\ninstall a bootloader. This can not currently " "may have to\ninstall a bootloader. This can not currently "
"be done automatically, but is\nonly necessary the first time " "be done automatically, but is\nonly necessary the first time "
@ -114,12 +117,12 @@ void rbutilFrm::CreateGUIControls(void)
WxBitmapButton1_BITMAP, wxPoint(0,0), wxSize(64,54), WxBitmapButton1_BITMAP, wxPoint(0,0), wxSize(64,54),
wxRAISED_BORDER | wxBU_AUTODRAW, wxDefaultValidator, wxRAISED_BORDER | wxBU_AUTODRAW, wxDefaultValidator,
wxT("WxBitmapButton1")); wxT("WxBitmapButton1"));
WxBitmapButton1->SetToolTip(_("Install Rockbox")); WxBitmapButton1->SetToolTip(wxT("Install Rockbox"));
WxFlexGridSizer1->Add(WxBitmapButton1,0, WxFlexGridSizer1->Add(WxBitmapButton1,0,
wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxALL,5); wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxALL,5);
WxStaticText2 = new wxStaticText(WxPanel1, ID_WXSTATICTEXT2, WxStaticText2 = new wxStaticText(WxPanel1, ID_WXSTATICTEXT2,
_("Install Rockbox on your audio player")); wxT("Install Rockbox on your audio player"));
WxFlexGridSizer1->Add(WxStaticText2,0, WxFlexGridSizer1->Add(WxStaticText2,0,
wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxALL,5); wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxALL,5);
@ -127,13 +130,13 @@ void rbutilFrm::CreateGUIControls(void)
WxBitmapButton3 = new wxBitmapButton(WxPanel1, ID_FONT_BTN, WxBitmapButton3 = new wxBitmapButton(WxPanel1, ID_FONT_BTN,
FontInstallButton, wxPoint(0,0), wxSize(64,54), FontInstallButton, wxPoint(0,0), wxSize(64,54),
wxRAISED_BORDER | wxBU_AUTODRAW); wxRAISED_BORDER | wxBU_AUTODRAW);
WxBitmapButton3->SetToolTip(_("Download the most up to date " WxBitmapButton3->SetToolTip(wxT("Download the most up to date "
"Rockbox fonts.")); "Rockbox fonts."));
WxFlexGridSizer1->Add(WxBitmapButton3, 0, WxFlexGridSizer1->Add(WxBitmapButton3, 0,
wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxALL,5); wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxALL,5);
wxStaticText* WxStaticText4 = new wxStaticText(WxPanel1, wxID_ANY, wxStaticText* WxStaticText4 = new wxStaticText(WxPanel1, wxID_ANY,
_("Install the Rockbox fonts package\n\n" wxT("Install the Rockbox fonts package\n\n"
"This step is only needed if you have installed " "This step is only needed if you have installed "
"a daily build and want\nthe full set of Rockbox fonts. You " "a daily build and want\nthe full set of Rockbox fonts. You "
"will not need to download these\nagain unless you uninstall " "will not need to download these\nagain unless you uninstall "
@ -141,48 +144,62 @@ void rbutilFrm::CreateGUIControls(void)
WxFlexGridSizer1->Add(WxStaticText4, 0, WxFlexGridSizer1->Add(WxStaticText4, 0,
wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxALL,5); wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxALL,5);
wxBitmap ThemesInstallButton (themes_3d_xpm);
WxBitmapButton5 = new wxBitmapButton(WxPanel1, ID_THEMES_BTN,
ThemesInstallButton, wxPoint(0,0), wxSize(64,54),
wxRAISED_BORDER | wxBU_AUTODRAW);
WxBitmapButton5->SetToolTip(wxT("Download other Themes for Rockbox."));
WxFlexGridSizer1->Add(WxBitmapButton5, 0,
wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxALL,5);
wxStaticText* WxStaticText6 = new wxStaticText(WxPanel1, wxID_ANY,
wxT("Install more Themes for Rockbox.\n\n"));
WxFlexGridSizer1->Add(WxStaticText6, 0,
wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxALL,5);
wxBitmap WxBitmapButton2_BITMAP (uninstall_3d_xpm); wxBitmap WxBitmapButton2_BITMAP (uninstall_3d_xpm);
WxBitmapButton2 = new wxBitmapButton(WxPanel1, ID_REMOVE_BTN, WxBitmapButton2 = new wxBitmapButton(WxPanel1, ID_REMOVE_BTN,
WxBitmapButton2_BITMAP, wxPoint(0,0), wxSize(64,54), WxBitmapButton2_BITMAP, wxPoint(0,0), wxSize(64,54),
wxRAISED_BORDER | wxBU_AUTODRAW, wxDefaultValidator, wxRAISED_BORDER | wxBU_AUTODRAW, wxDefaultValidator,
wxT("WxBitmapButton2")); wxT("WxBitmapButton2"));
WxBitmapButton2->SetToolTip(_("Uninstall Rockbox")); WxBitmapButton2->SetToolTip(wxT("Uninstall Rockbox"));
WxFlexGridSizer1->Add(WxBitmapButton2,0, WxFlexGridSizer1->Add(WxBitmapButton2,0,
wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxALL,5); wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxALL,5);
WxStaticText3 = new wxStaticText(WxPanel1, ID_WXSTATICTEXT3, WxStaticText3 = new wxStaticText(WxPanel1, ID_WXSTATICTEXT3,
_("Remove Rockbox from your audio player")); wxT("Remove Rockbox from your audio player"));
WxFlexGridSizer1->Add(WxStaticText3,0, WxFlexGridSizer1->Add(WxStaticText3,0,
wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxALL,5); wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxALL,5);
wxBitmap WxBitmapButton4_BITMAP (uninstall_3d_xpm); wxBitmap WxBitmapButton4_BITMAP (untools2_3d_xpm);
WxBitmapButton4 = new wxBitmapButton(WxPanel1, ID_BOOTLOADERREMOVE_BTN, WxBitmapButton4 = new wxBitmapButton(WxPanel1, ID_BOOTLOADERREMOVE_BTN,
WxBitmapButton4_BITMAP, wxPoint(0,0), wxSize(64,54), WxBitmapButton4_BITMAP, wxPoint(0,0), wxSize(64,54),
wxRAISED_BORDER | wxBU_AUTODRAW, wxDefaultValidator, wxRAISED_BORDER | wxBU_AUTODRAW, wxDefaultValidator,
wxT("WxBitmapButton4")); wxT("WxBitmapButton4"));
WxBitmapButton4->SetToolTip(_("Uninstall Bootloader")); WxBitmapButton4->SetToolTip(wxT("Uninstall Bootloader"));
WxFlexGridSizer1->Add(WxBitmapButton4,0, WxFlexGridSizer1->Add(WxBitmapButton4,0,
wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxALL,5); wxALIGN_CENTER_HORIZONTAL | wxALIGN_CENTER_VERTICAL | wxALL,5);
WxStaticText4 = new wxStaticText(WxPanel1, ID_WXSTATICTEXT4, WxStaticText4 = new wxStaticText(WxPanel1, ID_WXSTATICTEXT4,
_("Remove Rockbox Bootloader from your audio player")); wxT("Remove Rockbox Bootloader from your audio player"));
WxFlexGridSizer1->Add(WxStaticText4,0, WxFlexGridSizer1->Add(WxStaticText4,0,
wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxALL,5); wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxALL,5);
WxMenuBar1 = new wxMenuBar(); WxMenuBar1 = new wxMenuBar();
wxMenu *ID_FILE_MENU_Mnu_Obj = new wxMenu(0); wxMenu *ID_FILE_MENU_Mnu_Obj = new wxMenu(0);
WxMenuBar1->Append(ID_FILE_MENU_Mnu_Obj, _("&File")); WxMenuBar1->Append(ID_FILE_MENU_Mnu_Obj, wxT("&File"));
ID_FILE_MENU_Mnu_Obj->Append(ID_FILE_WIPECACHE, ID_FILE_MENU_Mnu_Obj->Append(ID_FILE_WIPECACHE,
_("&Empty local download cache"), wxT(""), wxITEM_NORMAL); wxT("&Empty local download cache"), wxT(""), wxITEM_NORMAL);
if (! gv->portable ) if (! gv->portable )
{ {
ID_FILE_MENU_Mnu_Obj->Append(ID_PORTABLE_INSTALL, ID_FILE_MENU_Mnu_Obj->Append(ID_PORTABLE_INSTALL,
_("&Install Rockbox Utility on device"), wxT(""), wxITEM_NORMAL); wxT("&Install Rockbox Utility on device"), wxT(""), wxITEM_NORMAL);
} }
ID_FILE_MENU_Mnu_Obj->Append(ID_FILE_ABOUT, _("&About"), wxT(""), ID_FILE_MENU_Mnu_Obj->Append(ID_FILE_ABOUT, wxT("&About"), wxT(""),
wxITEM_NORMAL); wxITEM_NORMAL);
ID_FILE_MENU_Mnu_Obj->Append(ID_FILE_EXIT, _("E&xit\tCtrl+X"), wxT(""), ID_FILE_MENU_Mnu_Obj->Append(ID_FILE_EXIT, wxT("E&xit\tCtrl+X"), wxT(""),
wxITEM_NORMAL); wxITEM_NORMAL);
this->SetMenuBar(WxMenuBar1); this->SetMenuBar(WxMenuBar1);
@ -191,24 +208,24 @@ void rbutilFrm::CreateGUIControls(void)
GetSizer()->SetSizeHints(this); GetSizer()->SetSizeHints(this);
if (gv->portable) if (gv->portable)
{ {
this->SetTitle(_("Rockbox Utility (portable)")); this->SetTitle(wxT("Rockbox Utility (portable)"));
} else } else
{ {
this->SetTitle(_("Rockbox Utility")); this->SetTitle(wxT("Rockbox Utility"));
} }
this->Center(); this->Center();
wxIcon rbutilFrm_ICON (rbutilFrm_XPM); wxIcon rbutilFrm_ICON (rbutilFrm_XPM);
this->SetIcon(rbutilFrm_XPM); this->SetIcon(rbutilFrm_XPM);
this->SetToolTip(wxT("Install Rockbox")); this->SetToolTip(wxT("Install Rockbox"));
wxLogVerbose("=== end rbutilFrm::CreateGUIControls"); wxLogVerbose(wxT("=== end rbutilFrm::CreateGUIControls"));
} }
void rbutilFrm::rbutilFrmClose(wxCloseEvent& event) void rbutilFrm::rbutilFrmClose(wxCloseEvent& event)
{ {
wxLogVerbose("=== begin rbutilFrm::rbutilFrmClose(event)"); wxLogVerbose(wxT("=== begin rbutilFrm::rbutilFrmClose(event)"));
Destroy(); Destroy();
wxLogVerbose("=== end rbutilFrm::rbutilFrmClose"); wxLogVerbose(wxT("=== end rbutilFrm::rbutilFrmClose"));
} }
@ -217,9 +234,9 @@ void rbutilFrm::rbutilFrmClose(wxCloseEvent& event)
*/ */
void rbutilFrm::OnFileExit(wxCommandEvent& event) void rbutilFrm::OnFileExit(wxCommandEvent& event)
{ {
wxLogVerbose("=== begin rbutilFrm::OnFileExit(event)"); wxLogVerbose(wxT("=== begin rbutilFrm::OnFileExit(event)"));
Close(); Close();
wxLogVerbose("=== end rbutilFrm::OnFileExit"); wxLogVerbose(wxT("=== end rbutilFrm::OnFileExit"));
} }
// The routines this code uses are in the wxWidgets documentation, but // The routines this code uses are in the wxWidgets documentation, but
@ -230,11 +247,11 @@ void rbutilFrm::OnFileAbout(wxCommandEvent& event)
/* /*
wxAboutDialogInfo *info = new wxAboutDialogInfo(); wxAboutDialogInfo *info = new wxAboutDialogInfo();
info->SetName(_(RBUTIL_FULLNAME)); info->SetName(wxT(RBUTIL_FULLNAME));
info->SetVersion(_(RBUTIL_VERSION)); info->SetVersion(wxT(RBUTIL_VERSION));
info->SetCopyright(_(RBUTIL_COPYRIGHT)); info->SetCopyright(wxT(RBUTIL_COPYRIGHT));
info->SetDescription(_(RBUTIL_DESCRIPTION)); info->SetDescription(wxT(RBUTIL_DESCRIPTION));
info->SetWebSite(_(RBUTIL_WEBSITE)); info->SetWebSite(wxT(RBUTIL_WEBSITE));
long i = 0; long i = 0;
while (rbutil_developers[i] != "") while (rbutil_developers[i] != "")
@ -256,8 +273,8 @@ void rbutilFrm::OnFileWipeCache(wxCommandEvent& event)
datadir = gv->stdpaths->GetUserDataDir(); datadir = gv->stdpaths->GetUserDataDir();
if (datadir == "") if (datadir == "")
{ {
ERR_DIALOG(_("Can't locate user data directory. Unable to delete " ERR_DIALOG(wxT("Can't locate user data directory. Unable to delete "
"cache."), _("Delete download cache.") ); "cache."), wxT("Delete download cache.") );
return; return;
} }
@ -266,13 +283,13 @@ void rbutilFrm::OnFileWipeCache(wxCommandEvent& event)
if (! rm_rf(cacheloc) ) if (! rm_rf(cacheloc) )
{ {
wxMessageDialog* msg = new wxMessageDialog(this, _("Local download cache has been deleted.") wxMessageDialog* msg = new wxMessageDialog(this, wxT("Local download cache has been deleted.")
,"Cache deletion", wxOK |wxICON_INFORMATION); ,"Cache deletion", wxOK |wxICON_INFORMATION);
msg->ShowModal(); msg->ShowModal();
delete msg; delete msg;
} }
else { else {
MESG_DIALOG(_("Errors occured deleting the local download cache.")); MESG_DIALOG(wxT("Errors occured deleting the local download cache."));
} }
wxMkdir(cacheloc, 0777); wxMkdir(cacheloc, 0777);
@ -280,10 +297,10 @@ void rbutilFrm::OnFileWipeCache(wxCommandEvent& event)
void rbutilFrm::OnBootloaderRemoveBtn(wxCommandEvent& event) void rbutilFrm::OnBootloaderRemoveBtn(wxCommandEvent& event)
{ {
wxLogVerbose("=== begin rbutilFrm::OnBootloaderRemoveBtn(event)"); wxLogVerbose(wxT("=== begin rbutilFrm::OnBootloaderRemoveBtn(event)"));
wxWizard *wizard = new wxWizard(this, wxID_ANY, wxWizard *wizard = new wxWizard(this, wxID_ANY,
_("Rockbox Bootloader Uninstallation Wizard"), wxT("Rockbox Bootloader Uninstallation Wizard"),
wxBitmap(wizard_xpm), wxBitmap(wizard_xpm),
wxDefaultPosition, wxDefaultPosition,
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER); wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER);
@ -302,83 +319,83 @@ void rbutilFrm::OnBootloaderRemoveBtn(wxCommandEvent& event)
if (wizard->RunWizard(page1) ) if (wizard->RunWizard(page1) )
{ {
// uninstall the bootloader // uninstall the bootloader
if(gv->curbootloadermethod == "ipodpatcher") if(gv->curbootloadermethod == wxT("ipodpatcher"))
{ {
if(ipodpatcher(BOOTLOADER_REM)) if(ipodpatcher(BOOTLOADER_REM))
{ {
wxMessageDialog* msg = new wxMessageDialog(this, _("The Bootloader has been uninstalled.") wxMessageDialog* msg = new wxMessageDialog(this, wxT("The Bootloader has been uninstalled.")
,"Uninstallation", wxOK |wxICON_INFORMATION); ,wxT("Uninstallation"), wxOK |wxICON_INFORMATION);
msg->ShowModal(); msg->ShowModal();
delete msg; delete msg;
} }
else else
{ {
MESG_DIALOG(_("The Uninstallation has failed.") ); MESG_DIALOG(wxT("The Uninstallation has failed.") );
} }
} }
else if(gv->curbootloadermethod == "gigabeatf") else if(gv->curbootloadermethod == wxT("gigabeatf"))
{ {
if(gigabeatf(BOOTLOADER_REM)) if(gigabeatf(BOOTLOADER_REM))
{ {
wxMessageDialog* msg = new wxMessageDialog(this, _("The Bootloader has been uninstalled.") wxMessageDialog* msg = new wxMessageDialog(this, wxT("The Bootloader has been uninstalled.")
,"Uninstallation", wxOK |wxICON_INFORMATION); ,wxT("Uninstallation"), wxOK |wxICON_INFORMATION);
msg->ShowModal(); msg->ShowModal();
delete msg; delete msg;
} }
else else
MESG_DIALOG(_("The Uninstallation has failed.") ); MESG_DIALOG(wxT("The Uninstallation has failed.") );
} }
else if(gv->curbootloadermethod == "h10") else if(gv->curbootloadermethod == wxT("h10"))
{ {
if(h10(BOOTLOADER_REM)) if(h10(BOOTLOADER_REM))
{ {
wxMessageDialog* msg = new wxMessageDialog(this, _("The Bootloader has been uninstalled.") wxMessageDialog* msg = new wxMessageDialog(this, wxT("The Bootloader has been uninstalled.")
,"Uninstallation", wxOK |wxICON_INFORMATION); ,wxT("Uninstallation"), wxOK |wxICON_INFORMATION);
msg->ShowModal(); msg->ShowModal();
delete msg; delete msg;
} }
else else
MESG_DIALOG(_("The Uninstallation has failed.") ); MESG_DIALOG(wxT("The Uninstallation has failed.") );
} }
else if(gv->curbootloadermethod == "iaudio" ) else if(gv->curbootloadermethod == wxT("iaudio") )
{ {
wxMessageDialog* msg = new wxMessageDialog(this, _("To uninstall the Bootloader on this Device,\n" wxMessageDialog* msg = new wxMessageDialog(this, wxT("To uninstall the Bootloader on this Device,\n"
"you need to download and install an Original Firmware from the Manufacturer.") "you need to download and install an Original Firmware from the Manufacturer.")
,"Uninstallation", wxOK |wxICON_INFORMATION); ,wxT("Uninstallation"), wxOK |wxICON_INFORMATION);
msg->ShowModal(); msg->ShowModal();
delete msg; delete msg;
} }
else if(gv->curbootloadermethod == "fwpatcher" ) else if(gv->curbootloadermethod == wxT("fwpatcher") )
{ {
wxMessageDialog* msg = new wxMessageDialog(this, _("To uninstall the Bootloader on this Device,\n" wxMessageDialog* msg = new wxMessageDialog(this, wxT("To uninstall the Bootloader on this Device,\n"
"you need to download and install an original Firmware from the Manufacturer.\n" "you need to download and install an original Firmware from the Manufacturer.\n"
"To do this, you need to boot into the original Firmware.") "To do this, you need to boot into the original Firmware.")
,"Uninstallation", wxOK |wxICON_INFORMATION); ,wxT("Uninstallation"), wxOK |wxICON_INFORMATION);
msg->ShowModal(); msg->ShowModal();
delete msg; delete msg;
} }
else else
{ {
MESG_DIALOG(_("Unsupported Bootloader Method") ); MESG_DIALOG(wxT("Unsupported Bootloader Method") );
} }
} }
else else
{ {
MESG_DIALOG(_("The bootloader Uninstallation wizard was cancelled") ); MESG_DIALOG(wxT("The bootloader Uninstallation wizard was cancelled") );
} }
wxLogVerbose("=== end rbutilFrm::OnBootloaderRemoveBtn"); wxLogVerbose(wxT("=== end rbutilFrm::OnBootloaderRemoveBtn"));
} }
void rbutilFrm::OnBootloaderBtn(wxCommandEvent& event) void rbutilFrm::OnBootloaderBtn(wxCommandEvent& event)
{ {
wxLogVerbose("=== begin rbutilFrm::OnBootloaderBtn(event)"); wxLogVerbose(wxT("=== begin rbutilFrm::OnBootloaderBtn(event)"));
wxWizard *wizard = new wxWizard(this, wxID_ANY, wxWizard *wizard = new wxWizard(this, wxID_ANY,
_("Rockbox Installation Wizard"), wxT("Rockbox Installation Wizard"),
wxBitmap(wizard_xpm), wxBitmap(wizard_xpm),
wxDefaultPosition, wxDefaultPosition,
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER); wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER);
@ -399,84 +416,84 @@ void rbutilFrm::OnBootloaderBtn(wxCommandEvent& event)
if (wizard->RunWizard(page1) ) if (wizard->RunWizard(page1) )
{ {
// start installation depending on player // start installation depending on player
if(gv->curbootloadermethod == "ipodpatcher") if(gv->curbootloadermethod == wxT("ipodpatcher"))
{ {
if(ipodpatcher(BOOTLOADER_ADD)) if(ipodpatcher(BOOTLOADER_ADD))
{ {
wxMessageDialog* msg = new wxMessageDialog(this, _("The Bootloader has been installed on your device.") wxMessageDialog* msg = new wxMessageDialog(this, wxT("The Bootloader has been installed on your device.")
,"Installation", wxOK |wxICON_INFORMATION); ,wxT("Installation"), wxOK |wxICON_INFORMATION);
msg->ShowModal(); msg->ShowModal();
delete msg; delete msg;
} }
else else
{ {
MESG_DIALOG(_("The installation has failed.") ); MESG_DIALOG(wxT("The installation has failed.") );
} }
} }
else if(gv->curbootloadermethod == "gigabeatf") else if(gv->curbootloadermethod == wxT("gigabeatf"))
{ {
if(gigabeatf(BOOTLOADER_ADD)) if(gigabeatf(BOOTLOADER_ADD))
{ {
wxMessageDialog* msg = new wxMessageDialog(this, _("The Bootloader has been installed on your device.") wxMessageDialog* msg = new wxMessageDialog(this, wxT("The Bootloader has been installed on your device.")
,"Installation", wxOK |wxICON_INFORMATION); ,wxT("Installation"), wxOK |wxICON_INFORMATION);
msg->ShowModal(); msg->ShowModal();
delete msg; delete msg;
} }
else else
MESG_DIALOG(_("The installation has failed.") ); MESG_DIALOG(wxT("The installation has failed.") );
} }
else if(gv->curbootloadermethod == "iaudio" ) else if(gv->curbootloadermethod == wxT("iaudio") )
{ {
if(iaudiox5(BOOTLOADER_ADD)) if(iaudiox5(BOOTLOADER_ADD))
{ {
wxMessageDialog* msg = new wxMessageDialog(this, _("The Bootloader has been installed on your device.\n" wxMessageDialog* msg = new wxMessageDialog(this, wxT("The Bootloader has been installed on your device.\n"
"Now turn OFF your Device, unplug USB,and insert Charger\n" "Now turn OFF your Device, unplug USB,and insert Charger\n"
"Your Device will automatically upgrade the flash with the Rockbox bootloader") "Your Device will automatically upgrade the flash with the Rockbox bootloader")
,"Installation", wxOK |wxICON_INFORMATION); ,wxT("Installation"), wxOK |wxICON_INFORMATION);
msg->ShowModal(); msg->ShowModal();
delete msg; delete msg;
} }
else else
MESG_DIALOG(_("The installation has failed.") ); MESG_DIALOG(wxT("The installation has failed.") );
} }
else if(gv->curbootloadermethod == "fwpatcher") else if(gv->curbootloadermethod == wxT("fwpatcher"))
{ {
if(fwpatcher(BOOTLOADER_ADD)) if(fwpatcher(BOOTLOADER_ADD))
{ {
wxMessageDialog* msg = new wxMessageDialog(this, _("The Bootloader has been patched and copied on your device.\n" wxMessageDialog* msg = new wxMessageDialog(this, wxT("The Bootloader has been patched and copied on your device.\n"
"Now use the Firmware upgrade option of your Device\n") "Now use the Firmware upgrade option of your Device\n")
,"Installation", wxOK |wxICON_INFORMATION); ,wxT("Installation"), wxOK |wxICON_INFORMATION);
msg->ShowModal(); msg->ShowModal();
delete msg; delete msg;
} }
else else
MESG_DIALOG(_("The installation has failed.") ); MESG_DIALOG(wxT("The installation has failed.") );
} }
else if(gv->curbootloadermethod == "h10") else if(gv->curbootloadermethod == wxT("h10"))
{ {
if(h10(BOOTLOADER_ADD)) if(h10(BOOTLOADER_ADD))
{ {
wxMessageDialog* msg = new wxMessageDialog(this, _("The Bootloader has been patched and copied on your device.\n") wxMessageDialog* msg = new wxMessageDialog(this, wxT("The Bootloader has been patched and copied on your device.\n")
,"Installation", wxOK |wxICON_INFORMATION); ,wxT("Installation"), wxOK |wxICON_INFORMATION);
msg->ShowModal(); msg->ShowModal();
delete msg; delete msg;
} }
else else
MESG_DIALOG(_("The installation has failed.") ); MESG_DIALOG(wxT("The installation has failed.") );
} }
else else
{ {
MESG_DIALOG(_("Unsupported Bootloader Method") ); MESG_DIALOG(wxT("Unsupported Bootloader Method") );
} }
} }
else else
{ {
MESG_DIALOG(_("The bootloader installation wizard was cancelled") ); MESG_DIALOG(wxT("The bootloader installation wizard was cancelled") );
} }
wxLogVerbose("=== end rbutilFrm::OnBootloaderBtn"); wxLogVerbose(wxT("=== end rbutilFrm::OnBootloaderBtn"));
} }
@ -485,13 +502,13 @@ void rbutilFrm::OnInstallBtn(wxCommandEvent& event)
wxString src, dest, buf; wxString src, dest, buf;
wxDateTime date; wxDateTime date;
wxTimeSpan day(24); wxTimeSpan day(24);
wxLogVerbose("=== begin rbutilFrm::OnInstallBtn(event)"); wxLogVerbose(wxT("=== begin rbutilFrm::OnInstallBtn(event)"));
wxFileSystem fs; wxFileSystem fs;
wxFileConfig* buildinfo; wxFileConfig* buildinfo;
wxDateSpan oneday; wxDateSpan oneday;
wxWizard *wizard = new wxWizard(this, wxID_ANY, wxWizard *wizard = new wxWizard(this, wxID_ANY,
_("Rockbox Installation Wizard"), wxT("Rockbox Installation Wizard"),
wxBitmap(wizard_xpm), wxBitmap(wizard_xpm),
wxDefaultPosition, wxDefaultPosition,
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER); wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER);
@ -511,20 +528,20 @@ void rbutilFrm::OnInstallBtn(wxCommandEvent& event)
{ {
case BUILD_RELEASE: case BUILD_RELEASE:
// This is a URL - don't use PATH_SEP // This is a URL - don't use PATH_SEP
src.Printf("%s%s-%s-%s.zip", src.Printf(wxT("%s%s-%s-%s.zip"),
gv->download_url.c_str(), gv->prog_name.c_str(), gv->download_url.c_str(), gv->prog_name.c_str(),
gv->last_release.c_str(), gv->curplat.c_str()); gv->last_release.c_str(), gv->curplat.c_str());
dest.Printf("%s" PATH_SEP "download" PATH_SEP "%s-%s-%s.zip", dest.Printf(wxT("%s" PATH_SEP "download" PATH_SEP "%s-%s-%s.zip"),
gv->stdpaths->GetUserDataDir().c_str(), gv->stdpaths->GetUserDataDir().c_str(),
gv->prog_name.c_str(), gv->last_release.c_str(), gv->prog_name.c_str(), gv->last_release.c_str(),
gv->curplat.c_str()); gv->curplat.c_str());
break; break;
case BUILD_DAILY: case BUILD_DAILY:
dest.Printf("%s" PATH_SEP "download" PATH_SEP "build-info", dest.Printf(wxT("%s" PATH_SEP "download" PATH_SEP "build-info"),
gv->stdpaths->GetUserDataDir().c_str()); gv->stdpaths->GetUserDataDir().c_str());
if (DownloadURL(gv->server_conf_url, dest)) { if (DownloadURL(gv->server_conf_url, dest)) {
WARN_DIALOG(_("Unable to download build status."), WARN_DIALOG(wxT("Unable to download build status."),
_("Install")); wxT("Install"));
buf = ""; buf = "";
} else } else
{ {
@ -534,41 +551,41 @@ void rbutilFrm::OnInstallBtn(wxCommandEvent& event)
buildinfo->DeleteAll(); buildinfo->DeleteAll();
if (buf.Len() != 8) { if (buf.Len() != 8) {
dest.Printf(_("Invalid build date: %s"), buf.c_str()); dest.Printf(wxT("Invalid build date: %s"), buf.c_str());
WARN_DIALOG(dest, _("Install")); WARN_DIALOG(dest, wxT("Install"));
buf = ""; buf = wxT("");
} }
} }
if (buf == "") { if (buf == "") {
WARN_DIALOG(_("Can't get date of latest build from " WARN_DIALOG(wxT("Can't get date of latest build from "
"server. Using yesterday's date."), _("Install") ); "server. Using yesterday's date."), wxT("Install") );
date = wxDateTime::Now(); date = wxDateTime::Now();
date.Subtract(oneday.Day()); date.Subtract(oneday.Day());
buf = date.Format(wxT("%Y%m%d")); // yes, we want UTC buf = date.Format(wxT("%Y%m%d")); // yes, we want UTC
} }
src.Printf("%s%s/%s-%s-%s.zip", src.Printf(wxT("%s%s/%s-%s-%s.zip"),
gv->daily_url.c_str(), gv->curplat.c_str(), gv->daily_url.c_str(), gv->curplat.c_str(),
gv->prog_name.c_str(), gv->curplat.c_str(), gv->prog_name.c_str(), gv->curplat.c_str(),
buf.c_str() ); buf.c_str() );
dest.Printf("%s" PATH_SEP "download" PATH_SEP "%s-%s-%s.zip", dest.Printf(wxT("%s" PATH_SEP "download" PATH_SEP "%s-%s-%s.zip"),
gv->stdpaths->GetUserDataDir().c_str(), gv->stdpaths->GetUserDataDir().c_str(),
gv->prog_name.c_str(), gv->prog_name.c_str(),
gv->curplat.c_str(), buf.c_str() ); gv->curplat.c_str(), buf.c_str() );
break; break;
case BUILD_BLEEDING: case BUILD_BLEEDING:
src.Printf("%s%s/%s.zip", src.Printf(wxT("%s%s/%s.zip"),
gv->bleeding_url.c_str(), gv->curplat.c_str(), gv->bleeding_url.c_str(), gv->curplat.c_str(),
gv->prog_name.c_str() ); gv->prog_name.c_str() );
dest.Printf("%s" PATH_SEP "download" PATH_SEP "%s.zip", dest.Printf(wxT("%s" PATH_SEP "download" PATH_SEP "%s.zip"),
gv->stdpaths->GetUserDataDir().c_str(), gv->stdpaths->GetUserDataDir().c_str(),
gv->prog_name.c_str() ); gv->prog_name.c_str() );
break; break;
default: default:
ERR_DIALOG(_("Something seriously odd has happened."), ERR_DIALOG(wxT("Something seriously odd has happened."),
_("Install")); wxT("Install"));
return; return;
break; break;
} }
@ -578,30 +595,30 @@ void rbutilFrm::OnInstallBtn(wxCommandEvent& event)
if ( DownloadURL(src, dest) ) if ( DownloadURL(src, dest) )
{ {
wxRemoveFile(dest); wxRemoveFile(dest);
buf.Printf(_("Unable to download %s"), src.c_str() ); buf.Printf(wxT("Unable to download %s"), src.c_str() );
ERR_DIALOG(buf, _("Install")); ERR_DIALOG(buf, wxT("Install"));
return; return;
} }
} }
if ( !UnzipFile(dest, gv->curdestdir, true) ) if ( !UnzipFile(dest, gv->curdestdir, true) )
{ {
wxMessageDialog* msg = new wxMessageDialog(this, _("Rockbox has been installed on your device.") wxMessageDialog* msg = new wxMessageDialog(this, wxT("Rockbox has been installed on your device.")
,"Installation", wxOK |wxICON_INFORMATION); ,wxT("Installation"), wxOK |wxICON_INFORMATION);
msg->ShowModal(); msg->ShowModal();
delete msg; delete msg;
} else } else
{ {
wxRemoveFile(dest); wxRemoveFile(dest);
buf.Printf(_("Unable to unzip %s"), dest.c_str() ); buf.Printf(wxT("Unable to unzip %s"), dest.c_str() );
ERR_DIALOG(buf, _("Install")); ERR_DIALOG(buf, wxT("Install"));
} }
} else } else
{ {
MESG_DIALOG(_("The installation wizard was cancelled") ); MESG_DIALOG(wxT("The installation wizard was cancelled") );
} }
wxLogVerbose("=== end rbutilFrm::OnInstallBtn"); wxLogVerbose(wxT("=== end rbutilFrm::OnInstallBtn"));
} }
void rbutilFrm::OnFontBtn(wxCommandEvent& event) void rbutilFrm::OnFontBtn(wxCommandEvent& event)
@ -609,13 +626,13 @@ void rbutilFrm::OnFontBtn(wxCommandEvent& event)
wxString src, dest, buf; wxString src, dest, buf;
wxDateTime date; wxDateTime date;
wxTimeSpan day(24); wxTimeSpan day(24);
wxLogVerbose("=== begin rbutilFrm::OnFontBtn(event)"); wxLogVerbose(wxT("=== begin rbutilFrm::OnFontBtn(event)"));
wxFileSystem fs; wxFileSystem fs;
wxFileConfig* buildinfo; wxFileConfig* buildinfo;
wxDateSpan oneday; wxDateSpan oneday;
wxWizard *wizard = new wxWizard(this, wxID_ANY, wxWizard *wizard = new wxWizard(this, wxID_ANY,
_("Rockbox Font Installation Wizard"), wxT("Rockbox Font Installation Wizard"),
wxBitmap(wizard_xpm), wxBitmap(wizard_xpm),
wxDefaultPosition, wxDefaultPosition,
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER); wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER);
@ -628,9 +645,9 @@ void rbutilFrm::OnFontBtn(wxCommandEvent& event)
buf.Printf(wxT("%s" PATH_SEP ".rockbox"), gv->curdestdir.c_str()) ; buf.Printf(wxT("%s" PATH_SEP ".rockbox"), gv->curdestdir.c_str()) ;
if (! wxDirExists(buf) ) if (! wxDirExists(buf) )
{ {
buf.Printf(_("Rockbox is not yet installed on %s - install " buf.Printf(wxT("Rockbox is not yet installed on %s - install "
"Rockbox first."), buf.c_str() ); "Rockbox first."), buf.c_str() );
WARN_DIALOG(buf, _("Can't install fonts") ); WARN_DIALOG(buf, wxT("Can't install fonts") );
return; return;
} }
@ -638,8 +655,8 @@ void rbutilFrm::OnFontBtn(wxCommandEvent& event)
gv->stdpaths->GetUserDataDir().c_str()); gv->stdpaths->GetUserDataDir().c_str());
if (DownloadURL(gv->server_conf_url, dest)) if (DownloadURL(gv->server_conf_url, dest))
{ {
WARN_DIALOG(_("Unable to download build status."), WARN_DIALOG(wxT("Unable to download build status."),
_("Font Install")); wxT("Font Install"));
buf = ""; buf = "";
} else } else
{ {
@ -649,25 +666,25 @@ void rbutilFrm::OnFontBtn(wxCommandEvent& event)
buildinfo->DeleteAll(); buildinfo->DeleteAll();
if (buf.Len() != 8) { if (buf.Len() != 8) {
dest.Printf(_("Invalid build date: %s"), buf.c_str()); dest.Printf(wxT("Invalid build date: %s"), buf.c_str());
WARN_DIALOG(dest, _("Font Install")); WARN_DIALOG(dest, wxT("Font Install"));
buf = ""; buf = "";
} }
} }
if (buf == "") { if (buf == "") {
WARN_DIALOG(_("Can't get date of latest build from " WARN_DIALOG(wxT("Can't get date of latest build from "
"server. Using yesterday's date."), "server. Using yesterday's date."),
_("Font Install") ); wxT("Font Install") );
date = wxDateTime::Now(); date = wxDateTime::Now();
date.Subtract(oneday.Day()); date.Subtract(oneday.Day());
buf = date.Format(wxT("%Y%m%d")); // yes, we want UTC buf = date.Format(wxT("%Y%m%d")); // yes, we want UTC
} }
src.Printf("%s%s.zip", gv->font_url.c_str(), buf.c_str() ); src.Printf(wxT("%s%s.zip"), gv->font_url.c_str(), buf.c_str() );
dest.Printf("%s" PATH_SEP "download" PATH_SEP dest.Printf(wxT("%s" PATH_SEP "download" PATH_SEP
"rockbox-fonts-%s.zip", gv->stdpaths->GetUserDataDir().c_str(), "rockbox-fonts-%s.zip"), gv->stdpaths->GetUserDataDir().c_str(),
buf.c_str() ); buf.c_str() );
if ( ! wxFileExists(dest) ) if ( ! wxFileExists(dest) )
@ -675,38 +692,88 @@ void rbutilFrm::OnFontBtn(wxCommandEvent& event)
if ( DownloadURL(src, dest) ) if ( DownloadURL(src, dest) )
{ {
wxRemoveFile(dest); wxRemoveFile(dest);
buf.Printf(_("Unable to download %s"), src.c_str() ); buf.Printf(wxT("Unable to download %s"), src.c_str() );
ERR_DIALOG(buf, _("Font Install")); ERR_DIALOG(buf, wxT("Font Install"));
return; return;
} }
} }
if ( !UnzipFile(dest, gv->curdestdir, true) ) if ( !UnzipFile(dest, gv->curdestdir, true) )
{ {
wxMessageDialog* msg = new wxMessageDialog(this, _("The Rockbox fonts have been installed on your device.") wxMessageDialog* msg = new wxMessageDialog(this, wxT("The Rockbox fonts have been installed on your device.")
,"Installation", wxOK |wxICON_INFORMATION); ,wxT("Installation"), wxOK |wxICON_INFORMATION);
msg->ShowModal(); msg->ShowModal();
delete msg; delete msg;
} else } else
{ {
wxRemoveFile(dest); wxRemoveFile(dest);
buf.Printf(_("Unable to unzip %s"), dest.c_str() ); buf.Printf(wxT("Unable to unzip %s"), dest.c_str() );
ERR_DIALOG(buf, _("Font Install")); ERR_DIALOG(buf, wxT("Font Install"));
} }
} else } else
{ {
MESG_DIALOG(_("The font installation wizard was cancelled") ); MESG_DIALOG(wxT("The font installation wizard was cancelled") );
} }
wxLogVerbose("=== end rbutilFrm::OnFontBtn"); wxLogVerbose(wxT("=== end rbutilFrm::OnFontBtn"));
} }
void rbutilFrm::OnThemesBtn(wxCommandEvent& event)
{
wxString src, dest, buf;
wxTimeSpan day(24);
wxLogVerbose(wxT("=== begin rbutilFrm::OnThemesBtn(event)"));
wxWizard *wizard = new wxWizard(this, wxID_ANY,
wxT("Rockbox Themes Installation Wizard"),
wxBitmap(wizard_xpm),
wxDefaultPosition,
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER);
wxPlatformPage* page1 = new wxPlatformPage(wizard);
wxLocationPage* page2 = new wxLocationPage(wizard);
wxThemesPage* page3 = new wxThemesPage(wizard);
page1->SetNext(page2);
page2->SetPrev(page1);
page2->SetNext(page3);
page3->SetPrev(page2);
wizard->GetPageAreaSizer()->Add(page1);
if (wizard->RunWizard(page1) )
{
bool success=true;
for(int i=0 ;i < gv->themesToInstall.GetCount();i++)
{
if(!InstallTheme(gv->themesToInstall[i]))
{
MESG_DIALOG(wxT("The Themes installation has failed") );
success=false;
break;
}
}
if(success)
{
MESG_DIALOG(wxT("The Theme installation completed successfully.") );
}
}
else
{
MESG_DIALOG(wxT("The Themes installation wizard was cancelled") );
}
wxLogVerbose(wxT("=== end rbutilFrm::OnThemesBtn(event)"));
}
void rbutilFrm::OnRemoveBtn(wxCommandEvent& event) void rbutilFrm::OnRemoveBtn(wxCommandEvent& event)
{ {
wxLogVerbose("=== begin rbutilFrm::OnRemoveBtn(event)"); wxLogVerbose(wxT("=== begin rbutilFrm::OnRemoveBtn(event)"));
wxWizard *wizard = new wxWizard(this, wxID_ANY, wxWizard *wizard = new wxWizard(this, wxID_ANY,
_("Rockbox Uninstallation Wizard"), wxT("Rockbox Uninstallation Wizard"),
wxBitmap(wizard_xpm), wxBitmap(wizard_xpm),
wxDefaultPosition, wxDefaultPosition,
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER); wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER);
@ -722,33 +789,33 @@ void rbutilFrm::OnRemoveBtn(wxCommandEvent& event)
if (Uninstall(gv->curdestdir, gv->curisfull) ) if (Uninstall(gv->curdestdir, gv->curisfull) )
{ {
MESG_DIALOG( MESG_DIALOG(
_("The uninstallation wizard was cancelled or completed with " wxT("The uninstallation wizard was cancelled or completed with "
"some errors.") ); "some errors.") );
} else { } else {
wxMessageDialog* msg = new wxMessageDialog(this, _("The uninstall wizard completed successfully\n" wxMessageDialog* msg = new wxMessageDialog(this, wxT("The uninstall wizard completed successfully\n"
"Depending on which Device you own, you also have to uninstall the Bootloader") "Depending on which Device you own, you also have to uninstall the Bootloader")
,"Uninstallation", wxOK |wxICON_INFORMATION); ,wxT("Uninstallation"), wxOK |wxICON_INFORMATION);
msg->ShowModal(); msg->ShowModal();
delete msg; delete msg;
} }
} else } else
{ {
MESG_DIALOG(_("The uninstallation wizard was cancelled.") ); MESG_DIALOG(wxT("The uninstallation wizard was cancelled.") );
} }
wxLogVerbose("=== end rbutilFrm::OnRemoveBtn"); wxLogVerbose(wxT("=== end rbutilFrm::OnRemoveBtn"));
} }
void rbutilFrm::OnPortableInstall(wxCommandEvent& event) void rbutilFrm::OnPortableInstall(wxCommandEvent& event)
{ {
wxString src, dest, buf; wxString src, dest, buf;
wxLogVerbose("=== begin rbutilFrm::OnPortableInstall(event)"); wxLogVerbose(wxT("=== begin rbutilFrm::OnPortableInstall(event)"));
wxFileSystem fs; wxFileSystem fs;
wxFileConfig* buildinfo; wxFileConfig* buildinfo;
wxDateSpan oneday; wxDateSpan oneday;
wxWizard *wizard = new wxWizard(this, wxID_ANY, wxWizard *wizard = new wxWizard(this, wxID_ANY,
_("Rockbox Utility Portable Installation Wizard"), wxT("Rockbox Utility Portable Installation Wizard"),
wxBitmap(wizard_xpm), wxBitmap(wizard_xpm),
wxDefaultPosition, wxDefaultPosition,
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER); wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER);
@ -760,24 +827,24 @@ void rbutilFrm::OnPortableInstall(wxCommandEvent& event)
{ {
if ( InstallRbutil(gv->curdestdir) ) if ( InstallRbutil(gv->curdestdir) )
{ {
wxMessageDialog* msg = new wxMessageDialog(this, _("The Rockbox Utility has been installed on your device.") wxMessageDialog* msg = new wxMessageDialog(this, wxT("The Rockbox Utility has been installed on your device.")
,"Installation", wxOK |wxICON_INFORMATION); ,wxT("Installation"), wxOK |wxICON_INFORMATION);
msg->ShowModal(); msg->ShowModal();
delete msg; delete msg;
} else } else
{ {
ERR_DIALOG(_("Installation failed"), _("Portable Install")); ERR_DIALOG(wxT("Installation failed"), wxT("Portable Install"));
} }
} else } else
{ {
MESG_DIALOG(_("The portable installation wizard was cancelled") ); MESG_DIALOG(wxT("The portable installation wizard was cancelled") );
} }
wxLogVerbose("=== end rbutilFrm::OnUnstallPortable"); wxLogVerbose(wxT("=== end rbutilFrm::OnUnstallPortable"));
} }
AboutDlg::AboutDlg(rbutilFrm* parent) AboutDlg::AboutDlg(rbutilFrm* parent)
: wxDialog(parent, -1, _("About"), wxDefaultPosition, wxDefaultSize, : wxDialog(parent, -1, wxT("About"), wxDefaultPosition, wxDefaultSize,
wxDEFAULT_DIALOG_STYLE) wxDEFAULT_DIALOG_STYLE)
{ {
wxBoxSizer* WxBoxSizer1 = new wxBoxSizer(wxVERTICAL); wxBoxSizer* WxBoxSizer1 = new wxBoxSizer(wxVERTICAL);
@ -792,13 +859,13 @@ AboutDlg::AboutDlg(rbutilFrm* parent)
WxBoxSizer2->Add(WxStaticBitmap1, 0, wxALL | wxCENTER, 5); WxBoxSizer2->Add(WxStaticBitmap1, 0, wxALL | wxCENTER, 5);
wxStaticText* WxStaticText1 = new wxStaticText(this, wxID_ANY, wxStaticText* WxStaticText1 = new wxStaticText(this, wxID_ANY,
_(RBUTIL_FULLNAME), wxDefaultPosition, wxDefaultSize, wxT(RBUTIL_FULLNAME), wxDefaultPosition, wxDefaultSize,
wxALIGN_CENTER | wxST_NO_AUTORESIZE ); wxALIGN_CENTER | wxST_NO_AUTORESIZE );
WxBoxSizer2->Add(WxStaticText1, 0, wxALL | wxCENTER, 5); WxBoxSizer2->Add(WxStaticText1, 0, wxALL | wxCENTER, 5);
WxBoxSizer1->Add(WxBoxSizer2, 0, wxALL, 5); WxBoxSizer1->Add(WxBoxSizer2, 0, wxALL, 5);
wxStaticText* WxStaticText2 = new wxStaticText(this, wxID_ANY, wxStaticText* WxStaticText2 = new wxStaticText(this, wxID_ANY,
_(RBUTIL_VERSION "\n" RBUTIL_DESCRIPTION "\n\n" RBUTIL_COPYRIGHT)); wxT(RBUTIL_VERSION "\n" RBUTIL_DESCRIPTION "\n\n" RBUTIL_COPYRIGHT));
WxStaticText2->Wrap(400); WxStaticText2->Wrap(400);
WxBoxSizer1->Add(WxStaticText2, 0, wxALL, 5); WxBoxSizer1->Add(WxStaticText2, 0, wxALL, 5);
@ -806,7 +873,7 @@ AboutDlg::AboutDlg(rbutilFrm* parent)
wxT(RBUTIL_WEBSITE), wxT(RBUTIL_WEBSITE) ); wxT(RBUTIL_WEBSITE), wxT(RBUTIL_WEBSITE) );
WxBoxSizer1->Add(WxHyperlink1, 0, wxALL, 5); WxBoxSizer1->Add(WxHyperlink1, 0, wxALL, 5);
wxStaticBox* WxStaticBox1 = new wxStaticBox(this, wxID_ANY, _("Contributors:")); wxStaticBox* WxStaticBox1 = new wxStaticBox(this, wxID_ANY, wxT("Contributors:"));
wxStaticBoxSizer* WxStaticBoxSizer2 = new wxStaticBoxSizer(WxStaticBox1, wxStaticBoxSizer* WxStaticBoxSizer2 = new wxStaticBoxSizer(WxStaticBox1,
wxVERTICAL); wxVERTICAL);
wxTextCtrl* WxTextCtrl1 = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxTextCtrl* WxTextCtrl1 = new wxTextCtrl(this, wxID_ANY, wxEmptyString,
@ -816,7 +883,7 @@ AboutDlg::AboutDlg(rbutilFrm* parent)
while ( rbutil_developers[i] != "") while ( rbutil_developers[i] != "")
{ {
WxTextCtrl1->AppendText(rbutil_developers[i++]); WxTextCtrl1->AppendText(rbutil_developers[i++]);
WxTextCtrl1->AppendText("\n"); WxTextCtrl1->AppendText(wxT("\n"));
} }
WxBoxSizer1->Add(WxStaticBoxSizer2, 1, wxGROW | wxALL, 5); WxBoxSizer1->Add(WxStaticBoxSizer2, 1, wxGROW | wxALL, 5);

View file

@ -58,13 +58,13 @@ public:
public: public:
wxMenuBar *WxMenuBar1; wxMenuBar *WxMenuBar1;
wxStaticText *WxStaticText3; wxStaticText *WxStaticText3;
wxStaticText *WxStaticText4;
wxBitmapButton *WxBitmapButton2; wxBitmapButton *WxBitmapButton2;
wxStaticText *WxStaticText2; wxStaticText *WxStaticText2;
wxBitmapButton *WxBitmapButton1; wxBitmapButton *WxBitmapButton1;
wxBitmapButton *WxBitmapButton3; wxBitmapButton *WxBitmapButton3;
wxBitmapButton *WxBitmapButton4; wxBitmapButton *WxBitmapButton4;
wxBitmapButton *WxBitmapButton5; wxBitmapButton *WxBitmapButton5;
wxBitmapButton *WxBitmapButton6;
wxFlexGridSizer *WxFlexGridSizer1; wxFlexGridSizer *WxFlexGridSizer1;
wxStaticBoxSizer *WxStaticBoxSizer3; wxStaticBoxSizer *WxStaticBoxSizer3;
wxStaticBitmap *WxStaticBitmap1; wxStaticBitmap *WxStaticBitmap1;
@ -87,6 +87,7 @@ public:
ID_INSTALL_BTN = 1028, ID_INSTALL_BTN = 1028,
ID_WXSTATICBITMAP1 = 1053, ID_WXSTATICBITMAP1 = 1053,
ID_FONT_BTN = 1128, ID_FONT_BTN = 1128,
ID_THEMES_BTN = 1139,
ID_BOOTLOADER_BTN = 1129, ID_BOOTLOADER_BTN = 1129,
ID_WXPANEL1 = 1064, ID_WXPANEL1 = 1064,
@ -102,6 +103,7 @@ public:
void OnInstallBtn(wxCommandEvent& event); void OnInstallBtn(wxCommandEvent& event);
void OnRemoveBtn(wxCommandEvent& event); void OnRemoveBtn(wxCommandEvent& event);
void OnFontBtn(wxCommandEvent& event); void OnFontBtn(wxCommandEvent& event);
void OnThemesBtn(wxCommandEvent& event);
void OnBootloaderBtn(wxCommandEvent& event); void OnBootloaderBtn(wxCommandEvent& event);
void OnPortableInstall(wxCommandEvent& event); void OnPortableInstall(wxCommandEvent& event);
void OnBootloaderRemoveBtn(wxCommandEvent& event); void OnBootloaderRemoveBtn(wxCommandEvent& event);

View file

@ -1,286 +1,313 @@
/* WxBitmapButton2 XPM */ /* XPM */
static char *uninstall_3d_xpm[]={ static char * uninstall_3d_xpm[] = {
"56 46 236 2", "56 46 264 2",
" c None", " c #FFFFFF",
" 0 c #BEBABE", ". c #BEBABE",
" 1 c #BEC3BE", "+ c #BEC3BE",
" 2 c #000011", "@ c #000011",
" 3 c #AEAAAE", "# c #AEAAAE",
" 4 c #9E9A9E", "$ c #9E9A9E",
" 5 c #C0B3AE", "% c #010101",
" 6 c #C97577", "& c #79869E",
" 7 c #C45759", "* c #C7BAC7",
" 8 c #BF6B6D", "= c #5155FF",
" 9 c #BEB9BD", "- c #5558FC",
" a c #BFB1B5", "; c #6A66E3",
" b c #C49793", "> c #5F3C3B",
" c c #CE5254", ", c #C67175",
" d c #D81413", "' c #623841",
" e c #DB0505", ") c #949194",
" f c #DB0303", "! c #BEBFBB",
" g c #D81717", "~ c #BA7F82",
" h c #CB6668", "{ c #C97173",
" i c #C1A6AA", "] c #431C1D",
" j c #C64E50", "^ c #241D1D",
" k c #D71E1F", "/ c #ADAAAE",
" l c #D31F1F", "( c #6E5EDE",
" m c #CF4C4D", "_ c #BD8587",
" n c #BA797D", ": c #A25A94",
" o c #C29EA2", "< c #C2344A",
" p c #AFA4A8", "[ c #DA0909",
" q c #C0AAAE", "} c #DB0302",
" r c #C25C5E", "| c #D51617",
" s c #D6201E", "1 c #9A8B98",
" t c #DA0606", "2 c #AEAEB6",
" u c #D81A1B", "3 c #C07B7E",
" v c #CD5D5F", "4 c #D81111",
" w c #D90E0D", "5 c #DA0707",
" x c #D62423", "6 c #D71314",
" y c #C68789", "7 c #D13434",
" z c #010101", "8 c #C49094",
" A c #130101", "9 c #C0BCB8",
" B c #650101", "0 c #0D0D0D",
" C c #C40202", "a c #5558FE",
" D c #DA0202", "b c #5449BC",
" E c #DB0202", "c c #A2484A",
" F c #D42F30", "d c #CF1D26",
" G c #D81516", "e c #DC0000",
" H c #C3595B", "f c #DD0000",
" I c #C2A49F", "g c #A1848F",
" J c #D62424", "h c #CE5456",
" K c #DA0607", "i c #DC0101",
" L c #D14244", "j c #D01717",
" M c #DB0404", "k c #943857",
" N c #D90909", "l c #4B1A1A",
" O c #A10101", "m c #524ACB",
" P c #CA6B6D", "n c #4C4FEE",
" Q c #070101", "o c #4A4DE5",
" R c #3F000C", "p c #7D57A6",
" S c #CD0202", "q c #D71F26",
" T c #DB0203", "r c #DB0000",
" U c #D90C0C", "s c #DC0100",
" V c #CE5556", "t c #E20200",
" W c #C0B2AD", "u c #E10000",
" X c #C7BAC7", "v c #E00201",
" Y c #C59591", "w c #D90707",
" Z c #D41E1E", "x c #A13C3C",
" & c #CE0203", "y c #868EA1",
"0 c #A1246B", "z c #B6AEB6",
"00 c #6F42C7", "A c #CFC7CF",
"01 c #604BE2", "B c #452F2E",
"02 c #9D2774", "C c #C92B2B",
"03 c #D80409", "D c #DE0101",
"04 c #B40202", "E c #DF0809",
"05 c #AE3C48", "F c #B80E1A",
"06 c #8E687A", "G c #7D308D",
"07 c #AFA5A9", "H c #6E3FBA",
"08 c #C49397", "I c #7F2C85",
"09 c #D04546", "J c #C70102",
"0a c #CB0202", "K c #DE0000",
"0b c #DA0305", "L c #DD0302",
"0c c #D60409", "M c #DE0203",
"0d c #A91F5D", "N c #B00E28",
"0e c #300101", "O c #AC2945",
"0f c #BEB4B8", "P c #6C0E18",
"0g c #8E8A8E", "Q c #B4949B",
"0h c #79869E", "R c #222020",
"0i c #B49194", "S c #A6989C",
"0j c #C77D7F", "T c #A67578",
"0k c #D41A1B", "U c #9D3234",
"0l c #783CB5", "V c #C90D0D",
"0m c #5552F7", "W c #E50B0B",
"0n c #AEAEB6", "X c #E50202",
"0o c #B19B9F", "Y c #E40304",
"0p c #CC6163", "Z c #E40303",
"0q c #CC0202", "` c #DF0303",
"0r c #DA0A0A", " . c #DB0303",
"0s c #932D85", ".. c #D90306",
"0t c #5155FF", "+. c #CE1723",
"0u c #C16263", "@. c #753FC5",
"0v c #D33432", "#. c #5449DC",
"0w c #D90707", "$. c #5459F3",
"0x c #C50F29", "%. c #100C0D",
"0y c #6449DC", "&. c #48459B",
"0z c #B6AEB6", "*. c #63376A",
"0A c #CFC7CF", "=. c #B6374A",
"0B c #B58D91", "-. c #D1171C",
"0C c #CF0202", ";. c #DB0202",
"0D c #B21B4C", ">. c #DE0202",
"0E c #1F0101", ",. c #9F206C",
"0F c #C80202", "'. c #6660EB",
"0G c #6847D4", "). c #202496",
"0H c #BA0202", "!. c #202495",
"0I c #D4060F", "~. c #343798",
"0J c #86349C", "{. c #B48083",
"0K c #C11130", "]. c #D80101",
"0L c #D5070F", "^. c #DC0303",
"0M c #773EB8", "/. c #DF0100",
"0N c #202496", "(. c #DE0200",
"0O c #252291", "_. c #DD0202",
"0P c #541A6D", ":. c #B31143",
"0Q c #CE050D", "<. c #645CEB",
"0R c #D10202", "[. c #9696AE",
"0S c #5C4DE9", "}. c #1F2390",
"0T c #CC0B1E", "|. c #867274",
"0U c #D70509", "1. c #BB1C1D",
"0V c #8335A0", "2. c #E40101",
"0W c #9696AE", "3. c #AF1F58",
"0X c #511A6E", "4. c #C51539",
"0Y c #CD050E", "5. c #E30202",
"0Z c #D90B0B", "6. c #DC0201",
"0& c #400101", "7. c #A62566",
"1 c #6B44CD", "8. c #5255FE",
"10 c #D4070F", "9. c #7992B6",
"11 c #CE091A", "0. c #717986",
"12 c #7992B6", "a. c #8E6C81",
"13 c #717986", "b. c #C40505",
"14 c #3F1E7D", "c. c #E10100",
"15 c #CE040C", "d. c #930000",
"16 c #DA0909", "e. c #0D040A",
"17 c #BA7B7E", "f. c #200610",
"18 c #250101", "g. c #B30307",
"19 c #D30202", "h. c #E20102",
"1a c #D51919", "i. c #DD0001",
"1b c #D81010", "j. c #891034",
"1c c #CF4644", "k. c #080309",
"1d c #C49894", "l. c #010103",
"1e c #690101", "m. c #9B7795",
"1f c #D80B0C", "n. c #D80B16",
"1g c #B97D80", "o. c #E30201",
"1h c #DA0203", "p. c #DB0201",
"1i c #8B0101", "q. c #C84848",
"1j c #060010", "r. c #938D8A",
"1k c #B48F92", "s. c #887B78",
"1l c #D60202", "t. c #D11111",
"1m c #BEB1B5", "u. c #E00202",
"1n c #D71918", "v. c #EE0100",
"1o c #DA0B0B", "w. c #4D6A15",
"1p c #C49194", "x. c #ADA9AD",
"1q c #B19C9F", "y. c #28080B",
"1r c #CE2222", "z. c #DD0D11",
"1s c #7A0101", "A. c #DC0102",
"1t c #CB6467", "B. c #9F3435",
"1u c #DC0404", "C. c #322D2E",
"1v c #DC0303", "D. c #060707",
"1w c #D33435", "E. c #77312F",
"1x c #FCEAEA", "F. c #8F2926",
"1y c #C35C5E", "G. c #010111",
"1z c #DA0404", "H. c #B0A6AA",
"1A c #D90808", "I. c #B30807",
"1B c #D81616", "J. c #C66265",
"1C c #D20202", "K. c #292728",
"1D c #570101", "L. c #B5A7AA",
"1E c #9F9599", "M. c #D60B0B",
"1F c #CC3839", "N. c #CF0303",
"1G c #CB6967", "O. c #A89595",
"1H c #970101", "P. c #A19CA0",
"1I c #B78587", "Q. c #C35557",
"1J c #BB0101", "R. c #E00101",
"1K c #B48D91", "S. c #9E1717",
"1L c #FBE9E9", "T. c #A9A2A6",
"1M c #D9100F", "U. c #BFC4BF",
"1N c #D40202", "V. c #CB6B6C",
"1O c #3E0101", "W. c #DF0000",
"1P c #C04444", "X. c #E35A59",
"1Q c #D80202", "Y. c #BFC0BC",
"1R c #AB777A", "Z. c #B28C90",
"1S c #8D0202", "`. c #E80A0A",
"1T c #9F0101", " + c #370C0D",
"1U c #D41919", ".+ c #C6BEBB",
"1V c #D51617", "++ c #E12F2E",
"1W c #867488", "@+ c #DE0303",
"1X c #D70607", "#+ c #D60000",
"1Y c #D40B0C", "$+ c #260000",
"1Z c #7C0101", "%+ c #121213",
"1& c #C0252C", "&+ c #C05B5C",
"2 c #DA0304", "*+ c #963334",
"20 c #8186A7", "=+ c #A6A1A5",
"21 c #B8595B", "-+ c #BBB8BC",
"22 c #B78487", ";+ c #B05956",
"23 c #B9787B", ">+ c #E40202",
"24 c #CF6B72", ",+ c #AE1414",
"25 c #CF3031", "'+ c #040101",
"26 c #D80A0A", ")+ c #AFA7AB",
"27 c #CE0202", "!+ c #D30F0F",
"28 c #D21F20", "~+ c #DC0202",
"29 c #D51112", "{+ c #CC0203",
"2a c #D02728", "]+ c #95898C",
"2b c #CF2E2F", "^+ c #040404",
"2c c #DA0303", "/+ c #BDB9BD",
"2d c #B48E91", "(+ c #D0C9CB",
"2e c #DA0505", "_+ c #D8171A",
"2f c #BE4749", ":+ c #261C23",
"2g c #5E0101", "<+ c #513436",
"2h c #B46163", "[+ c #E10101",
"2i c #AC7578", "}+ c #AE4042",
"2j c #310101", "|+ c #131212",
"2k c #CE2122", "1+ c #090909",
"2l c #C33E40", "2+ c #812A2D",
"2m c #C50202", "3+ c #60333C",
"2n c #D90202", "4+ c #C05658",
"2o c #600101", "5+ c #E60303",
"2p c #C63537", "6+ c #986365",
"2q c #C94445", "7+ c #766775",
"2r c #A69EA6", "8+ c #E30606",
"2s c #7F7D93", "9+ c #D12829",
"2t c #CF1215", "0+ c #82899D",
"2u c #CA191D", "a+ c #B72223",
"2v c #CA2C2D", "b+ c #DD0101",
"2w c #DA0707", "c+ c #D20607",
"2x c #D60F0F", "d+ c #A79194",
"2y c #C43C3D", "e+ c #928B8F",
"2z c #A58589", "f+ c #AF1113",
"2A c #A97C7F", "g+ c #DB0101",
"2B c #CE2223", "h+ c #DA0404",
"2C c #A68589", "i+ c #9C8387",
"2D c #A97D80", "j+ c #D01E1F",
"2E c #B59093", "k+ c #E10202",
"2F c #A09296", "l+ c #A50E0E",
"2G c #9E999D", "m+ c #A49DA1",
" 0", "n+ c #ADADB5",
" 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 2", "o+ c #882C2D",
" 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 2", "p+ c #EA0101",
" 1 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 2", "q+ c #BD6063",
" 3 0 3 0 4 1 0 3 3 1 3 0 4 1 0 3 3 1 3 0 4 1 0 3 3 1 3 0 4 1 0 3 3 1 3 0 4 5 6 7 8 5 3 0 4 1 0 3 3 1 3 0 3 1 2", "r+ c #ADAEB6",
" 0 1 0 1 0 1 0 1 0 0 1 0 1 0 1 0 1 0 0 1 0 1 0 1 0 0 1 0 1 0 1 0 1 9 a b c d e f g h 1 0 1 0 1 0 1 0 0 1 0 0 2", "s+ c #D90708",
" 3 0 3 0 3 0 3 0 3 i j k l m n o p 1 3 0 3 0 3 0 3 0 3 0 3 0 3 q r s t f f f f f f u 3 0 3 0 3 0 3 1 3 0 3 0 2", "t+ c #A9292A",
" 0 1 0 1 0 3 0 0 1 v w f f f f x y 0 1 0 1 z z z z z z z z A B C D E E E E f f f f u 1 0 1 3 1 0 1 0 0 1 0 3 2", "u+ c #1D0203",
" 3 0 4 1 3 0 3 1 4 F f f f f f E E G H q z 0 1 0 1 0 1 0 I J f f f f f f f E f f K h 3 0 3 0 4 0 3 0 4 0 3 0 2", "v+ c #D90102",
" 0 1 0 3 0 1 0 3 0 L M f f f E f E f f N O P A z 2 z Q R S T E T E T E T f E f U V W 0 3 1 0 1 3 1 0 1 3 0 1 2", "w+ c #BE454A",
" 3 0 3 0 3 X 4 1 3 Y Z f f E f f E f f f E f &0 00010203 f f f f f f f E t040506 p X 3 0 4 0 3 0 3 1 3 0 3 0 2", "x+ c #CF2121",
" 0 3 0 1 0 3 1 3 00708090a f f E f E E f E f E f f0b f f f f f f f0c0d0e0f 20g0h 0 3 1 0 1 3 0 3 0 3 0 0 1 3 2", "y+ c #D51313",
" 3 0 3 0 4 0 3 0 3 0 4 Q0i0j04 f f f E E E E E E f f f f f f f f0k0l0m z 1 20h0h0n 0 3 0 3 0 3 0 4 1 3 1 3 0 2", "z+ c #603A3B",
" 0 3 X 3 0 3 0 3 0 3 1 z 1 z 00o0p0q f f f f E E f f f f f f0r0s W0t0t z 0 z0h0h 0 3 0 3 1 3 X 3 0 3 0 3 0 3 2", "A+ c #080808",
" 3 1 3 1 3 0 3 0 3 0 3 z z 0 3 0 z W0u0v0w E f E f f f f f f0x0y 30t0t z 1 z0h0h0z 0 3 0 4 0 3 1 3 0 3 0 4 1 2", "B+ c #B4B1B6",
" 3 3 0 3 3 30A 3 3 3 0 3 z 3 z z z z 00B0C f f E f f f f f f f0D 10t0t 2 0 z0h0h 3 3 0 3 3 3 0 3 3 3 X 3 3 3 2", "C+ c #BB6065",
" 3 0 3 0 3 0 4 0 3 0 3 0 3 z 3 0 3 00E0F f f f E f f f f f f f f0G0t0t z 1 z 40h 3 0 3 1 3 0 3 0 3 0 3 0 3 0 2", "D+ c #DB0807",
" 3 3 3 3 3 3 3 3 3 3 3 3 3 z z z z0E0H f f f f E0I0J0K f f f f f0L0M0m z 0 z0h0h 3 3 3 3 3 3 3 3 3 3 3 3 3 3 2", "E+ c #5C3035",
" 3 0 3 0 3 0 3 0 3 X 3 0 3 z0N0O0P0Q E f f f f0R0G0t0S0T f f f f f0U0V z 1 20h0W 3 0 3 0 3 0 4 1 3 0 3 0 3 0 2", "F+ c #AE9598",
" 3 3 3 3 3 3 3 3 3 3 3 3 3 z0N0X0Y f E f f f0Z0&0t0t0t1 10 f f f f f11 z 0 z1213 3 3 3 3 3 3 3 3 3 3 3 3 3 3 2", "G+ c #AC8083",
" 3 3 3 0 3 3 3 0 3 3 3 0 3 z1415 f f E f f1617 Q z z z z1819 E E E E E Q 1 z0h0h0n 3 3 0 3 3 3 0 3 3 3 0 3 3 2", "H+ c #AE989C",
" 3 3 3 3 3 3 3 3 3 3 3 3 3 A1a f f f E f1b17 3 z 1 1 1 1 11c f f f f f1d 0 z0h0h 3 3 3 3 3 3 3 3 3 3 3 3 3 3 2", "I+ c #080707",
" 3 3 3 3 3 3 3 3 3 3 3 3 31e f f f f E1f1g p 3 z z 2 z 2 z0&1h E E E T1i1j z z z 3 3 3 3 3 3 3 3 3 3 3 3 3 3 2", "J+ c #050506",
" 3 3 3 3 3 3 3 3 3 3 3 31k19 f f f f1l17 3 z 0 z 1 0 0 1 01m1n f f f f1o1p 1 0 0 z 3 3 3 3 3 3 3 3 3 3 3 3 3 2", "K+ c #141011",
" 4 3 3 3 4 3 3 3 4 3 31q1r E f f f f1s p z 3 3 z 0 1 0 11t1u f f1v f1w1x 1 0 z0h 3 3 4 3 3 3 4 3 3 3 4 3 2", "L+ c #453133",
" 3 3 3 3 3 3 3 3 3 3 31y1z E f f f1A A 3 3 z 3 z 1 0 0 1 0 0 W1B E E E E1C1D 0 0 z0h0h 3 3 3 3 3 3 3 3 3 3 3 2", "M+ c #453333",
" 3 3 4 3 4 3 4 3 3 31E0k f E f E f1F z 3 z 3 4 z 0 1 0 1 0 1 01G M E E f E1H Q 1 z0h0h0z 4 3 4 3 3 3 4 3 4 3 2", "N+ c #090808",
" 3 3 3 3 3 3 3 3 3 31I1z f E f f1J1K z 3 3 z 3 z 0 1 0 0 01L1M f E E E1N1O z z0h0h 3 3 3 3 3 3 3 3 3 3 3 2", "O+ c #A69EA6",
" 4 3 4 3 4 3 4 3 4 31P f f E f1Q1R 3 z 3 z 3 4 z z z z z z z z z1S D E E E E1T z0h0h0h 3 4 3 4 3 4 3 4 3 4 3 2", " . ",
" 3 3 3 3 3 3 3 3 3 31U f f E f1V Q 3 z 3 3 3 3 z0h0h0h0h0h0h0h0h1W1X f f f f1Y12130W0h 3 3 3 3 3 3 3 3 3 3 3 2", " . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + @ ",
" 4 3 4 3 4 3 4 3 41q1z f f E f1Z 4 3 z 3 4 3 z z0h0h0h0W13120h0h0g1& f f f f2 201312 4 3 4 3 4 3 4 3 4 3 4 3 2", " + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . + . @ ",
" 3 4 3 3 3 4 3 3 321 f f f E f22 z 4 z 3 3 z0h z z z z z z z z 20n23 f f f f f24 3 4 3 3 3 4 3 3 3 4 3 3 3 4 2", " + . . + . . . + . . . + . . . + . . . + . . . + . . . + . . . + . . . + . . . + . . . + . . . + . . . + . . @ ",
" 4 3 4 3 4 3 4 3 425 f f f E26 Q 4 3 z 3 z0h0h z 4 0 0 0 3 0 z z z Q27 E E f f281E 3 4 3 4 3 4 3 4 3 4 3 4 3 2", " # . # . $ + . # # + # . $ + . # # + # . $ + . # # + # . $ + . # # + # . $ + . # # + # . $ + . # # + # . # + @ ",
" 3 4 3 4 3 4 3 4 329 f f f E2a 4 3 4 z z0h0h0h0h z z z z z z z 3 0 02b f f E f2c2d 4 3 4 3 4 3 4 3 4 3 4 3 4 2", " . + . + . + . + . . + . + . + . + . . + . + . + . . + . + . + . + . . + . + . + . . + . + . + . + . . + . . @ ",
" 4 3 4 3 4 3 4 31E2e f f f E2f 3 4 3 z0h0h0W130z 4 z z z z 0 z z z z2g E E E E f2h 3 4 3 4 3 4 3 4 3 4 3 4 3 2", " # . # . # . # . # . # . # . # . # + # . # . # . # . # . # . # . # + # . # . # . # . # . # . # . # + # . # . @ ",
" 4 4 3 4 4 4 3 42i f f f f E2j z z z0W1312130n 4 4 4 z z z z z z z z A f E E E E2k 4 3 4 4 4 3 4 4 4 3 4 4 4 2", " . + . + . # . . + . + . + # . + . . + . + % % % % % % % % % % % % % % % % # . . + . + . + # + . + . . + . # @ ",
" 4 3 4 3 4 3 4 32l f f f f f1E0h0h0h0h0h0h0z0W 3 4 3 40h z z z z z z z2m E E E E2n 3 4 3 4 3 4 3 4 3 4 3 4 3 2", " # . $ + # . # + $ . # . # . $ % % . # . % . + . + . + . + . + . + . . + . % # . $ . # . # . $ . # . $ . # . @ ",
" 4 4 4 4 4 4 4 42k f f f f0w 40h0h0h0h0h 4 4 4 4 4 4 4 40h0h0h0h0h0h z2o E E E E E0h 4 4 4 4 4 4 4 4 4 4 4 4 2", " . + . # . + . # . . + # . + % # % + . # % . % % @ % % @ % @ % @ % @ % @ . % & # . + . # + . + # + . + # . + @ ",
" 4 3 4 3 4 3 4 32p2e f f M2q 4 32r 3 40n 4 3 4 3 4 3 4 0 4 3 4 X 4 30h2s2t f f f2u0h0h 3 4 3 4 3 4 3 4 3 4 3 2", " # . # . # * $ + # + # . # % # . % . # . % + @ = = = = = = = = = = = = % + % & & # * # . $ . # . # + # . # . @ ",
" 4 4 4 4 4 4 4 42i2v2w2x2y2z 4 4 4 42r 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 42A2B f2B2A 42r 4 4 4 4 4 4 4 4 4 4 4 2", " . # . + . # + # . # . . % # . % + % % + % . % = = = = = = = + = + - ; > , ' ) & . # + . + # . # . # . . + # @ ",
" 4 4 4 3 4 4 4 31E2C2D2E2F2G 4 3 4 4 4 3 4 4 4 3 4 4 4 3 4 4 4 3 4 4 4 3 4 4 4 3 4 4 4 3 4 4 4 3 4 4 4 3 4 4 2", " # . # . $ . # . # . $ % # . % ! ~ { ] ^ % % % % = = = = = = / ( _ : < [ } | 1 & 2 . # . # . # . $ + # + # . @ ",
" 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 2", " . # * # . # . # . # + % + % . 3 4 5 6 7 8 9 0 % = = = = a b c d e f f e f f g & . # . # + # * # . # . # . # @ ",
" 4 3 4 4 4 4 4 4 4 3 4 4 4 4 4 4 4 3 4 4 4 4 4 4 4 3 4 4 4 4 4 4 4 3 4 4 4 4 4 4 4 3 4 4 4 4 4 4 4 3 4 4 4 4 2", " # + # + # . # . # . # % % . # h e i e e e j k l m n = o p q r e s t u v w x y & z . # . $ . # + # . # . $ + @ ",
" 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 2", " # # . # # # A # # # . # % # % B C D e f e e f E F G H I J K L f M N O P Q R & & # # . # # # . # # # * # # # @ ",
" 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 2", " # . # . # . $ . # . # . # % # . S T U V W e e e u X Y Z ` ...+.@.#.$.% + % $ & # . # + # . # . # . # . # . @ ",
" 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2"}; " # # # # # # # # # # # # # % % % % % %.&.*.=.-. .;.;. . . .>.,.'.= = = % . % & & # # # # # # # # # # # # # # @ ",
" # . # . # . # . # * # . # % ).).).).% ).!.~.{.].^.;./.(. ._.:.<.= = = % + @ & [.# . # . # . $ + # . # . # . @ ",
" # # # # # # # # # # # # # % ).).).).% ).}.|.1.` } 2.3.4.5.} 6.7.8.= = % . % 9.0.# # # # # # # # # # # # # # @ ",
" # # # . # # # . # # # . # % ).).).).% ).a.b.c. .e d.e.f.g.h.} i.j.k.% % + % & & 2 # # . # # # . # # # . # # @ ",
" # # # # # # # # # # # # # % # # # # l.m.n.o.p.K q.r.+ + s.t.u.6.v.w.+ + . % & & # # # # # # # # # # # # # # @ ",
" # # # # # # # # # # # # # % # # # x.y.z./.A.K B.C.@ % @ D.E.r .u F.G.% @ % % % # # # # # # # # # # # # # # @ ",
" # # # # # # # # # # # # # % # # # H.I.c. .r J.K.+ . . + . L.M.i _.N.O.. . + . . % # # # # # # # # # # # # # @ ",
" $ # # # $ # # # $ # # # $ % # # P.Q.R. .X S.T.% . + . U.V.e ;.W.X.Y.. + . % & # # $ # # # $ # # # $ # @ ",
" # # # # # # # # # # # # # % # # Z.^.i i `. +# % + . . + . . .+++r @+#+$+% % . . % & & # # # # # # # # # # # @ ",
" # # $ # $ # $ # # # $ # $ % $ %+&+K ;.K *+=+$ % . + . + . + -+;+e ;.>+,+'+% % + % & & z $ # $ # # # $ # $ # @ ",
" # # # # # # # # # # # # # % # )+!+i ~+{+]+^+# % . + . . /+(+_+i ~+W.:+% % % % & & # # # # # # # # # # # @ ",
" $ # $ # $ # $ # $ # $ # $ % $ <+e .[+}+|+# $ % % % % % % % % 1+2+K .W.3+% % % & & & # $ # $ # $ # $ # $ # @ ",
" # # # # # # # # # # # # # % # 4+f ;.5+6+# # # % & & & & & & & & 7+8+;.e 9+0+& 9.0.[.& # # # # # # # # # # # @ ",
" $ # $ # $ # $ # $ # $ # $ % $ a+f b+c+d+$ # % % & & & [.0.9.& & e+f+[+g+h+i+0.9.0.9.$ # $ # $ # $ # $ # $ # @ ",
" # $ # # # $ # # # $ # # # % # j+f k+l+m+# % & % % % % % % % % @ n+o+p+;.f q+r+* # $ # # # $ # # # $ # # # $ @ ",
" $ # $ # $ # $ # $ # $ # $ % $ s+s W.t+/ % & & % $ . . . # . % % % u+v+W.u w+$ # $ # $ # $ # $ # $ # $ # $ # @ ",
" # $ # $ # $ # $ # $ # $ # % # x+f y+z+A+& & & & % % % % % % % # . B+C+b+D+E+# $ # $ # $ # $ # $ # $ # $ # $ @ ",
" $ # $ # $ # $ # $ # $ # $ % $ F+G+H+I+& & [.0.z $ % % % % . % % % J+K+L+M+N+% # $ # $ # $ # $ # $ # $ # $ # @ ",
" $ $ # $ $ $ # $ $ $ # $ $ % % % % % [.0.9.0.2 $ $ $ % % % % % % % % % $ % % % % $ $ # $ $ $ # $ $ $ # $ $ $ @ ",
" $ # $ # $ # $ # $ # $ # $ # $ & & & & & & z [.# $ # $ & % % % % % % % % % % % % % # $ # $ # $ # $ # $ # $ # @ ",
" $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ & & & & & $ $ $ $ $ $ $ $ & & & & & & % % % % % % % & $ $ $ $ $ $ $ $ $ $ $ $ @ ",
" $ # $ # $ # $ # $ # $ # $ # $ # O+# $ 2 $ # $ # $ # $ . $ # $ * $ # & & & & & & & & & # $ # $ # $ # $ # $ # @ ",
" $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ O+$ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ O+$ $ $ $ $ $ $ $ $ $ $ @ ",
" $ $ $ # $ $ $ # $ $ $ # $ $ $ # $ $ $ # $ $ $ # $ $ $ # $ $ $ # $ $ $ # $ $ $ # $ $ $ # $ $ $ # $ $ $ # $ $ @ ",
" $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ @ ",
" $ # $ $ $ $ $ $ $ # $ $ $ $ $ $ $ # $ $ $ $ $ $ $ # $ $ $ $ $ $ $ # $ $ $ $ $ $ $ # $ $ $ $ $ $ $ # $ $ $ $ @ ",
" $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ @ ",
" $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ @ ",
"+ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ "};

View file

@ -21,12 +21,17 @@
#include "wizard_pages.h" #include "wizard_pages.h"
#include "bootloaders.h" #include "bootloaders.h"
#include <wx/regex.h>
#include <wx/tokenzr.h>
/////// Bootplatform page ///////////////////////////////////77
wxBootPlatformPage::wxBootPlatformPage(wxWizard *parent) : wxWizardPageSimple(parent) wxBootPlatformPage::wxBootPlatformPage(wxWizard *parent) : wxWizardPageSimple(parent)
{ {
wxBoxSizer* WxBoxSizer1 = new wxBoxSizer(wxVERTICAL); wxBoxSizer* WxBoxSizer1 = new wxBoxSizer(wxVERTICAL);
wxStaticText* WxStaticText1 = new wxStaticText(this, wxID_ANY, wxStaticText* WxStaticText1 = new wxStaticText(this, wxID_ANY,
_("Please select the model of audio device that you would like to" wxT("Please select the model of audio device that you would like to"
"\ninstall the Rockbox Bootloader on from the list below:")); "\ninstall the Rockbox Bootloader on from the list below:"));
WxBoxSizer1->Add(WxStaticText1,0,wxGROW | wxALL,5); WxBoxSizer1->Add(WxStaticText1,0,wxGROW | wxALL,5);
@ -61,12 +66,12 @@ wxBootPlatformPage::wxBootPlatformPage(wxWizard *parent) : wxWizardPageSimple(pa
wxWizardPage * wxBootPlatformPage::GetNext() const wxWizardPage * wxBootPlatformPage::GetNext() const
{ {
if(gv->curbootloadermethod != "fwpatcher"&& gv->curbootloadermethod != "ipodpatcher") if(gv->curbootloadermethod != wxT("fwpatcher")&& gv->curbootloadermethod != wxT("ipodpatcher"))
{ {
if(wxWizardPageSimple::GetNext()->GetNext() != NULL) // not iriver hx0 and ipod, skip one page if(wxWizardPageSimple::GetNext()->GetNext() != NULL) // not iriver hx0 and ipod, skip one page
return wxWizardPageSimple::GetNext()->GetNext(); return wxWizardPageSimple::GetNext()->GetNext();
} }
else if(gv->curbootloadermethod == "ipodpatcher") else if(gv->curbootloadermethod == wxT("ipodpatcher"))
{ {
if(wxWizardPageSimple::GetNext()->GetNext() != NULL) if(wxWizardPageSimple::GetNext()->GetNext() != NULL)
if(wxWizardPageSimple::GetNext()->GetNext()->GetNext() != NULL) if(wxWizardPageSimple::GetNext()->GetNext()->GetNext() != NULL)
@ -83,8 +88,8 @@ bool wxBootPlatformPage::TransferDataFromWindow()
{ {
if (BootPlatformListBox->GetSelection() == wxNOT_FOUND ) if (BootPlatformListBox->GetSelection() == wxNOT_FOUND )
{ {
WARN_DIALOG(_("You must select an audio device type before proceeding"), WARN_DIALOG(wxT("You must select an audio device type before proceeding"),
_("Select Platform")); wxT("Select Platform"));
return false; return false;
} else } else
{ {
@ -98,13 +103,13 @@ bool wxBootPlatformPage::TransferDataFromWindow()
return true; return true;
} }
} }
//// Plattfor Page //////////////////////////
wxPlatformPage::wxPlatformPage(wxWizard *parent) : wxWizardPageSimple(parent) wxPlatformPage::wxPlatformPage(wxWizard *parent) : wxWizardPageSimple(parent)
{ {
wxBoxSizer* WxBoxSizer1 = new wxBoxSizer(wxVERTICAL); wxBoxSizer* WxBoxSizer1 = new wxBoxSizer(wxVERTICAL);
wxStaticText* WxStaticText1 = new wxStaticText(this, wxID_ANY, wxStaticText* WxStaticText1 = new wxStaticText(this, wxID_ANY,
_("Please select the model of audio device that you would like to" wxT("Please select the model of audio device that you would like to"
"\ninstall Rockbox on from the list below:")); "\ninstall Rockbox on from the list below:"));
WxBoxSizer1->Add(WxStaticText1,0,wxGROW | wxALL,5); WxBoxSizer1->Add(WxStaticText1,0,wxGROW | wxALL,5);
@ -124,17 +129,274 @@ bool wxPlatformPage::TransferDataFromWindow()
{ {
if (PlatformListBox->GetSelection() == wxNOT_FOUND ) if (PlatformListBox->GetSelection() == wxNOT_FOUND )
{ {
WARN_DIALOG(_("You must select an audio device type before proceeding"), WARN_DIALOG(wxT("You must select an audio device type before proceeding"),
_("Select Platform")); wxT("Select Platform"));
return false; return false;
} else } else
{ {
gv->curplatnum = PlatformListBox->GetSelection(); gv->curplatnum = PlatformListBox->GetSelection();
gv->curplat = gv->plat_id[gv->curplatnum]; gv->curplat = gv->plat_id[gv->curplatnum];
gv->curresolution = gv->plat_resolution[gv->curplatnum];
return true; return true;
} }
} }
//////////////// ThemeImage Dialog /////////////////
BEGIN_EVENT_TABLE(wxThemeImageDialog,wxDialog)
EVT_PAINT(wxThemeImageDialog::OnPaint)
END_EVENT_TABLE();
wxThemeImageDialog::wxThemeImageDialog(wxWindow* parent,wxWindowID id,wxString title,wxBitmap bmp) :
wxDialog(parent, id, title)
{
wxBoxSizer *sizerTop = new wxBoxSizer(wxHORIZONTAL);
m_bitmap = bmp;
sizerTop->SetMinSize(m_bitmap.GetWidth(),m_bitmap.GetHeight());
SetSizer(sizerTop);
sizerTop->SetSizeHints(this);
sizerTop->Fit(this);
}
void wxThemeImageDialog::OnPaint(wxPaintEvent& WXUNUSED(event))
{
wxPaintDC dc( this );
dc.DrawBitmap( m_bitmap, 0, 0, true /* use mask */ );
}
////////////////// Themes page ////////////////////////
BEGIN_EVENT_TABLE(wxThemesPage,wxWizardPageSimple)
EVT_WIZARD_PAGE_CHANGED (wxID_ANY, wxThemesPage::OnPageShown)
EVT_WIZARD_PAGE_CHANGING (wxID_ANY, wxThemesPage::OnWizardPageChanging)
EVT_LISTBOX (ID_LISTBOX,wxThemesPage::OnListBox)
EVT_BUTTON (ID_PREVIEW_BTN, wxThemesPage::OnPreviewBtn)
EVT_CHECKBOX (ID_INSTALLCHECKBOX, wxThemesPage::OnCheckBox)
END_EVENT_TABLE();
wxThemesPage::wxThemesPage(wxWizard *parent) : wxWizardPageSimple(parent)
{
m_parent = parent;
wxSizer* mainSizer = new wxBoxSizer(wxVERTICAL);
wxStaticText* WxStaticText1 = new wxStaticText(this, wxID_ANY,
wxT("Please select the Theme you would like to"
"\ninstall on your Device from the list below:"));
mainSizer->Add(WxStaticText1,0,wxGROW | wxALL,5);
// create theme listbox
wxArrayString list;
for(int i = 0; i< 35;i++)
list.Add("");
ThemesListBox= new wxListBox(this, ID_LISTBOX, wxDefaultPosition,
wxDefaultSize,list, wxLB_SINGLE);
mainSizer->Add(ThemesListBox,10,wxGROW | wxALL,5);
// create groupbox
wxStaticBox* groupbox= new wxStaticBox(this,wxID_ANY,wxT("Selected Theme:"));
wxBoxSizer* styleSizer = new wxStaticBoxSizer( groupbox, wxVERTICAL );
mainSizer->Add(styleSizer,11,wxGROW | wxALL,5);
// horizontal sizer
wxBoxSizer* wxBoxSizer2 = new wxBoxSizer(wxHORIZONTAL);
styleSizer->Add(wxBoxSizer2,0,wxGROW | wxALL,0);
// preview button
m_previewBtn = new wxButton(this, ID_PREVIEW_BTN, wxT("Preview"),
wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator,
wxT("PreviewBtn"));
wxBoxSizer2->Add(m_previewBtn,0,wxGROW | wxALL,5);
// checkbox for Install
m_InstallCheckBox= new wxCheckBox(this,ID_INSTALLCHECKBOX,wxT("Install")
,wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator,
wxT("InstallCheckbox"));
wxBoxSizer2->Add(m_InstallCheckBox,0,wxGROW | wxALL,5);
// horizontal sizer
wxBoxSizer* wxBoxSizer3 = new wxBoxSizer(wxHORIZONTAL);
styleSizer->Add(wxBoxSizer3,0,wxGROW | wxALL,0);
// File size
wxStaticText* size= new wxStaticText(this,wxID_ANY,wxT("Filesize:"));
wxBoxSizer3->Add(size,0,wxGROW | wxALL,5);
m_size= new wxStaticText(this,wxID_ANY,wxT(""));
wxBoxSizer3->Add(m_size,0,wxGROW | wxALL,5);
// Description
wxStaticText* desc= new wxStaticText(this,wxID_ANY,wxT("Description:"));
styleSizer->Add(desc,0,wxGROW | wxALL,5);
m_desc= new wxStaticText(this,wxID_ANY,wxT(""));
styleSizer->Add(m_desc,0,wxGROW | wxALL,5);
SetSizer(mainSizer);
mainSizer->Fit(this);
}
bool wxThemesPage::TransferDataFromWindow()
{
gv->themesToInstall.Clear();
for(int i=0; i < m_installTheme.GetCount(); i++)
{
if(m_installTheme[i])
{
gv->themesToInstall.Add(m_Themes_path[i]);
}
}
return true;
}
void wxThemesPage::OnWizardPageChanging(wxWizardEvent& event)
{
if(event.GetDirection()) // going forwards in the Wizard
{
if(gv->themesToInstall.GetCount() == 0)
{
WARN_DIALOG(wxT("You have not selected a Theme to Install"), wxT("Select a Theme"));
event.Veto();
}
}
}
void wxThemesPage::OnCheckBox(wxCommandEvent& event)
{
int index = ThemesListBox->GetSelection(); //get Index
if(index == wxNOT_FOUND)
return;
m_installTheme[index]= ! m_installTheme[index]; // Toggle install
}
void wxThemesPage::OnListBox(wxCommandEvent& event)
{
int index = ThemesListBox->GetSelection(); //get Index
if(index == wxNOT_FOUND)
return;
m_desc->SetLabel(m_Themes_desc[index]); //set Desc
m_desc->Wrap(270); // wrap desc
m_size->SetLabel(m_Themes_size[index]+wxT(" kb")); //set file size
m_InstallCheckBox->SetValue(m_installTheme[index]); // set the install checkbox
this->GetSizer()->Layout();
}
void wxThemesPage::OnPreviewBtn(wxCommandEvent& event)
{
int index = ThemesListBox->GetSelection();
if(index == wxNOT_FOUND)
return;
wxString src,dest;
int pos = m_Themes_image[index].Find('/',true);
wxString filename = m_Themes_image[index](pos+1,m_Themes_image[index].Length());
dest.Printf(wxT("%s" PATH_SEP "download" PATH_SEP "%s"),
gv->stdpaths->GetUserDataDir().c_str(),gv->curresolution.c_str());
if(!wxDirExists(dest))
wxMkdir(dest);
//this is a URL no PATH_SEP
src.Printf("%s/data/%s/%s",gv->themes_url.c_str(),gv->curresolution.c_str(),filename.c_str());
dest.Printf(wxT("%s" PATH_SEP "download" PATH_SEP "%s" PATH_SEP "%s"),
gv->stdpaths->GetUserDataDir().c_str(),gv->curresolution.c_str(),filename.c_str());
if(DownloadURL(src, dest))
{
MESG_DIALOG(wxT("Unable to download image."));
return;
}
wxBitmap bmp;
bmp.LoadFile(dest,wxBITMAP_TYPE_PNG);
wxThemeImageDialog dlg(this,wxID_ANY,wxT("Preview"),bmp);
dlg.ShowModal();
}
void wxThemesPage::OnPageShown(wxWizardEvent& event)
{
// clear Theme info
m_Themes.Clear();
m_Themes_image.Clear();
m_Themes_path.Clear();
m_Themes_desc.Clear();
m_Themes_size.Clear();
m_installTheme.Clear();
m_desc->SetLabel(wxT(""));
m_size->SetLabel(wxT(""));
m_InstallCheckBox->SetValue(false);
//get correct Themes list
wxString src,dest,err;
src.Printf("%srbutil.php?res=%s",gv->themes_url.c_str(),gv->curresolution.c_str());
dest.Printf(wxT("%s" PATH_SEP "download" PATH_SEP "%s.list"),
gv->stdpaths->GetUserDataDir().c_str(),gv->curresolution.c_str());
if(DownloadURL(src, dest))
{
MESG_DIALOG(wxT("Unable to download themes list."));
return;
}
//read and parse Themes list
wxString themelistraw;
wxFFile themefile;
if(!themefile.Open(dest)) //open file
{
MESG_DIALOG(wxT("Unable to open themes list."));
return;
}
if(!themefile.ReadAll(&themelistraw)) //read complete file
{
MESG_DIALOG(wxT("Unable to read themes list."));
return;
}
wxRegEx reAll(wxT("<body >(.+)</body>")); //extract body part
if(! reAll.Matches(themelistraw))
{
MESG_DIALOG(wxT("Themes list is in wrong Format."));
return;
}
wxString lines = reAll.GetMatch(themelistraw,1);
// prepare text
lines.Replace(wxT("<br />"),wxT(""),true); //replace <br /> with nothing
lines.Replace(wxT("\n"),wxT(""),true); //replace \n with nothing
lines.Trim(true); //strip WS at end
lines.Trim(false); //strip WS at beginning
wxStringTokenizer tkz(lines,wxT("|")); //tokenize it
while ( tkz.HasMoreTokens() ) // read all entrys
{
m_Themes.Add(tkz.GetNextToken()); //Theme name
m_Themes_path.Add(tkz.GetNextToken()); //Theme path
m_Themes_size.Add(tkz.GetNextToken()); //File size
m_Themes_image.Add(tkz.GetNextToken()); //Screenshot
m_Themes_desc.Add(tkz.GetNextToken()); //Description
m_installTheme.Add(false); //Theme should be installed ?
}
// set ThemeList
ThemesListBox->Set(m_Themes);
}
//////////////////// Ipod Locaction Page /////////////////////////////
BEGIN_EVENT_TABLE(wxIpodLocationPage,wxWizardPageSimple) BEGIN_EVENT_TABLE(wxIpodLocationPage,wxWizardPageSimple)
EVT_BUTTON (ID_IPODLOCATION_BTN, wxIpodLocationPage::OnIpodLocationBtn) EVT_BUTTON (ID_IPODLOCATION_BTN, wxIpodLocationPage::OnIpodLocationBtn)
EVT_WIZARD_PAGE_CHANGING(wxID_ANY, wxIpodLocationPage::OnWizardPageChanging) EVT_WIZARD_PAGE_CHANGING(wxID_ANY, wxIpodLocationPage::OnWizardPageChanging)
@ -178,7 +440,7 @@ wxIpodLocationPage::wxIpodLocationPage(wxWizard* parent) : wxWizardPageSimple(pa
wxWizardPage* wxIpodLocationPage::GetPrev() const wxWizardPage* wxIpodLocationPage::GetPrev() const
{ {
if(gv->curbootloadermethod == "ipodpatcher") //if ipod, skip previous if(gv->curbootloadermethod == wxT("ipodpatcher")) //if ipod, skip previous
{ {
if(wxWizardPageSimple::GetPrev()->GetPrev() != NULL) if(wxWizardPageSimple::GetPrev()->GetPrev() != NULL)
return wxWizardPageSimple::GetPrev()->GetPrev(); return wxWizardPageSimple::GetPrev()->GetPrev();
@ -190,13 +452,13 @@ void wxIpodLocationPage::OnWizardPageChanging(wxWizardEvent& event)
{ {
if(event.GetDirection()) // going forwards in the Wizard if(event.GetDirection()) // going forwards in the Wizard
{ {
if(gv->curbootloadermethod=="ipodpatcher") if(gv->curbootloadermethod==wxT("ipodpatcher"))
{ {
if(IpodLocationText->GetLabel() == "no Ipod found" || if(IpodLocationText->GetLabel() == wxT("no Ipod found") ||
IpodLocationText->GetLabel() =="More than 1 Ipod found" || IpodLocationText->GetLabel() ==wxT("More than 1 Ipod found") ||
IpodLocationText->GetLabel() =="") IpodLocationText->GetLabel() ==wxT(""))
{ {
WARN_DIALOG(_("No valid ipod found!"), _("Select Location")); WARN_DIALOG(wxT("No valid ipod found!"), wxT("Select Location"));
event.Veto(); //stop pagechanging event.Veto(); //stop pagechanging
} }
} }
@ -205,27 +467,27 @@ void wxIpodLocationPage::OnWizardPageChanging(wxWizardEvent& event)
void wxIpodLocationPage::OnIpodLocationBtn(wxCommandEvent& event) void wxIpodLocationPage::OnIpodLocationBtn(wxCommandEvent& event)
{ {
wxLogVerbose("=== begin wxIpodLocationPage::OnIpodLocationBtn"); wxLogVerbose(wxT("=== begin wxIpodLocationPage::OnIpodLocationBtn"));
struct ipod_t ipod; struct ipod_t ipod;
int n = ipod_scan(&ipod); int n = ipod_scan(&ipod);
gv->curbootloader=""; gv->curbootloader=wxT("");
if(n == 0) if(n == 0)
IpodLocationText->SetLabel("no Ipod found"); IpodLocationText->SetLabel(wxT("no Ipod found"));
else if( n==1) else if( n==1)
{ {
gv->curbootloader="bootloader-"; gv->curbootloader=wxT("bootloader-");
gv->curbootloader.Append(ipod.targetname); gv->curbootloader.Append(ipod.targetname);
IpodLocationText->SetLabel(ipod.modelstr); IpodLocationText->SetLabel(ipod.modelstr);
} }
else else
IpodLocationText->SetLabel("More than 1 Ipod found"); IpodLocationText->SetLabel(wxT("More than 1 Ipod found"));
if(ipod.macpod) if(ipod.macpod)
IpodLocationExtraText->SetLabel("This Ipod is a Mac formated Ipod\n" IpodLocationExtraText->SetLabel(wxT("This Ipod is a Mac formated Ipod\n"
"Rockbox will not work on this.\n" "Rockbox will not work on this.\n"
"You have to convert it first to Fat32"); "You have to convert it first to Fat32"));
wxLogVerbose("=== end wxIpodLocationPage::OnIpodLocationBtn"); wxLogVerbose(wxT("=== end wxIpodLocationPage::OnIpodLocationBtn"));
} }
@ -251,7 +513,7 @@ wxBootLocationPage::wxBootLocationPage(wxWizard* parent) : wxWizardPageSimple(pa
WxBoxSizer1->Add(WxBoxSizer3,0, WxBoxSizer1->Add(WxBoxSizer3,0,
wxGROW | wxALIGN_CENTER_VERTICAL | wxALL, 5); wxGROW | wxALIGN_CENTER_VERTICAL | wxALL, 5);
if (gv->curdestdir == wxT("")) gv->curdestdir = _("<none>"); if (gv->curdestdir == wxT("")) gv->curdestdir = wxT("<none>");
BootLocationText = new wxStaticText(this, wxID_ANY, gv->curdestdir, BootLocationText = new wxStaticText(this, wxID_ANY, gv->curdestdir,
wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT); wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT);
WxBoxSizer3->Add(BootLocationText,1, WxBoxSizer3->Add(BootLocationText,1,
@ -269,7 +531,7 @@ wxBootLocationPage::wxBootLocationPage(wxWizard* parent) : wxWizardPageSimple(pa
wxWizardPage* wxBootLocationPage::GetPrev() const wxWizardPage* wxBootLocationPage::GetPrev() const
{ {
if(gv->curbootloadermethod != "fwpatcher") if(gv->curbootloadermethod != wxT("fwpatcher"))
{ {
if(wxWizardPageSimple::GetPrev()->GetPrev() != NULL) if(wxWizardPageSimple::GetPrev()->GetPrev() != NULL)
return wxWizardPageSimple::GetPrev()->GetPrev(); return wxWizardPageSimple::GetPrev()->GetPrev();
@ -281,7 +543,7 @@ wxWizardPage* wxBootLocationPage::GetPrev() const
wxWizardPage* wxBootLocationPage::GetNext() const wxWizardPage* wxBootLocationPage::GetNext() const
{ {
if(gv->curbootloadermethod == "ipodpatcher") if(gv->curbootloadermethod == wxT("ipodpatcher"))
{ {
return wxWizardPageSimple::GetNext(); // if ipod then this is not the last page return wxWizardPageSimple::GetNext(); // if ipod then this is not the last page
} }
@ -294,8 +556,8 @@ void wxBootLocationPage::OnWizardPageChanging(wxWizardEvent& event)
{ {
if(!wxDirExists(BootLocationText->GetLabel())) if(!wxDirExists(BootLocationText->GetLabel()))
{ {
WARN_DIALOG(_("You have not selected a valid location for your audio " WARN_DIALOG(wxT("You have not selected a valid location for your audio "
"device"), _("Select Location")); "device"), wxT("Select Location"));
event.Veto(); event.Veto();
} }
@ -313,13 +575,13 @@ bool wxBootLocationPage::TransferDataFromWindow()
void wxBootLocationPage::OnBootLocationBtn(wxCommandEvent& event) void wxBootLocationPage::OnBootLocationBtn(wxCommandEvent& event)
{ {
const wxString& temp = wxDirSelector( const wxString& temp = wxDirSelector(
_("Please select the location of your audio device"), gv->curdestdir); wxT("Please select the location of your audio device"), gv->curdestdir);
wxLogVerbose("=== begin wxBootLocationPage::OnBootLocationBtn(event)"); wxLogVerbose(wxT("=== begin wxBootLocationPage::OnBootLocationBtn(event)"));
if (!temp.empty()) if (!temp.empty())
{ {
BootLocationText->SetLabel(temp); BootLocationText->SetLabel(temp);
} }
wxLogVerbose("=== end wxBootLocationPage::OnBootLocationBtn"); wxLogVerbose(wxT("=== end wxBootLocationPage::OnBootLocationBtn"));
} }
@ -368,8 +630,8 @@ void wxFirmwareLocationPage::OnWizardPageChanging(wxWizardEvent& event)
{ {
if( !wxFileExists(gv->curfirmware)) if( !wxFileExists(gv->curfirmware))
{ {
WARN_DIALOG(_("You have not selected a valid location for the firmware " WARN_DIALOG(wxT("You have not selected a valid location for the firmware "
"file"), _("Select File")); "file"), wxT("Select File"));
event.Veto(); event.Veto();
} }
} }
@ -379,8 +641,8 @@ void wxFirmwareLocationPage::OnWizardPageChanging(wxWizardEvent& event)
void wxFirmwareLocationPage::OnFirmwareFilenameBtn(wxCommandEvent& event) void wxFirmwareLocationPage::OnFirmwareFilenameBtn(wxCommandEvent& event)
{ {
wxString temp = wxFileSelector( wxString temp = wxFileSelector(
_("Please select the location of the original Firmware"), gv->curdestdir,"","","*.hex"); wxT("Please select the location of the original Firmware"), gv->curdestdir,"","","*.hex");
wxLogVerbose("=== begin wxFirmwareLocationPage::OnFirmwareFilenameBtn(event)"); wxLogVerbose(wxT("=== begin wxFirmwareLocationPage::OnFirmwareFilenameBtn(event)"));
if (!temp.empty()) if (!temp.empty())
{ {
gv->curfirmware=temp; gv->curfirmware=temp;
@ -391,7 +653,7 @@ void wxFirmwareLocationPage::OnFirmwareFilenameBtn(wxCommandEvent& event)
} }
FirmwareLocationFilename->SetLabel(temp); FirmwareLocationFilename->SetLabel(temp);
} }
wxLogVerbose("=== end wxFirmwareLocationPage::OnFirmwareFilenameBtn"); wxLogVerbose(wxT("=== end wxFirmwareLocationPage::OnFirmwareFilenameBtn"));
} }
BEGIN_EVENT_TABLE(wxLocationPage,wxWizardPageSimple) BEGIN_EVENT_TABLE(wxLocationPage,wxWizardPageSimple)
@ -413,7 +675,7 @@ wxLocationPage::wxLocationPage(wxWizard* parent) : wxWizardPageSimple(parent)
WxBoxSizer1->Add(WxBoxSizer3,0, WxBoxSizer1->Add(WxBoxSizer3,0,
wxGROW | wxALIGN_CENTER_VERTICAL | wxALL, 5); wxGROW | wxALIGN_CENTER_VERTICAL | wxALL, 5);
if (gv->curdestdir == wxT("")) gv->curdestdir = _("<none>"); if (gv->curdestdir == wxT("")) gv->curdestdir = wxT("<none>");
LocationText = new wxStaticText(this, wxID_ANY, gv->curdestdir, LocationText = new wxStaticText(this, wxID_ANY, gv->curdestdir,
wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT); wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT);
WxBoxSizer3->Add(LocationText,1, WxBoxSizer3->Add(LocationText,1,
@ -436,8 +698,8 @@ void wxLocationPage::OnWizardPageChanging(wxWizardEvent& event)
{ {
if(!wxDirExists(LocationText->GetLabel())) if(!wxDirExists(LocationText->GetLabel()))
{ {
WARN_DIALOG(_("You have not selected a valid location for your audio " WARN_DIALOG(wxT("You have not selected a valid location for your audio "
"device"), _("Select Location")); "device"), wxT("Select Location"));
event.Veto(); event.Veto();
} }
} }
@ -452,13 +714,13 @@ bool wxLocationPage::TransferDataFromWindow()
void wxLocationPage::OnLocationBtn(wxCommandEvent& event) void wxLocationPage::OnLocationBtn(wxCommandEvent& event)
{ {
const wxString& temp = wxDirSelector( const wxString& temp = wxDirSelector(
_("Please select the location of your audio device"), gv->curdestdir); wxT("Please select the location of your audio device"), gv->curdestdir);
wxLogVerbose("=== begin wxLocationPage::OnLocationBtn(event)"); wxLogVerbose(wxT("=== begin wxLocationPage::OnLocationBtn(event)"));
if (!temp.empty()) if (!temp.empty())
{ {
LocationText->SetLabel(temp); LocationText->SetLabel(temp);
} }
wxLogVerbose("=== end wxLocationPage::OnLocationBtn"); wxLogVerbose(wxT("=== end wxLocationPage::OnLocationBtn"));
} }
BEGIN_EVENT_TABLE(wxBuildPage,wxWizardPageSimple) BEGIN_EVENT_TABLE(wxBuildPage,wxWizardPageSimple)
@ -479,17 +741,17 @@ wxBuildPage::wxBuildPage(wxWizard *parent) : wxWizardPageSimple(parent)
WxBoxSizer1->Add(WxStaticText1,0,wxGROW | wxALL,5); WxBoxSizer1->Add(WxStaticText1,0,wxGROW | wxALL,5);
wxArrayString* array = new wxArrayString(); wxArrayString* array = new wxArrayString();
buf.Printf(_("Rockbox stable version (%s)") , gv->last_release.c_str()); buf.Printf(wxT("Rockbox stable version (%s)") , gv->last_release.c_str());
array->Add(buf); array->Add(buf);
array->Add(_("Archived Build")); array->Add(wxT("Archived Build"));
array->Add(_("Current Build ")); array->Add(wxT("Current Build "));
BuildRadioBox = new wxRadioBox(this, ID_BUILD_BOX, _("Version"), BuildRadioBox = new wxRadioBox(this, ID_BUILD_BOX, wxT("Version"),
wxDefaultPosition, wxDefaultSize, *array, 0, wxRA_SPECIFY_ROWS); wxDefaultPosition, wxDefaultSize, *array, 0, wxRA_SPECIFY_ROWS);
WxBoxSizer1->Add(BuildRadioBox, 0, wxGROW | wxALL, 5); WxBoxSizer1->Add(BuildRadioBox, 0, wxGROW | wxALL, 5);
delete array; delete array;
wxStaticBox* WxStaticBox1 = new wxStaticBox(this, wxID_ANY, _("Details:")); wxStaticBox* WxStaticBox1 = new wxStaticBox(this, wxID_ANY, wxT("Details:"));
wxStaticBoxSizer* WxStaticBoxSizer2 = new wxStaticBoxSizer(WxStaticBox1, wxStaticBoxSizer* WxStaticBoxSizer2 = new wxStaticBoxSizer(WxStaticBox1,
wxVERTICAL); wxVERTICAL);
DetailText = new wxStaticText(this, wxID_ANY, wxT("")); DetailText = new wxStaticText(this, wxID_ANY, wxT(""));
@ -497,13 +759,13 @@ wxBuildPage::wxBuildPage(wxWizard *parent) : wxWizardPageSimple(parent)
WxStaticBoxSizer2->Add(DetailText, 1, wxGROW | wxALL, 5); WxStaticBoxSizer2->Add(DetailText, 1, wxGROW | wxALL, 5);
wxStaticText* WxStaticText2 = new wxStaticText(this, wxID_ANY, wxStaticText* WxStaticText2 = new wxStaticText(this, wxID_ANY,
_("Rockbox Utility stores copies of Rockbox it has downloaded on the\n" wxT("Rockbox Utility stores copies of Rockbox it has downloaded on the\n"
"local hard disk to save network traffic. If your local copy is\n" "local hard disk to save network traffic. If your local copy is\n"
"no longer working, tick this box to download a fresh copy.") ); "no longer working, tick this box to download a fresh copy.") );
WxBoxSizer1->Add(WxStaticText2, 0 , wxALL, 5); WxBoxSizer1->Add(WxStaticText2, 0 , wxALL, 5);
NoCacheCheckBox = new wxCheckBox(this, wxID_ANY, NoCacheCheckBox = new wxCheckBox(this, wxID_ANY,
_("Don't use locally cached copies of Rockbox") ); wxT("Don't use locally cached copies of Rockbox") );
WxBoxSizer1->Add(NoCacheCheckBox, 0, wxALL, 5); WxBoxSizer1->Add(NoCacheCheckBox, 0, wxALL, 5);
SetSizer(WxBoxSizer1); SetSizer(WxBoxSizer1);
@ -577,7 +839,7 @@ wxFullUninstallPage::wxFullUninstallPage(wxWizard* parent) :
wxBoxSizer* WxBoxSizer1 = new wxBoxSizer(wxVERTICAL); wxBoxSizer* WxBoxSizer1 = new wxBoxSizer(wxVERTICAL);
wxStaticText* WxStaticText1 = new wxStaticText(this, wxID_ANY, wxStaticText* WxStaticText1 = new wxStaticText(this, wxID_ANY,
_("Rockbox Utility normally uninstalls Rockbox using an uninstall\n" wxT("Rockbox Utility normally uninstalls Rockbox using an uninstall\n"
"file created during installation. This means that when Rockbox is\n" "file created during installation. This means that when Rockbox is\n"
"uninstalled all your configuration files are preserved. However,\n" "uninstalled all your configuration files are preserved. However,\n"
"you can also perform a full uninstall, which will completely\n" "you can also perform a full uninstall, which will completely\n"
@ -588,7 +850,7 @@ wxFullUninstallPage::wxFullUninstallPage(wxWizard* parent) :
WxBoxSizer1->Add(WxStaticText1,0,wxGROW | wxALL,5); WxBoxSizer1->Add(WxStaticText1,0,wxGROW | wxALL,5);
FullCheckBox = new wxCheckBox(this, wxID_ANY, FullCheckBox = new wxCheckBox(this, wxID_ANY,
_("Perform a full uninstall")); wxT("Perform a full uninstall"));
WxBoxSizer1->Add(FullCheckBox, 0, wxALL, 5); WxBoxSizer1->Add(FullCheckBox, 0, wxALL, 5);
SetSizer(WxBoxSizer1); SetSizer(WxBoxSizer1);

View file

@ -24,6 +24,60 @@
#include "rbutil.h" #include "rbutil.h"
////// Dialog for Preview of Theme //////////////
class wxThemeImageDialog : public wxDialog
{
private:
DECLARE_EVENT_TABLE()
public:
wxThemeImageDialog(wxWindow* parent,wxWindowID id,wxString title,wxBitmap bmp);
void OnPaint(wxPaintEvent& WXUNUSED(event));
private:
wxBitmap m_bitmap;
};
class wxThemesPage : public wxWizardPageSimple
{
private:
DECLARE_EVENT_TABLE()
public:
enum {
ID_PREVIEW_BTN = 1000,
ID_LISTBOX = 1001,
ID_INSTALLCHECKBOX = 1002,
};
public:
wxThemesPage(wxWizard *parent);
virtual bool TransferDataFromWindow(void);
void OnPageShown(wxWizardEvent& event);
void OnPreviewBtn(wxCommandEvent& event);
void OnListBox(wxCommandEvent& event);
void OnCheckBox(wxCommandEvent& event);
void OnWizardPageChanging(wxWizardEvent& event);
public:
wxListBox* ThemesListBox;
wxButton* m_previewBtn;
wxStaticText* m_desc;
wxStaticText* m_size;
wxCheckBox* m_InstallCheckBox;
wxArrayString m_Themes;
wxArrayString m_Themes_path;
wxArrayString m_Themes_image;
wxArrayString m_Themes_desc;
wxArrayString m_Themes_size;
wxArrayInt m_installTheme;
};
class wxBootPlatformPage : public wxWizardPageSimple class wxBootPlatformPage : public wxWizardPageSimple
{ {
public: public: