1
""" Full build configuration for pygame.
2
Reads configuration and creates appropriate parameters for SCons build scripts.
3
For SVN support, install pysvn.
11
import build_config as config
14
from scons_symbian.config.constants import CAPS_SELF_SIGNED
15
from scons_symbian.arguments import COMPILER, RELEASE
18
BASE_CMD = "scons dosis=true"
20
UID_PACKAGE = 0xE0006020
27
UID_PYGAMEAPP = getuid()
32
#: Capability configuration
33
CAPABILITIES = CAPS_SELF_SIGNED[:]
34
CAPABILITIES.remove("UserEnvironment") # Missing from sdl.dll
35
CAPABILITIES = "+".join(CAPABILITIES)
40
cmd += "%s=%s " % ( x, str(args[x]) )
42
cmd = " ".join( [BASE_CMD, cmd] )
43
cmd = " ".join( [cmd] + sys.argv[1:] )
47
raise SystemExit( "Error: Build failed" )
52
version = list(time.gmtime()[:3])
53
version = [ str(x).zfill(2) for x in version ]
54
version = "".join( version )
56
sisname = "python_for_pygame_%s.sis" % version
58
args = { "applications" : "",
59
"capabilities" : CAPABILITIES,
60
"builtin" : "sysinfo,socket",
62
"basename" : "pygame_python",
63
"uidbase" : hex(UID_BASE).replace("L",""),
64
"sisappname" : '"Python for Pygame"',
65
# Convert to int or may be converted to octal due to zero at beginning
66
'sisversion' : '"(1,%d,%d%s)"' % ( int(version[2:4]), int( version[4:6]),version[6:]),
67
'pythonsis' : sisname,
68
'libpath' : "data/pygame/libs",
69
'pycompiler' : config.pycompiler
72
# Add certificate stuff
73
if config.cert is not None:
74
args['cert'] = config.cert
75
args['privkey'] = config.privkey
76
args['passphrase'] = config.passphrase
80
if config.build_python:
82
os.chdir(config.pys60_ce_src)
84
a["gcce_options"] = '"-O2 -fno-unit-at-a-time"'
88
sisname = "python_for_pygame_%s_signed.sisx" % version
89
pys60_sis = os.path.join( config.pys60_ce_src, sisname )
91
# Copy the sis to current directory
92
if os.path.exists(pys60_sis):
94
shutil.copyfile(pys60_sis, sisname)
96
args['pythondll'] = args['basename']
99
sisname = config.pys60_sis
100
if config.pythondll is not None:
101
args['pythondll'] = config.pythondll
104
args["pythonsis"] = sisname
105
args["pythonsis"] = sisname
106
args["sisappname"] = '"pygame"'
107
args['sisversion'] = '1,%d,%d%s' % ( int(version[2:4]), int( version[4:6]),version[6:])
108
args['sisuid'] = hex(UID_PACKAGE).replace("L","")
109
args['appuid'] = hex(UID_PYGAMEAPP).replace("L","")
110
args['sdluid'] = hex(UID_SDL).replace("L","")
111
args['jpeguid']= hex(UID_JPEG).replace("L","")
112
args['pythoninclude'] = config.pythoninclude
113
args["staticmods"] = config.staticmods
114
args["modbaseuid"] = hex(UID_BASE).replace("L","")
115
args["build_libs"] = config.build_libs
116
#args['defines'] = "STDERR_TO_STDOUT"
117
args['winscw_options'] = "-nostderr" # Don't show the stdioserver output
121
if __name__ == "__main__":