From ad169272fb83730c6d59ff140ef5ac15e52ffdf3 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Mon, 14 Aug 1995 12:20:22 +0000 Subject: [PATCH] Added List.slb alias --- Mac/scripts/ConfigurePython.py | 26 ++++---------------------- 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 2f7d6431ea1..ba76ee4f121 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 27c0b283ef2..8acc6084906 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"}})