mirror of
https://github.com/python/cpython.git
synced 2025-11-02 22:51:25 +00:00
Adapted for cfm68k, new names and split off of qt.
This commit is contained in:
parent
e420178ba6
commit
25b361fc14
2 changed files with 92 additions and 67 deletions
|
|
@ -2,11 +2,8 @@
|
||||||
# dynamically-loaded modules that "live in" in a single
|
# dynamically-loaded modules that "live in" in a single
|
||||||
# shared library.
|
# shared library.
|
||||||
# It needs a fully functional non-dynamic python to work
|
# It needs a fully functional non-dynamic python to work
|
||||||
# (since it creates aliases to stuff it needs itself),
|
# but you can run it in a shared python as long as you can point
|
||||||
# you should probably drag it onto your non-dynamic python.
|
# it to toolboxmodules.slb
|
||||||
#
|
|
||||||
# If you compare it to MkPluginAliases.as it also serves
|
|
||||||
# as a comparison between python and AppleScript:-)
|
|
||||||
#
|
#
|
||||||
# Jack Jansen, CWI, August 1995
|
# Jack Jansen, CWI, August 1995
|
||||||
|
|
||||||
|
|
@ -16,10 +13,10 @@ def help():
|
||||||
print"""
|
print"""
|
||||||
Try the following:
|
Try the following:
|
||||||
1. Remove any old "Python Preferences" files from the system folder.
|
1. Remove any old "Python Preferences" files from the system folder.
|
||||||
2. Remove any old "PythonCore" files from the system folder.
|
2. Remove any old "PythonCore" or "PythonCoreCFM68K" files from the system folder.
|
||||||
3. Make sure this script, PythonPPC and PythonCore are all located in the
|
3. Make sure this script, your interpreter and your PythonCore are all located in the
|
||||||
python home folder (where the Lib and PlugIns folders are)
|
same folder.
|
||||||
4. Run this script again, by dropping it on PythonPPC.
|
4. Run this script again, by dropping it on your interpreter.
|
||||||
|
|
||||||
If this fails try removing starting afresh from the distribution archive.
|
If this fails try removing starting afresh from the distribution archive.
|
||||||
"""
|
"""
|
||||||
|
|
@ -36,26 +33,12 @@ def help():
|
||||||
try:
|
try:
|
||||||
import Res
|
import Res
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
import macfs
|
||||||
#
|
#
|
||||||
# Check that we are actually in the main python directory
|
# Check that we are actually in the main python directory
|
||||||
#
|
#
|
||||||
try:
|
fss, ok = macfs.StandardGetFile('Where are the toolbox modules?', 'shlb')
|
||||||
os.chdir(':PlugIns')
|
tblibname = fss.as_pathname()
|
||||||
except IOError:
|
|
||||||
print """
|
|
||||||
I cannot find the 'PlugIns' folder, so I am obviously not run from the Python
|
|
||||||
home folder.
|
|
||||||
"""
|
|
||||||
help()
|
|
||||||
import imp
|
|
||||||
cwd = os.getcwd()
|
|
||||||
tblibname = os.path.join(cwd, "toolboxmodules.slb")
|
|
||||||
if not os.path.exists(tblibname):
|
|
||||||
print """
|
|
||||||
I cannot find the 'toolboxmodules.slb' file in the PlugIns directory.
|
|
||||||
Start afresh from a clean distribution.
|
|
||||||
"""
|
|
||||||
sys.exit(1)
|
|
||||||
try:
|
try:
|
||||||
for wtd in ["Ctl", "Dlg", "Evt", "Qd", "Res", "Win"]:
|
for wtd in ["Ctl", "Dlg", "Evt", "Qd", "Res", "Win"]:
|
||||||
imp.load_dynamic(wtd, tblibname)
|
imp.load_dynamic(wtd, tblibname)
|
||||||
|
|
@ -71,32 +54,53 @@ def help():
|
||||||
import EasyDialogs
|
import EasyDialogs
|
||||||
import macostools
|
import macostools
|
||||||
|
|
||||||
goals = [
|
ppc_goals = [
|
||||||
("AE.slb", "toolboxmodules.slb"),
|
("AE.ppc.slb", "toolboxmodules.ppc.slb"),
|
||||||
("Cm.slb", "toolboxmodules.slb"),
|
("Ctl.ppc.slb", "toolboxmodules.ppc.slb"),
|
||||||
("Ctl.slb", "toolboxmodules.slb"),
|
("Dlg.ppc.slb", "toolboxmodules.ppc.slb"),
|
||||||
("Dlg.slb", "toolboxmodules.slb"),
|
("Evt.ppc.slb", "toolboxmodules.ppc.slb"),
|
||||||
("Evt.slb", "toolboxmodules.slb"),
|
("Fm.ppc.slb", "toolboxmodules.ppc.slb"),
|
||||||
("Fm.slb", "toolboxmodules.slb"),
|
("Menu.ppc.slb", "toolboxmodules.ppc.slb"),
|
||||||
("Menu.slb", "toolboxmodules.slb"),
|
("List.ppc.slb", "toolboxmodules.ppc.slb"),
|
||||||
("List.slb", "toolboxmodules.slb"),
|
("Qd.ppc.slb", "toolboxmodules.ppc.slb"),
|
||||||
("Qd.slb", "toolboxmodules.slb"),
|
("Res.ppc.slb", "toolboxmodules.ppc.slb"),
|
||||||
("Qt.slb", "toolboxmodules.slb"),
|
("Scrap.ppc.slb", "toolboxmodules.ppc.slb"),
|
||||||
("Res.slb", "toolboxmodules.slb"),
|
("Snd.ppc.slb", "toolboxmodules.ppc.slb"),
|
||||||
("Scrap.slb", "toolboxmodules.slb"),
|
("TE.ppc.slb", "toolboxmodules.ppc.slb"),
|
||||||
("Snd.slb", "toolboxmodules.slb"),
|
("Win.ppc.slb", "toolboxmodules.ppc.slb"),
|
||||||
("TE.slb", "toolboxmodules.slb"),
|
|
||||||
("Win.slb", "toolboxmodules.slb"),
|
("Cm.ppc.slb", "qtmodules.ppc.slb"),
|
||||||
("imgcolormap.slb", "imgmodules.slb"),
|
("Qt.ppc.slb", "qtmodules.ppc.slb"),
|
||||||
("imgformat.slb", "imgmodules.slb"),
|
|
||||||
("imggif.slb", "imgmodules.slb"),
|
("imgcolormap.ppc.slb", "imgmodules.ppc.slb"),
|
||||||
("imgjpeg.slb", "imgmodules.slb"),
|
("imgformat.ppc.slb", "imgmodules.ppc.slb"),
|
||||||
("imgop.slb", "imgmodules.slb"),
|
("imggif.ppc.slb", "imgmodules.ppc.slb"),
|
||||||
("imgpbm.slb", "imgmodules.slb"),
|
("imgjpeg.ppc.slb", "imgmodules.ppc.slb"),
|
||||||
("imgpgm.slb", "imgmodules.slb"),
|
("imgop.ppc.slb", "imgmodules.ppc.slb"),
|
||||||
("imgppm.slb", "imgmodules.slb"),
|
("imgpbm.ppc.slb", "imgmodules.ppc.slb"),
|
||||||
("imgtiff.slb", "imgmodules.slb"),
|
("imgpgm.ppc.slb", "imgmodules.ppc.slb"),
|
||||||
("imgsgi.slb", "imgmodules.slb")
|
("imgppm.ppc.slb", "imgmodules.ppc.slb"),
|
||||||
|
("imgtiff.ppc.slb", "imgmodules.ppc.slb"),
|
||||||
|
("imgsgi.ppc.slb", "imgmodules.ppc.slb")
|
||||||
|
]
|
||||||
|
|
||||||
|
cfm68k_goals = [
|
||||||
|
("AE.CFM68K.slb", "toolboxmodules.CFM68K.slb"),
|
||||||
|
("Ctl.CFM68K.slb", "toolboxmodules.CFM68K.slb"),
|
||||||
|
("Dlg.CFM68K.slb", "toolboxmodules.CFM68K.slb"),
|
||||||
|
("Evt.CFM68K.slb", "toolboxmodules.CFM68K.slb"),
|
||||||
|
("Fm.CFM68K.slb", "toolboxmodules.CFM68K.slb"),
|
||||||
|
("Menu.CFM68K.slb", "toolboxmodules.CFM68K.slb"),
|
||||||
|
("List.CFM68K.slb", "toolboxmodules.CFM68K.slb"),
|
||||||
|
("Qd.CFM68K.slb", "toolboxmodules.CFM68K.slb"),
|
||||||
|
("Res.CFM68K.slb", "toolboxmodules.CFM68K.slb"),
|
||||||
|
("Scrap.CFM68K.slb", "toolboxmodules.CFM68K.slb"),
|
||||||
|
("Snd.CFM68K.slb", "toolboxmodules.CFM68K.slb"),
|
||||||
|
("TE.CFM68K.slb", "toolboxmodules.CFM68K.slb"),
|
||||||
|
("Win.CFM68K.slb", "toolboxmodules.CFM68K.slb"),
|
||||||
|
|
||||||
|
("Cm.CFM68K.slb", "qtmodules.CFM68K.slb"),
|
||||||
|
("Qt.CFM68K.slb", "qtmodules.CFM68K.slb"),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -121,9 +125,14 @@ def main():
|
||||||
|
|
||||||
print LibFiles
|
print LibFiles
|
||||||
# Create the new aliases.
|
# Create the new aliases.
|
||||||
if EasyDialogs.AskYesNoCancel('Proceed with creating new ones?') <= 0:
|
if EasyDialogs.AskYesNoCancel('Proceed with creating PPC aliases?') > 0:
|
||||||
sys.exit(0)
|
for dst, src in ppc_goals:
|
||||||
for dst, src in goals:
|
if src in LibFiles:
|
||||||
|
macostools.mkalias(src, dst)
|
||||||
|
else:
|
||||||
|
EasyDialogs.Message(dst+' not created: '+src+' not found')
|
||||||
|
if EasyDialogs.AskYesNoCancel('Proceed with creating CFM68K aliases?') > 0:
|
||||||
|
for dst, src in cfm68k_goals:
|
||||||
if src in LibFiles:
|
if src in LibFiles:
|
||||||
macostools.mkalias(src, dst)
|
macostools.mkalias(src, dst)
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
|
|
@ -81,14 +81,29 @@ def buildapplet(top, dummy, list):
|
||||||
":build.macppc.shared:PythonApplet.µ",
|
":build.macppc.shared:PythonApplet.µ",
|
||||||
])
|
])
|
||||||
]
|
]
|
||||||
|
CFM68K_INSTRUCTIONS=[
|
||||||
|
(buildmwproject, "CWIE", [
|
||||||
|
":build.mac68k.shared:PythonCoreCFM68K.µ",
|
||||||
|
":build.mac68k.shared:PythonCFM68K.µ",
|
||||||
|
":build.mac68k.shared:PythonAppletCFM68K.µ",
|
||||||
|
])
|
||||||
|
]
|
||||||
PLUGIN_INSTRUCTIONS=[
|
PLUGIN_INSTRUCTIONS=[
|
||||||
(buildmwproject, "CWIE", [
|
(buildmwproject, "CWIE", [
|
||||||
":PlugIns:ctbmodule.µ",
|
":PlugIns:ctbmodule.ppc.µ",
|
||||||
":PlugIns:imgmodules.µ",
|
":PlugIns:imgmodules.ppc.µ",
|
||||||
":PlugIns:macspeechmodule.µ",
|
":PlugIns:macspeechmodule.ppc.µ",
|
||||||
":PlugIns:toolboxmodules.µ",
|
":PlugIns:toolboxmodules.ppc.µ",
|
||||||
":PlugIns:wastemodule.µ",
|
":PlugIns:wastemodule.ppc.µ",
|
||||||
":PlugIns:_tkintermodule.µ",
|
":PlugIns:_tkintermodule.ppc.µ",
|
||||||
|
])
|
||||||
|
]
|
||||||
|
CFM68KPLUGIN_INSTRUCTIONS=[
|
||||||
|
(buildmwproject, "CWIE", [
|
||||||
|
":PlugIns:ctbmodule.CFM68K.µ",
|
||||||
|
":PlugIns:toolboxmodules.CFM68K.µ",
|
||||||
|
":PlugIns:wastemodule.CFM68K.µ",
|
||||||
|
":PlugIns:_tkintermodule.CFM68K.µ",
|
||||||
])
|
])
|
||||||
]
|
]
|
||||||
M68K_INSTRUCTIONS=[
|
M68K_INSTRUCTIONS=[
|
||||||
|
|
@ -108,8 +123,9 @@ def buildapplet(top, dummy, list):
|
||||||
ALLINST=[
|
ALLINST=[
|
||||||
("PPC shared executable", PPC_INSTRUCTIONS),
|
("PPC shared executable", PPC_INSTRUCTIONS),
|
||||||
("PPC plugin modules", PLUGIN_INSTRUCTIONS),
|
("PPC plugin modules", PLUGIN_INSTRUCTIONS),
|
||||||
("68K executable", M68K_INSTRUCTIONS),
|
("CFM68K shared executable", CFM68K_INSTRUCTIONS),
|
||||||
("PPC applets", APPLET_INSTRUCTIONS)
|
("68K standalone executable", M68K_INSTRUCTIONS),
|
||||||
|
("Applets", APPLET_INSTRUCTIONS)
|
||||||
]
|
]
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue