blob: 0750a46e386c2f8cf85ebeec18765f5f4802e209 [file] [log] [blame]
Jack Jansen6655c4e1995-09-01 12:03:32 +00001#
2# fullbuild creates everything that needs to be created before a
3# distribution can be made, and puts it all in the right place.
4#
5# It expects the projects to be in the places where Jack likes them:
Jack Jansenfaad9951997-09-01 15:37:07 +00006# in directories named like 'build.mac'. That is fixable,
Jack Jansen6655c4e1995-09-01 12:03:32 +00007# however.
8#
9# NOTE: You should proably make a copy of python with which to execute this
10# script, rebuilding running programs does not work...
11
Jack Jansenfaad9951997-09-01 15:37:07 +000012MACBUILDNO=":Mac:Include:macbuildno.h"
13
Jack Jansen6655c4e1995-09-01 12:03:32 +000014import os
15import sys
16import macfs
Jack Jansen1023dff1996-02-21 15:28:49 +000017import MacOS
Jack Jansenf04fa721996-04-10 14:51:14 +000018import EasyDialogs
Jack Jansenbe614ee2001-01-02 22:02:02 +000019import re
Jack Jansenfaad9951997-09-01 15:37:07 +000020import string
Jack Jansen6655c4e1995-09-01 12:03:32 +000021
Jack Jansen6655c4e1995-09-01 12:03:32 +000022import aetools
Jack Jansen1023dff1996-02-21 15:28:49 +000023import AppleEvents
Jack Jansen87426b92000-08-17 22:12:12 +000024
25OLDAESUPPORT = 0
26
27if OLDAESUPPORT:
28 from Metrowerks_Shell_Suite import Metrowerks_Shell_Suite
29 from CodeWarrior_suite import CodeWarrior_suite
30 from Metrowerks_Standard_Suite import Metrowerks_Standard_Suite
31 from Required_Suite import Required_Suite
32else:
33 import CodeWarrior
Jack Jansen0f00c5e1997-05-06 16:15:32 +000034
35import Res
36import Dlg
Jack Jansen6655c4e1995-09-01 12:03:32 +000037
Jack Jansen490ec9c1998-07-31 09:45:27 +000038import buildtools
Jack Jansen0f00c5e1997-05-06 16:15:32 +000039import cfmfile
40
41# Dialog resource. Note that the item numbers should correspond
42# to those in the DITL resource. Also note that the order is important:
43# things are built in this order, so there should be no forward dependencies.
44DIALOG_ID = 512
45
46I_OK=1
47I_CANCEL=2
Jack Jansene56e87d2001-01-03 11:12:21 +000048# label 3
49I_PPC_EXTLIBS=4
50I_GEN_PROJECTS=5
Jack Jansen1f5cd702001-01-21 22:25:11 +000051I_GEN_PROJECTS_FORCE=6
52I_GEN_IMGPROJECTS=7
53I_GEN_IMGPROJECTS_FORCE=8
54I_INC_BUILDNO=9
55# label 10
56I_PPC_CORE=11
57I_PPC_PLUGINS=12
58I_PPC_EXTENSIONS=13
59# label 14
60I_CARBON_CORE=15
61I_CARBON_PLUGINS=16
62I_CARBON_EXTENSIONS=17
Jack Jansen5288c472001-02-12 14:46:53 +000063I_INTERPRETER=18
64# label 19
65I_PPC_FULL=20
66I_PPC_SMALL=21
67# label 22
68I_CARBON_FULL=23
69I_CARBON_SMALL=24
70# label 25
71I_APPLETS=26
Jack Jansen0f00c5e1997-05-06 16:15:32 +000072
Jack Jansen5288c472001-02-12 14:46:53 +000073N_BUTTONS=27
Jack Jansen6655c4e1995-09-01 12:03:32 +000074
Jack Jansen87426b92000-08-17 22:12:12 +000075if OLDAESUPPORT:
76 class MwShell(Metrowerks_Shell_Suite, CodeWarrior_suite, Metrowerks_Standard_Suite,
77 Required_Suite, aetools.TalkTo):
78 pass
79else:
80 MwShell = CodeWarrior.CodeWarrior
Jack Jansen6655c4e1995-09-01 12:03:32 +000081
Jack Jansenf04fa721996-04-10 14:51:14 +000082RUNNING=[]
Jack Jansen6655c4e1995-09-01 12:03:32 +000083
84def buildmwproject(top, creator, projects):
85 """Build projects with an MW compiler"""
Jack Jansenb9e5e141996-09-20 15:30:52 +000086 mgr = MwShell(creator, start=1)
Jack Jansen1023dff1996-02-21 15:28:49 +000087 mgr.send_timeout = AppleEvents.kNoTimeOut
88
Jack Jansenbc66f952000-07-24 19:45:07 +000089 failed = []
Jack Jansen6655c4e1995-09-01 12:03:32 +000090 for file in projects:
Jack Jansen82bfde91997-08-27 14:10:29 +000091 if type(file) == type(()):
92 file, target = file
93 else:
94 target = ''
Jack Jansen6655c4e1995-09-01 12:03:32 +000095 file = os.path.join(top, file)
Just van Rossum2607a441999-01-30 18:27:12 +000096 try:
97 fss = macfs.FSSpec(file)
Jack Jansene56e87d2001-01-03 11:12:21 +000098 except MacOS.Error:
Just van Rossum2607a441999-01-30 18:27:12 +000099 print '** file not found:', file
100 continue
Jack Jansen82bfde91997-08-27 14:10:29 +0000101 print 'Building', file, target
Just van Rossum2607a441999-01-30 18:27:12 +0000102 try:
103 mgr.open(fss)
104 except aetools.Error, detail:
105 print '**', detail, file
106 continue
Jack Jansen82bfde91997-08-27 14:10:29 +0000107 if target:
108 try:
109 mgr.Set_Current_Target(target)
110 except aetools.Error, arg:
111 print '**', file, target, 'Cannot select:', arg
Jack Jansen1023dff1996-02-21 15:28:49 +0000112 try:
113 mgr.Make_Project()
Jack Jansenb9e5e141996-09-20 15:30:52 +0000114 except aetools.Error, arg:
Jack Jansen82bfde91997-08-27 14:10:29 +0000115 print '**', file, target, 'Failed:', arg
Jack Jansenbc66f952000-07-24 19:45:07 +0000116 failed.append(fss)
Jack Jansen6655c4e1995-09-01 12:03:32 +0000117 mgr.Close_Project()
Jack Jansenbc66f952000-07-24 19:45:07 +0000118 if failed:
119 print 'Open failed projects and exit?',
120 rv = sys.stdin.readline()
121 if rv[0] in ('y', 'Y'):
122 for fss in failed:
123 mgr.open(fss)
124 sys.exit(0)
Jack Jansenf04fa721996-04-10 14:51:14 +0000125## mgr.quit()
Jack Jansen6655c4e1995-09-01 12:03:32 +0000126
127def buildapplet(top, dummy, list):
Jack Jansen0f00c5e1997-05-06 16:15:32 +0000128 """Create python applets"""
Jack Jansen490ec9c1998-07-31 09:45:27 +0000129 template = buildtools.findtemplate()
Just van Rossum9d609b41999-02-01 01:21:18 +0000130 for src, dst in list:
Jack Jansen6655c4e1995-09-01 12:03:32 +0000131 if src[-3:] != '.py':
132 raise 'Should end in .py', src
133 base = os.path.basename(src)
Jack Jansen6655c4e1995-09-01 12:03:32 +0000134 src = os.path.join(top, src)
Just van Rossum9d609b41999-02-01 01:21:18 +0000135 dst = os.path.join(top, dst)
Jack Jansen6655c4e1995-09-01 12:03:32 +0000136 try:
137 os.unlink(dst)
138 except os.error:
139 pass
140 print 'Building applet', dst
Jack Jansen490ec9c1998-07-31 09:45:27 +0000141 buildtools.process(template, src, dst, 1)
Jack Jansen0f00c5e1997-05-06 16:15:32 +0000142
Jack Jansen1f5cd702001-01-21 22:25:11 +0000143def buildprojectfile(top, arg, list):
Jack Jansene56e87d2001-01-03 11:12:21 +0000144 """Create CodeWarrior project files with a script"""
145 for folder, module, routine in list:
146 print "Generating project files with", module
147 sys.path.insert(0, os.path.join(top, folder))
148 m = __import__(module)
149 r = getattr(m, routine)
Jack Jansen1f5cd702001-01-21 22:25:11 +0000150 r(arg)
Jack Jansene56e87d2001-01-03 11:12:21 +0000151 del sys.path[0]
152
Jack Jansen0f00c5e1997-05-06 16:15:32 +0000153def buildfat(top, dummy, list):
154 """Build fat binaries"""
155 for dst, src1, src2 in list:
156 dst = os.path.join(top, dst)
157 src1 = os.path.join(top, src1)
158 src2 = os.path.join(top, src2)
159 print 'Building fat binary', dst
160 cfmfile.mergecfmfiles((src1, src2), dst)
161
Jack Jansen5288c472001-02-12 14:46:53 +0000162def buildcopy(top, dummy, list):
163 import macostools
164 for src, dst in list:
165 src = os.path.join(top, src)
166 dst = os.path.join(top, dst)
167 macostools.copy(src, dst)
168
Jack Jansen675cda01997-09-09 13:57:15 +0000169def handle_dialog(filename):
Jack Jansen0f00c5e1997-05-06 16:15:32 +0000170 """Handle selection dialog, return list of selected items"""
171 d = Dlg.GetNewDialog(DIALOG_ID, -1)
172 d.SetDialogDefaultItem(I_OK)
173 d.SetDialogCancelItem(I_CANCEL)
174 results = [0]*N_BUTTONS
175 while 1:
176 n = Dlg.ModalDialog(None)
177 if n == I_OK:
178 break
179 if n == I_CANCEL:
180 return []
Jack Jansen675cda01997-09-09 13:57:15 +0000181 if n == I_INC_BUILDNO:
182 incbuildno(filename)
183 continue
Jack Jansen0f00c5e1997-05-06 16:15:32 +0000184 if n < len(results):
185 results[n] = (not results[n])
Jack Jansenc9b1e901999-12-24 13:39:23 +0000186 ctl = d.GetDialogItemAsControl(n)
187 ctl.SetControlValue(results[n])
Jack Jansen0f00c5e1997-05-06 16:15:32 +0000188 rv = []
189 for i in range(len(results)):
190 if results[i]:
191 rv.append(i)
192 return rv
Jack Jansen6655c4e1995-09-01 12:03:32 +0000193
194#
195# The build instructions. Entries are (routine, arg, list-of-files)
196# XXXX We could also include the builds for stdwin and such here...
Jack Jansen0f00c5e1997-05-06 16:15:32 +0000197BUILD_DICT = {
Jack Jansen1f5cd702001-01-21 22:25:11 +0000198I_GEN_PROJECTS : (buildprojectfile, 0, [
Jack Jansene56e87d2001-01-03 11:12:21 +0000199 (":Mac:scripts", "genpluginprojects", "genallprojects")
200 ]),
201
Jack Jansen1f5cd702001-01-21 22:25:11 +0000202I_GEN_PROJECTS_FORCE : (buildprojectfile, 1, [
203 (":Mac:scripts", "genpluginprojects", "genallprojects")
204 ]),
205
206I_GEN_IMGPROJECTS : (buildprojectfile, 0, [
Jack Jansene56e87d2001-01-03 11:12:21 +0000207 (":Extensions:img:Mac", "genimgprojects", "genallprojects")
208 ]),
209
Jack Jansen1f5cd702001-01-21 22:25:11 +0000210I_GEN_IMGPROJECTS_FORCE : (buildprojectfile, 1, [
211 (":Extensions:img:Mac", "genimgprojects", "genallprojects")
212 ]),
213
Jack Jansen5288c472001-02-12 14:46:53 +0000214I_INTERPRETER : (buildcopy, None, [
215 ("PythonInterpreterCarbon", "PythonInterpreter"),
216 ]),
217
Jack Jansen1f5cd702001-01-21 22:25:11 +0000218I_PPC_CORE : (buildmwproject, "CWIE", [
Jack Jansena5d384d2000-12-03 22:36:42 +0000219 (":Mac:Build:PythonCore.mcp", "PythonCore"),
Jack Jansen5288c472001-02-12 14:46:53 +0000220 (":Mac:Build:PythonInterpreter.mcp", "PythonInterpreterClassic"),
Jack Jansen0f00c5e1997-05-06 16:15:32 +0000221 ]),
222
Jack Jansen1f5cd702001-01-21 22:25:11 +0000223I_CARBON_CORE : (buildmwproject, "CWIE", [
224 (":Mac:Build:PythonCore.mcp", "PythonCoreCarbon"),
225 (":Mac:Build:PythonInterpreter.mcp", "PythonInterpreterCarbon"),
226 ]),
227
Jack Jansene56e87d2001-01-03 11:12:21 +0000228I_PPC_EXTLIBS : (buildmwproject, "CWIE", [
229## (":Mac:Build:buildlibs.mcp", "buildlibs ppc plus tcl/tk"),
230 (":Mac:Build:buildlibs.mcp", "buildlibs ppc"),
231 ]),
232
Jack Jansen0f00c5e1997-05-06 16:15:32 +0000233I_PPC_PLUGINS : (buildmwproject, "CWIE", [
Jack Jansen5288c472001-02-12 14:46:53 +0000234 (":Mac:Build:_weakref.mcp", "_weakref.ppc"),
235 (":Mac:Build:_symtable.mcp", "_symtable.ppc"),
236 (":Mac:Build:_testcapi.mcp", "_testcapi.ppc"),
Jack Jansena5d384d2000-12-03 22:36:42 +0000237 (":Mac:Build:pyexpat.mcp", "pyexpat.ppc"),
238 (":Mac:Build:calldll.mcp", "calldll.ppc"),
239 (":Mac:Build:ctb.mcp", "ctb.ppc"),
240 (":Mac:Build:gdbm.mcp", "gdbm.ppc"),
241 (":Mac:Build:icglue.mcp", "icglue.ppc"),
242 (":Mac:Build:macspeech.mcp", "macspeech.ppc"),
243 (":Mac:Build:waste.mcp", "waste.ppc"),
244 (":Mac:Build:zlib.mcp", "zlib.ppc"),
245## (":Mac:Build:_tkinter.mcp", "_tkinter.ppc"),
Jack Jansen07d69f62001-01-01 21:51:33 +0000246 (":Extensions:Imaging:_tkinter.mcp", "_tkinter.ppc"),
Jack Jansena5d384d2000-12-03 22:36:42 +0000247 (":Mac:Build:ColorPicker.mcp", "ColorPicker.ppc"),
248 (":Mac:Build:Printing.mcp", "Printing.ppc"),
249 (":Mac:Build:App.mcp", "App.ppc"),
250 (":Mac:Build:Cm.mcp", "Cm.ppc"),
Jack Jansena5d384d2000-12-03 22:36:42 +0000251 (":Mac:Build:Fm.mcp", "Fm.ppc"),
252 (":Mac:Build:Help.mcp", "Help.ppc"),
253 (":Mac:Build:Icn.mcp", "Icn.ppc"),
254 (":Mac:Build:List.mcp", "List.ppc"),
255 (":Mac:Build:Qdoffs.mcp", "Qdoffs.ppc"),
256 (":Mac:Build:Qt.mcp", "Qt.ppc"),
257 (":Mac:Build:Scrap.mcp", "Scrap.ppc"),
258 (":Mac:Build:Snd.mcp", "Snd.ppc"),
259 (":Mac:Build:Sndihooks.mcp", "Sndihooks.ppc"),
260 (":Mac:Build:TE.mcp", "TE.ppc"),
Jack Jansen0f00c5e1997-05-06 16:15:32 +0000261 ]),
262
Jack Jansenc3fc51f2001-01-23 22:36:52 +0000263I_CARBON_PLUGINS : (buildmwproject, "CWIE", [
Jack Jansen5288c472001-02-12 14:46:53 +0000264 (":Mac:Build:_weakref.carbon.mcp", "_weakref.carbon"),
265 (":Mac:Build:_symtable.carbon.mcp", "_symtable.carbon"),
266 (":Mac:Build:_testcapi.carbon.mcp", "_testcapi.carbon"),
Jack Jansenc3fc51f2001-01-23 22:36:52 +0000267 (":Mac:Build:pyexpat.carbon.mcp", "pyexpat.carbon"),
268 (":Mac:Build:calldll.carbon.mcp", "calldll.carbon"),
269 (":Mac:Build:gdbm.carbon.mcp", "gdbm.carbon"),
Jack Jansen5a8115c2001-01-29 13:27:46 +0000270 (":Mac:Build:icglue.carbon.mcp", "icglue.carbon"),
Jack Jansen8c982662001-01-24 16:02:07 +0000271 (":Mac:Build:waste.carbon.mcp", "waste.carbon"),
Jack Jansenc3fc51f2001-01-23 22:36:52 +0000272 (":Mac:Build:zlib.carbon.mcp", "zlib.carbon"),
Jack Jansen7b7e7132001-01-23 23:19:41 +0000273## (":Mac:Build:_tkinter.mcp", "_tkinter.carbon"),
Jack Jansenc3fc51f2001-01-23 22:36:52 +0000274## (":Extensions:Imaging:_tkinter.carbon.mcp", "_tkinter.carbon"),
275 (":Mac:Build:ColorPicker.carbon.mcp", "ColorPicker.carbon"),
276 (":Mac:Build:App.carbon.mcp", "App.carbon"),
277 (":Mac:Build:Cm.carbon.mcp", "Cm.carbon"),
278 (":Mac:Build:Fm.carbon.mcp", "Fm.carbon"),
279 (":Mac:Build:Icn.carbon.mcp", "Icn.carbon"),
280 (":Mac:Build:List.carbon.mcp", "List.carbon"),
281 (":Mac:Build:Qdoffs.carbon.mcp", "Qdoffs.carbon"),
282 (":Mac:Build:Qt.carbon.mcp", "Qt.carbon"),
Jack Jansen8c982662001-01-24 16:02:07 +0000283 (":Mac:Build:Scrap.carbon.mcp", "Scrap.carbon"),
Jack Jansenc3fc51f2001-01-23 22:36:52 +0000284 (":Mac:Build:Snd.carbon.mcp", "Snd.carbon"),
285 (":Mac:Build:Sndihooks.carbon.mcp", "Sndihooks.carbon"),
286 (":Mac:Build:TE.carbon.mcp", "TE.carbon"),
287 ]),
Jack Jansen0f00c5e1997-05-06 16:15:32 +0000288
Jack Jansen131c2882001-01-24 14:06:35 +0000289I_PPC_FULL : (buildmwproject, "CWIE", [
290 (":Mac:Build:PythonStandalone.mcp", "PythonStandalone"),
291 ]),
292
Jack Jansen0f00c5e1997-05-06 16:15:32 +0000293I_PPC_SMALL : (buildmwproject, "CWIE", [
Jack Jansena5d384d2000-12-03 22:36:42 +0000294 (":Mac:Build:PythonStandSmall.mcp", "PythonStandSmall"),
Jack Jansen0f00c5e1997-05-06 16:15:32 +0000295 ]),
296
Jack Jansen5288c472001-02-12 14:46:53 +0000297I_CARBON_FULL : (buildmwproject, "CWIE", [
298 (":Mac:Build:PythonStandalone.mcp", "PythonCarbonStandalone"),
299 ]),
300
301I_CARBON_SMALL : (buildmwproject, "CWIE", [
302 (":Mac:Build:PythonStandSmall.mcp", "PythonStandSmallCarbon"),
303 ]),
304
Jack Jansen0f00c5e1997-05-06 16:15:32 +0000305I_PPC_EXTENSIONS : (buildmwproject, "CWIE", [
Jack Jansena5d384d2000-12-03 22:36:42 +0000306 (":Extensions:Imaging:_imaging.mcp", "_imaging.ppc"),
307## (":Extensions:Imaging:_tkinter.mcp", "_tkinter.ppc"),
Jack Jansen7b7e7132001-01-23 23:19:41 +0000308 (":Extensions:img:Mac:imgmodules.mcp", "imgmodules.ppc"),
Jack Jansena5d384d2000-12-03 22:36:42 +0000309## (":Extensions:Numerical:Mac:numpymodules.mcp", "multiarraymodule"),
310## (":Extensions:Numerical:Mac:numpymodules.mcp", "_numpy"),
311## (":Extensions:Numerical:Mac:numpymodules.mcp", "umathmodule"),
312## (":Extensions:Numerical:Mac:numpymodules.mcp", "arrayfns"),
313## (":Extensions:Numerical:Packages:FFT:Mac:fftpack.mcp", "fftpack.ppc"),
314## (":Extensions:Numerical:Packages:LALITE:Mac:lapack_lite.mcp", "lapack_lite.ppc"),
315## (":Extensions:Numerical:Packages:RANLIB:Mac:ranlib.mcp", "ranlib.ppc"),
316## (":Extensions:Numerical:Packages:RNG:Mac:RNG.mcp", "RNG.ppc"),
Jack Jansen0f00c5e1997-05-06 16:15:32 +0000317 ]),
318
Jack Jansen7b7e7132001-01-23 23:19:41 +0000319I_CARBON_EXTENSIONS : (buildmwproject, "CWIE", [
320## (":Extensions:Imaging:_imaging.mcp", "_imaging.carbon"),
321## (":Extensions:Imaging:_tkinter.mcp", "_tkinter.carbon"),
322 (":Extensions:img:Mac:imgmodules.mcp", "imgmodules.carbon"),
323## (":Extensions:Numerical:Mac:numpymodules.mcp", "multiarraymodule"),
324## (":Extensions:Numerical:Mac:numpymodules.mcp", "_numpy"),
325## (":Extensions:Numerical:Mac:numpymodules.mcp", "umathmodule"),
326## (":Extensions:Numerical:Mac:numpymodules.mcp", "arrayfns"),
327## (":Extensions:Numerical:Packages:FFT:Mac:fftpack.mcp", "fftpack.ppc"),
328## (":Extensions:Numerical:Packages:LALITE:Mac:lapack_lite.mcp", "lapack_lite.ppc"),
329## (":Extensions:Numerical:Packages:RANLIB:Mac:ranlib.mcp", "ranlib.ppc"),
330## (":Extensions:Numerical:Packages:RNG:Mac:RNG.mcp", "RNG.ppc"),
331 ]),
332
Jack Jansen0f00c5e1997-05-06 16:15:32 +0000333I_APPLETS : (buildapplet, None, [
Just van Rossum9d609b41999-02-01 01:21:18 +0000334 (":Mac:scripts:EditPythonPrefs.py", "EditPythonPrefs"),
335 (":Mac:scripts:BuildApplet.py", "BuildApplet"),
336 (":Mac:scripts:BuildApplication.py", "BuildApplication"),
337 (":Mac:scripts:ConfigurePython.py", "ConfigurePython"),
338 (":Mac:Tools:IDE:PythonIDE.py", "Python IDE"),
Just van Rossumf84fdfe2000-03-28 20:50:36 +0000339 (":Mac:Tools:CGI:PythonCGISlave.py", ":Mac:Tools:CGI:PythonCGISlave"),
340 (":Mac:Tools:CGI:BuildCGIApplet.py", ":Mac:Tools:CGI:BuildCGIApplet"),
Jack Jansen0f00c5e1997-05-06 16:15:32 +0000341 ]),
Jack Jansen0f00c5e1997-05-06 16:15:32 +0000342}
Jack Jansenfaad9951997-09-01 15:37:07 +0000343
344def incbuildno(filename):
345 fp = open(filename)
346 line = fp.readline()
347 fp.close()
348
Jack Jansenbe614ee2001-01-02 22:02:02 +0000349 pat = re.compile('#define BUILD ([0-9]+)')
350 m = pat.search(line)
351 if not m or not m.group(1):
Jack Jansenfaad9951997-09-01 15:37:07 +0000352 raise 'Incorrect macbuildno.h line', line
Jack Jansenbe614ee2001-01-02 22:02:02 +0000353 buildno = m.group(1)
Jack Jansenfaad9951997-09-01 15:37:07 +0000354 new = string.atoi(buildno) + 1
355 fp = open(filename, 'w')
356 fp.write('#define BUILD %d\n'%new)
357 fp.close()
Jack Jansen6655c4e1995-09-01 12:03:32 +0000358
359def main():
Jack Jansen0f00c5e1997-05-06 16:15:32 +0000360 try:
Jack Jansend13c3852000-06-20 21:59:25 +0000361 h = Res.FSpOpenResFile('fullbuild.rsrc', 1)
Jack Jansen0f00c5e1997-05-06 16:15:32 +0000362 except Res.Error:
363 pass # Assume we already have acces to our own resource
364
Jack Jansen6655c4e1995-09-01 12:03:32 +0000365 dir, ok = macfs.GetDirectory('Python source folder:')
366 if not ok:
367 sys.exit(0)
368 dir = dir.as_pathname()
Jack Jansen0f00c5e1997-05-06 16:15:32 +0000369
Jack Jansen675cda01997-09-09 13:57:15 +0000370 todo = handle_dialog(os.path.join(dir, MACBUILDNO))
371
Jack Jansen0f00c5e1997-05-06 16:15:32 +0000372 instructions = []
373 for i in todo:
374 instructions.append(BUILD_DICT[i])
375
376 for routine, arg, list in instructions:
Jack Jansen8b4c9871997-05-07 15:52:12 +0000377 routine(dir, arg, list)
Jack Jansen0f00c5e1997-05-06 16:15:32 +0000378
Jack Jansene56e87d2001-01-03 11:12:21 +0000379 if todo:
380 print "All done!"
Jack Jansen6655c4e1995-09-01 12:03:32 +0000381
382if __name__ == '__main__':
383 main()
384