]>
git.saurik.com Git - wxWidgets.git/blob - utils/wxPython/distrib/autobuild.py
3 import sys
, os
, string
, time
7 logfile
= 'e:\\temp\\autobuild.log'
8 WXDIR
= os
.environ
['WXWIN']
11 dateSt
= time
.strftime("%Y%m%d", time
.localtime(time
.time()))
13 #----------------------------------------------------------------------
16 st
= " " + cmd
+ " >> " + logfile
18 f
= open(logfile
, "at")
21 os
.system(cmd
+ " >>& " + logfile
)
23 #----------------------------------------------------------------------
26 f
= open(logfile
, "wt")
30 def logSeparator(msg
=None, f
=None, recurse
=1):
32 f
= open(logfile
, "at")
42 logSeparator(msg
, sys
.stdout
, 0)
44 #----------------------------------------------------------------------
46 def validateFile(file):
47 if not os
.path
.exists(file):
48 logSeparator("***** %s does not exist, exiting! *****" % file)
51 logSeparator("%s found, continuing..." % file, recurse
=0)
54 #----------------------------------------------------------------------
60 logSeparator("Cleanup")
61 os
.chdir(WXDIR
+ '/src/msw')
62 do('make cleandll FINAL=1')
63 os
.chdir(WXDIR
+ '/utils/ogl/src')
64 do('wxm clean FINAL=1')
65 os
.chdir(WXDIR
+ '/utils/glcanvas/win')
66 do('wxm clean FINAL=1')
68 logSeparator("Building Documentation...")
69 os
.chdir(WXDIR
+ '/src/msw')
70 do('make touchmanual htmlhelp')
71 validateFile(WXDIR
+ '/docs/html/wx/wx.chm')
73 logSeparator("Building wxWindows and libraries...")
74 os
.chdir(WXDIR
+ '/src/msw')
75 do('make dll pch FINAL=1')
76 validateFile(WXDIR
+ '/lib/wx'+dllVer
+'.dll')
78 os
.chdir(WXDIR
+ '/utils/ogl/src')
80 os
.chdir(WXDIR
+ '/utils/glcanvas/win')
82 validateFile(WXDIR
+ '/lib/ogl.lib')
83 validateFile(WXDIR
+ '/lib/glcanvas.lib')
86 logSeparator("Copying wxPython workspace to build directory...")
87 do("copy /s %s %s" % ('e:\\projects\\wxPython\*.*', WXDIR
+'\\utils\\wxPython'))
88 os
.chdir(WXDIR
+ '/utils/wxPython')
89 f
= open("build.local", "w")
91 TARGETDIR = 'e:\\projects\\wx\\utils\\wxPython'
92 WXPSRCDIR = 'e:\\projects\\wx\\utils\\wxPython\\src'
99 logSeparator("Cleaning wxPython...")
100 os
.chdir(WXDIR
+'\\utils\\wxPython')
105 logSeparator("Building core wxPython...")
106 os
.chdir(WXDIR
+'\\utils\\wxPython\\src')
108 validateFile(WXDIR
+'\\utils\\wxPython\\wxc.pyd')
112 logSeparator("Building wxPython addon modules...")
113 os
.chdir(WXDIR
+'\\utils\\wxPython\\modules')
115 validateFile(WXDIR
+'\\utils\\wxPython\\utilsc.pyd')
116 validateFile(WXDIR
+'\\utils\\wxPython\\htmlc.pyd')
117 validateFile(WXDIR
+'\\utils\\wxPython\\glcanvasc.pyd')
118 validateFile(WXDIR
+'\\utils\\wxPython\\oglc.pyd')
121 logSeparator("Building installer executable...")
122 os
.chdir(WXDIR
+'\\utils\\wxPython\\distrib')
123 do("autoit2 wise.aut")
124 srcName
= WXDIR
+'\\utils\\wxPython\\distrib\\wxPython-'+wxpVer
+'.EXE'
125 destName
= WXDIR
+'\\utils\\wxPython\\distrib\\wxPython-'+wxpVer
+'-'+dateSt
+'.EXE'
126 validateFile(srcName
)
128 os
.rename(srcName
, destName
)
133 logSeparator("Building source zip file...")
134 os
.chdir(WXDIR
+'\\utils')
135 do("wxPython\\distrib\\zipit.bat %s" % wxpVer
)
136 srcZName
= WXDIR
+'\\utils\\wxPython\\distrib\\wxPython-src-'+wxpVer
+'.zip'
137 destZName
= WXDIR
+'\\utils\\wxPython\\distrib\\wxPython-src-'+wxpVer
+'-'+dateSt
+'.zip'
138 validateFile(srcZName
)
140 os
.rename(srcZName
, destZName
)
145 logSeparator("Uploading to website...")
146 do('python d:\util32\sendwxp.py %s' % destName
)
147 do('python d:\util32\sendwxp.py %s' % destZName
)
152 logSeparator("Finished!!!")
155 os
.system("list " + logfile
)
163 if __name__
== '__main__':