From aaebdd6a02dd4d650b14e2192e327336ecb62a98 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Mon, 5 Aug 2002 15:39:30 +0000 Subject: [PATCH] Enable building of Carbon toolbox modules with unix-Python. --- Mac/Modules/ae/aescan.py | 3 +-- Mac/Modules/app/appscan.py | 3 +-- Mac/Modules/carbonevt/CarbonEvtscan.py | 4 +--- Mac/Modules/cf/cfscan.py | 3 +-- Mac/Modules/cg/cgscan.py | 3 +-- Mac/Modules/cm/cmscan.py | 3 +-- Mac/Modules/ctl/ctlscan.py | 3 +-- Mac/Modules/dlg/dlgscan.py | 3 +-- Mac/Modules/drag/dragscan.py | 3 +-- Mac/Modules/evt/evtscan.py | 3 +-- Mac/Modules/fm/fmscan.py | 3 +-- Mac/Modules/help/helpscan.py | 3 +-- Mac/Modules/htmlrender/htmlscan.py | 3 +-- Mac/Modules/ibcarbon/IBCarbonscan.py | 5 +---- Mac/Modules/icn/icnscan.py | 3 +-- Mac/Modules/list/listscan.py | 3 +-- Mac/Modules/menu/menuscan.py | 3 +-- Mac/Modules/mlte/mltescan.py | 3 +-- Mac/Modules/qd/qdscan.py | 3 +-- Mac/Modules/qdoffs/qdoffsscan.py | 3 +-- Mac/Modules/qt/qtscan.py | 3 +-- Mac/Modules/res/resscan.py | 3 +-- Mac/Modules/scrap/scrapscan.py | 6 +----- Mac/Modules/snd/sndscan.py | 3 +-- Mac/Modules/te/tescan.py | 3 +-- Mac/Modules/win/winscan.py | 3 +-- 26 files changed, 26 insertions(+), 58 deletions(-) diff --git a/Mac/Modules/ae/aescan.py b/Mac/Modules/ae/aescan.py index 21d5299261f..b406ce784f4 100644 --- a/Mac/Modules/ae/aescan.py +++ b/Mac/Modules/ae/aescan.py @@ -7,9 +7,8 @@ import os import string import MacOS -BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen') +from bgenlocations import TOOLBOXDIR, BGENDIR sys.path.append(BGENDIR) -from bgenlocations import TOOLBOXDIR from scantools import Scanner diff --git a/Mac/Modules/app/appscan.py b/Mac/Modules/app/appscan.py index fe6b30d840e..286d3ce5167 100644 --- a/Mac/Modules/app/appscan.py +++ b/Mac/Modules/app/appscan.py @@ -2,10 +2,9 @@ import sys import os -BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen') +from bgenlocations import TOOLBOXDIR, BGENDIR sys.path.append(BGENDIR) from scantools import Scanner -from bgenlocations import TOOLBOXDIR LONG = "Appearance" SHORT = "app" diff --git a/Mac/Modules/carbonevt/CarbonEvtscan.py b/Mac/Modules/carbonevt/CarbonEvtscan.py index 0cc048a3268..467b8a848af 100644 --- a/Mac/Modules/carbonevt/CarbonEvtscan.py +++ b/Mac/Modules/carbonevt/CarbonEvtscan.py @@ -6,11 +6,9 @@ import string import MacOS import sys -BGENDIR= os.path.join(sys.prefix, ':Tools:bgen:bgen:') +from bgenlocations import TOOLBOXDIR, BGENDIR sys.path.append(BGENDIR) -from bgenlocations import TOOLBOXDIR - from scantools import Scanner, Scanner_OSX def main(): diff --git a/Mac/Modules/cf/cfscan.py b/Mac/Modules/cf/cfscan.py index 85178e4006b..0bcf914842e 100644 --- a/Mac/Modules/cf/cfscan.py +++ b/Mac/Modules/cf/cfscan.py @@ -2,10 +2,9 @@ import sys import os -BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen') +from bgenlocations import TOOLBOXDIR, BGENDIR sys.path.append(BGENDIR) from scantools import Scanner_OSX -from bgenlocations import TOOLBOXDIR LONG = "CoreFoundation" SHORT = "cf" diff --git a/Mac/Modules/cg/cgscan.py b/Mac/Modules/cg/cgscan.py index f67647008d1..4ed2127be76 100755 --- a/Mac/Modules/cg/cgscan.py +++ b/Mac/Modules/cg/cgscan.py @@ -2,10 +2,9 @@ import sys import os -BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen') +from bgenlocations import TOOLBOXDIR, BGENDIR sys.path.append(BGENDIR) from scantools import Scanner_OSX -from bgenlocations import TOOLBOXDIR LONG = "CoreGraphics" SHORT = "cg" diff --git a/Mac/Modules/cm/cmscan.py b/Mac/Modules/cm/cmscan.py index 1136fe5d73d..c846eb00af7 100644 --- a/Mac/Modules/cm/cmscan.py +++ b/Mac/Modules/cm/cmscan.py @@ -2,10 +2,9 @@ import sys import os -BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen') +from bgenlocations import TOOLBOXDIR, BGENDIR sys.path.append(BGENDIR) from scantools import Scanner -from bgenlocations import TOOLBOXDIR LONG = "Components" SHORT = "cm" diff --git a/Mac/Modules/ctl/ctlscan.py b/Mac/Modules/ctl/ctlscan.py index 0e0a80aa158..aac2cc44468 100644 --- a/Mac/Modules/ctl/ctlscan.py +++ b/Mac/Modules/ctl/ctlscan.py @@ -1,11 +1,10 @@ # Scan , generating ctlgen.py. import sys import os -BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen') +from bgenlocations import TOOLBOXDIR, BGENDIR sys.path.append(BGENDIR) from scantools import Scanner -from bgenlocations import TOOLBOXDIR def main(): # input = "Controls.h" # Universal Headers < 3.3 diff --git a/Mac/Modules/dlg/dlgscan.py b/Mac/Modules/dlg/dlgscan.py index b1f9a147797..828fd540692 100644 --- a/Mac/Modules/dlg/dlgscan.py +++ b/Mac/Modules/dlg/dlgscan.py @@ -2,11 +2,10 @@ import sys import os -BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen') +from bgenlocations import TOOLBOXDIR, BGENDIR sys.path.append(BGENDIR) from scantools import Scanner -from bgenlocations import TOOLBOXDIR LONG = "Dialogs" SHORT = "dlg" diff --git a/Mac/Modules/drag/dragscan.py b/Mac/Modules/drag/dragscan.py index 1a8d269dde7..833fca1ec92 100644 --- a/Mac/Modules/drag/dragscan.py +++ b/Mac/Modules/drag/dragscan.py @@ -1,11 +1,10 @@ # Scan , generating draggen.py. import sys import os -BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen') +from bgenlocations import TOOLBOXDIR, BGENDIR sys.path.append(BGENDIR) from scantools import Scanner -from bgenlocations import TOOLBOXDIR, INCLUDEDIR MISSING_DEFINES=""" kDragHasLeftSenderWindow = (1 << 0) diff --git a/Mac/Modules/evt/evtscan.py b/Mac/Modules/evt/evtscan.py index 82b92608b62..dcb9ee040de 100644 --- a/Mac/Modules/evt/evtscan.py +++ b/Mac/Modules/evt/evtscan.py @@ -2,10 +2,9 @@ import sys import os -BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen') +from bgenlocations import TOOLBOXDIR, BGENDIR sys.path.append(BGENDIR) from scantools import Scanner -from bgenlocations import TOOLBOXDIR LONG = "Events" SHORT = "evt" diff --git a/Mac/Modules/fm/fmscan.py b/Mac/Modules/fm/fmscan.py index 7b2b142aee1..8deee504dd6 100644 --- a/Mac/Modules/fm/fmscan.py +++ b/Mac/Modules/fm/fmscan.py @@ -2,10 +2,9 @@ import sys import os -BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen') +from bgenlocations import TOOLBOXDIR, BGENDIR sys.path.append(BGENDIR) from scantools import Scanner -from bgenlocations import TOOLBOXDIR LONG = "Fonts" SHORT = "fm" diff --git a/Mac/Modules/help/helpscan.py b/Mac/Modules/help/helpscan.py index 6932793c532..fdfd78028eb 100644 --- a/Mac/Modules/help/helpscan.py +++ b/Mac/Modules/help/helpscan.py @@ -2,10 +2,9 @@ import sys import os -BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen') +from bgenlocations import TOOLBOXDIR, BGENDIR sys.path.append(BGENDIR) from scantools import Scanner -from bgenlocations import TOOLBOXDIR LONG = "Balloons" SHORT = "help" diff --git a/Mac/Modules/htmlrender/htmlscan.py b/Mac/Modules/htmlrender/htmlscan.py index db6285869d0..ff2de327e35 100644 --- a/Mac/Modules/htmlrender/htmlscan.py +++ b/Mac/Modules/htmlrender/htmlscan.py @@ -2,11 +2,10 @@ import sys import os -BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen') +from bgenlocations import TOOLBOXDIR, BGENDIR sys.path.append(BGENDIR) from scantools import Scanner -from bgenlocations import TOOLBOXDIR LONG = "HtmlRendering" SHORT = "html" diff --git a/Mac/Modules/ibcarbon/IBCarbonscan.py b/Mac/Modules/ibcarbon/IBCarbonscan.py index 9312629b318..c0dea7e9018 100644 --- a/Mac/Modules/ibcarbon/IBCarbonscan.py +++ b/Mac/Modules/ibcarbon/IBCarbonscan.py @@ -3,12 +3,9 @@ import sys import os import string -import MacOS -BGENDIR= '/Users/jack/src/python/Tools/bgen/bgen' +from bgenlocations import TOOLBOXDIR, BGENDIR sys.path.append(BGENDIR) -print sys.path, sys.prefix -from bgenlocations import TOOLBOXDIR from scantools import Scanner_OSX diff --git a/Mac/Modules/icn/icnscan.py b/Mac/Modules/icn/icnscan.py index 3b24a6df6fd..519d9e52e62 100644 --- a/Mac/Modules/icn/icnscan.py +++ b/Mac/Modules/icn/icnscan.py @@ -2,10 +2,9 @@ import sys import os -BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen') +from bgenlocations import TOOLBOXDIR, BGENDIR sys.path.append(BGENDIR) from scantools import Scanner -from bgenlocations import TOOLBOXDIR LONG = "Icons" SHORT = "icn" diff --git a/Mac/Modules/list/listscan.py b/Mac/Modules/list/listscan.py index 0817e76f6e4..d9638aa32ad 100644 --- a/Mac/Modules/list/listscan.py +++ b/Mac/Modules/list/listscan.py @@ -2,10 +2,9 @@ import sys import os -BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen') +from bgenlocations import TOOLBOXDIR, BGENDIR sys.path.append(BGENDIR) from scantools import Scanner -from bgenlocations import TOOLBOXDIR LONG = "Lists" SHORT = "list" diff --git a/Mac/Modules/menu/menuscan.py b/Mac/Modules/menu/menuscan.py index 11be8f21909..625e7ed71a6 100644 --- a/Mac/Modules/menu/menuscan.py +++ b/Mac/Modules/menu/menuscan.py @@ -1,11 +1,10 @@ # Scan , generating menugen.py. import sys import os -BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen') +from bgenlocations import TOOLBOXDIR, BGENDIR sys.path.append(BGENDIR) from scantools import Scanner -from bgenlocations import TOOLBOXDIR def main(): input = "Menus.h" diff --git a/Mac/Modules/mlte/mltescan.py b/Mac/Modules/mlte/mltescan.py index 80c966eb327..e55f2227030 100644 --- a/Mac/Modules/mlte/mltescan.py +++ b/Mac/Modules/mlte/mltescan.py @@ -2,10 +2,9 @@ import sys import os -BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen') +from bgenlocations import TOOLBOXDIR, BGENDIR sys.path.append(BGENDIR) from scantools import Scanner_OSX -from bgenlocations import TOOLBOXDIR LONG = "MacTextEditor" SHORT = "mlte" diff --git a/Mac/Modules/qd/qdscan.py b/Mac/Modules/qd/qdscan.py index 756291514ff..1258a303db1 100644 --- a/Mac/Modules/qd/qdscan.py +++ b/Mac/Modules/qd/qdscan.py @@ -2,11 +2,10 @@ import sys import os -BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen') +from bgenlocations import TOOLBOXDIR, BGENDIR sys.path.append(BGENDIR) from scantools import Scanner -from bgenlocations import TOOLBOXDIR def main(): input = "QuickDraw.h" diff --git a/Mac/Modules/qdoffs/qdoffsscan.py b/Mac/Modules/qdoffs/qdoffsscan.py index 4f188a6cf26..b2b55b22fc5 100644 --- a/Mac/Modules/qdoffs/qdoffsscan.py +++ b/Mac/Modules/qdoffs/qdoffsscan.py @@ -1,9 +1,8 @@ # Scan an Apple header file, generating a Python file of generator calls. import sys import os -BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen') +from bgenlocations import TOOLBOXDIR, BGENDIR sys.path.append(BGENDIR) -from bgenlocations import TOOLBOXDIR from scantools import Scanner diff --git a/Mac/Modules/qt/qtscan.py b/Mac/Modules/qt/qtscan.py index f0e3d1eca10..bcd16d91d9e 100644 --- a/Mac/Modules/qt/qtscan.py +++ b/Mac/Modules/qt/qtscan.py @@ -2,10 +2,9 @@ import sys import os -BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen') +from bgenlocations import TOOLBOXDIR, BGENDIR sys.path.append(BGENDIR) from scantools import Scanner -from bgenlocations import TOOLBOXDIR LONG = "QuickTime" SHORT = "qt" diff --git a/Mac/Modules/res/resscan.py b/Mac/Modules/res/resscan.py index 8c51528e40c..cf4bcb136f4 100644 --- a/Mac/Modules/res/resscan.py +++ b/Mac/Modules/res/resscan.py @@ -7,9 +7,8 @@ import os import string import MacOS -BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen') +from bgenlocations import TOOLBOXDIR, BGENDIR sys.path.append(BGENDIR) -from bgenlocations import TOOLBOXDIR from scantools import Scanner diff --git a/Mac/Modules/scrap/scrapscan.py b/Mac/Modules/scrap/scrapscan.py index 6227446c80d..dbb083b3643 100644 --- a/Mac/Modules/scrap/scrapscan.py +++ b/Mac/Modules/scrap/scrapscan.py @@ -5,13 +5,9 @@ import sys import os -if os.sep == ':': - BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen') -else: - BGENDIR="../../../Tools/bgen/bgen" +from bgenlocations import TOOLBOXDIR, BGENDIR sys.path.append(BGENDIR) from scantools import Scanner -from bgenlocations import TOOLBOXDIR LONG = "Scrap" SHORT = "scrap" diff --git a/Mac/Modules/snd/sndscan.py b/Mac/Modules/snd/sndscan.py index 560e2fd0eb8..fc665bb4bcd 100644 --- a/Mac/Modules/snd/sndscan.py +++ b/Mac/Modules/snd/sndscan.py @@ -4,9 +4,8 @@ import sys import os -BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen') +from bgenlocations import TOOLBOXDIR, BGENDIR sys.path.append(BGENDIR) -from bgenlocations import TOOLBOXDIR from scantools import Scanner diff --git a/Mac/Modules/te/tescan.py b/Mac/Modules/te/tescan.py index c9cff60449e..5ad1f18ea77 100644 --- a/Mac/Modules/te/tescan.py +++ b/Mac/Modules/te/tescan.py @@ -2,10 +2,9 @@ import sys import os -BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen') +from bgenlocations import TOOLBOXDIR, BGENDIR sys.path.append(BGENDIR) from scantools import Scanner -from bgenlocations import TOOLBOXDIR LONG = "TextEdit" SHORT = "te" diff --git a/Mac/Modules/win/winscan.py b/Mac/Modules/win/winscan.py index cfe3eb3c33a..0052fad60c0 100644 --- a/Mac/Modules/win/winscan.py +++ b/Mac/Modules/win/winscan.py @@ -1,9 +1,8 @@ # Scan an Apple header file, generating a Python file of generator calls. import sys import os -BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen') +from bgenlocations import TOOLBOXDIR, BGENDIR sys.path.append(BGENDIR) -from bgenlocations import TOOLBOXDIR from scantools import Scanner