@@ -71,12 +71,12 @@ std::string GetSingletonSocketPath()
7171 char homePathHash[33 ] = " " ;
7272 Com_MD5Buffer (homePath.data (), homePath.size (), homePathHash, sizeof (homePathHash));
7373#ifdef _WIN32
74- return std::string (" \\\\ .\\ pipe\\ " PRODUCT_NAME ) + suffix + " -" + homePathHash;
74+ return std::string (" \\\\ .\\ pipe\\ " ) + Gameinfo::getInstance (). name ( ) + suffix + " -" + homePathHash;
7575#else
7676 // We use a temporary directory rather that using the homepath because
7777 // socket paths are limited to about 100 characters. This also avoids issues
7878 // when the homepath is on a network filesystem.
79- return std::string (" /tmp/." PRODUCT_NAME_LOWER ) + suffix + " -" + homePathHash + " /socket" ;
79+ return std::string (" /tmp/." ) + Gameinfo::getInstance (). name_lower ( ) + suffix + " -" + homePathHash + " /socket" ;
8080#endif
8181}
8282
@@ -408,7 +408,7 @@ static void StartSignalThread()
408408// Command line arguments
409409struct cmdlineArgs_t {
410410 cmdlineArgs_t ()
411- : homePath(FS::DefaultHomePath() ), libPath(FS::DefaultBasePath()), reset_config(false ), use_curses(Application::GetTraits().useCurses) {}
411+ : homePath(" " ), libPath(FS::DefaultBasePath()), reset_config(false ), use_curses(Application::GetTraits().useCurses) {}
412412
413413 std::string homePath;
414414 std::string libPath;
@@ -467,7 +467,7 @@ static void ParseCmdline(int argc, char** argv, cmdlineArgs_t& cmdlineArgs)
467467 }
468468
469469 if (!strcmp (argv[i], " --help" ) || !strcmp (argv[i], " -help" )) {
470- std::string helpUrl = Application::GetTraits ().supportsUri ? " | -connect " URI_SCHEME " ADDRESS[:PORT]" : " " ;
470+ std::string helpUrl = Application::GetTraits ().supportsUri ? Str::Format ( " [%s:// ADDRESS[:PORT]] " , Gameinfo::getInstance (). uriprotocol ()) : " " ;
471471 printf (" Usage: %s [-OPTION]... [+COMMAND...%s]\n " , argv[0 ], helpUrl.c_str ());
472472 printf (" Possible options are:\n "
473473 " -homepath <path> set the path used for user-specific configuration files and downloaded dpk files\n "
@@ -482,7 +482,7 @@ static void ParseCmdline(int argc, char** argv, cmdlineArgs_t& cmdlineArgs)
482482 );
483483 OSExit (0 );
484484 } else if (!strcmp (argv[i], " --version" ) || !strcmp (argv[i], " -version" )) {
485- printf (PRODUCT_NAME " " PRODUCT_VERSION " \n " );
485+ printf (ENGINE_NAME_VERSION " \n " );
486486 OSExit (0 );
487487 } else if (!strcmp (argv[i], " -set" )) {
488488 if (i >= argc - 2 ) {
@@ -549,16 +549,21 @@ static void Init(int argc, char** argv)
549549#endif
550550
551551 // Print a banner and a copy of the command-line arguments
552- Log::Notice (Q3_VERSION " " PLATFORM_STRING " " ARCH_STRING " " __DATE__);
553552 std::string argsString = " cmdline:" ;
554553 for (int i = 1 ; i < argc; i++) {
555554 argsString.push_back (' ' );
556555 argsString.append (argv[i]);
557556 }
558- Log::Notice (argsString);
559557
560558 Sys::SetupCrashHandler (); // If Breakpad is enabled, this handler will soon be replaced.
561559 Sys::ParseCmdline (argc, argv, cmdlineArgs);
560+ Gameinfo::getInstance ().parse (FS::Path::Build (cmdlineArgs.libPath , " gameinfo.conf" ));
561+ Log::Notice (" %s" , GAME_NAME_VERSION);
562+ Log::Notice (" %s %s %s %s" , ENGINE_NAME_VERSION, PLATFORM_STRING, ARCH_STRING, ENGINE_DATE);
563+ Log::Notice (argsString);
564+ if (cmdlineArgs.homePath .empty ()) {
565+ cmdlineArgs.homePath = FS::DefaultHomePath ();
566+ }
562567
563568 // Platform-specific initialization
564569#ifdef _WIN32
0 commit comments