]> de.git.xonotic.org Git - xonotic/netradiant.git/commitdiff
integrated x86_64 patch from LordHavoc
authorspog <spog>
Sat, 13 May 2006 10:32:50 +0000 (10:32 +0000)
committerspog <spog>
Sat, 13 May 2006 10:32:50 +0000 (10:32 +0000)
git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@61 8a3a26a2-13c4-0310-b231-cf6edde360e5

CHANGES
SConscript
SConstruct
radiant/findtexturedialog.cpp
radiant/mainframe.cpp

diff --git a/CHANGES b/CHANGES
index 82829e341bea0ebc4437b475466df19ef222051f..333cf5e98f570ce50df2fb1425bbf35727dc0b36 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,13 @@
 This is the changelog for developers, != changelog for the end user 
 that we distribute with the binaries. (see changelog)
 
+13/05/2006
+LordHavoc
+- Added -fPIC for Linux builds to support x86_64.
+- Removed static-linked libstdc++ hack for non-final builds.
+- Removed gcc explicit linking hack for non-final builds.
+- Added workaround for gcc static-member-pointer-as-template-argument bug.
+
 30/04/2006
 SPoG
 - Fixed memory leak in signals library.
index c025189f2b03fad405c1c8a231850518daf83d29..c7fb7c53c88bec1956e3e057d3580daa488411a5 100644 (file)
@@ -591,334 +591,5 @@ radiant_env.Depends(radiant_prog, profile_lib)
 radiant_env.Depends(radiant_prog, gtkutil_lib)
 radiant_env.Install(INSTALL, radiant_prog)
 
-# setup -------------------------------------------------------------------------------------------
-
-class setup_builder:
-
-  g_dryrun = 0
-  
-  def system(self, cmd):
-    if (self.g_dryrun):
-      print cmd
-    else:
-      sys.stdout.write(cmd)
-      ret = commands.getstatusoutput(cmd)
-      print ret[1]
-      if (ret[0] != 0):
-        raise 'command failed'
-
-  def copy_core(self):
-    # binaries and misc
-    self.system('mkdir -p %s/modules' % self.SETUP_BIN_DIR)
-    self.system('mkdir -p %s/plugins' % self.SETUP_BIN_DIR)
-    self.system('cp install/%s %s' % (self.EDITOR_BIN, self.SETUP_BIN_DIR))
-    self.system('cp install/modules/*.so %s/modules' % self.SETUP_BIN_DIR )
-#    self.system('cp install/plugins/*.so %s/plugins' % self.SETUP_BIN_DIR )
-    self.system('cp install/q3map2.%s %s' % ( g_cpu, self.SETUP_BIN_DIR ) )
-    self.M4_STDC = ''
-    if (not self.g_darwin):    
-      # fugly
-      # copy libgcc_s and stdc++ over to distribute it and reduce potential ABI fuckups
-      ret = commands.getstatusoutput('ldd -r install/' + self.EDITOR_BIN + ' 2>/dev/null | grep libgcc_s | sed -e \'s/.* => \\([^ ]*\\) .*/\\1/\'')
-      if (ret[0] != 0):
-        raise 'ldd command failed'
-      self.system('cp ' + ret[1] + ' ' + self.SETUP_BIN_DIR)
-      ret = commands.getstatusoutput('ldd -r install/' + self.EDITOR_BIN + ' 2>/dev/null | grep libstdc++ | sed -e \'s/.* => \\([^ ]*\\) .*/\\1/\'')
-      if (ret[0] != 0):
-        raise 'ldd command failed'
-      lines = string.split(ret[1], '\n')
-      self.M4_STDC = '"' 
-      for i in lines:
-        self.system('cp ' + i + ' ' + self.SETUP_BIN_DIR)
-        self.M4_STDC += os.path.basename(i) + ' \n'
-      self.M4_STDC += '"'
-    # hack for symlink
-    # setup process generates the wrapper at install time
-    # but we need a dummy executable for symlink in loki_setup
-    self.system('echo -n "#!/bin/sh\necho If you read this then there was a bug during setup. Report the bug and try running %s directly from it\'s installation directory.\n" > %s/radiant' % (self.EDITOR_BIN, self.SETUP_BIN_DIR));
-    self.system('echo -n "#!/bin/sh\necho If you read this then there was a bug during setup. Report the bug and try running %s directly from it\'s installation directory.\n" > %s/q3map2' % (self.EDITOR_BIN, self.SETUP_BIN_DIR));
-    ## this goes to the core install directory
-    DEST = self.SETUP_DIR + '/core'
-    self.system('mkdir -p ' + DEST + '/modules/bitmaps')
-    # general content stuff
-    self.system('cp -R plugins/model/bitmaps/* ' + DEST + '/modules/bitmaps')
-    self.system('cp setup/data/tools/credits.html ' + DEST)
-    self.system('cp setup/data/tools/links.htm ' + DEST)
-    self.system('cp setup/data/tools/q3data.qdt ' + DEST)
-    self.system('cp setup/data/tools/global.xlink ' + DEST)
-    self.system('cp -R radiant/bitmaps ' + DEST)
-    self.system('cp setup/changelog.txt ' + DEST)
-    self.system('cp setup/openurl.sh ' + DEST)
-    self.system('cp tools/quake3/q3map2/changelog.q3map2.txt ' + DEST)
-    # documentation
-    self.system('cp -R docs/manual/Q3Rad_Manual ' + DEST)
-    self.system('cp -R docs/manual/quake3/Compile_Manual ' + DEST)
-    self.system('cp -R docs/manual/quake3/Model_Manual ' + DEST)
-    self.system('cp -R docs/manual/quake3/Terrain_Manual ' + DEST)
-    # copy plugins media
-    #self.system('mkdir -p ' + DEST + '/plugins/bitmaps')
-    #self.system('cp -R contrib/bobtoolz/bitmaps/* ' + DEST + '/plugins/bitmaps')
-    #self.system('cp -R contrib/bobtoolz/bt ' + DEST + '/plugins')
-    #self.system('cp -R contrib/camera/bitmaps/* ' + DEST + '/plugins/bitmaps' )
-    #self.system('cp -R contrib/bkgrnd2d/bitmaps/* ' + DEST + '/plugins/bitmaps' )
-    # games files
-    self.system('mkdir -p ' + self.SETUP_DIR + '/games')
-  
-  def copy_q3(self):
-    # binaries
-    self.system('mkdir -p ' + self.SETUP_BIN_DIR + '/q3')
-    if ( self.g_darwin == 0 ):
-      self.system('cp setup/linux/bspc ' + self.SETUP_BIN_DIR + '/q3')
-
-    # goes in core
-    DEST = self.SETUP_DIR + '/core/q3.game'
-    self.system('mkdir -p ' + DEST)
-    self.system('cp -R games/Q3Pack/tools/q3.game/* ' + DEST)
-    self.system('cp -R docs/manual/quake3/Team_Arena_Mapping_Help ' + DEST)
-    self.system('cp -R docs/manual/quake3/New_Teams_For_Q3TA ' + DEST)
-    self.system('cp -R docs/manual/quake3/Q3AShader_Manual ' + DEST)
-  
-    # goes in the game install path
-    DEST = self.SETUP_DIR + '/q3'
-    self.system('mkdir -p ' + DEST)
-    self.system('cp -R games/Q3Pack/baseq3 ' + DEST)
-    self.system('cp -R games/Q3Pack/missionpack ' + DEST)
-
-    # game file
-    self.system('cp -R games/Q3Pack/tools/games/q3.game ' + self.SETUP_DIR + '/games')
-
-  def copy_wolf(self):
-    # binaries
-    self.system('mkdir -p ' + self.SETUP_BIN_DIR + '/wolf')
-    if ( self.g_darwin == 0 ):
-      self.system('cp games/WolfPack/bin/wolf.game/bspc ' + self.SETUP_BIN_DIR + '/wolf')
-  
-    # goes in core
-    DEST = self.SETUP_DIR + '/core/wolf.game'
-    self.system('mkdir -p ' + DEST)
-    self.system('cp -R games/WolfPack/docs ' + DEST)
-    self.system('cp -R games/WolfPack/bin/wolf.game/* ' + DEST)
-
-    # goes in the game install path
-    DEST = self.SETUP_DIR + '/wolf/main'
-    self.system('mkdir -p ' + DEST)
-    self.system('cp games/WolfPack/astro-skies.pk3 ' + DEST)
-    self.system('cp games/WolfPack/common-astro-spog.pk3 ' + DEST)
-    self.system('cp games/WolfPack/lights.pk3 ' + DEST)      
-    self.system('cp -R games/WolfPack/scripts ' + DEST)
-    self.system('cp -R games/WolfPack/maps ' + DEST)
-    self.system('cp -R games/WolfPack/models ' + DEST)
-  
-    # game file
-    self.system('cp -R games/WolfPack/bin/games/wolf.game ' + self.SETUP_DIR + '/games')
-
-  def copy_et(self):
-    # goes in core
-    DEST = self.SETUP_DIR + '/core/et.game'
-    self.system('mkdir -p ' + DEST)    
-    self.system('cp -R games/ETPack/docs ' + DEST)
-    self.system('cp -R games/ETPack/et.game/* ' + DEST)
-    
-    # goes in game install path
-    DEST = self.SETUP_DIR + '/et/etmain'
-    self.system('mkdir -p ' + DEST)
-    self.system('cp games/ETPack/astro-skies.pk3 ' + DEST)
-    self.system('cp games/ETPack/common.pk3 ' + DEST)
-    self.system('cp games/ETPack/goldrush.pcx ' + DEST)    
-    self.system('cp games/ETPack/lights.pk3 ' + DEST)
-    self.system('cp games/ETPack/mapmedia.pk3 ' + DEST)
-    self.system('cp -R games/ETPack/scripts ' + DEST)
-    self.system('cp -R games/ETPack/maps ' + DEST)
-    self.system('cp -R games/ETPack/models ' + DEST)
-  
-    # game file
-    self.system('cp -R games/ETPack/games/et.game ' + self.SETUP_DIR + '/games')
-
-  def copy_doom3(self):
-    # goes in core
-    DEST = self.SETUP_DIR + '/core/doom3.game'
-    self.system('mkdir -p ' + DEST)
-    self.system('cp -R games/Doom3Pack/tools/doom3.game/* ' + DEST)
-  
-    # game file
-    self.system('cp -R games/Doom3Pack/tools/games/doom3.game ' + self.SETUP_DIR + '/games')
-
-  def copy_q2(self):
-    # binaries
-    self.system('cp -R install/q2 %s' % (self.SETUP_BIN_DIR))
-
-    # goes in core
-    DEST = self.SETUP_DIR + '/core/q2.game'
-    self.system('mkdir -p ' + DEST + '/modules')
-    self.system('cp -R games/Q2Pack/q2.game/* ' + DEST)
-    self.system('cp install/q2/q2map install/q2/qdata3 ' + DEST) 
-#    self.system('cp -R install/q2/modules ' + DEST )
-
-    # goes in game install path
-    DEST = self.SETUP_DIR + '/q2'
-    self.system('mkdir -p ' + DEST +  '/baseq2')
-    self.system('cp -R games/Q2Pack/baseq2/* ' + DEST + '/baseq2')
-  
-    # game file
-    self.system('cp -R games/Q2Pack/games/q2.game ' + self.SETUP_DIR + '/games')
-
-  def copy_her2(self):
-    # binaries
-    self.system('cp -R install/heretic2 %s' % (self.SETUP_BIN_DIR))
-
-    # goes in core
-    DEST = self.SETUP_DIR + '/core/heretic2.game'
-    self.system('mkdir -p ' + DEST + '/modules')
-    self.system('cp -R games/Her2Pack/heretic2.game/* ' + DEST)
-    self.system('cp install/q2/q2map install/heretic2/qdata3 ' + DEST)
-#    self.system('cp -R install/heretic2/modules ' + DEST )
-
-    # goes in game install path
-    DEST = self.SETUP_DIR + '/heretic2'
-    self.system('mkdir -p ' + DEST +  '/base')
-    self.system('cp -R games/Her2Pack/base/* ' + DEST + '/base')
-  
-    # game file
-    self.system('cp -R games/Her2Pack/games/heretic2.game ' + self.SETUP_DIR + '/games')
-
-  def build_setup(self):
-    self.system( 'cp -R ' + self.SETUP_IMAGE_OS + '/* ' + self.SETUP_DIR )
-    self.system( 'cp -fR ' + self.SETUP_IMAGE + '/* ' + self.SETUP_DIR )
-    self.system('cp setup/license.txt ' + self.SETUP_DIR)
-    self.system('cp setup/linux/README ' + self.SETUP_DIR)
-    OS_DEFS=''
-    if (self.g_darwin):
-      OS_DEFS='--define=M4_OSX'
-    M4_LINE = OS_DEFS + ' --define=M4_VER_MAJOR=' + self.major + ' --define=M4_VER_MINOR=' + self.minor + ' --define=M4_VER=' + self.line 
-    M4_LINE += ' --define=M4_GAME_ET=%d' % self.DO_GAME_ET
-    M4_LINE += ' --define=M4_GAME_DOOM3=%d' % self.DO_GAME_DOOM3
-    M4_LINE += ' --define=M4_GAME_Q2=%d' % self.DO_GAME_Q2
-    if ( self.M4_STDC != '' ):
-      M4_LINE += ' --define=M4_STDC=' + self.M4_STDC 
-    # setup.xml
-    self.system('m4 ' + M4_LINE + ' ' + self.SETUP_DIR + '/setup.data/setup.xml.in > ' + self.SETUP_DIR + '/setup.data/setup.xml')
-    # postinstall.sh
-    self.system('m4 ' + M4_LINE + ' ' + self.SETUP_DIR + '/setup.data/postinstall.sh.in > ' + self.SETUP_DIR + '/setup.data/postinstall.sh')
-    # config.sh
-    self.system('m4 ' + M4_LINE + ' ' + self.SETUP_DIR + '/setup.data/config.sh.in > ' + self.SETUP_DIR + '/setup.data/config.sh')
-    # setup.sh
-    self.system('m4 ' + M4_LINE + ' ' + self.SETUP_DIR + '/setup.sh.in > ' + self.SETUP_DIR + '/setup.sh')
-    self.system('chmod +x ' +self.SETUP_DIR + '/setup.sh')
-    self.system('find ' + self.SETUP_DIR + ' -name .svn | while read i ; do rm -r "$i" ; done')
-    # pack it up
-    self.system('setup/linux/makeself/makeself.sh ' + self.SETUP_DIR + ' ' + self.SETUP_TARGET + ' "GtkRadiant ' + self.line + ' setup" ./setup.sh')
-    if (self.g_darwin):
-      def build_fink_deb(self):
-        print "Building installer .deb\n"
-        self.F_REV = '1'
-        self.FINKINFO_DIR = '/sw/fink/10.2/unstable/main/finkinfo/games'
-        self.TARBALL_DIR='radiant-' + self.F_REV + '.' + self.major 
-        self.TARBALL_NAME='radiant-' + self.F_REV + '.' + self.major + '.tar.gz'
-        self.TARBALL_DEST='/sw/src'
-
-        # prepare package description
-        self.system('mkdir -p ' + self.FINKINFO_DIR)
-        self.system('m4 ' + M4_LINE + ' --define=M4_SETUP_TARGET=' + self.SETUP_TARGET + '  --define=M4_F_REV=' + self.F_REV + ' ' + 'setup/osx/radiant.info.m4 > ' + self.FINKINFO_DIR + '/radiant-' + self.TARBALL_DIR + '.info')
-
-        # build the tarball
-        self.system('if [ -r /tmp/' + self.TARBALL_DIR + ' ] ; then rm -r ' '/tmp/' + self.TARBALL_DIR + ' ; fi')
-        self.system('mkdir -p ' '/tmp/' + self.TARBALL_DIR)
-        self.system('cp ' + self.SETUP_TARGET + ' ' + '/tmp/' + self.TARBALL_DIR)
-        self.system('cd /tmp ; tar -cvzf ' + self.TARBALL_NAME + ' ' + self.TARBALL_DIR + ' ; cp ' + self.TARBALL_NAME + ' ' + self.TARBALL_DEST + '/')
-        self.system('/sw/bin/fink rebuild radiant')
-
-        build_fink_deb(self)
-      
-  def spawn_setup(self, env, target, source):
-    if ( OS == 'Darwin' ):
-      self.g_darwin = 1
-    else:
-      self.g_darwin = 0
-    (self.line, self.major, self.minor) = get_version()
-    print 'Setup: GtkRadiant %s' % self.line  
-    if ( self.g_darwin ):
-      self.SETUP_IMAGE_OS = '../loki_setup/image'
-    else:
-      self.SETUP_IMAGE_OS = 'setup/linux/setup_image.Linux'
-    self.SETUP_IMAGE = 'setup/linux/setup_image'
-    self.SETUP_DIR = '/tmp/radiant-setup.%d' % os.getpid()
-    self.EDITOR_BIN='radiant.' + g_cpu
-    if ( self.g_darwin ):
-      self.SETUP_BIN_DIR = self.SETUP_DIR + '/bin/Darwin/ppc'
-      self.SETUP_TARGET = 'osx-radiant-%s.run' % self.line
-    else:
-      self.SETUP_BIN_DIR = self.SETUP_DIR + '/bin/Linux/x86'
-      self.SETUP_TARGET = 'linux-radiant-%s.run' % self.line
-    # TODO: eval a conf file instead
-    self.DO_CORE=1
-    self.DO_GAME_Q3=1
-    self.DO_GAME_WOLF=1
-    self.DO_GAME_ET=1
-    self.DO_GAME_DOOM3=1
-    self.DO_GAME_Q2=1
-    self.DO_GAME_HER2=1
-    if ( self.g_darwin ):
-      self.DO_GAME_Q2=0
-      self.DO_GAME_ET=0
-      self.DO_GAME_HER2=0
-    # verbose a bit
-    print 'version: %s major: %s minor: %s\neditor core: %d\nq3: %d\nwolf: %d\net: %d\ndoom3: %d\nq2: %d\nher2: %d' % (self.line, self.major, self.minor, self.DO_CORE, self.DO_GAME_Q3, self.DO_GAME_WOLF, self.DO_GAME_ET, self.DO_GAME_DOOM3, self.DO_GAME_Q2, self.DO_GAME_HER2)
-    if (self.DO_CORE):
-      self.copy_core()
-    if (self.DO_GAME_Q3):
-      self.copy_q3()
-    if (self.DO_GAME_WOLF):
-      self.copy_wolf()
-    if (self.DO_GAME_ET):
-      self.copy_et()
-    if (self.DO_GAME_DOOM3):
-      self.copy_doom3()
-    if ( OS != 'Darwin' ):
-      if (self.DO_GAME_Q2):
-        self.copy_q2()
-      if (self.DO_GAME_HER2):
-        self.copy_her2()
-    self.build_setup()
-    return 0
-    
-def spawn_setup(env, target, source):
-  setup = setup_builder()
-  setup.spawn_setup(env, target, source)
-
-# NOTE: could modify g_env to add the deps auto when calling SharedLibrarySafe ..
-if (SETUP == '1'):
-  g_env.Command('foo', INSTALL + '/radiant.' + g_cpu, [ spawn_setup ] )
-  depends_list = [ 
-    INSTALL + '/modules/archivepak.so',
-    INSTALL + '/modules/archivewad.so',
-    INSTALL + '/modules/archivezip.so',
-    INSTALL + '/modules/entity.so',
-#    INSTALL + '/modules/fgd.so',
-    INSTALL + '/modules/imagehl.so',
-    INSTALL + '/modules/imageq2.so',
-    INSTALL + '/modules/image.so',
-    INSTALL + '/modules/imagepng.so',
-    INSTALL + '/modules/mapq3.so',
-    INSTALL + '/modules/mapxml.so',
-    INSTALL + '/modules/model.so',
-    INSTALL + '/modules/md3model.so',
-    INSTALL + '/modules/shaders.so',
-    INSTALL + '/modules/vfspk3.so',
-#    INSTALL + '/modules/vfswad.so',
-#    INSTALL + '/plugins/bobtoolz.so',
-#    INSTALL + '/plugins/camera.so',
-#    INSTALL + '/plugins/prtview.so',
-#    INSTALL + '/plugins/gensurf.so',
-#    INSTALL + '/plugins/bkgrnd2d.so',
-    INSTALL + '/q3map2.' + g_cpu,
-    INSTALL + '/radiant.' + g_cpu,
-    INSTALL + '/q3data.' + g_cpu ]
-  if ( OS != 'Darwin' ):
-    depends_list += [
-      INSTALL + '/q2/q2map',
-      INSTALL + '/q2/qdata3',
-      INSTALL + '/heretic2/qdata3',
-      INSTALL + '/heretic2/q2map' ]
-  g_env.Depends( 'foo', depends_list )
 
 # end setup ---------------------------------------------------------------------------------------
index a8cbf68e0021f70fe10566ed5f3b1e9ce77ceae3..9dfda4b2e7e4a15ee3557fdca5f0e2040bda5875 100644 (file)
@@ -10,7 +10,7 @@ import SCons
 conf_filename='site.conf'
 # there is a default hardcoded value, you can override on command line, those are saved between runs
 # we only handle strings
-serialized=['CC', 'CXX', 'JOBS', 'BUILD', 'SETUP']
+serialized=['CC', 'CXX', 'JOBS', 'BUILD']
 
 # help -------------------------------------------
 
@@ -85,7 +85,6 @@ CXX='g++'
 JOBS='1'
 BUILD='debug'
 INSTALL='#install'
-SETUP='0'
 g_build_root = 'build'
 
 # end default settings ---------------------------
@@ -117,9 +116,6 @@ for k in serialized:
 
 # sanity check -----------------------------------
 
-if (SETUP == '1' and BUILD != 'release' and BUILD != 'info'):
-  print 'Forcing release build for setup'
-  BUILD = 'release'
 
 def GetGCCVersion(name):
   ret = commands.getstatusoutput('%s -dumpversion' % name)
@@ -175,7 +171,7 @@ CPPPATH = []
 if (BUILD == 'debug'):
        CXXFLAGS += '-g -D_DEBUG '
        CCFLAGS += '-g -D_DEBUG '
-elif (BUILD == 'release'):
+elif (BUILD == 'release' or BUILD == 'final'):
        CXXFLAGS += '-O2 '
        CCFLAGS += '-O2 '
 else:
@@ -185,25 +181,29 @@ else:
 LINKFLAGS = ''
 if ( OS == 'Linux' ):
 
-  # static
-  # 2112833 /opt/gtkradiant/radiant.x86
-  # 35282 /opt/gtkradiant/modules/archivezip.so
-  # 600099 /opt/gtkradiant/modules/entity.so
+  if ( BUILD == 'final' ):
+    # static
+    # 2112833 /opt/gtkradiant/radiant.x86
+    # 35282 /opt/gtkradiant/modules/archivezip.so
+    # 600099 /opt/gtkradiant/modules/entity.so
   
-  # dynamic
-  # 2237060 /opt/gtkradiant/radiant.x86
-  # 110605 /opt/gtkradiant/modules/archivezip.so
-  # 730222 /opt/gtkradiant/modules/entity.so
+    # dynamic
+    # 2237060 /opt/gtkradiant/radiant.x86
+    # 110605 /opt/gtkradiant/modules/archivezip.so
+    # 730222 /opt/gtkradiant/modules/entity.so
   
-  # EVIL HACK - force static-linking for libstdc++ - create a symbolic link to the static libstdc++ in the root
-  os.system("ln -s `g++ -print-file-name=libstdc++.a`")
+    # EVIL HACK - force static-linking for libstdc++ - create a symbolic link to the static libstdc++ in the root
+    os.system("ln -s `g++ -print-file-name=libstdc++.a`")
   
-  #if not os.path.exists("./install"):
-  #  os.mkdir("./install")
-  #os.system("cp `g++ -print-file-name=libstdc++.so` ./install")
+    #if not os.path.exists("./install"):
+    #  os.mkdir("./install")
+    #os.system("cp `g++ -print-file-name=libstdc++.so` ./install")
   
-  CXXFLAGS += '-fno-exceptions -fno-rtti '
-  LINKFLAGS += '-Wl,-fini,fini_stub -L. -static-libgcc '
+  # -fPIC might be worth removing when building for 32-bit x86
+  CCFLAGS += '-fPIC '
+  CXXFLAGS += '-fPIC -fno-exceptions -fno-rtti '
+  LINKFLAGS += '-fPIC -Wl,-fini,fini_stub -L. -static-libgcc '
+
 if ( OS == 'Darwin' ):
   CCFLAGS += '-force_cpusubtype_ALL -fPIC '
   CXXFLAGS += '-force_cpusubtype_ALL -fPIC -fno-exceptions -fno-rtti '
@@ -230,22 +230,35 @@ class idEnvironment(Environment):
   def useGlib2(self):
     self['CXXFLAGS'] += '`pkg-config glib-2.0 --cflags` '
     self['CCFLAGS'] += '`pkg-config glib-2.0 --cflags` '
-    self['LINKFLAGS'] += '-lglib-2.0 '
+    if BUILD == 'final':
+      self['LINKFLAGS'] += '-lglib-2.0 '
+    else:
+      self['LINKFLAGS'] += '`pkg-config glib-2.0 --libs` '
+      
     
   def useXML2(self):
     self['CXXFLAGS'] += '`xml2-config --cflags` '      
     self['CCFLAGS'] += '`xml2-config --cflags` '      
-    self['LINKFLAGS'] += '-lxml2 '
+    if BUILD == 'final':
+      self['LINKFLAGS'] += '-lxml2 '
+    else:
+      self['LINKFLAGS'] += '`xml2-config --libs` '
 
   def useGtk2(self):
     self['CXXFLAGS'] += '`pkg-config gtk+-2.0 --cflags` '
     self['CCFLAGS'] += '`pkg-config gtk+-2.0 --cflags` '
-    self['LINKFLAGS'] += '-lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lpango-1.0 -lgdk_pixbuf-2.0 '
+    if BUILD == 'final':
+      self['LINKFLAGS'] += '-lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lpango-1.0 -lgdk_pixbuf-2.0 '
+    else:
+      self['LINKFLAGS'] += '`pkg-config gtk+-2.0 --libs-only-L` `pkg-config gtk+-2.0 --libs-only-l` '
    
   def useGtkGLExt(self):
     self['CXXFLAGS'] += '`pkg-config gtkglext-1.0 --cflags` '
     self['CCFLAGS'] += '`pkg-config gtkglext-1.0 --cflags` '
-    self['LINKFLAGS'] += '-lgtkglext-x11-1.0 -lgdkglext-x11-1.0 '      
+    if BUILD == 'final':
+      self['LINKFLAGS'] += '-lgtkglext-x11-1.0 -lgdkglext-x11-1.0 '      
+    else:
+      self['LINKFLAGS'] += 'pkg-config gtkglext-1.0 --libs-only-L` `pkg-config gtkglext-1.0 --libs-only-l` '      
     
   def usePNG(self):
     self['CXXFLAGS'] += '`libpng-config --cflags` '
@@ -307,7 +320,7 @@ class idEnvironment(Environment):
 g_env = idEnvironment()
 
 # export the globals
-GLOBALS = 'g_env INSTALL SETUP g_cpu'
+GLOBALS = 'g_env INSTALL g_cpu'
 
 radiant_makeversion('\\ngcc version: %s.%s.%s' % ( ver_cc[0], ver_cc[1], ver_cc[2] ) )
 
index f84338b35a9d9f55503b200be4412ada256b7fc8..80491d81c0b50d261a9cde2592e2005e92101401 100644 (file)
@@ -60,6 +60,7 @@ class FindTextureDialog : public Dialog
   static void setFindStr(const char* name);
   static bool isOpen();
   static void show();
+  typedef FreeCaller<&FindTextureDialog::show> ShowCaller;
   static void updateTextures(const char* name);
 
   FindTextureDialog();
@@ -290,7 +291,7 @@ void FindTextureDialog_selectTexture(const char* name)
 
 void FindTextureDialog_Construct()
 {
-  GlobalCommands_insert("FindReplaceTextures", FreeCaller<FindTextureDialog::show>());
+  GlobalCommands_insert("FindReplaceTextures", FindTextureDialog::ShowCaller());
 }
 
 void FindTextureDialog_Destroy()
index 9b36b72cbcdfae0f56d6ce48f53eafc051295edd..56f8b6001e532537fc750a14b2eecd67ae5be920 100644 (file)
@@ -1047,15 +1047,18 @@ public:
   }
 };
 
-FreeCaller1<const BoolImportCallback&, BoolFunctionExport<EdgeMode>::apply> g_edgeMode_button_caller;
+typedef FreeCaller1<const BoolImportCallback&, &BoolFunctionExport<EdgeMode>::apply> EdgeModeApplyCaller;
+EdgeModeApplyCaller g_edgeMode_button_caller;
 BoolExportCallback g_edgeMode_button_callback(g_edgeMode_button_caller);
 ToggleItem g_edgeMode_button(g_edgeMode_button_callback);
 
-FreeCaller1<const BoolImportCallback&, BoolFunctionExport<VertexMode>::apply> g_vertexMode_button_caller;
+typedef FreeCaller1<const BoolImportCallback&, &BoolFunctionExport<VertexMode>::apply> VertexModeApplyCaller;
+VertexModeApplyCaller g_vertexMode_button_caller;
 BoolExportCallback g_vertexMode_button_callback(g_vertexMode_button_caller);
 ToggleItem g_vertexMode_button(g_vertexMode_button_callback);
 
-FreeCaller1<const BoolImportCallback&, BoolFunctionExport<FaceMode>::apply> g_faceMode_button_caller;
+typedef FreeCaller1<const BoolImportCallback&, &BoolFunctionExport<FaceMode>::apply> FaceModeApplyCaller;
+FaceModeApplyCaller g_faceMode_button_caller;
 BoolExportCallback g_faceMode_button_callback(g_faceMode_button_caller);
 ToggleItem g_faceMode_button(g_faceMode_button_callback);