Changeset 298
- Timestamp:
- 07/10/08 02:24:06 (2 months ago)
- Files:
-
- GtkRadiant/trunk/radiant/preferences.cpp (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
GtkRadiant/trunk/radiant/preferences.cpp
r297 r298 696 696 697 697 #if defined(WIN32) 698 #define TOOLS_ATTRIBUTE "gametools_win32" 698 699 #define ENGINE_ATTRIBUTE "engine_win32" 700 #define ENGINEPATH_ATTRIBUTE "enginepath_win32" 699 701 #define MP_ENGINE_ATTRIBUTE "mp_engine_win32" 700 702 #elif defined(__linux__) || defined (__FreeBSD__) 703 #define TOOLS_ATTRIBUTE "gametools_linux" 701 704 #define ENGINE_ATTRIBUTE "engine_linux" 705 #define ENGINEPATH_ATTRIBUTE "enginepath_linux" 702 706 #define MP_ENGINE_ATTRIBUTE "mp_engine_linux" 703 707 #elif defined(__APPLE__) 708 #define TOOLS_ATTRIBUTE "gametools_macos" 704 709 #define ENGINE_ATTRIBUTE "engine_macos" 710 #define ENGINEPATH_ATTRIBUTE "enginepath_macos" 705 711 #define MP_ENGINE_ATTRIBUTE "mp_engine_macos" 706 712 #else … … 708 714 #endif 709 715 710 711 #if defined(WIN32)712 #define ENGINEPATH_ATTRIBUTE "enginepath_win32"713 #elif defined(__linux__) || defined (__FreeBSD__)714 #define ENGINEPATH_ATTRIBUTE "enginepath_linux"715 #elif defined(__APPLE__)716 #define ENGINEPATH_ATTRIBUTE "enginepath_macos"717 #else718 #error "unknown platform"719 #endif720 721 722 716 CGameDescription::CGameDescription(xmlDocPtr pDoc, const Str &GameFile) 723 717 { … … 734 728 } 735 729 // on win32, game tools path can now be specified relative to the exe's cwd 736 prop = (char*)xmlGetProp( pNode, (xmlChar*) "gametools");730 prop = (char*)xmlGetProp( pNode, (xmlChar*)TOOLS_ATTRIBUTE); 737 731 if ( prop == NULL ) { 738 Error( "Didn't find ' gametools' node in the game description file '%s'\n", pDoc->URL );732 Error( "Didn't find '"TOOLS_ATTRIBUTE"' node in the game description file '%s'\n", pDoc->URL ); 739 733 } 740 734 { … … 3376 3370 switch ( m_availGames[ m_nComboSelect ] ) { 3377 3371 case GAME_Q2: { 3378 fprintf( fg, " gametools=\"%sinstalls/Quake2Pack/game\"\n", g_strAppPath.GetBuffer() );3372 fprintf( fg, " "TOOLS_ATTRIBUTE"=\"%sinstalls/Quake2Pack/game\"\n", g_strAppPath.GetBuffer() ); 3379 3373 fprintf( fg, " prefix=\".quake2\"\n" ); 3380 3374 Str source = g_strAppPath.GetBuffer(); … … 3388 3382 } 3389 3383 case GAME_Q3: { 3390 fprintf( fg, " gametools=\"%sinstalls/Q3Pack/game\"\n", g_strAppPath.GetBuffer() );3384 fprintf( fg, " "TOOLS_ATTRIBUTE"=\"%sinstalls/Q3Pack/game\"\n", g_strAppPath.GetBuffer() ); 3391 3385 fprintf( fg, " prefix=\".q3a\"\n" ); 3392 3386 Str source = g_strAppPath.GetBuffer(); … … 3400 3394 } 3401 3395 case GAME_URT: { 3402 fprintf( fg, " gametools=\"%sinstalls/UrTPack/game\"\n", g_strAppPath.GetBuffer() );3396 fprintf( fg, " "TOOLS_ATTRIBUTE"=\"%sinstalls/UrTPack/game\"\n", g_strAppPath.GetBuffer() ); 3403 3397 fprintf( fg, " prefix=\".q3a\"\n" ); 3404 3398 Str source = g_strAppPath.GetBuffer(); … … 3412 3406 } 3413 3407 case GAME_UFOAI: { 3414 fprintf( fg, " gametools=\"%sinstalls/UFOAIPack/game\"\n", g_strAppPath.GetBuffer() );3408 fprintf( fg, " "TOOLS_ATTRIBUTE"=\"%sinstalls/UFOAIPack/game\"\n", g_strAppPath.GetBuffer() ); 3415 3409 fprintf( fg, " prefix=\".ufoai\"\n" ); 3416 3410 Str source = g_strAppPath.GetBuffer(); … … 3424 3418 } 3425 3419 case GAME_Q2W: { 3426 fprintf( fg, " gametools=\"%sinstalls/Q2WPack/game\"\n", g_strAppPath.GetBuffer() );3420 fprintf( fg, " "TOOLS_ATTRIBUTE"=\"%sinstalls/Q2WPack/game\"\n", g_strAppPath.GetBuffer() ); 3427 3421 fprintf( fg, " prefix=\".quake2world\"\n" ); 3428 3422 Str source = g_strAppPath.GetBuffer(); … … 3436 3430 } 3437 3431 case GAME_WARSOW: { 3438 fprintf( fg, " gametools=\"%sinstalls/WarsowPack/game\"\n", g_strAppPath.GetBuffer() );3432 fprintf( fg, " "TOOLS_ATTRIBUTE"=\"%sinstalls/WarsowPack/game\"\n", g_strAppPath.GetBuffer() ); 3439 3433 fprintf( fg, " prefix=\".warsow\"\n" ); 3440 3434 Str source = g_strAppPath.GetBuffer(); … … 3448 3442 } 3449 3443 case GAME_NEXUIZ: { 3450 fprintf( fg, " gametools=\"%sinstalls/NexuizPack/game\"\n", g_strAppPath.GetBuffer() );3444 fprintf( fg, " "TOOLS_ATTRIBUTE"=\"%sinstalls/NexuizPack/game\"\n", g_strAppPath.GetBuffer() ); 3451 3445 fprintf( fg, " prefix=\".nexuiz\"\n" ); 3452 3446 Str source = g_strAppPath.GetBuffer(); … … 3460 3454 } 3461 3455 case GAME_TREMULOUS: { 3462 fprintf( fg, " gametools=\"%sinstalls/TremulousPack/game\"\n", g_strAppPath.GetBuffer() );3456 fprintf( fg, " "TOOLS_ATTRIBUTE"=\"%sinstalls/TremulousPack/game\"\n", g_strAppPath.GetBuffer() ); 3463 3457 fprintf( fg, " prefix=\".tremulous\"\n" ); 3464 3458 Str source = g_strAppPath.GetBuffer();
