From ea7463afc0341961eec924cf91c1872e10b46034 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 28 Feb 2016 16:46:11 +0100 Subject: [PATCH] Merge with develop --- code/nel/src/misc/common.cpp | 4 +-- code/ryzom/client/macosx/upgd_nl.sh | 38 +++++++++++++++++++++++++++ code/ryzom/client/src/client.cpp | 18 ------------- code/ryzom/client/src/login_patch.cpp | 8 +++++- code/ryzom/client/unix/upgd_nl.sh | 15 +++++++++++ 5 files changed, 62 insertions(+), 21 deletions(-) create mode 100644 code/ryzom/client/macosx/upgd_nl.sh create mode 100644 code/ryzom/client/unix/upgd_nl.sh diff --git a/code/nel/src/misc/common.cpp b/code/nel/src/misc/common.cpp index d902cf47b..5954ac9c9 100644 --- a/code/nel/src/misc/common.cpp +++ b/code/nel/src/misc/common.cpp @@ -806,7 +806,7 @@ bool launchProgram(const std::string &programName, const std::string &arguments, #ifdef NL_OS_MAC // special OS X case with bundles - if (toLower(programName).find(".app") != std::string::npos) + if (toLower(CFile::getExtension(programName)) == ".app") { // we need to open bundles with "open" command std::string command = NLMISC::toString("open \"%s\"", programName.c_str()); @@ -914,7 +914,7 @@ bool launchProgramArray (const std::string &programName, const std::vector files; @@ -307,10 +293,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 8208d6e28..20bfcbed0 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -171,7 +171,7 @@ CPatchManager::CPatchManager() : State("t_state"), DataScanState("t_data_scan_st ForceRemovePatchCategories.push_back("main_exedll_linux32"); ForceRemovePatchCategories.push_back("main_exedll_linux64"); ForceRemovePatchCategories.push_back("main_exedll_osx"); -#elif defined(NL_OS_APPLE) +#elif defined(NL_OS_MAC) ForceRemovePatchCategories.push_back("main_exedll_win32"); ForceRemovePatchCategories.push_back("main_exedll_win64"); ForceRemovePatchCategories.push_back("main_exedll_linux32"); @@ -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 diff --git a/code/ryzom/client/unix/upgd_nl.sh b/code/ryzom/client/unix/upgd_nl.sh new file mode 100644 index 000000000..a1af6867e --- /dev/null +++ b/code/ryzom/client/unix/upgd_nl.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +if [ -z "$ROOTPATH" ] +then + echo "upgd_nl.sh can only be launched from updt_nl.sh" + exit 1 +fi + +# executable flag for all executables +chmod +x $ROOTPATH/ryzom_client +chmod +x $ROOTPATH/crash_report +chmod +x $ROOTPATH/ryzom_client_patcher +chmod +x $ROOTPATH/ryzom_configuration + +exit 0