]>
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')
85 logSeparator("Cleaning wxPython build directory...")
86 os
.chdir(WXDIR
+ '/utils/wxPython')
89 logSeparator("Copying wxPython workspace to build directory...")
90 do("copy /s %s %s" % ('e:\\projects\\wxPython\*.*', WXDIR
+'\\utils\\wxPython'))
91 os
.chdir(WXDIR
+ '/utils/wxPython')
92 f
= open("build.local", "w")
94 TARGETDIR = 'e:\\projects\\wx\\utils\\wxPython'
95 WXPSRCDIR = 'e:\\projects\\wx\\utils\\wxPython\\src'
102 logSeparator("Cleaning wxPython...")
103 os
.chdir(WXDIR
+'\\utils\\wxPython')
108 logSeparator("Building core wxPython...")
109 os
.chdir(WXDIR
+'\\utils\\wxPython\\src')
111 validateFile(WXDIR
+'\\utils\\wxPython\\wxc.pyd')
115 logSeparator("Building wxPython addon modules...")
116 os
.chdir(WXDIR
+'\\utils\\wxPython\\modules')
118 validateFile(WXDIR
+'\\utils\\wxPython\\utilsc.pyd')
119 validateFile(WXDIR
+'\\utils\\wxPython\\htmlc.pyd')
120 validateFile(WXDIR
+'\\utils\\wxPython\\glcanvasc.pyd')
121 validateFile(WXDIR
+'\\utils\\wxPython\\oglc.pyd')
124 logSeparator("Building installer executable...")
125 os
.chdir(WXDIR
+'\\utils\\wxPython\\distrib')
126 do("autoit2 wise.aut")
127 srcName
= WXDIR
+'\\utils\\wxPython\\distrib\\wxPython-'+wxpVer
+'.EXE'
128 destName
= WXDIR
+'\\utils\\wxPython\\distrib\\wxPython-'+wxpVer
+'-'+dateSt
+'.EXE'
129 validateFile(srcName
)
132 os
.rename(srcName
, destName
)
133 validateFile(destName
)
138 logSeparator("Building source zip file...")
139 os
.chdir(WXDIR
+'\\utils')
140 do("wxPython\\distrib\\zipit.bat %s" % wxpVer
)
141 srcZName
= WXDIR
+'\\utils\\wxPython\\distrib\\wxPython-src-'+wxpVer
+'.zip'
142 destZName
= WXDIR
+'\\utils\\wxPython\\distrib\\wxPython-src-'+wxpVer
+'-'+dateSt
+'.zip'
143 validateFile(srcZName
)
145 os
.rename(srcZName
, destZName
)
153 logSeparator("Uploading to website...")
154 do('python d:\util32\sendwxp.py %s' % destName
)
155 do('python d:\util32\sendwxp.py %s' % destZName
)
160 logSeparator("Finished!!!")
163 os
.system("list " + logfile
)
171 if __name__
== '__main__':