mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-17 04:51:48 +00:00
Changed: Use toString to format string
This commit is contained in:
parent
e665b46d43
commit
678d0c123b
1 changed files with 8 additions and 6 deletions
|
@ -49,9 +49,10 @@ void normalisePackageDescriptionFileName(std::string& fileName)
|
||||||
|
|
||||||
void GeneratePatch(const std::string& srcFileName,const std::string& destFileName,const std::string& patchFileName)
|
void GeneratePatch(const std::string& srcFileName,const std::string& destFileName,const std::string& patchFileName)
|
||||||
{
|
{
|
||||||
std::string cmd="xdelta delta";
|
std::string cmd = toString("xdelta delta %s %s %s", srcFileName.c_str(), destFileName.c_str(), patchFileName.c_str());
|
||||||
cmd+=" "+srcFileName+" "+destFileName+" "+patchFileName;
|
|
||||||
nlinfo("executing system command: %s",cmd.c_str());
|
nlinfo("Executing system command: %s", cmd.c_str());
|
||||||
|
|
||||||
#ifdef NL_OS_WINDOWS
|
#ifdef NL_OS_WINDOWS
|
||||||
_spawnlp(_P_WAIT, "xdelta.exe", "xdelta.exe", "delta", srcFileName.c_str(), destFileName.c_str(), patchFileName.c_str(), NULL);
|
_spawnlp(_P_WAIT, "xdelta.exe", "xdelta.exe", "delta", srcFileName.c_str(), destFileName.c_str(), patchFileName.c_str(), NULL);
|
||||||
#else // NL_OS_WINDOWS
|
#else // NL_OS_WINDOWS
|
||||||
|
@ -65,9 +66,10 @@ void GeneratePatch(const std::string& srcFileName,const std::string& destFileNam
|
||||||
|
|
||||||
void ApplyPatch(const std::string& srcFileName,const std::string& destFileName,const std::string& patchFileName=std::string())
|
void ApplyPatch(const std::string& srcFileName,const std::string& destFileName,const std::string& patchFileName=std::string())
|
||||||
{
|
{
|
||||||
std::string cmd="xdelta patch";
|
std::string cmd = toString("xdelta patch %s %s %s", patchFileName.c_str(), srcFileName.c_str(), destFileName.c_str());
|
||||||
cmd+=" "+patchFileName+" "+srcFileName+" "+destFileName;
|
|
||||||
nlinfo("executing system command: %s",cmd.c_str());
|
nlinfo("Executing system command: %s", cmd.c_str());
|
||||||
|
|
||||||
#ifdef NL_OS_WINDOWS
|
#ifdef NL_OS_WINDOWS
|
||||||
_spawnlp(_P_WAIT, "xdelta.exe", "xdelta.exe", "patch",patchFileName.c_str(), srcFileName.c_str(), destFileName.c_str(), NULL);
|
_spawnlp(_P_WAIT, "xdelta.exe", "xdelta.exe", "patch",patchFileName.c_str(), srcFileName.c_str(), destFileName.c_str(), NULL);
|
||||||
#else // NL_OS_WINDOWS
|
#else // NL_OS_WINDOWS
|
||||||
|
|
Loading…
Reference in a new issue