Commit 82bfde93 authored by Jack Jansen's avatar Jack Jansen

Modified for CW Pro projects and new filenames

parent 8505ef8c
...@@ -19,12 +19,13 @@ import addpack ...@@ -19,12 +19,13 @@ import addpack
import aetools import aetools
import AppleEvents import AppleEvents
from Metrowerks_Shell_Suite import Metrowerks_Shell_Suite from Metrowerks_Shell_Suite import Metrowerks_Shell_Suite
from CodeWarrior_Standard_Suite import CodeWarrior_Standard_Suite
from Required_Suite import Required_Suite from Required_Suite import Required_Suite
import Res import Res
import Dlg import Dlg
import mkapplet import BuildApplet
import cfmfile import cfmfile
# Dialog resource. Note that the item numbers should correspond # Dialog resource. Note that the item numbers should correspond
...@@ -35,22 +36,21 @@ DIALOG_ID = 512 ...@@ -35,22 +36,21 @@ DIALOG_ID = 512
I_OK=1 I_OK=1
I_CANCEL=2 I_CANCEL=2
I_PPC_CORE=3 I_CORE=3
I_PPC_PLUGINS=4 I_PPC_PLUGINS=4
I_PPC_EXTENSIONS=5 I_PPC_EXTENSIONS=5
I_68K_CORE=6 I_68K_PLUGINS=6
I_68K_PLUGINS=7 I_68K_EXTENSIONS=7
I_68K_EXTENSIONS=8 I_PPC_FULL=8
I_PPC_FULL=9 I_PPC_SMALL=9
I_PPC_SMALL=10 I_68K_FULL=10
I_68K_FULL=11 I_68K_SMALL=11
I_68K_SMALL=12 I_APPLETS=12
I_FAT=13
I_APPLETS=14 N_BUTTONS=13
N_BUTTONS=15 class MwShell(Metrowerks_Shell_Suite, CodeWarrior_Standard_Suite,
Required_Suite, aetools.TalkTo):
class MwShell(aetools.TalkTo, Metrowerks_Shell_Suite, Required_Suite):
pass pass
RUNNING=[] RUNNING=[]
...@@ -61,20 +61,29 @@ def buildmwproject(top, creator, projects): ...@@ -61,20 +61,29 @@ def buildmwproject(top, creator, projects):
mgr.send_timeout = AppleEvents.kNoTimeOut mgr.send_timeout = AppleEvents.kNoTimeOut
for file in projects: for file in projects:
if type(file) == type(()):
file, target = file
else:
target = ''
file = os.path.join(top, file) file = os.path.join(top, file)
fss = macfs.FSSpec(file) fss = macfs.FSSpec(file)
print 'Building', file print 'Building', file, target
mgr.open(fss) mgr.open(fss)
if target:
try:
mgr.Set_Current_Target(target)
except aetools.Error, arg:
print '**', file, target, 'Cannot select:', arg
try: try:
mgr.Make_Project() mgr.Make_Project()
except aetools.Error, arg: except aetools.Error, arg:
print '** Failed:', arg print '**', file, target, 'Failed:', arg
mgr.Close_Project() mgr.Close_Project()
## mgr.quit() ## mgr.quit()
def buildapplet(top, dummy, list): def buildapplet(top, dummy, list):
"""Create python applets""" """Create python applets"""
template = mkapplet.findtemplate() template = BuildApplet.findtemplate()
for src in list: for src in list:
if src[-3:] != '.py': if src[-3:] != '.py':
raise 'Should end in .py', src raise 'Should end in .py', src
...@@ -86,7 +95,7 @@ def buildapplet(top, dummy, list): ...@@ -86,7 +95,7 @@ def buildapplet(top, dummy, list):
except os.error: except os.error:
pass pass
print 'Building applet', dst print 'Building applet', dst
mkapplet.process(template, src, dst) BuildApplet.process(template, src, dst)
def buildfat(top, dummy, list): def buildfat(top, dummy, list):
"""Build fat binaries""" """Build fat binaries"""
...@@ -123,84 +132,53 @@ def handle_dialog(): ...@@ -123,84 +132,53 @@ def handle_dialog():
# The build instructions. Entries are (routine, arg, list-of-files) # The build instructions. Entries are (routine, arg, list-of-files)
# XXXX We could also include the builds for stdwin and such here... # XXXX We could also include the builds for stdwin and such here...
BUILD_DICT = { BUILD_DICT = {
I_PPC_CORE : (buildmwproject, "CWIE", [ I_CORE : (buildmwproject, "CWIE", [
":build.macppc.shared:PythonCorePPC.", (":build.mac:PythonCore.prj", "PythonCore"),
":build.macppc.shared:PythonPPC.", (":build.mac:Python.prj", "PythonFAT"),
":build.macppc.shared:PythonAppletPPC.", (":build.mac:PythonApplet.prj", "PythonAppletFAT"),
]),
I_68K_CORE : (buildmwproject, "CWIE", [
":build.mac68k.shared:PythonCoreCFM68K.",
":build.mac68k.shared:PythonCFM68K.",
":build.mac68k.shared:PythonAppletCFM68K.",
]), ]),
I_PPC_PLUGINS : (buildmwproject, "CWIE", [ I_PPC_PLUGINS : (buildmwproject, "CWIE", [
":PlugIns:toolboxmodules.ppc.", # First: used by others (":PlugIns:PlugIns.prj", "PlugIns.ppc"),
":PlugIns:qtmodules.ppc.",
":PlugIns:ctb.ppc.",
":PlugIns:gdbm.ppc.",
":PlugIns:icglue.ppc.",
":PlugIns:imgmodules.ppc.",
":PlugIns:macspeech.ppc.",
":PlugIns:waste.ppc.",
":PlugIns:_tkinter.ppc.",
":PlugIns:calldll.ppc.",
":PlugIns:zlib.ppc.",
]), ]),
I_68K_PLUGINS : (buildmwproject, "CWIE", [ I_68K_PLUGINS : (buildmwproject, "CWIE", [
":PlugIns:toolboxmodules.CFM68K.", # First: used by others (":PlugIns:PlugIns.prj", "PlugIns.CFM68K"),
":PlugIns:qtmodules.CFM68K.",
":PlugIns:ctb.CFM68K.",
":PlugIns:gdbm.CFM68K.",
":PlugIns:icglue.CFM68K.",
":PlugIns:imgmodules.CFM68K.",
":PlugIns:waste.CFM68K.",
":PlugIns:_tkinter.CFM68K.",
":PlugIns:zlib.CFM68K.",
]), ]),
I_68K_FULL : (buildmwproject, "CWIE", [ I_68K_FULL : (buildmwproject, "CWIE", [
":build.mac68k.stand:Python68K.", (":build.macstand:PythonStandalone.prj", "Python68K"),
]), ]),
I_68K_SMALL : (buildmwproject, "CWIE", [ I_68K_SMALL : (buildmwproject, "CWIE", [
":build.mac68k.stand:Python68Ksmall.", (":build.macstand:PythonStandSmall.prj", "PythonSmall68K"),
]), ]),
I_PPC_FULL : (buildmwproject, "CWIE", [ I_PPC_FULL : (buildmwproject, "CWIE", [
":build.macppc.stand:PythonStandalone.", (":build.macstand:PythonStandalone.prj", "PythonStandalone"),
]), ]),
I_PPC_SMALL : (buildmwproject, "CWIE", [ I_PPC_SMALL : (buildmwproject, "CWIE", [
":build.macppc.stand:PythonStandSmall.", (":build.macstand:PythonStandSmall.prj", "PythonStandSmall"),
]), ]),
I_PPC_EXTENSIONS : (buildmwproject, "CWIE", [ I_PPC_EXTENSIONS : (buildmwproject, "CWIE", [
":Extensions:Imaging:_imaging.ppc.", (":Extensions:Imaging:_imaging.prj", "_imaging.ppc"),
":Extensions:Imaging:_tkinter.ppc.", (":Extensions:Imaging:_tkinter.prj", "_tkinter.ppc"),
":Extensions:NumPy:numpymodules.ppc.", (":Extensions:NumPy:numpymodules.prj", "numpymodules.ppc"),
]), ]),
I_68K_EXTENSIONS : (buildmwproject, "CWIE", [ I_68K_EXTENSIONS : (buildmwproject, "CWIE", [
":Extensions:Imaging:_imaging.CFM68K.", (":Extensions:Imaging:_imaging.prj", "_imaging.CFM68K"),
":Extensions:Imaging:_tkinter.CFM68K.", (":Extensions:Imaging:_tkinter.prj", "_tkinter.CFM68K"),
":Extensions:NumPy:numpymodules.CFM68K.", (":Extensions:NumPy:numpymodules.prj", "numpymodules.CFM68K"),
]), ]),
I_APPLETS : (buildapplet, None, [ I_APPLETS : (buildapplet, None, [
":Mac:scripts:EditPythonPrefs.py", ":Mac:scripts:EditPythonPrefs.py",
":Mac:scripts:mkapplet.py", ":Mac:scripts:BuildApplet.py",
":Mac:scripts:MkPluginAliases.py" ":Mac:scripts:ConfigurePython.py"
]), ]),
I_FAT : (buildfat, None, [
(":PythonFAT", ":build.macppc.shared:PythonPPC",
":build.mac68k.shared:PythonCFM68K"),
(":PythonApplet", ":build.macppc.shared:PythonAppletPPC",
":build.mac68k.shared:PythonAppletCFM68K")
])
} }
def main(): def main():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment