blob: 428c952fb93285e104764051b0882b4f46378ab9 [file] [log] [blame]
Jack Jansend2d2b201999-01-29 16:15:52 +00001/*
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
11type '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;
Jack Jansen4a5eb962000-09-22 21:50:11 +000018 byte unused_0 = 0, unused_1 = 1;
19 byte closeAlways = POPT_KEEPCONSOLE_NEVER,
20 noCloseOutput = POPT_KEEPCONSOLE_OUTPUT,
21 noCloseError = POPT_KEEPCONSOLE_ERROR,
22 closeNever = POPT_KEEPCONSOLE_ALWAYS;
Jack Jansend2d2b201999-01-29 16:15:52 +000023 byte interactiveOptions = 0, noInteractiveOptions = 1;
24 byte argcArgv = 0, noArgcArgv = 1;
25 byte newStandardExceptions = 0, oldStandardExceptions = 1;
26 byte sitePython = 0, noSitePython = 1;
Jack Jansen0c6d0372000-05-05 23:11:14 +000027 byte navService = 0, noNavService = 1;
Jack Jansen8a387142001-02-11 01:08:04 +000028 byte noDelayConsole = 0, delayConsole = 1;
Jack Jansend2d2b201999-01-29 16:15:52 +000029};
30
31type 'TMPL' {
32 wide array {
33 pstring;
34 literal longint;
35 };
36};
37
38/* The resources themselves */
39
40/* Popt template, for editing them in ResEdit */
41
42resource 'TMPL' (PYTHONOPTIONS_ID, "Popt") {
43 {
44 "preference version", 'DBYT',
45 "Interactive after script", 'DBYT',
46 "Verbose import", 'DBYT',
47 "Optimize", 'DBYT',
48 "Unbuffered stdio", 'DBYT',
49 "Debug parser", 'DBYT',
50 "Keep window on normal exit", 'DBYT',
51 "Keep window on error exit", 'DBYT',
52 "No interactive option dialog", 'DBYT',
53 "No argc/argv emulation", 'DBYT',
54 "Old standard exceptions", 'DBYT',
55 "No site-python support", 'DBYT',
Jack Jansen0c6d0372000-05-05 23:11:14 +000056 "No NavServices in macfs", 'DBYT',
Jack Jansen8a387142001-02-11 01:08:04 +000057 "Delay console window", 'DBYT',
Jack Jansend2d2b201999-01-29 16:15:52 +000058 }
59};
60
61/* The default-default Python options */
62
63resource 'Popt' (PYTHONOPTIONS_ID, "Options") {
64 POPT_VERSION_CURRENT,
65 noInspect,
66 noVerbose,
67 noOptimize,
68 noUnbuffered,
69 noDebugParser,
Jack Jansen4a5eb962000-09-22 21:50:11 +000070 unused_0,
71 noCloseOutput,
Jack Jansend2d2b201999-01-29 16:15:52 +000072 interactiveOptions,
73 argcArgv,
74 newStandardExceptions,
75 sitePython,
Jack Jansen0c6d0372000-05-05 23:11:14 +000076 navService,
Jack Jansen8a387142001-02-11 01:08:04 +000077 noDelayConsole,
Jack Jansend2d2b201999-01-29 16:15:52 +000078};
79
80/* The sys.path initializer */
81
82resource 'STR#' (PYTHONPATH_ID, "sys.path initialization") {
83 {
84 "$(PYTHON)",
Jack Jansend2d2b201999-01-29 16:15:52 +000085 "$(PYTHON):Mac:PlugIns",
86 "$(PYTHON):Mac:Lib",
87 "$(PYTHON):Mac:Lib:lib-toolbox",
Jack Jansen26d7c142000-09-11 22:47:12 +000088 "$(PYTHON):Mac:Lib:lib-scriptpackages",
89 "$(PYTHON):Lib",
Jack Jansen6d3d6e41999-02-06 17:56:59 +000090 "$(PYTHON):Extensions:img:Mac",
Just van Rossum53ea1341999-01-29 16:28:55 +000091 "$(PYTHON):Extensions:img:Lib",
Jack Jansen26d7c142000-09-11 22:47:12 +000092 "$(PYTHON):Extensions:Imaging:PIL",
93 "$(PYTHON):Lib:lib-tk",
94 "$(PYTHON):Lib:site-packages",
Jack Jansend2d2b201999-01-29 16:15:52 +000095 }
96};
97
98/* The preferences filename */
99
100resource 'STR ' (PREFFILENAME_ID, PREFFILENAME_PASCAL_NAME) {
101 $$Format("Python %s Preferences", PY_VERSION)
102};