From 3ddefec294eec1d9df4893d2b18929df0f37df1c Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 28 Feb 2016 16:41:53 +0100 Subject: [PATCH] Changed: Delete updt_nl.bat/sh only when patch enabled and after determining ClientRootPath --HG-- branch : develop --- code/ryzom/client/src/client.cpp | 18 ------------------ code/ryzom/client/src/login_patch.cpp | 6 ++++++ 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/code/ryzom/client/src/client.cpp b/code/ryzom/client/src/client.cpp index 63392dd15..e4a77b3c6 100644 --- a/code/ryzom/client/src/client.cpp +++ b/code/ryzom/client/src/client.cpp @@ -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 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 diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index bd806e8bf..20bfcbed0 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -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