Jack Jansen | d2d2b20 | 1999-01-29 16:15:52 +0000 | [diff] [blame] | 1 | /* |
| 2 | ** Resources for the sys.path initialization, the Python options |
| 3 | ** and the preference filename |
| 4 | */ |
| 5 | #include "Types.r" |
| 6 | #include "patchlevel.h" |
| 7 | #include "pythonresources.h" |
| 8 | |
| 9 | /* A few resource type declarations */ |
| 10 | |
| 11 | type 'Popt' { |
| 12 | literal byte version = POPT_VERSION_CURRENT; |
| 13 | byte noInspect = 0, inspect = 1; |
| 14 | byte noVerbose = 0, verbose = 1; |
| 15 | byte noOptimize = 0, optimize = 1; |
| 16 | byte noUnbuffered = 0, unbuffered = 1; |
| 17 | byte noDebugParser = 0, debugParser = 1; |
| 18 | byte closeOnNormalExit = 0, noCloseOnNormalExit = 1; |
| 19 | byte closeOnErrorExit = 0, noCloseOnErrorExit = 1; |
| 20 | byte interactiveOptions = 0, noInteractiveOptions = 1; |
| 21 | byte argcArgv = 0, noArgcArgv = 1; |
| 22 | byte newStandardExceptions = 0, oldStandardExceptions = 1; |
| 23 | byte sitePython = 0, noSitePython = 1; |
| 24 | }; |
| 25 | |
| 26 | type 'TMPL' { |
| 27 | wide array { |
| 28 | pstring; |
| 29 | literal longint; |
| 30 | }; |
| 31 | }; |
| 32 | |
| 33 | /* The resources themselves */ |
| 34 | |
| 35 | /* Popt template, for editing them in ResEdit */ |
| 36 | |
| 37 | resource 'TMPL' (PYTHONOPTIONS_ID, "Popt") { |
| 38 | { |
| 39 | "preference version", 'DBYT', |
| 40 | "Interactive after script", 'DBYT', |
| 41 | "Verbose import", 'DBYT', |
| 42 | "Optimize", 'DBYT', |
| 43 | "Unbuffered stdio", 'DBYT', |
| 44 | "Debug parser", 'DBYT', |
| 45 | "Keep window on normal exit", 'DBYT', |
| 46 | "Keep window on error exit", 'DBYT', |
| 47 | "No interactive option dialog", 'DBYT', |
| 48 | "No argc/argv emulation", 'DBYT', |
| 49 | "Old standard exceptions", 'DBYT', |
| 50 | "No site-python support", 'DBYT', |
| 51 | } |
| 52 | }; |
| 53 | |
| 54 | /* The default-default Python options */ |
| 55 | |
| 56 | resource 'Popt' (PYTHONOPTIONS_ID, "Options") { |
| 57 | POPT_VERSION_CURRENT, |
| 58 | noInspect, |
| 59 | noVerbose, |
| 60 | noOptimize, |
| 61 | noUnbuffered, |
| 62 | noDebugParser, |
| 63 | closeOnNormalExit, |
| 64 | noCloseOnErrorExit, |
| 65 | interactiveOptions, |
| 66 | argcArgv, |
| 67 | newStandardExceptions, |
| 68 | sitePython, |
| 69 | }; |
| 70 | |
| 71 | /* The sys.path initializer */ |
| 72 | |
| 73 | resource 'STR#' (PYTHONPATH_ID, "sys.path initialization") { |
| 74 | { |
| 75 | "$(PYTHON)", |
| 76 | "$(PYTHON):Lib", |
| 77 | "$(PYTHON):Mac:PlugIns", |
| 78 | "$(PYTHON):Mac:Lib", |
| 79 | "$(PYTHON):Mac:Lib:lib-toolbox", |
| 80 | "$(PYTHON):Mac:Lib:lib-scripting", |
| 81 | "$(PYTHON):Extensions:img:Lib" |
Just van Rossum | 9f08666 | 1999-01-29 16:21:04 +0000 | [diff] [blame^] | 82 | "$(PYTHON):Extensions:Numerical:Lib" |
Jack Jansen | d2d2b20 | 1999-01-29 16:15:52 +0000 | [diff] [blame] | 83 | } |
| 84 | }; |
| 85 | |
| 86 | /* The preferences filename */ |
| 87 | |
| 88 | resource 'STR ' (PREFFILENAME_ID, PREFFILENAME_PASCAL_NAME) { |
| 89 | $$Format("Python %s Preferences", PY_VERSION) |
| 90 | }; |