diff options
author | Dominik Wenger <domonoky@googlemail.com> | 2007-03-20 15:38:48 +0000 |
---|---|---|
committer | Dominik Wenger <domonoky@googlemail.com> | 2007-03-20 15:38:48 +0000 |
commit | 22a673062ffdffc9048ca10193fd93d4c24039a7 (patch) | |
tree | f96ab2f4679f782268ae42df7bb078de7200ce58 | |
parent | 2671b6cda62e43015c5914844c03dbbc53aafb31 (diff) | |
download | rockbox-22a673062ffdffc9048ca10193fd93d4c24039a7.tar.gz rockbox-22a673062ffdffc9048ca10193fd93d4c24039a7.zip |
Fix more Warnings, and also a bug with checking the dirstructure for themes in rbutil
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12862 a1c6a512-1295-4272-9138-f99709370657
-rwxr-xr-x | rbutil/bootloaders.cpp | 40 | ||||
-rw-r--r-- | rbutil/credits.h | 2 | ||||
-rw-r--r-- | rbutil/rbutil-rc.rc | 4 | ||||
-rw-r--r-- | rbutil/rbutil.cpp | 6 |
4 files changed, 24 insertions, 28 deletions
diff --git a/rbutil/bootloaders.cpp b/rbutil/bootloaders.cpp index 5a58f3b14b..d424a4f35e 100755 --- a/rbutil/bootloaders.cpp +++ b/rbutil/bootloaders.cpp @@ -194,19 +194,17 @@ bool gigabeatf(int mode) } path2 = path1; path2.Append(wxT(".ORIG")); - if(wxFileExists(path2)) + if(!wxFileExists(path2)) { - err = wxT("Its seems there is already a Bootloader install, if not, delete the *.IMG.ORIG file"); - ERR_DIALOG(err, wxT("Bootloader add")); - return false; + if(!wxRenameFile(path1,path2,false)) + { + err.Printf(wxT("[ERR] Coud not rename %s to %s"),path1.c_str(),path2.c_str()); + ERR_DIALOG(err, wxT("Bootloader add")); + return false; + } } - if(!wxRenameFile(path1,path2,false)) - { - err.Printf(wxT("[ERR] Coud not rename %s to %s"),path1.c_str(),path2.c_str()); - ERR_DIALOG(err, wxT("Bootloader add")); - return false; - } + if(!wxCopyFile(dest,path1)) { err.Printf(wxT("[ERR] Coud not copy %s to %s"),dest.c_str(),path2.c_str()); @@ -300,7 +298,7 @@ bool h10(int mode) if(!wxFileExists(path1)) //Firmware dosent exists on player { - path1.Printf(wxT("%sSYSTEM" PATH_SEP "H10EMP.mi4")); //attempt other firmwarename + path1.Printf(wxT("%sSYSTEM" PATH_SEP "H10EMP.mi4"),gv->curdestdir.c_str()); //attempt other firmwarename if(!wxFileExists(path1)) //Firmware dosent exists on player { err.Printf(wxT("[ERR] File %s does not Exist"),path1.c_str()); @@ -308,18 +306,16 @@ bool h10(int mode) return false; } } - if(wxFileExists(path2)) //there is already a original firmware - { - err.Printf(wxT("[ERR2] File %s does Exist"),path2.c_str()); - ERR_DIALOG(err, wxT("Bootloader add")); - return false; - } - if(!wxRenameFile(path1,path2,false)) //rename Firmware to Original + if(!wxFileExists(path2)) //there is already a original firmware { - err.Printf(wxT("[ERR] Coud not rename %s to %s"),path1.c_str(),path2.c_str()); - ERR_DIALOG(err, wxT("Bootloader add")); - return false; + if(!wxRenameFile(path1,path2,false)) //rename Firmware to Original + { + err.Printf(wxT("[ERR] Coud not rename %s to %s"),path1.c_str(),path2.c_str()); + ERR_DIALOG(err, wxT("Bootloader add")); + return false; + } } + if(!wxCopyFile(dest,path1)) // copy file { err.Printf(wxT("[ERR] Coud not copy %s to %s"),dest.c_str(),path1.c_str()); @@ -336,7 +332,7 @@ bool h10(int mode) path2.Printf(wxT("%sSYSTEM" PATH_SEP "Original.mi4"),gv->curdestdir.c_str()); if(!wxFileExists(path1)) //Firmware dosent exists on player { - path1.Printf(wxT("%s" PATH_SEP "SYSTEM" PATH_SEP "H10EMP.mi4")); //attempt other firmwarename + path1.Printf(wxT("%s" PATH_SEP "SYSTEM" PATH_SEP "H10EMP.mi4"),gv->curdestdir.c_str()); //attempt other firmwarename if(!wxFileExists(path1)) //Firmware dosent exists on player { err.Printf(wxT("[ERR] File %s does not Exist"),path1.c_str()); diff --git a/rbutil/credits.h b/rbutil/credits.h index 16c5f4fc04..75ba0f547b 100644 --- a/rbutil/credits.h +++ b/rbutil/credits.h @@ -22,7 +22,7 @@ #define CREDITS_H_INCLUDED #define RBUTIL_FULLNAME "The Rockbox Utility" -#define RBUTIL_VERSION "Version 0.3.0.1" +#define RBUTIL_VERSION "Version 0.3.0.2" static const wxString rbutil_developers[] = { wxT("Christi Alice Scarborough"), diff --git a/rbutil/rbutil-rc.rc b/rbutil/rbutil-rc.rc index dfb48e34cc..7ca5040256 100644 --- a/rbutil/rbutil-rc.rc +++ b/rbutil/rbutil-rc.rc @@ -10,8 +10,8 @@ BEGIN BEGIN BLOCK "FFFF0000" BEGIN - VALUE "FileVersion", "0.3.0.1\0" - VALUE "ProductVersion", "0.3.0.1\0" + VALUE "FileVersion", "0.3.0.2\0" + VALUE "ProductVersion", "0.3.0.2\0" VALUE "CompanyName", "Rockbox Team\0" VALUE "FileDescription", "Rockbox Utility\0" VALUE "InternalName", "rbutil\0" diff --git a/rbutil/rbutil.cpp b/rbutil/rbutil.cpp index ceeb4a9222..ff01a65923 100644 --- a/rbutil/rbutil.cpp +++ b/rbutil/rbutil.cpp @@ -105,7 +105,7 @@ bool checkZip(wxString zipname) wxString name = entry->GetName(); if(entry->IsDir()) { - if(name.Contains(wxT(".rockbox\\"))) + if(name.Contains(wxT(".rockbox"))) { return true; } @@ -126,6 +126,7 @@ int DownloadURL(wxString src, wxString dest) wxPD_AUTO_HIDE | wxPD_SMOOTH | wxPD_ELAPSED_TIME | wxPD_REMAINING_TIME | wxPD_CAN_ABORT); progress->Update(0); + progress->SetSize(500,200); input = true; wxURL* in_http = new wxURL(src); @@ -647,8 +648,7 @@ bool InstallRbutil(wxString dest) if (! copied_exe) { str.Printf(wxT("%s" PATH_SEP EXE_NAME), gv->AppDir.c_str()); - dstr.Printf(wxT("%s" PATH_SEP EXE_NAME), destdir.c_str(), - filestocopy[i].AfterLast(PATH_SEP_CHR).c_str()); + dstr.Printf(wxT("%s" PATH_SEP EXE_NAME), destdir.c_str()); if (! wxCopyFile(str, dstr) ) { buf.Printf(wxT("Can't copy program binary %s -> %s"), |