#define BUFFERSIZE 0x10000
-void ExtractFileFromArchive(ProgressBar progressBar, char * path, char * outputFile)
+void ExtractFileFromArchive(ProgressBar progressBar, const char * path, const char * outputFile)
{
char fileName[MAX_LOCATION];
FileAttribs exists = FileExists(path);
FileGetSize(path, &dataSize);
GetLastDirectory(outputFile, fileName);
progressBar.statusBar.SetText($"Extracting %s...", fileName);
-
+
app.UpdateDisplay();
for(c = 0; c<dataSize; c += BUFFERSIZE)
whereLabel.Update(null); // Is this still needed?
return true;
}
- }
+ };
EditBox where { this, text = $"Extract to", anchor = Anchor { left = 10, top = 40, right = 100 }, size = Size { h = 22 }, hotKey = altT, disabled = true };
Label whereLabel { this, position = Point { 10,20 }, labeledWindow = where };
Button browse
where.contents = fileDialog.filePath;
return true;
}
- }
+ };
Button close { this, text = $"Exit", anchor = Anchor { right = 10, top = 70 }, size = Size { 80 }, hotKey = altX, NotifyClicked = ButtonCloseDialog };
Button extract
{
return true;
}
- void ViewArchive(char * path)
+ void ViewArchive(const char * path)
{
FileListing listing { path };
- char string[MAX_LOCATION], * directory;
+ char string[MAX_LOCATION];
+ const char * directory;
DataRow row;
SplitArchivePath(path, string, &directory);
row.SetData(cField, c);//(void *)stats.created.local);
}
}
-
+
while(listing.Find())
{
if(strcmp(listing.path, "<:>ecere"))
SetLoggingMode(stdOut, null);
SelfExtract { text = title };
-
+
GuiApplication::Main();
}
}