Anonymous avatar Anonymous committed 2d67ec1

build script configuration tool

Comments (0)

Files changed (4)

symbian/BuildPygameRelease.py

+""" Full build configuration for pygame """
+
 import sys
 import time
 import os
              'libpath'      : "data/pygame/libs",
              }
     
+    # Add certificate stuff
+    if config.cert is not None:
+        args['cert'] = config.cert        
+        args['privkey'] = config.privkey
+        args['passphrase'] = config.passphrase
+        
     # Build PyS60 CE
     sisname   = ""  
     if config.build_python:
     args['appuid'] = hex(UID_PYGAMEAPP).replace("L","")
     args['sdluid'] = hex(UID_SDL).replace("L","")
     args['jpeguid']= hex(UID_JPEG).replace("L","")
+    
+    if config.pythondll is not None:
+        args['pythondll'] = config.pythondll
+    
     dobuild(args)
     
     

symbian/configure.py

+""" Script to configure build_config.py 
+  
+== Build everything, including pys60 ==
+configure.py pys60_ce_src=\projects\pys60ce\trunk\src
+
+== Use existing python sis ==
+configure.py build_python=False pys60_sis=python.sisx pythondll=python222.dll
+
+"""
+
+import os, sys
+
+def start():
+    
+    try:
+        import build_config as defaults
+    except:
+        import default_build_config as defaults
+    
+    args = [x.split("=") for x in sys.argv if "=" in x]
+        
+    vars = [ x for x in dir(defaults) if not x.startswith("_") ]
+    values = [ getattr( defaults, x ) for x in vars ]
+    defaults = zip( vars, values )
+    
+    result = {}
+    for name,value in args:
+        if name not in vars:
+            print "Error: no such configuration '%s'" % name
+            print "Possible configuration values are:\n", " | ".join( vars )
+            raise SystemExit( )
+        
+        try:
+            # Evaluate booleans and integers
+            result[name] = eval(value)
+        except:
+            result[name] = value
+            
+        print name, "reconfigured to", value
+    
+    for name, value in defaults:
+        if name not in result:
+            result[name] = value
+    
+    
+    # Create the module
+    print
+    f=open("build_config.py",'w');
+    keys = result.keys();keys.sort()
+    for name in keys:
+        value = result[name]
+        line = "%s = %s\n" % ( name, repr(value))
+        print line.strip()
+        f.write(line)
+    f.close()
+    
+    
+    
+if __name__ == "__main__":
+    start()    

symbian/default_build_config.py

+# These are the defaults used by configure.py 
+# when build_config.py does not exist
+build_python = False
+pys60_ce_src = ''
+pys60_sis    = 'pygame_python.sis'
+pythondll    = 'pygame_python'
 
-build_python = True
-pys60_ce_src = ''
+# Defaults for certificates
+cert         = None
+privkey      = None
+passphrase   = None

symbian/how_to_build.txt

 Initialize the release script by giving it information about the python dll to be linked with
 and the sis file to be embedded with it's UID.
 - TODO: Not implemented yet!!
-- configure.py --pythondll=python222 --pys60-embed=Python_1.4.5_3rdEd.sis
-- configure.py --pythondll=python25  --pys60-embed=Python_1.9.0_3rdEd.sis
+- configure.py pythondll=python222 pys60-embed=Python_1.4.5_3rdEd.sis
+- configure.py pythondll=python25  pys60-embed=Python_1.9.0_3rdEd.sis
 
 or
 
 - The above parameters are handled automatically in that case.
 - Of course, you can build the PyS60 CE manually and configure the build script as above.
 
-configure.py --pys60-ce=\projects\pys60ce\trunk\src
+# Build everything, including pys60
+configure.py pys60_ce_src=\projects\pys60ce\trunk\src
+
+# Use existing python sis. Need to configure the python dll for linker.
+configure.py build_python=False pys60_sis=official_python.sisx pythondll=python222.dll
 
 ==== Do the build ====
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.