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