Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 82bfde9

Browse files
committed
Modified for CW Pro projects and new filenames
1 parent 8505ef8 commit 82bfde9

1 file changed

Lines changed: 46 additions & 68 deletions

File tree

Mac/scripts/fullbuild.py

Lines changed: 46 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@
1919
import aetools
2020
import AppleEvents
2121
from Metrowerks_Shell_Suite import Metrowerks_Shell_Suite
22+
from CodeWarrior_Standard_Suite import CodeWarrior_Standard_Suite
2223
from Required_Suite import Required_Suite
2324

2425
import Res
2526
import Dlg
2627

27-
import mkapplet
28+
import BuildApplet
2829
import cfmfile
2930

3031
# Dialog resource. Note that the item numbers should correspond
@@ -35,22 +36,21 @@
3536
I_OK=1
3637
I_CANCEL=2
3738

38-
I_PPC_CORE=3
39+
I_CORE=3
3940
I_PPC_PLUGINS=4
4041
I_PPC_EXTENSIONS=5
41-
I_68K_CORE=6
42-
I_68K_PLUGINS=7
43-
I_68K_EXTENSIONS=8
44-
I_PPC_FULL=9
45-
I_PPC_SMALL=10
46-
I_68K_FULL=11
47-
I_68K_SMALL=12
48-
I_FAT=13
49-
I_APPLETS=14
50-
51-
N_BUTTONS=15
52-
53-
class MwShell(aetools.TalkTo, Metrowerks_Shell_Suite, Required_Suite):
42+
I_68K_PLUGINS=6
43+
I_68K_EXTENSIONS=7
44+
I_PPC_FULL=8
45+
I_PPC_SMALL=9
46+
I_68K_FULL=10
47+
I_68K_SMALL=11
48+
I_APPLETS=12
49+
50+
N_BUTTONS=13
51+
52+
class MwShell(Metrowerks_Shell_Suite, CodeWarrior_Standard_Suite,
53+
Required_Suite, aetools.TalkTo):
5454
pass
5555

5656
RUNNING=[]
@@ -61,20 +61,29 @@ def buildmwproject(top, creator, projects):
6161
mgr.send_timeout = AppleEvents.kNoTimeOut
6262

6363
for file in projects:
64+
if type(file) == type(()):
65+
file, target = file
66+
else:
67+
target = ''
6468
file = os.path.join(top, file)
6569
fss = macfs.FSSpec(file)
66-
print 'Building', file
70+
print 'Building', file, target
6771
mgr.open(fss)
72+
if target:
73+
try:
74+
mgr.Set_Current_Target(target)
75+
except aetools.Error, arg:
76+
print '**', file, target, 'Cannot select:', arg
6877
try:
6978
mgr.Make_Project()
7079
except aetools.Error, arg:
71-
print '** Failed:', arg
80+
print '**', file, target, 'Failed:', arg
7281
mgr.Close_Project()
7382
## mgr.quit()
7483

7584
def buildapplet(top, dummy, list):
7685
"""Create python applets"""
77-
template = mkapplet.findtemplate()
86+
template = BuildApplet.findtemplate()
7887
for src in list:
7988
if src[-3:] != '.py':
8089
raise 'Should end in .py', src
@@ -86,7 +95,7 @@ def buildapplet(top, dummy, list):
8695
except os.error:
8796
pass
8897
print 'Building applet', dst
89-
mkapplet.process(template, src, dst)
98+
BuildApplet.process(template, src, dst)
9099

91100
def buildfat(top, dummy, list):
92101
"""Build fat binaries"""
@@ -123,84 +132,53 @@ def handle_dialog():
123132
# The build instructions. Entries are (routine, arg, list-of-files)
124133
# XXXX We could also include the builds for stdwin and such here...
125134
BUILD_DICT = {
126-
I_PPC_CORE : (buildmwproject, "CWIE", [
127-
":build.macppc.shared:PythonCorePPC.µ",
128-
":build.macppc.shared:PythonPPC.µ",
129-
":build.macppc.shared:PythonAppletPPC.µ",
130-
]),
131-
132-
I_68K_CORE : (buildmwproject, "CWIE", [
133-
":build.mac68k.shared:PythonCoreCFM68K.µ",
134-
":build.mac68k.shared:PythonCFM68K.µ",
135-
":build.mac68k.shared:PythonAppletCFM68K.µ",
135+
I_CORE : (buildmwproject, "CWIE", [
136+
(":build.mac:PythonCore.prj", "PythonCore"),
137+
(":build.mac:Python.prj", "PythonFAT"),
138+
(":build.mac:PythonApplet.prj", "PythonAppletFAT"),
136139
]),
137140

138141
I_PPC_PLUGINS : (buildmwproject, "CWIE", [
139-
":PlugIns:toolboxmodules.ppc.µ", # First: used by others
140-
":PlugIns:qtmodules.ppc.µ",
141-
":PlugIns:ctb.ppc.µ",
142-
":PlugIns:gdbm.ppc.µ",
143-
":PlugIns:icglue.ppc.µ",
144-
":PlugIns:imgmodules.ppc.µ",
145-
":PlugIns:macspeech.ppc.µ",
146-
":PlugIns:waste.ppc.µ",
147-
":PlugIns:_tkinter.ppc.µ",
148-
":PlugIns:calldll.ppc.µ",
149-
":PlugIns:zlib.ppc.µ",
142+
(":PlugIns:PlugIns.prj", "PlugIns.ppc"),
150143
]),
151144

152145
I_68K_PLUGINS : (buildmwproject, "CWIE", [
153-
":PlugIns:toolboxmodules.CFM68K.µ", # First: used by others
154-
":PlugIns:qtmodules.CFM68K.µ",
155-
":PlugIns:ctb.CFM68K.µ",
156-
":PlugIns:gdbm.CFM68K.µ",
157-
":PlugIns:icglue.CFM68K.µ",
158-
":PlugIns:imgmodules.CFM68K.µ",
159-
":PlugIns:waste.CFM68K.µ",
160-
":PlugIns:_tkinter.CFM68K.µ",
161-
":PlugIns:zlib.CFM68K.µ",
146+
(":PlugIns:PlugIns.prj", "PlugIns.CFM68K"),
162147
]),
163148

164149
I_68K_FULL : (buildmwproject, "CWIE", [
165-
":build.mac68k.stand:Python68K.µ",
150+
(":build.macstand:PythonStandalone.prj", "Python68K"),
166151
]),
167152

168153
I_68K_SMALL : (buildmwproject, "CWIE", [
169-
":build.mac68k.stand:Python68Ksmall.µ",
154+
(":build.macstand:PythonStandSmall.prj", "PythonSmall68K"),
170155
]),
171156

172157
I_PPC_FULL : (buildmwproject, "CWIE", [
173-
":build.macppc.stand:PythonStandalone.µ",
158+
(":build.macstand:PythonStandalone.prj", "PythonStandalone"),
174159
]),
175160

176161
I_PPC_SMALL : (buildmwproject, "CWIE", [
177-
":build.macppc.stand:PythonStandSmall.µ",
162+
(":build.macstand:PythonStandSmall.prj", "PythonStandSmall"),
178163
]),
179164

180165
I_PPC_EXTENSIONS : (buildmwproject, "CWIE", [
181-
":Extensions:Imaging:_imaging.ppc.µ",
182-
":Extensions:Imaging:_tkinter.ppc.µ",
183-
":Extensions:NumPy:numpymodules.ppc.µ",
166+
(":Extensions:Imaging:_imaging.prj", "_imaging.ppc"),
167+
(":Extensions:Imaging:_tkinter.prj", "_tkinter.ppc"),
168+
(":Extensions:NumPy:numpymodules.prj", "numpymodules.ppc"),
184169
]),
185170

186171
I_68K_EXTENSIONS : (buildmwproject, "CWIE", [
187-
":Extensions:Imaging:_imaging.CFM68K.µ",
188-
":Extensions:Imaging:_tkinter.CFM68K.µ",
189-
":Extensions:NumPy:numpymodules.CFM68K.µ",
172+
(":Extensions:Imaging:_imaging.prj", "_imaging.CFM68K"),
173+
(":Extensions:Imaging:_tkinter.prj", "_tkinter.CFM68K"),
174+
(":Extensions:NumPy:numpymodules.prj", "numpymodules.CFM68K"),
190175
]),
191176

192177
I_APPLETS : (buildapplet, None, [
193178
":Mac:scripts:EditPythonPrefs.py",
194-
":Mac:scripts:mkapplet.py",
195-
":Mac:scripts:MkPluginAliases.py"
179+
":Mac:scripts:BuildApplet.py",
180+
":Mac:scripts:ConfigurePython.py"
196181
]),
197-
198-
I_FAT : (buildfat, None, [
199-
(":PythonFAT", ":build.macppc.shared:PythonPPC",
200-
":build.mac68k.shared:PythonCFM68K"),
201-
(":PythonApplet", ":build.macppc.shared:PythonAppletPPC",
202-
":build.mac68k.shared:PythonAppletCFM68K")
203-
])
204182
}
205183

206184
def main():

0 commit comments

Comments
 (0)