Browse Source

wscript: better Sailfish/AuroraOS macros

pull/2/head
Alibek Omarov 2 years ago
parent
commit
13f8a02cdf
  1. 8
      game_launch/game.cpp
  2. 4
      wscript

8
game_launch/game.cpp

@ -153,18 +153,18 @@ _inline int Sys_Start( void )
pfnChangeGame changeGame = NULL; pfnChangeGame changeGame = NULL;
const char *game = getenv( E_GAME ); const char *game = getenv( E_GAME );
#ifdef XASH_SAILFISH #if XASH_SAILFISH
const char *home = getenv( "HOME" ); const char *home = getenv( "HOME" );
char buf[1024]; char buf[1024];
snprintf( buf, sizeof( buf ), "%s/xash", home ); snprintf( buf, sizeof( buf ), "%s/xash", home );
setenv( "XASH3D_BASEDIR", buf, true ); setenv( "XASH3D_BASEDIR", buf, true );
#if XASH_SAILFISH == aurora #if XASH_AURORAOS
setenv( "XASH3D_RODIR", "/usr/share/su.xash.Engine/rodir", true ); setenv( "XASH3D_RODIR", "/usr/share/su.xash.Engine/rodir", true );
#else #else
setenv( "XASH3D_RODIR", "/usr/share/harbour-xash3d-fwgs/rodir", true ); setenv( "XASH3D_RODIR", "/usr/share/harbour-xash3d-fwgs/rodir", true );
#endif #endif // XASH_AURORAOS
#endif // SAILFISH #endif // XASH_SAILFISH
if( !game ) if( !game )
game = XASH_GAMEDIR; game = XASH_GAMEDIR;

4
wscript

@ -263,7 +263,9 @@ def configure(conf):
linkflags.append('-lc') linkflags.append('-lc')
elif conf.env.SAILFISH != None: elif conf.env.SAILFISH != None:
# TODO: enable XASH_MOBILE_PLATFORM # TODO: enable XASH_MOBILE_PLATFORM
conf.env.append_unique('DEFINES', 'XASH_SAILFISH=%s' % conf.env.SAILFISH) conf.define('XASH_SAILFISH', 1)
if conf.env.SAILFISH == "aurora":
conf.define('XASH_AURORAOS', 1)
# Do not warn us about bug in SDL_Audio headers # Do not warn us about bug in SDL_Audio headers
conf.env.append_unique('CFLAGS', ['-Wno-attributes']) conf.env.append_unique('CFLAGS', ['-Wno-attributes'])

Loading…
Cancel
Save