if ( gamedetect_check_game( "nexuiz.game", "data/common-spog.pk3", "nexuiz.exe", buf, p - buf ) )
#elif GDEF_OS_MACOS
if ( gamedetect_check_game( "nexuiz.game", "data/common-spog.pk3", "Nexuiz.app/Contents/Info.plist", buf, p - buf ) )
-#else
+#elif GDEF_OS_LINUX
if ( gamedetect_check_game( "nexuiz.game", "data/common-spog.pk3", "nexuiz-linux-glx.sh", buf, p - buf ) )
+#else
+ if ( gamedetect_check_game( "nexuiz.game", "data/common-spog.pk3", NULL, buf, p - buf ) )
#endif
{ return; }
namespace
{
-CopiedString home_path;
-CopiedString app_path;
+ CopiedString home_path;
+ CopiedString app_path;
CopiedString lib_path;
CopiedString data_path;
}
const char* LINK_NAME =
#if GDEF_OS_LINUX
"/proc/self/exe"
-#else // FreeBSD and OSX
+#else // FreeBSD and macOS
"/proc/curproc/file"
#endif
;
}
if ( !portable_app_setup() ) {
+ // this is used on both Linux and macOS
+ // but a macOS specific code may be written instead
StringOutputStream home( 256 );
home << DirectoryCleaned(g_get_user_config_dir()) << "/" << RADIANT_BASENAME << "/";
+ // first create ~/.config
+ // since it may be missing on brand new home directory
+ Q_mkdir( g_get_user_config_dir() );
+ // then create ~/.config/netradiant
Q_mkdir( home.c_str() );
home_path = home.c_str();
}