]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/distrib/autobuild.py
3 import sys
, os
, string
, time
8 logfile
= 'c:\\temp\\autobuild.log'
9 WXDIR
= os
.environ
['WXWIN']
12 dateSt
= time
.strftime("%Y%m%d", time
.localtime(time
.time()))
14 base
= os
.path
.split(sys
.argv
[0])[0]
15 base
= os
.path
.join(base
, '..')
16 WXPYDIR
= os
.path
.abspath(base
)
18 #----------------------------------------------------------------------
21 st
= " " + cmd
+ " >> " + logfile
23 f
= open(logfile
, "at")
26 os
.system(cmd
+ " >>& " + logfile
)
28 #----------------------------------------------------------------------
31 f
= open(logfile
, "wt")
35 def logSeparator(msg
=None, f
=None, recurse
=1):
37 f
= open(logfile
, "at")
47 logSeparator(msg
, sys
.stdout
, 0)
49 #----------------------------------------------------------------------
51 def validateFile(file):
52 if not os
.path
.exists(file):
53 logSeparator("***** %s does not exist, exiting! *****" % file)
56 logSeparator("%s found, continuing..." % file, recurse
=0)
59 #----------------------------------------------------------------------
65 logSeparator("Cleanup")
66 os
.chdir(WXDIR
+ '/src/msw')
67 do('make cleandll FINAL=1')
69 logSeparator("Building Documentation...")
70 os
.chdir(WXDIR
+ '/src/msw')
71 do('make touchmanual htmlhelp')
72 validateFile(WXDIR
+ '/docs/htmlhelp/wx.chm')
74 logSeparator("Building wxWindows...")
75 os
.chdir(WXDIR
+ '/src/msw')
76 do('make dll pch FINAL=1')
77 validateFile(WXDIR
+ '/lib/wx'+dllVer
+'.dll')
81 logSeparator("Cleaning wxPython build directory...")
85 logSeparator("Building wxPython...")
86 os
.chdir(WXPYDIR
+ '\\src')
88 validateFile(WXPYDIR
+'\\wxPython\\wxc.pyd')
91 logSeparator("Building installer executable...")
92 os
.chdir(WXPYDIR
+'\\distrib')
93 do("autoit2 wise.aut")
94 srcName
= WXPYDIR
+'\\distrib\\wxPython-'+wxpVer
+'.EXE'
95 destName
= WXPYDIR
+'\\distrib\\wxPython-'+wxpVer
+'-'+dateSt
+'.EXE'
99 os
.rename(srcName
, destName
)
100 validateFile(destName
)
102 logSeparator("****** UNABLE TO RENAME FILE ******")
105 logSeparator("Building docs zip file...")
107 do("distrib\\zipit.bat %s" % wxpVer
)
109 srcDName
= WXPYDIR
+'\\distrib\\wxPython-docs-'+wxpVer
+'.tar.gz'
110 destDName
= WXPYDIR
+'\\distrib\\wxPython-docs-'+wxpVer
+'-'+dateSt
+'.tar.gz'
111 validateFile(srcDName
)
113 os
.rename(srcDName
, destDName
)
119 # #*#*#*#*#* Comment this out to allow upload...
122 logSeparator("Uploading to website...")
123 do('python c:\\utils\\sendwxp.py %s' % destName
)
124 #do('python c:\\utils\\sendwxp.py %s' % destDName)
127 logSeparator("Finished!!!")
130 os
.system("list " + logfile
)
138 if __name__
== '__main__':