mirror of
https://github.com/glest/glest-source.git
synced 2025-08-19 14:41:23 +02:00
- added a new commandline command to create data archives for network xfer for techtrees and tilesets:
megaglest --create-data-archives=all
This commit is contained in:
@@ -2005,6 +2005,30 @@ string getFullFileArchiveExtractCommand(string fileArchiveExtractCommand,
|
||||
return result;
|
||||
}
|
||||
|
||||
string getFullFileArchiveCompressCommand(string fileArchiveCompressCommand,
|
||||
string fileArchiveCompressCommandParameters,
|
||||
string archivename, string archivefiles) {
|
||||
string parsedArchivename = archivename;
|
||||
string parsedArchivefiles = archivefiles;
|
||||
|
||||
// This is required for execution on win32
|
||||
#if defined(WIN32)
|
||||
replaceAll(parsedArchivename, "\\\\", "\\");
|
||||
replaceAll(parsedArchivename, "/", "\\");
|
||||
replaceAll(parsedArchivefiles, "\\\\", "\\");
|
||||
replaceAll(parsedArchivefiles, "/", "\\");
|
||||
|
||||
#endif
|
||||
|
||||
string result = fileArchiveCompressCommand;
|
||||
result += " ";
|
||||
string args = replaceAll(fileArchiveCompressCommandParameters, "{archivename}", parsedArchivename);
|
||||
args = replaceAll(args, "{archivefiles}", parsedArchivefiles);
|
||||
result += args;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
bool executeShellCommand(string cmd, int expectedResult, ShellCommandOutputCallbackInterface *cb) {
|
||||
bool result = false;
|
||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"About to run [%s]", cmd.c_str());
|
||||
|
Reference in New Issue
Block a user