diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 1995-08-14 12:20:22 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 1995-08-14 12:20:22 (GMT) |
commit | ad169272fb83730c6d59ff140ef5ac15e52ffdf3 (patch) | |
tree | e122285ef87166e888051fd4e7373c501a13e6aa | |
parent | 3050a2dc5fa8c123df98342483c9d325ab84c2bf (diff) | |
download | cpython-ad169272fb83730c6d59ff140ef5ac15e52ffdf3.zip cpython-ad169272fb83730c6d59ff140ef5ac15e52ffdf3.tar.gz cpython-ad169272fb83730c6d59ff140ef5ac15e52ffdf3.tar.bz2 |
Added List.slb alias
-rw-r--r-- | Mac/scripts/ConfigurePython.py | 26 | ||||
-rw-r--r-- | Mac/scripts/MkPluginAliases.as | 1 |
2 files changed, 5 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') diff --git a/Mac/scripts/MkPluginAliases.as b/Mac/scripts/MkPluginAliases.as index 27c0b28..8acc608 100644 --- a/Mac/scripts/MkPluginAliases.as +++ b/Mac/scripts/MkPluginAliases.as @@ -18,6 +18,7 @@ set G to (G & {{"Ctl.slb", "toolboxmodules.slb"}}) set G to (G & {{"Dlg.slb", "toolboxmodules.slb"}}) set G to (G & {{"Evt.slb", "toolboxmodules.slb"}}) set G to (G & {{"Menu.slb", "toolboxmodules.slb"}}) +set G to (G & {{"List.slb", "toolboxmodules.slb"}}) set G to (G & {{"Qd.slb", "toolboxmodules.slb"}}) set G to (G & {{"Res.slb", "toolboxmodules.slb"}}) set G to (G & {{"Snd.slb", "toolboxmodules.slb"}}) |