summaryrefslogtreecommitdiffstats
path: root/Mac/scripts/ConfigurePython.py
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>1995-08-14 12:20:22 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>1995-08-14 12:20:22 (GMT)
commitad169272fb83730c6d59ff140ef5ac15e52ffdf3 (patch)
treee122285ef87166e888051fd4e7373c501a13e6aa /Mac/scripts/ConfigurePython.py
parent3050a2dc5fa8c123df98342483c9d325ab84c2bf (diff)
downloadcpython-ad169272fb83730c6d59ff140ef5ac15e52ffdf3.zip
cpython-ad169272fb83730c6d59ff140ef5ac15e52ffdf3.tar.gz
cpython-ad169272fb83730c6d59ff140ef5ac15e52ffdf3.tar.bz2
Added List.slb alias
Diffstat (limited to 'Mac/scripts/ConfigurePython.py')
-rw-r--r--Mac/scripts/ConfigurePython.py26
1 files changed, 4 insertions, 22 deletions
diff --git a/Mac/scripts/ConfigurePython.py b/Mac/scripts/ConfigurePython.py
index 2f7d643..ba76ee4 100644
--- a/Mac/scripts/ConfigurePython.py
+++ b/Mac/scripts/ConfigurePython.py
@@ -28,6 +28,7 @@ for dynamically-linked python to use. Do one of the following:
sys.exit(1)
import EasyDialogs
+import macostools
goals = [
("mactcp.slb", "mactcpmodules.slb"),
@@ -37,6 +38,7 @@ goals = [
("Dlg.slb", "toolboxmodules.slb"),
("Evt.slb", "toolboxmodules.slb"),
("Menu.slb", "toolboxmodules.slb"),
+ ("List.slb", "toolboxmodules.slb"),
("Qd.slb", "toolboxmodules.slb"),
("Res.slb", "toolboxmodules.slb"),
("Snd.slb", "toolboxmodules.slb"),
@@ -51,30 +53,10 @@ goals = [
("imgtiff.slb", "imgmodules.slb")
]
-#
-# Not guaranteed to be correct or stay correct (Apple doesn't tell you
-# how to do this), but it seems to work.
-#
-def mkalias(src, dst):
- """Create a finder alias"""
- srcfss = macfs.FSSpec(src)
- dstfss = macfs.FSSpec(dst)
- alias = srcfss.NewAlias()
- srcfinfo = srcfss.GetFInfo()
-
- Res.FSpCreateResFile(dstfss, srcfinfo.Creator, srcfinfo.Type, -1)
- h = Res.FSpOpenResFile(dstfss, 3)
- resource = Res.Resource(alias.data)
- resource.AddResource('alis', 0, '')
- Res.CloseResFile(h)
-
- dstfinfo = dstfss.GetFInfo()
- dstfinfo.Flags = dstfinfo.Flags|0x8000 # Alias flag
- dstfss.SetFInfo(dstfinfo)
def main():
# Ask the user for the plugins directory
- dir, ok = macfs.GetDirectory()
+ dir, ok = macfs.GetDirectory('Where is the PlugIns folder?')
if not ok: sys.exit(0)
os.chdir(dir.as_pathname())
@@ -97,7 +79,7 @@ def main():
sys.exit(0)
for dst, src in goals:
if src in LibFiles:
- mkalias(src, dst)
+ macostools.mkalias(src, dst)
else:
EasyDialogs.Message(dst+' not created: '+src+' not found')