Changed: Delete updt_nl.bat/sh only when patch enabled and after determining ClientRootPath

--HG--
branch : develop
This commit is contained in:
kervala 2016-02-28 16:41:53 +01:00
parent eac2cec783
commit 3ddefec294
2 changed files with 6 additions and 18 deletions

View file

@ -275,20 +275,6 @@ int main(int argc, char **argv)
pump ();
// Delete the .bat file because it s not useful anymore
if (NLMISC::CFile::fileExists("updt_nl.bat"))
NLMISC::CFile::deleteFile("updt_nl.bat");
if (NLMISC::CFile::fileExists("bug_report.exe"))
NLMISC::CFile::deleteFile("bug_report.exe");
if (NLMISC::CFile::fileExists("bug_report_r.exe"))
NLMISC::CFile::deleteFile("bug_report_r.exe");
if (NLMISC::CFile::fileExists("bug_report_rd.exe"))
NLMISC::CFile::deleteFile("bug_report_rd.exe");
if (NLMISC::CFile::fileExists("bug_report_df.exe"))
NLMISC::CFile::deleteFile("bug_report_df.exe");
if (NLMISC::CFile::fileExists("bug_report_d.exe"))
NLMISC::CFile::deleteFile("bug_report_d.exe");
// Delete all the .ttf file in the /data directory
{
vector<string> files;
@ -303,10 +289,6 @@ int main(int argc, char **argv)
#else
// TODO for Linux : splashscreen
// Delete the .sh file because it s not useful anymore
if (NLMISC::CFile::fileExists("updt_nl.sh"))
NLMISC::CFile::deleteFile("updt_nl.sh");
#endif
// initialize patch manager and set the ryzom full path, before it's used

View file

@ -195,6 +195,12 @@ void CPatchManager::setClientRootPath(const std::string& clientRootPath)
ClientRootPath = CPath::standardizePath(clientRootPath);
ClientPatchPath = CPath::standardizePath(ClientRootPath + "unpack");
// Delete the .sh file because it's not useful anymore
std::string fullUpdateBatchFilename = ClientRootPath + UpdateBatchFilename;
if (NLMISC::CFile::fileExists(fullUpdateBatchFilename))
NLMISC::CFile::deleteFile(fullUpdateBatchFilename);
WritableClientDataPath = CPath::standardizePath(ClientRootPath + "data");
#ifdef NL_OS_MAC