9 print 'PreBuildSDK: ' + repr( build_path )
13 def Visit( self, arg, dirname, names ):
16 if ( i[len(i)-2:] ==
'.h' or i[len(i)-4:] ==
'.cpp' ):
17 self.file_list.append( os.path.join( dirname, i ) )
19 def BuildSDK( self, target = None, source = None, env = None ):
20 print 'Building SDK release'
24 os.path.walk( p, self.
Visit,
None )
27 sdk_dirname =
'doom3-linux-%s.%s-sdk' % ( main_version, version )
28 sdk_srcdir = os.path.join( sdk_dirname,
'src' )
29 if ( os.path.exists( sdk_dirname ) ):
35 target = os.path.join( sdk_srcdir, short )
36 dir = os.path.dirname( target )
37 if (
not os.path.exists( dir ) ):
41 delete = [
'framework/Compressor.h',
'framework/Console.h',
'framework/DemoChecksum.h',
'framework/DemoFile.h',
42 'framework/EditField.h',
'framework/EventLoop.h',
'framework/KeyInput.h',
'framework/Session.h',
43 'framework/async/AsyncClient.h',
'framework/async/AsyncNetwork.h',
'framework/async/AsyncServer.h',
44 'framework/async/MsgChannel.h',
'framework/async/ServerScan.h',
45 'mssdk',
'punkbuster',
'sys/osx',
46 'tools/comafx/StdAfx.h',
'tools/compilers/compiler_public.h',
'tools/edit_public.h' ]
48 target = os.path.join( sdk_srcdir, i )
51 force_copy = [
'SConstruct',
'sys/scons/SConscript.game',
'sys/scons/SConscript.idlib',
'sys/scons/scons_utils.py',
52 'game/Game.def',
'd3xp/Game.def',
53 'idlib/geometry/Surface_Polytope.cpp',
'idlib/hashing/CRC8.cpp',
'idlib/math/Complex.cpp',
54 'idlib/math/Simd_3DNow.cpp',
'idlib/math/Simd_AltiVec.cpp',
'idlib/math/Simd_MMX.cpp',
'idlib/math/Simd_SSE.cpp',
55 'idlib/math/Simd_SSE2.cpp',
'idlib/math/Simd_SSE3.cpp',
56 'MayaImport/exporter.h',
'MayaImport/maya_main.cpp',
'MayaImport/maya_main.h',
57 'MayaImport/mayaimport.def',
'MayaImport/Maya4.5/maya.h',
'MayaImport/maya5.0/maya.h',
58 'MayaImport/Maya6.0/maya.h',
59 'd3xp/EndLevel.cpp',
'd3xp/EndLevel.h'
62 target = os.path.join( sdk_srcdir, i )
63 dir = os.path.dirname( target )
64 if (
not os.path.exists( dir ) ):
68 if (
not os.path.exists(
'sys/linux/setup/media-sdk' ) ):
69 print 'sdk media is missing (sys/linux/setup/media-sdk)'
71 self.
SimpleCommand(
'cp -R sys/linux/setup/media-sdk/* ' + sdk_dirname )
74 self.
SimpleCommand(
'cd ' + sdk_dirname +
' && zip MayaSetupStuff.zip MayaImportx86* && rm MayaImportx86*' )
76 self.
SimpleCommand(
'cp -R -f sys/linux/setup/image-base/* ' + sdk_dirname )
77 self.
SimpleCommand(
'cp -R -f sys/linux/setup/image-sdk/* ' + sdk_dirname )
79 m4_dict = {
'M4_VERSION' : main_version }
80 self.
M4Processing( sdk_dirname +
'/setup.data/setup.xml.in', m4_dict )
82 self.
SimpleCommand(
'cd ' + sdk_dirname +
'/setup.data/bin ; ln -s Linux FreeBSD' )
84 self.
SimpleCommand(
'cd ' + sdk_dirname +
'/setup.data/bin/Linux ; ln -s x86 amd64' )
86 self.
SimpleCommand(
'find ' + sdk_dirname +
' -name \'.svn\' -type d | xargs rm -rf' )
88 self.
SimpleCommand(
'sys/linux/setup/makeself/makeself.sh ' + sdk_dirname +
' ' + sdk_dirname +
'.x86.run \'DOOM III SDK\' ./setup.sh' )
89 print 'TODO: do a build check in SDK directory'