summaryrefslogtreecommitdiff
path: root/rbutil/rbutil.cpp
diff options
context:
space:
mode:
authorDominik Wenger <domonoky@googlemail.com>2007-07-15 18:15:59 +0000
committerDominik Wenger <domonoky@googlemail.com>2007-07-15 18:15:59 +0000
commit1ad4b2c8091fde4f04bc88dd6d61f879658ccea5 (patch)
tree93e8c091fbf004dbe57d3d0cafd79fcdf3ee3ecb /rbutil/rbutil.cpp
parent798e0d552552a013cc32aca0e61e1a42827604d4 (diff)
rbutil: first attempt to talk file creator. also pushed version to 3.2.6
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13906 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/rbutil.cpp')
-rw-r--r--rbutil/rbutil.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/rbutil/rbutil.cpp b/rbutil/rbutil.cpp
index 0f58c09707..058ca10a27 100644
--- a/rbutil/rbutil.cpp
+++ b/rbutil/rbutil.cpp
@@ -101,6 +101,7 @@ bool InstallTheme(wxString Themesrc)
bool checkZip(wxString zipname)
{
+
wxZipEntryPtr entry;
wxFFileInputStream* in_file = new wxFFileInputStream(zipname);
@@ -124,6 +125,7 @@ bool checkZip(wxString zipname)
}
return false;
+
}
int DownloadURL(wxString src, wxString dest)
@@ -267,6 +269,7 @@ int DownloadURL(wxString src, wxString dest)
int UnzipFile(wxString src, wxString destdir, bool isInstall)
{
+
wxZipEntryPtr entry;
wxString in_str, progress_msg, buf,subdir;
int errnum = 0, curfile = 0, totalfiles = 0;
@@ -328,8 +331,10 @@ int UnzipFile(wxString src, wxString destdir, bool isInstall)
(entry.reset(in_zip->GetNextEntry()), entry.get() != NULL) )
{
+
curfile++;
wxString name = entry->GetName();
+ // set progress
progress_msg = wxT("Unpacking ") + name;
if (! progress->Update(curfile, progress_msg) )
{
@@ -367,6 +372,7 @@ int UnzipFile(wxString src, wxString destdir, bool isInstall)
continue; // this is just a directory, nothing else to do
}
+ // its a file, copy it
wxFFileOutputStream* out = new wxFFileOutputStream(in_str);
if (! out->IsOk() )
{
@@ -412,6 +418,7 @@ int UnzipFile(wxString src, wxString destdir, bool isInstall)
if (log) delete log;
wxLogVerbose(wxT("=== end UnzipFile"));
return(errnum);
+
}
int Uninstall(const wxString dir, bool isFullUninstall) {