mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-13 15:12:30 -05:00
Fix for the Bootloader installation for H10, thanks to barrywardell
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12537 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
7230674b5d
commit
ba7d27786d
3 changed files with 14 additions and 15 deletions
|
|
@ -276,9 +276,10 @@ bool h10(int mode)
|
||||||
{
|
{
|
||||||
wxString err,src,dest,path1,path2;
|
wxString err,src,dest,path1,path2;
|
||||||
|
|
||||||
int pos = gv->curbootloader.Find('/');
|
int pos = gv->curbootloader.Find('/');
|
||||||
|
if(pos == wxNOT_FOUND) pos = 0;
|
||||||
wxString firmwarename = gv->curbootloader.SubString(pos,gv->curbootloader.Length());
|
wxString firmwarename = gv->curbootloader.SubString(pos,gv->curbootloader.Length());
|
||||||
wxString firmDir = gv->curbootloader.SubString(0,pos);
|
//wxString firmDir = gv->curbootloader.SubString(0,pos);
|
||||||
|
|
||||||
if(mode == BOOTLOADER_ADD)
|
if(mode == BOOTLOADER_ADD)
|
||||||
{
|
{
|
||||||
|
|
@ -294,12 +295,12 @@ bool h10(int mode)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
path1.Printf("%s" PATH_SEP "SYSTEM" PATH_SEP "%s",gv->curdestdir.c_str(),firmwarename.c_str());
|
path1.Printf("%sSYSTEM" PATH_SEP "%s",gv->curdestdir.c_str(),firmwarename.c_str());
|
||||||
path2.Printf("%s" PATH_SEP "SYSTEM" PATH_SEP "Original.mi4",gv->curdestdir.c_str());
|
path2.Printf("%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("%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("[ERR] File %s does not Exist",path1.c_str());
|
||||||
|
|
@ -307,9 +308,9 @@ bool h10(int mode)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!wxFileExists(path2)) //there is already a original firmware
|
if(wxFileExists(path2)) //there is already a original firmware
|
||||||
{
|
{
|
||||||
err.Printf("[ERR] File %s does not Exist",path1.c_str());
|
err.Printf("[ERR2] File %s does Exist",path2.c_str());
|
||||||
ERR_DIALOG(err, _("Bootloader add"));
|
ERR_DIALOG(err, _("Bootloader add"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -331,8 +332,8 @@ bool h10(int mode)
|
||||||
}
|
}
|
||||||
else if(mode == BOOTLOADER_REM)
|
else if(mode == BOOTLOADER_REM)
|
||||||
{
|
{
|
||||||
path1.Printf("%s" PATH_SEP "SYSTEM" PATH_SEP "%s",gv->curdestdir.c_str(),firmwarename.c_str());
|
path1.Printf("%sSYSTEM" PATH_SEP "%s",gv->curdestdir.c_str(),firmwarename.c_str());
|
||||||
path2.Printf("%s" PATH_SEP "SYSTEM" PATH_SEP "Original.mi4",gv->curdestdir.c_str());
|
path2.Printf("%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("%s" PATH_SEP "SYSTEM" PATH_SEP "H10EMP.mi4"); //attempt other firmwarename
|
||||||
|
|
|
||||||
|
|
@ -458,8 +458,7 @@ void rbutilFrm::OnBootloaderBtn(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
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, _("The Bootloader has been patched and copied on your device.\n")
|
||||||
"Now use the Firmware upgrade option of your Device\n")
|
|
||||||
,"Installation", wxOK |wxICON_INFORMATION);
|
,"Installation", wxOK |wxICON_INFORMATION);
|
||||||
msg->ShowModal();
|
msg->ShowModal();
|
||||||
delete msg;
|
delete msg;
|
||||||
|
|
|
||||||
|
|
@ -481,8 +481,8 @@ wxBuildPage::wxBuildPage(wxWizard *parent) : wxWizardPageSimple(parent)
|
||||||
wxArrayString* array = new wxArrayString();
|
wxArrayString* array = new wxArrayString();
|
||||||
buf.Printf(_("Rockbox stable version (%s)") , gv->last_release.c_str());
|
buf.Printf(_("Rockbox stable version (%s)") , gv->last_release.c_str());
|
||||||
array->Add(buf);
|
array->Add(buf);
|
||||||
array->Add(_("Daily Build"));
|
array->Add(_("Archived Build"));
|
||||||
array->Add(_("Bleeding Edge Build "));
|
array->Add(_("Current Build "));
|
||||||
|
|
||||||
BuildRadioBox = new wxRadioBox(this, ID_BUILD_BOX, _("Version"),
|
BuildRadioBox = new wxRadioBox(this, ID_BUILD_BOX, _("Version"),
|
||||||
wxDefaultPosition, wxDefaultSize, *array, 0, wxRA_SPECIFY_ROWS);
|
wxDefaultPosition, wxDefaultSize, *array, 0, wxRA_SPECIFY_ROWS);
|
||||||
|
|
@ -539,8 +539,7 @@ void wxBuildPage::OnBuildBox(wxCommandEvent& event)
|
||||||
break;
|
break;
|
||||||
case BUILD_BLEEDING:
|
case BUILD_BLEEDING:
|
||||||
str = _("This is the absolute up to the minute Rockbox built after\n"
|
str = _("This is the absolute up to the minute Rockbox built after\n"
|
||||||
"the last change was made. This should be avoided unless the\n"
|
"the last change was made.\n\n"
|
||||||
"daily version is causing problems for some reason.\n\n"
|
|
||||||
"Note: This option will always download a fresh copy from the\n"
|
"Note: This option will always download a fresh copy from the\n"
|
||||||
"web server.\n");
|
"web server.\n");
|
||||||
NoCacheCheckBox->Enable(false);
|
NoCacheCheckBox->Enable(false);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue