]> git.saurik.com Git - wxWidgets.git/blame - distrib/scripts/build_controller.py
fix LaTeX syntax (non-escaped underscore)
[wxWidgets.git] / distrib / scripts / build_controller.py
CommitLineData
03a2668f 1import sys, os, string, time, shutil
ec43e682 2#import ReleaseForge
03a2668f
KO
3
4from taskrunner import Job, Task, TaskRunner, Config
5
6# read in the build settings...
7
8CFGFILE = "./scripts/build-environ.cfg"
9config = Config()
10config.read(CFGFILE)
11
12config.WXWIN = os.path.abspath("..")
13
14class Job(Job):
15 LOGBASE = "./tmp"
16
17# ensure the staging area exists
18if not os.path.exists(config.STAGING_DIR):
19 os.makedirs(config.STAGING_DIR)
20
21# Figure out the wxPython version number, possibly adjusted for being a daily build
22if config.KIND == "daily":
23 t = time.localtime()
24 config.DAILY = time.strftime("%Y%m%d") # should it include the hour too? 2-digit year?
25 file("DAILY_BUILD", "w").write(config.DAILY)
26 # stamp the date on daily builds
27 config.BUILD_VERSION=config.BUILD_VERSION + "-" + config.DAILY
28
29# Let the user override build machine names, etc., etc. with their own
30# config file settings
31myconfig = None
32myconfig_file = os.path.expanduser("~/wxrelease-environ.cfg")
33if os.path.exists(myconfig_file):
34 myconfig = Config()
35 myconfig.read(myconfig_file)
36
37# TODO: Set up different environs for daily, release, etc.
38# so that people can have different configs for different builds
39
40# prepare the environment file
41config_env = config.asDict()
42config_env.update(os.environ)
43if myconfig:
44 config_env.update(myconfig.asDict())
45
46tasks = Task([ Job("pre-flight", "./scripts/pre-flight.sh", env=config_env),
47 Job("win_build", "./scripts/build-windows.sh", env=config_env),
403aad79
KO
48 Job("lin_build", "./scripts/build-linux.sh", env=config_env),
49 Job("mac_build", "./scripts/build-mac.sh", env=config_env),
03a2668f
KO
50 ])
51
52print "Build getting started at: ", time.ctime()
53
54
55# Run the first task, which will create the docs and sources tarballs
56tr = TaskRunner(tasks)
57rc = tr.run()
58
59if rc == 0 and config.delete_temps == "yes":
60 shutil.rmtree(config.WX_TEMP_DIR)
61
62# cleanup the DAILY_BUILD file
63if config.KIND == "daily":
64 os.unlink("DAILY_BUILD")
65
66print "Build finished at: ", time.ctime()
67sys.exit(0)