|
|
@ -345,6 +345,14 @@ int main(int argc, char **argv)
|
|
|
|
// init the Nel context
|
|
|
|
// init the Nel context
|
|
|
|
CApplicationContext *appContext = new CApplicationContext;
|
|
|
|
CApplicationContext *appContext = new CApplicationContext;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef CHANGE_CURRENT_PATH
|
|
|
|
|
|
|
|
std::string currentPath = CFile::getApplicationDirectory("Ryzom");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!CFile::isExists(currentPath)) CFile::createDirectory(currentPath);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CPath::setCurrentPath(currentPath);
|
|
|
|
|
|
|
|
#endif // CHANGE_CURRENT_PATH
|
|
|
|
|
|
|
|
|
|
|
|
// temporary buffer to store Ryzom full path
|
|
|
|
// temporary buffer to store Ryzom full path
|
|
|
|
char filename[1024];
|
|
|
|
char filename[1024];
|
|
|
|
|
|
|
|
|
|
|
@ -437,31 +445,6 @@ int main(int argc, char **argv)
|
|
|
|
|
|
|
|
|
|
|
|
GetModuleFileName(GetModuleHandle(NULL), filename, 1024);
|
|
|
|
GetModuleFileName(GetModuleHandle(NULL), filename, 1024);
|
|
|
|
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// TODO for Linux : splashscreen
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (argc >= 3)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
LoginLogin = argv[1];
|
|
|
|
|
|
|
|
LoginPassword = argv[2];
|
|
|
|
|
|
|
|
if (!fromString(argv[3], LoginShardId)) LoginShardId = -1;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (argc >= 2)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
LoginLogin = argv[1];
|
|
|
|
|
|
|
|
LoginPassword = argv[2];
|
|
|
|
|
|
|
|
LoginShardId = -1;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
strcpy(filename, argv[0]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// initialize patch manager and set the ryzom full path, before it's used
|
|
|
|
|
|
|
|
CPatchManager *pPM = CPatchManager::getInstance();
|
|
|
|
|
|
|
|
pPM->setRyzomFilename(NLMISC::CFile::getFilename(filename));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Delete the .bat file because it s not useful anymore
|
|
|
|
// Delete the .bat file because it s not useful anymore
|
|
|
|
if (NLMISC::CFile::fileExists("updt_nl.bat"))
|
|
|
|
if (NLMISC::CFile::fileExists("updt_nl.bat"))
|
|
|
|
NLMISC::CFile::deleteFile("updt_nl.bat");
|
|
|
|
NLMISC::CFile::deleteFile("updt_nl.bat");
|
|
|
@ -488,6 +471,31 @@ int main(int argc, char **argv)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// TODO for Linux : splashscreen
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (argc >= 3)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
LoginLogin = argv[1];
|
|
|
|
|
|
|
|
LoginPassword = argv[2];
|
|
|
|
|
|
|
|
if (!fromString(argv[3], LoginShardId)) LoginShardId = -1;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (argc >= 2)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
LoginLogin = argv[1];
|
|
|
|
|
|
|
|
LoginPassword = argv[2];
|
|
|
|
|
|
|
|
LoginShardId = -1;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
strcpy(filename, argv[0]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// initialize patch manager and set the ryzom full path, before it's used
|
|
|
|
|
|
|
|
CPatchManager *pPM = CPatchManager::getInstance();
|
|
|
|
|
|
|
|
pPM->setRyzomFilename(NLMISC::CFile::getFilename(filename));
|
|
|
|
|
|
|
|
|
|
|
|
/////////////////////////////////
|
|
|
|
/////////////////////////////////
|
|
|
|
// Initialize the application. //
|
|
|
|
// Initialize the application. //
|
|
|
|
#ifndef TEST_CRASH_COUNTER
|
|
|
|
#ifndef TEST_CRASH_COUNTER
|
|
|
|