some updates to the Linux build system - obtained a core binary and all required modules

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/branches/ZeroRadiant@180 8a3a26a2-13c4-0310-b231-cf6edde360e5
This commit is contained in:
TTimo 2007-10-24 04:00:48 +00:00
parent ff588a439f
commit 4189d27b34
34 changed files with 344 additions and 1190 deletions

View file

@ -11,7 +11,7 @@ Import( [ 'utils', 'config', 'settings', 'project' ] )
libname = os.path.splitext( libname )[0] libname = os.path.splitext( libname )[0]
env = Environment() env = Environment()
settings.SetupEnvironment( env, config ) settings.SetupEnvironment( env, config['name'] )
proj = utils.vcproj( os.path.join( GetLaunchDir(), project ) ) proj = utils.vcproj( os.path.join( GetLaunchDir(), project ) )
# some filtering. may need to improve that # some filtering. may need to improve that
@ -20,9 +20,15 @@ add_sources = []
if ( len( drop ) != 0 ): if ( len( drop ) != 0 ):
add_sources.append( 'l_net_berkeley.c' ) add_sources.append( 'l_net_berkeley.c' )
#env.StaticLibrary( libname, [ os.path.join( libpath, i ) for i in files ] ) emit_func = env.StaticObject
try:
if ( config['shared'] ):
emit_func = env.SharedObject
except:
pass
objects = [] objects = []
for i in files + add_sources: for i in files + add_sources:
objects.append( env.StaticObject( os.path.join( libpath, i ) ) ) objects.append( emit_func( os.path.join( libpath, i ) ) )
Return( 'objects' ) Return( 'objects' )

32
SConscript.module Normal file
View file

@ -0,0 +1,32 @@
# -*- mode: python -*-
# ZeroRadiant build scripts
# TTimo <ttimo@idsoftware.com>
# http://scons.sourceforge.net
import os
Import( [ 'utils', 'config', 'settings', 'project', 'shlib_objects' ] )
( libpath, libname ) = os.path.split( project )
libname = os.path.splitext( libname )[0]
env = Environment()
useJPEG = False
useGtk = False
if ( libname == 'image' ):
useJPEG = True
if ( libname == 'surface' ):
useGtk = True
settings.SetupEnvironment( env, config['name'], useGtk = useGtk, useJPEG = useJPEG )
proj = utils.vcproj( os.path.join( GetLaunchDir(), project ) )
# some filtering. may need to improve that
add_sources = []
( drop, files ) = proj.filterSource( r'.*l_net_wins\.c' )
if ( len( drop ) != 0 ):
add_sources.append( 'l_net_berkeley.c' )
module_base = env.SharedLibrary( os.path.join( 'modules', libname ), shlib_objects + [ os.path.join( libpath, i ) for i in files ] )
module = env.AddPostAction( module_base, utils.CheckUnresolved )
Return( 'module' )

View file

@ -8,8 +8,11 @@ import os
Import( [ 'utils', 'config', 'settings', 'lib_objects' ] ) Import( [ 'utils', 'config', 'settings', 'lib_objects' ] )
env = Environment() env = Environment()
settings.SetupEnvironment( env, config, useGtk = True, useGtkGL = True ) settings.SetupEnvironment( env, config['name'], useGtk = True, useGtkGL = True )
proj = utils.vcproj( os.path.join( GetLaunchDir(), 'radiant/radiant.vcproj' ) ) proj = utils.vcproj( os.path.join( GetLaunchDir(), 'radiant/radiant.vcproj' ) )
env.Program( 'radiant.bin', lib_objects + [ os.path.join( 'radiant', i ) for i in proj.getSourceFiles() ] ) radiant = env.Program( 'radiant.bin', lib_objects + [ os.path.join( 'radiant', i ) for i in proj.getSourceFiles() ] )
Return( 'radiant' )

View file

@ -51,19 +51,53 @@ class Config:
def emit( self ): def emit( self ):
settings = self settings = self
for config in self.config_selected: for config_name in self.config_selected:
config = {}
config['name'] = config_name
config['shared'] = False
Export( 'utils', 'settings', 'config' ) Export( 'utils', 'settings', 'config' )
build_dir = os.path.join( 'build', config ) build_dir = os.path.join( 'build', config_name )
BuildDir( build_dir, '.', duplicate = 0 ) BuildDir( build_dir, '.', duplicate = 0 )
# left out jpeg6, splines # left out jpeg6, splines (FIXME: I think jpeg6 is not used at all, can trash?)
lib_objects = [] lib_objects = []
for project in [ 'libs/synapse/synapse.vcproj', 'libs/cmdlib/cmdlib.vcproj', 'libs/mathlib/mathlib.vcproj', 'libs/l_net/l_net.vcproj', 'libs/ddslib/ddslib.vcproj', 'libs/picomodel/picomodel.vcproj', 'libs/md5lib/md5lib.vcproj' ]: for project in [ 'libs/synapse/synapse.vcproj', 'libs/cmdlib/cmdlib.vcproj', 'libs/mathlib/mathlib.vcproj', 'libs/l_net/l_net.vcproj', 'libs/ddslib/ddslib.vcproj', 'libs/picomodel/picomodel.vcproj', 'libs/md5lib/md5lib.vcproj' ]:
Export( 'project' ) Export( 'project' )
lib_objects += SConscript( os.path.join( build_dir, 'SConscript.lib' ) ) lib_objects += SConscript( os.path.join( build_dir, 'SConscript.lib' ) )
Export( 'lib_objects' ) Export( 'lib_objects' )
SConscript( os.path.join( build_dir, 'SConscript.radiant' ) ) radiant = SConscript( os.path.join( build_dir, 'SConscript.radiant' ) )
InstallAs( 'install/radiant.bin', radiant )
def SetupEnvironment( self, env, config, useGtk = False, useGtkGL = False ): # PIC versions of the libs for the modules
shlib_objects_extra = {}
for project in [ 'libs/synapse/synapse.vcproj', 'libs/mathlib/mathlib.vcproj', 'libs/cmdlib/cmdlib.vcproj' ]:
( libpath, libname ) = os.path.split( project )
libname = os.path.splitext( libname )[0]
config['shared'] = True
Export( 'project', 'config' )
build_dir = os.path.join( 'build', config_name, 'shobjs' )
BuildDir( build_dir, '.', duplicate = 0 )
shlib_objects_extra[libname] = SConscript( os.path.join( build_dir, 'SConscript.lib' ) )
for project in [ 'plugins/vfspk3/vfspk3.vcproj',
'plugins/image/image.vcproj',
'plugins/entity/entity.vcproj',
'plugins/map/map.vcproj',
'plugins/mapxml/mapxml.vcproj',
'plugins/shaders/shaders.vcproj',
'plugins/surface/surface.vcproj'
]:
( libpath, libname ) = os.path.split( project )
libname = os.path.splitext( libname )[0]
shlib_objects = shlib_objects_extra['synapse']
if ( libname == 'entity' ):
shlib_objects += shlib_objects_extra['mathlib']
if ( libname == 'map' ):
shlib_objects += shlib_objects_extra['cmdlib']
Export( 'project', 'shlib_objects' )
module = SConscript( os.path.join( build_dir, 'SConscript.module' ) )
InstallAs( 'install/modules/%s.so' % libname, module )
def SetupEnvironment( self, env, config, useGtk = False, useGtkGL = False, useJPEG = False ):
env['CC'] = self.cc env['CC'] = self.cc
env['CXX'] = self.cxx env['CXX'] = self.cxx
( ret, xml2 ) = commands.getstatusoutput( 'xml2-config --cflags' ) ( ret, xml2 ) = commands.getstatusoutput( 'xml2-config --cflags' )
@ -72,7 +106,8 @@ class Config:
assert( False ) assert( False )
xml2libs = commands.getoutput( 'xml2-config --libs' ) xml2libs = commands.getoutput( 'xml2-config --libs' )
env.Append( LINKFLAGS = xml2libs.split( ' ' ) ) env.Append( LINKFLAGS = xml2libs.split( ' ' ) )
baseflags = [ '-m32', '-pipe', '-Wall', '-fmessage-length=0', '-fvisibility=hidden', xml2.split( ' ' ) ] baseflags = [ '-pipe', '-Wall', '-fmessage-length=0', '-fvisibility=hidden', xml2.split( ' ' ) ]
# baseflags += [ '-m32' ]
if ( useGtk ): if ( useGtk ):
( ret, gtk2 ) = commands.getstatusoutput( 'pkg-config gtk+-2.0 --cflags' ) ( ret, gtk2 ) = commands.getstatusoutput( 'pkg-config gtk+-2.0 --cflags' )
if ( ret != 0 ): if ( ret != 0 ):
@ -82,11 +117,14 @@ class Config:
gtk2libs = commands.getoutput( 'pkg-config gtk+-2.0 --libs' ) gtk2libs = commands.getoutput( 'pkg-config gtk+-2.0 --libs' )
env.Append( LINKFLAGS = gtk2libs.split( ' ' ) ) env.Append( LINKFLAGS = gtk2libs.split( ' ' ) )
else: else:
# always setup at least glib
( ret, glib ) = commands.getstatusoutput( 'pkg-config glib-2.0 --cflags' ) ( ret, glib ) = commands.getstatusoutput( 'pkg-config glib-2.0 --cflags' )
if ( ret != 0 ): if ( ret != 0 ):
print 'pkg-config glib-2.0 failed' print 'pkg-config glib-2.0 failed'
assert( False ) assert( False )
baseflags += glib.split( ' ' ) baseflags += glib.split( ' ' )
gliblibs = commands.getoutput( 'pkg-config glib-2.0 --libs' )
env.Append( LINKFLAGS = gliblibs.split( ' ' ) )
if ( useGtkGL ): if ( useGtkGL ):
( ret, gtkgl ) = commands.getstatusoutput( 'pkg-config gtkglext-1.0 --cflags' ) ( ret, gtkgl ) = commands.getstatusoutput( 'pkg-config gtkglext-1.0 --cflags' )
if ( ret != 0 ): if ( ret != 0 ):
@ -95,6 +133,8 @@ class Config:
baseflags += gtkgl.split( ' ' ) baseflags += gtkgl.split( ' ' )
gtkgllibs = commands.getoutput( 'pkg-config gtkglext-1.0 --libs' ) gtkgllibs = commands.getoutput( 'pkg-config gtkglext-1.0 --libs' )
env.Append( LINKFLAGS = gtkgllibs.split( ' ' ) ) env.Append( LINKFLAGS = gtkgllibs.split( ' ' ) )
if ( useJPEG ):
env.Append( LIBS = 'jpeg' )
env.Append( CFLAGS = baseflags ) env.Append( CFLAGS = baseflags )
env.Append( CXXFLAGS = baseflags + [ '-fpermissive', '-fvisibility-inlines-hidden' ] ) env.Append( CXXFLAGS = baseflags + [ '-fpermissive', '-fvisibility-inlines-hidden' ] )
@ -104,7 +144,10 @@ class Config:
env.Append( CFLAGS = [ '-g' ] ) env.Append( CFLAGS = [ '-g' ] )
env.Append( CPPDEFINES = [ '_DEBUG' ] ) env.Append( CPPDEFINES = [ '_DEBUG' ] )
else: else:
env.Append( CFLAGS = [ '-O3', '-march=pentium3', '-Winline', '-ffast-math', '-fno-unsafe-math-optimizations' ] ) env.Append( CFLAGS = [ '-O3', '-Winline', '-ffast-math', '-fno-unsafe-math-optimizations' ] )
#env.Append( CFLAGS = [ '-march=pentium3' ] )
# env.Append( LINKFLAGS = [ '-m32' ] )
# parse the config statement line to produce/update an existing config list # parse the config statement line to produce/update an existing config list
# the configs expose a list of keywords and accepted values, which the engine parses out # the configs expose a list of keywords and accepted values, which the engine parses out

View file

@ -254,8 +254,13 @@ void DoBkgrndToggleYZ()
CSynapseServer* g_pSynapseServer = NULL; CSynapseServer* g_pSynapseServer = NULL;
CSynapseClientBkgrnd2d g_SynapseClient; CSynapseClientBkgrnd2d g_SynapseClient;
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces (const char *version, CSynapseServer *pServer) #if __GNUC__ >= 4
{ #pragma GCC visibility push(default)
#endif
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces( const char *version, CSynapseServer *pServer ) {
#if __GNUC__ >= 4
#pragma GCC visibility pop
#endif
if (strcmp(version, SYNAPSE_VERSION)) if (strcmp(version, SYNAPSE_VERSION))
{ {
Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version); Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version);

View file

@ -219,8 +219,13 @@ public:
CSynapseServer* g_pSynapseServer = NULL; CSynapseServer* g_pSynapseServer = NULL;
CSynapseClientBobtoolz g_SynapseClient; CSynapseClientBobtoolz g_SynapseClient;
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces (const char *version, CSynapseServer *pServer) #if __GNUC__ >= 4
{ #pragma GCC visibility push(default)
#endif
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces( const char *version, CSynapseServer *pServer ) {
#if __GNUC__ >= 4
#pragma GCC visibility pop
#endif
if (strcmp(version, SYNAPSE_VERSION)) if (strcmp(version, SYNAPSE_VERSION))
{ {
Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version); Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version);

View file

@ -184,8 +184,13 @@ public:
CSynapseServer* g_pSynapseServer = NULL; CSynapseServer* g_pSynapseServer = NULL;
CameraSynapseClient g_SynapseClient; CameraSynapseClient g_SynapseClient;
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces (const char *version, CSynapseServer *pServer) #if __GNUC__ >= 4
{ #pragma GCC visibility push(default)
#endif
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces( const char *version, CSynapseServer *pServer ) {
#if __GNUC__ >= 4
#pragma GCC visibility pop
#endif
if (strcmp(version, SYNAPSE_VERSION)) if (strcmp(version, SYNAPSE_VERSION))
{ {
Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version); Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version);

View file

@ -181,8 +181,13 @@ public:
CSynapseServer* g_pSynapseServer = NULL; CSynapseServer* g_pSynapseServer = NULL;
GenSurfSynapseClient g_SynapseClient; GenSurfSynapseClient g_SynapseClient;
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces (const char *version, CSynapseServer *pServer) #if __GNUC__ >= 4
{ #pragma GCC visibility push(default)
#endif
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces( const char *version, CSynapseServer *pServer ) {
#if __GNUC__ >= 4
#pragma GCC visibility pop
#endif
if (strcmp(version, SYNAPSE_VERSION)) if (strcmp(version, SYNAPSE_VERSION))
{ {
Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version); Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version);

View file

@ -372,8 +372,13 @@ extern "C" void QERPlug_Dispatch(const char* p, vec3_t vMin, vec3_t vMax, bool b
CSynapseServer* g_pSynapseServer = NULL; CSynapseServer* g_pSynapseServer = NULL;
CSynapseClientHydraToolz g_SynapseClient; CSynapseClientHydraToolz g_SynapseClient;
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces (const char *version, CSynapseServer *pServer) #if __GNUC__ >= 4
{ #pragma GCC visibility push(default)
#endif
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces( const char *version, CSynapseServer *pServer ) {
#if __GNUC__ >= 4
#pragma GCC visibility pop
#endif
if (strcmp(version, SYNAPSE_VERSION)) if (strcmp(version, SYNAPSE_VERSION))
{ {
Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version); Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version);

View file

@ -496,8 +496,13 @@ public:
CSynapseServer* g_pSynapseServer = NULL; CSynapseServer* g_pSynapseServer = NULL;
CSynapseClientPrtView g_SynapseClient; CSynapseClientPrtView g_SynapseClient;
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces (const char *version, CSynapseServer *pServer) #if __GNUC__ >= 4
{ #pragma GCC visibility push(default)
#endif
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces( const char *version, CSynapseServer *pServer ) {
#if __GNUC__ >= 4
#pragma GCC visibility pop
#endif
if (strcmp(version, SYNAPSE_VERSION)) if (strcmp(version, SYNAPSE_VERSION))
{ {
Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version); Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version);

7
install/games/qz.game Normal file
View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
<game
name="QuakeZero"
enginepath =".."
gametools="/home/timo/SVN/ZeroRadiant/install/games"
gamename="quakezero"
/>

View file

@ -0,0 +1,56 @@
<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
<!-- synapse XML configuration -->
<synapseconfig>
<client name="core">
<api name="image">
tga jpg
</api>
<api name="VFS">
pk3
</api>
<api name="shaders">
quake3
</api>
<api name="map">
mapq3
</api>
<api name="eclass">
def
</api>
<api name="surfdialog">
quake3
</api>
</client>
<client name="image">
<api name="VFS">
pk3
</api>
</client>
<client name="shaders">
<!-- NOTE: this is a SYN_PROVIDE -->
<api name="shaders">
quake3
</api>
<api name="VFS">
pk3
</api>
</client>
<client name="map">
<api name="shaders">
quake3
</api>
</client>
<client name="xmap">
<api name="shaders">
quake3
</api>
</client>
<client name="model">
<api name="shaders">
quake3
</api>
<api name="VFS">
pk3
</api>
</client>
</synapseconfig>

File diff suppressed because it is too large Load diff

View file

@ -60,6 +60,7 @@ could be split into two independant libraries actually, the server part and the
#if defined(_WIN32) #if defined(_WIN32)
#define SYNAPSE_DLL_EXPORT WINAPI #define SYNAPSE_DLL_EXPORT WINAPI
#elif defined(__linux__) || defined(__APPLE__) /* ydnar */ #elif defined(__linux__) || defined(__APPLE__) /* ydnar */
// #define SYNAPSE_DLL_EXPORT __attribute__ ((visibility ("protected")))
#define SYNAPSE_DLL_EXPORT #define SYNAPSE_DLL_EXPORT
#else #else
#error unknown architecture #error unknown architecture

View file

@ -135,8 +135,13 @@ const char* EClass_GetExtension()
CSynapseServer* g_pSynapseServer = NULL; CSynapseServer* g_pSynapseServer = NULL;
CSynapseClientFGD g_SynapseClient; CSynapseClientFGD g_SynapseClient;
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces (const char *version, CSynapseServer *pServer) #if __GNUC__ >= 4
{ #pragma GCC visibility push(default)
#endif
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces( const char *version, CSynapseServer *pServer ) {
#if __GNUC__ >= 4
#pragma GCC visibility pop
#endif
if (strcmp(version, SYNAPSE_VERSION)) if (strcmp(version, SYNAPSE_VERSION))
{ {
Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version); Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version);

View file

@ -56,8 +56,13 @@ public:
CSynapseServer* g_pSynapseServer = NULL; CSynapseServer* g_pSynapseServer = NULL;
CSynapseClientEntity g_SynapseClient; CSynapseClientEntity g_SynapseClient;
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces (const char *version, CSynapseServer *pServer) #if __GNUC__ >= 4
{ #pragma GCC visibility push(default)
#endif
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces( const char *version, CSynapseServer *pServer ) {
#if __GNUC__ >= 4
#pragma GCC visibility pop
#endif
if (strcmp(version, SYNAPSE_VERSION)) if (strcmp(version, SYNAPSE_VERSION))
{ {
Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version); Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version);

View file

@ -55,8 +55,13 @@ static const XMLConfigEntry_t entries[] =
{ VFS_MAJOR, SYN_REQUIRE, sizeof(g_FileSystemTable), &g_FileSystemTable }, { VFS_MAJOR, SYN_REQUIRE, sizeof(g_FileSystemTable), &g_FileSystemTable },
{ NULL, SYN_UNKNOWN, 0, NULL } }; { NULL, SYN_UNKNOWN, 0, NULL } };
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces (const char *version, CSynapseServer *pServer) #if __GNUC__ >= 4
{ #pragma GCC visibility push(default)
#endif
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces( const char *version, CSynapseServer *pServer ) {
#if __GNUC__ >= 4
#pragma GCC visibility pop
#endif
if (strcmp(version, SYNAPSE_VERSION)) if (strcmp(version, SYNAPSE_VERSION))
{ {
Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version); Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version);

View file

@ -40,10 +40,14 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <string.h> #include <string.h>
#include <glib.h> #include <glib.h>
#include <jpeglib.h>
#include <jerror.h>
/*
extern "C" { extern "C" {
#include "radiant_jpeglib.h" #include "radiant_jpeglib.h"
#include "jpeg6/jerror.h" #include "jpeg6/jerror.h"
} }
*/
#include "image.h" #include "image.h"

View file

@ -50,8 +50,13 @@ _QERFileSystemTable g_FileSystemTable;
CSynapseServer* g_pSynapseServer = NULL; CSynapseServer* g_pSynapseServer = NULL;
CSynapseClientImageHL g_SynapseClient; CSynapseClientImageHL g_SynapseClient;
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces (const char *version, CSynapseServer *pServer) #if __GNUC__ >= 4
{ #pragma GCC visibility push(default)
#endif
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces( const char *version, CSynapseServer *pServer ) {
#if __GNUC__ >= 4
#pragma GCC visibility pop
#endif
if (strcmp(version, SYNAPSE_VERSION)) if (strcmp(version, SYNAPSE_VERSION))
{ {
Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version); Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version);

View file

@ -49,8 +49,13 @@ _QERFileSystemTable g_FileSystemTable;
CSynapseServer* g_pSynapseServer = NULL; CSynapseServer* g_pSynapseServer = NULL;
CSynapseClientImage g_SynapseClient; CSynapseClientImage g_SynapseClient;
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces (const char *version, CSynapseServer *pServer) #if __GNUC__ >= 4
{ #pragma GCC visibility push(default)
#endif
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces( const char *version, CSynapseServer *pServer ) {
#if __GNUC__ >= 4
#pragma GCC visibility pop
#endif
if (strcmp(version, SYNAPSE_VERSION)) if (strcmp(version, SYNAPSE_VERSION))
{ {
Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version); Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version);

View file

@ -46,8 +46,13 @@ public:
CSynapseServer* g_pSynapseServer = NULL; CSynapseServer* g_pSynapseServer = NULL;
CSynapseClientImage g_SynapseClient; CSynapseClientImage g_SynapseClient;
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces (const char *version, CSynapseServer *pServer) #if __GNUC__ >= 4
{ #pragma GCC visibility push(default)
#endif
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces( const char *version, CSynapseServer *pServer ) {
#if __GNUC__ >= 4
#pragma GCC visibility pop
#endif
if (strcmp(version, SYNAPSE_VERSION)) if (strcmp(version, SYNAPSE_VERSION))
{ {
Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version); Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version);

View file

@ -39,8 +39,13 @@ static const XMLConfigEntry_t entries[] =
{ VFS_MAJOR, SYN_REQUIRE, sizeof(_QERFileSystemTable), &g_FileSystemTable }, { VFS_MAJOR, SYN_REQUIRE, sizeof(_QERFileSystemTable), &g_FileSystemTable },
{ NULL, SYN_UNKNOWN, 0, NULL } }; { NULL, SYN_UNKNOWN, 0, NULL } };
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces (const char *version, CSynapseServer *pServer) #if __GNUC__ >= 4
{ #pragma GCC visibility push(default)
#endif
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces( const char *version, CSynapseServer *pServer ) {
#if __GNUC__ >= 4
#pragma GCC visibility pop
#endif
if (strcmp(version, SYNAPSE_VERSION)) if (strcmp(version, SYNAPSE_VERSION))
{ {
Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version); Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version);

View file

@ -49,8 +49,13 @@ static const XMLConfigEntry_t entries[] =
{ SHADERS_MAJOR, SYN_REQUIRE, sizeof(g_ShadersTable), &g_ShadersTable }, { SHADERS_MAJOR, SYN_REQUIRE, sizeof(g_ShadersTable), &g_ShadersTable },
{ NULL, SYN_UNKNOWN, 0, NULL } }; { NULL, SYN_UNKNOWN, 0, NULL } };
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces (const char *version, CSynapseServer *pServer) #if __GNUC__ >= 4
{ #pragma GCC visibility push(default)
#endif
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces( const char *version, CSynapseServer *pServer ) {
#if __GNUC__ >= 4
#pragma GCC visibility pop
#endif
if (strcmp(version, SYNAPSE_VERSION)) if (strcmp(version, SYNAPSE_VERSION))
{ {
Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version); Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version);

View file

@ -21,8 +21,13 @@ static const XMLConfigEntry_t entries[] =
{ SHADERS_MAJOR, SYN_REQUIRE, sizeof(g_ShadersTable), &g_ShadersTable }, { SHADERS_MAJOR, SYN_REQUIRE, sizeof(g_ShadersTable), &g_ShadersTable },
{ NULL, SYN_UNKNOWN, 0, NULL } }; { NULL, SYN_UNKNOWN, 0, NULL } };
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces (const char *version, CSynapseServer *pServer) #if __GNUC__ >= 4
{ #pragma GCC visibility push(default)
#endif
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces( const char *version, CSynapseServer *pServer ) {
#if __GNUC__ >= 4
#pragma GCC visibility pop
#endif
if (strcmp(version, SYNAPSE_VERSION)) if (strcmp(version, SYNAPSE_VERSION))
{ {
Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version); Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version);

View file

@ -354,8 +354,13 @@ static const XMLConfigEntry_t entries[] =
{ VFS_MAJOR, SYN_REQUIRE, sizeof(g_FileSystemTable), &g_FileSystemTable }, { VFS_MAJOR, SYN_REQUIRE, sizeof(g_FileSystemTable), &g_FileSystemTable },
{ NULL, SYN_UNKNOWN, 0, NULL } }; { NULL, SYN_UNKNOWN, 0, NULL } };
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces (const char *version, CSynapseServer *pServer) #if __GNUC__ >= 4
{ #pragma GCC visibility push(default)
#endif
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces( const char *version, CSynapseServer *pServer ) {
#if __GNUC__ >= 4
#pragma GCC visibility pop
#endif
if (strcmp(version, SYNAPSE_VERSION)) if (strcmp(version, SYNAPSE_VERSION))
{ {
Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version); Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version);

View file

@ -60,8 +60,13 @@ static const XMLConfigEntry_t entries[] =
{ VFS_MAJOR, SYN_REQUIRE, sizeof(g_VFSTable), &g_VFSTable }, { VFS_MAJOR, SYN_REQUIRE, sizeof(g_VFSTable), &g_VFSTable },
{ NULL, SYN_UNKNOWN, 0, NULL } }; { NULL, SYN_UNKNOWN, 0, NULL } };
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces (const char *version, CSynapseServer *pServer) #if __GNUC__ >= 4
{ #pragma GCC visibility push(default)
#endif
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces( const char *version, CSynapseServer *pServer ) {
#if __GNUC__ >= 4
#pragma GCC visibility pop
#endif
if (strcmp(version, SYNAPSE_VERSION)) if (strcmp(version, SYNAPSE_VERSION))
{ {
Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version); Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version);

View file

@ -213,8 +213,13 @@ extern "C" void QERPlug_Dispatch (const char *p, vec3_t vMin, vec3_t vMax, bool
CSynapseServer* g_pSynapseServer = NULL; CSynapseServer* g_pSynapseServer = NULL;
CSynapseClientModel g_SynapseClient; CSynapseClientModel g_SynapseClient;
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces (const char *version, CSynapseServer *pServer) #if __GNUC__ >= 4
{ #pragma GCC visibility push(default)
#endif
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces( const char *version, CSynapseServer *pServer ) {
#if __GNUC__ >= 4
#pragma GCC visibility pop
#endif
if (strcmp(version, SYNAPSE_VERSION)) if (strcmp(version, SYNAPSE_VERSION))
{ {
Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version); Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version);

View file

@ -61,8 +61,13 @@ _QERAppDataTable g_AppDataTable;
CSynapseServer* g_pSynapseServer = NULL; CSynapseServer* g_pSynapseServer = NULL;
CSynapseClient_SurfDLG g_SynapseClient; CSynapseClient_SurfDLG g_SynapseClient;
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces (const char *version, CSynapseServer *pServer) #if __GNUC__ >= 4
{ #pragma GCC visibility push(default)
#endif
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces( const char *version, CSynapseServer *pServer ) {
#if __GNUC__ >= 4
#pragma GCC visibility pop
#endif
if (strcmp(version, SYNAPSE_VERSION)) if (strcmp(version, SYNAPSE_VERSION))
{ {
Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version); Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version);

View file

@ -61,8 +61,13 @@ _QERAppDataTable g_AppDataTable;
CSynapseServer* g_pSynapseServer = NULL; CSynapseServer* g_pSynapseServer = NULL;
CSynapseClient_SurfDLG g_SynapseClient; CSynapseClient_SurfDLG g_SynapseClient;
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces (const char *version, CSynapseServer *pServer) #if __GNUC__ >= 4
{ #pragma GCC visibility push(default)
#endif
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces( const char *version, CSynapseServer *pServer ) {
#if __GNUC__ >= 4
#pragma GCC visibility pop
#endif
if (strcmp(version, SYNAPSE_VERSION)) if (strcmp(version, SYNAPSE_VERSION))
{ {
Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version); Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version);

View file

@ -61,8 +61,13 @@ _QERAppDataTable g_AppDataTable;
CSynapseServer* g_pSynapseServer = NULL; CSynapseServer* g_pSynapseServer = NULL;
CSynapseClient_SurfDLG g_SynapseClient; CSynapseClient_SurfDLG g_SynapseClient;
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces (const char *version, CSynapseServer *pServer) #if __GNUC__ >= 4
{ #pragma GCC visibility push(default)
#endif
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces( const char *version, CSynapseServer *pServer ) {
#if __GNUC__ >= 4
#pragma GCC visibility pop
#endif
if (strcmp(version, SYNAPSE_VERSION)) if (strcmp(version, SYNAPSE_VERSION))
{ {
Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version); Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version);

View file

@ -919,8 +919,13 @@ extern "C" void QERPlug_Dispatch(const char* p, vec3_t vMin, vec3_t vMax, bool b
CSynapseServer* g_pSynapseServer = NULL; CSynapseServer* g_pSynapseServer = NULL;
CSynapseClientTexTool g_SynapseClient; CSynapseClientTexTool g_SynapseClient;
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces (const char *version, CSynapseServer *pServer) #if __GNUC__ >= 4
{ #pragma GCC visibility push(default)
#endif
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces( const char *version, CSynapseServer *pServer ) {
#if __GNUC__ >= 4
#pragma GCC visibility pop
#endif
if (strcmp(version, SYNAPSE_VERSION)) if (strcmp(version, SYNAPSE_VERSION))
{ {
Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version); Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version);

View file

@ -46,8 +46,13 @@ _QERFuncTable_1 g_FuncTable;
CSynapseServer* g_pSynapseServer = NULL; CSynapseServer* g_pSynapseServer = NULL;
CSynapseClientVFS g_SynapseClient; CSynapseClientVFS g_SynapseClient;
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces (const char *version, CSynapseServer *pServer) #if __GNUC__ >= 4
{ #pragma GCC visibility push(default)
#endif
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces( const char *version, CSynapseServer *pServer ) {
#if __GNUC__ >= 4
#pragma GCC visibility pop
#endif
if (strcmp(version, SYNAPSE_VERSION)) if (strcmp(version, SYNAPSE_VERSION))
{ {
Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version); Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version);

View file

@ -50,19 +50,24 @@ _QERFuncTable_1 g_FuncTable;
CSynapseServer* g_pSynapseServer = NULL; CSynapseServer* g_pSynapseServer = NULL;
CSynapseClientVFS g_SynapseClient; CSynapseClientVFS g_SynapseClient;
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces (const char *version, CSynapseServer *pServer) #if __GNUC__ >= 4
{ #pragma GCC visibility push(default)
if (strcmp(version, SYNAPSE_VERSION)) #endif
{ extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces( const char *version, CSynapseServer *pServer ) {
#if __GNUC__ >= 4
#pragma GCC visibility pop
#endif
if ( strcmp( version, SYNAPSE_VERSION ) ) {
Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version); Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version);
return NULL; return NULL;
} }
g_pSynapseServer = pServer; g_pSynapseServer = pServer;
g_pSynapseServer->IncRef(); g_pSynapseServer->IncRef();
Set_Syn_Printf(g_pSynapseServer->Get_Syn_Printf()); Set_Syn_Printf( g_pSynapseServer->Get_Syn_Printf() );
g_SynapseClient.AddAPI(VFS_MAJOR, "pk3", sizeof(_QERFileSystemTable)); g_SynapseClient.AddAPI( VFS_MAJOR, "pk3", sizeof( _QERFileSystemTable ) );
g_SynapseClient.AddAPI(RADIANT_MAJOR, NULL, sizeof(_QERFuncTable_1), SYN_REQUIRE, &g_FuncTable); g_SynapseClient.AddAPI( RADIANT_MAJOR, NULL, sizeof( _QERFuncTable_1 ), SYN_REQUIRE, &g_FuncTable );
return &g_SynapseClient; return &g_SynapseClient;
} }

View file

@ -52,8 +52,13 @@ _QERFuncTable_1 g_FuncTable;
CSynapseServer* g_pSynapseServer = NULL; CSynapseServer* g_pSynapseServer = NULL;
CSynapseClientVFS g_SynapseClient; CSynapseClientVFS g_SynapseClient;
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces (const char *version, CSynapseServer *pServer) #if __GNUC__ >= 4
{ #pragma GCC visibility push(default)
#endif
extern "C" CSynapseClient* SYNAPSE_DLL_EXPORT Synapse_EnumerateInterfaces( const char *version, CSynapseServer *pServer ) {
#if __GNUC__ >= 4
#pragma GCC visibility pop
#endif
if (strcmp(version, SYNAPSE_VERSION)) if (strcmp(version, SYNAPSE_VERSION))
{ {
Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version); Syn_Printf("ERROR: synapse API version mismatch: should be '" SYNAPSE_VERSION "', got '%s'\n", version);