author | Claus Gittinger <cg@exept.de> |
Wed, 21 Dec 2005 14:24:03 +0100 | |
changeset 677 | 222fd88429a3 |
parent 676 | 98a21f90890a |
child 678 | 728aff120ee7 |
permissions | -rw-r--r-- |
0 | 1 |
"* |
609 | 2 |
* Encoding: iso8859-1 |
3 |
* |
|
0 | 4 |
* $Header$ |
5 | 5 |
* |
209 | 6 |
* ST/X startup configuration file: |
7 |
* |
|
5 | 8 |
* DONT add site specific things here - use your own h_xxx.rc file instead |
8 | 9 |
* where xxx stands for your hostname(s) |
5 | 10 |
* |
0 | 11 |
* startup configuration for host specific stuff - |
331
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
12 |
* looks for a system specific h_sysType.rc init file and loads it. |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
13 |
* looks for a host specific h_hostName.rc init file and loads it. |
0 | 14 |
*" |
15 |
||
340 | 16 |
|sysType host domain s rshCommand isStupidSYSV3 conf includes incDir| |
177
eec6bac738ba
stupid SYSV3: renamed rsh to remsh
Claus Gittinger <cg@exept.de>
parents:
169
diff
changeset
|
17 |
|
eec6bac738ba
stupid SYSV3: renamed rsh to remsh
Claus Gittinger <cg@exept.de>
parents:
169
diff
changeset
|
18 |
sysType := OperatingSystem getSystemType. |
eec6bac738ba
stupid SYSV3: renamed rsh to remsh
Claus Gittinger <cg@exept.de>
parents:
169
diff
changeset
|
19 |
isStupidSYSV3 := false. |
0 | 20 |
|
177
eec6bac738ba
stupid SYSV3: renamed rsh to remsh
Claus Gittinger <cg@exept.de>
parents:
169
diff
changeset
|
21 |
sysType = 'realIX' ifTrue:[ |
eec6bac738ba
stupid SYSV3: renamed rsh to remsh
Claus Gittinger <cg@exept.de>
parents:
169
diff
changeset
|
22 |
"/ |
eec6bac738ba
stupid SYSV3: renamed rsh to remsh
Claus Gittinger <cg@exept.de>
parents:
169
diff
changeset
|
23 |
"/ those people must have been brain-damaged; |
eec6bac738ba
stupid SYSV3: renamed rsh to remsh
Claus Gittinger <cg@exept.de>
parents:
169
diff
changeset
|
24 |
"/ They made a whole lot of trouble by renaming |
eec6bac738ba
stupid SYSV3: renamed rsh to remsh
Claus Gittinger <cg@exept.de>
parents:
169
diff
changeset
|
25 |
"/ 'rsh' to 'remsh' (those systems are broken in other places as well ...). |
eec6bac738ba
stupid SYSV3: renamed rsh to remsh
Claus Gittinger <cg@exept.de>
parents:
169
diff
changeset
|
26 |
"/ (who needs a restricted shell named 'rsh' ?) |
eec6bac738ba
stupid SYSV3: renamed rsh to remsh
Claus Gittinger <cg@exept.de>
parents:
169
diff
changeset
|
27 |
"/ |
eec6bac738ba
stupid SYSV3: renamed rsh to remsh
Claus Gittinger <cg@exept.de>
parents:
169
diff
changeset
|
28 |
isStupidSYSV3 := true. |
eec6bac738ba
stupid SYSV3: renamed rsh to remsh
Claus Gittinger <cg@exept.de>
parents:
169
diff
changeset
|
29 |
]. |
eec6bac738ba
stupid SYSV3: renamed rsh to remsh
Claus Gittinger <cg@exept.de>
parents:
169
diff
changeset
|
30 |
|
331
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
31 |
"------------------------------------------------------------------------" |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
32 |
"/ printer setup |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
33 |
"/ Notice that this setup may be changed by an OS-specific h_xxx file |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
34 |
"/ |
239
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
35 |
"/ only reset the printer setting, if restarted |
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
36 |
"/ on another host. |
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
37 |
|
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
38 |
host := OperatingSystem getHostName. |
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
39 |
(Smalltalk at:#'_ImageHostName') ~= host ifTrue:[ |
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
40 |
|
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
41 |
"/ |
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
42 |
"/ setup the printer stuff. |
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
43 |
"/ the commands below will be offered in the printer-setting box |
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
44 |
"/ |
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
45 |
PostscriptPrinterStream notNil ifTrue:[ |
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
46 |
isStupidSYSV3 ifTrue:[ |
609 | 47 |
PostscriptPrinterStream |
239
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
48 |
defaultCommands:#( |
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
49 |
'lpr' |
270 | 50 |
'cat | remsh {hostname} lpr -h' |
239
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
51 |
'cat > preview.ps' |
498 | 52 |
'cat > preview.ps; gv preview.ps' |
239
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
53 |
). |
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
54 |
] ifFalse:[ |
609 | 55 |
PostscriptPrinterStream |
239
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
56 |
defaultCommands:#( |
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
57 |
'lpr -h' |
270 | 58 |
'cat | rsh {hostname} lpr -h' |
239
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
59 |
'cat > preview.ps' |
498 | 60 |
'cat > preview.ps; gv preview.ps' |
239
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
61 |
). |
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
62 |
]. |
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
63 |
PostscriptPrinterStream printCommand:'lpr'. |
177
eec6bac738ba
stupid SYSV3: renamed rsh to remsh
Claus Gittinger <cg@exept.de>
parents:
169
diff
changeset
|
64 |
]. |
165 | 65 |
|
239
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
66 |
PrinterStream notNil ifTrue:[ |
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
67 |
isStupidSYSV3 ifTrue:[ |
609 | 68 |
PrinterStream |
239
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
69 |
defaultCommands:#( |
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
70 |
'lpr -h' |
270 | 71 |
'cat | remsh {hostname} lpr -h' |
72 |
'a2ps | remsh {hostname} lpr -h' |
|
498 | 73 |
'a2ps > preview.ps; gv preview.ps' |
239
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
74 |
). |
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
75 |
] ifFalse:[ |
609 | 76 |
PrinterStream |
239
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
77 |
defaultCommands:#( |
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
78 |
'lpr -h' |
270 | 79 |
'cat | rsh {hostname} lpr -h' |
80 |
'a2ps | rsh {hostname} lpr -h' |
|
498 | 81 |
'a2ps > preview.ps; gv preview.ps' |
239
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
82 |
). |
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
83 |
]. |
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
84 |
Printer := PrinterStream. |
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
85 |
PrinterStream printCommand:'lpr'. |
177
eec6bac738ba
stupid SYSV3: renamed rsh to remsh
Claus Gittinger <cg@exept.de>
parents:
169
diff
changeset
|
86 |
]. |
165 | 87 |
|
239
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
88 |
"/ Printer := PostscriptPrinterStream. |
165 | 89 |
|
239
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
90 |
"/ in our home-domain, preset the print command for remote printing |
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
91 |
"/ on a host called 'ibm'. |
254
9de729ce1390
preset ccPath to 'cl' on msDos
Claus Gittinger <cg@exept.de>
parents:
239
diff
changeset
|
92 |
"/ You can change this for YOUR environment and/or make it unconditional. |
239
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
93 |
"/ Consider the stuff below as an example; you should add |
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
94 |
"/ corresponding setup into a private h_xxxx.rc file. |
165 | 95 |
|
239
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
96 |
domain := OperatingSystem getDomainName. |
394
70ecff920548
Fix DISPLAY access for headless servers.
Stefan Vogel <sv@exept.de>
parents:
376
diff
changeset
|
97 |
(domain = 'exept.de') ifTrue:[ |
376 | 98 |
PostscriptPrinterStream notNil ifTrue:[ |
99 |
isStupidSYSV3 ifTrue:[ |
|
394
70ecff920548
Fix DISPLAY access for headless servers.
Stefan Vogel <sv@exept.de>
parents:
376
diff
changeset
|
100 |
PostscriptPrinterStream printCommand:'cat | remsh exept lpr -h'. |
70ecff920548
Fix DISPLAY access for headless servers.
Stefan Vogel <sv@exept.de>
parents:
376
diff
changeset
|
101 |
PrinterStream printCommand:'cat | remsh exept lpr -h'. |
70ecff920548
Fix DISPLAY access for headless servers.
Stefan Vogel <sv@exept.de>
parents:
376
diff
changeset
|
102 |
PostscriptPrinterStream defaultCommands:#( |
331
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
103 |
'cat | remsh exept lpr -h' |
239
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
104 |
'cat > preview.ps' |
498 | 105 |
'cat > preview.ps; gv preview.ps' |
239
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
106 |
). |
394
70ecff920548
Fix DISPLAY access for headless servers.
Stefan Vogel <sv@exept.de>
parents:
376
diff
changeset
|
107 |
PrinterStream defaultCommands:#( |
331
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
108 |
'cat | remsh exept lpr -h' |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
109 |
'a2ps | remsh exept lpr -h' |
498 | 110 |
'a2ps > preview.ps; gv preview.ps' |
239
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
111 |
). |
376 | 112 |
] ifFalse:[ |
394
70ecff920548
Fix DISPLAY access for headless servers.
Stefan Vogel <sv@exept.de>
parents:
376
diff
changeset
|
113 |
PostscriptPrinterStream printCommand:'cat | rsh exept lpr -h'. |
70ecff920548
Fix DISPLAY access for headless servers.
Stefan Vogel <sv@exept.de>
parents:
376
diff
changeset
|
114 |
PrinterStream printCommand:'cat | rsh exept lpr -h'. |
70ecff920548
Fix DISPLAY access for headless servers.
Stefan Vogel <sv@exept.de>
parents:
376
diff
changeset
|
115 |
PostscriptPrinterStream defaultCommands:#( |
331
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
116 |
'cat | rsh exept lpr -h' |
239
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
117 |
'cat > preview.ps' |
498 | 118 |
'cat > preview.ps; gv preview.ps' |
239
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
119 |
). |
394
70ecff920548
Fix DISPLAY access for headless servers.
Stefan Vogel <sv@exept.de>
parents:
376
diff
changeset
|
120 |
PrinterStream defaultCommands:#( |
331
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
121 |
'cat | rsh exept lpr -h' |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
122 |
'a2ps | rsh exept lpr -h' |
498 | 123 |
'a2ps > preview.ps; gv preview.ps' |
239
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
124 |
). |
376 | 125 |
]. |
239
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
126 |
]. |
177
eec6bac738ba
stupid SYSV3: renamed rsh to remsh
Claus Gittinger <cg@exept.de>
parents:
169
diff
changeset
|
127 |
]. |
103
9f5c03497b38
example - checking for the domain
Claus Gittinger <cg@exept.de>
parents:
8
diff
changeset
|
128 |
]. |
9f5c03497b38
example - checking for the domain
Claus Gittinger <cg@exept.de>
parents:
8
diff
changeset
|
129 |
|
331
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
130 |
"------------------------------------------------------------------------" |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
131 |
"/ default compiler setup; |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
132 |
"/ can be rechanged in a h_xxx file. |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
133 |
"/ |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
134 |
|
577
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
135 |
Smalltalk wasStartedFromImage ifFalse:[ |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
136 |
Compiler stcCompilation:#default. |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
137 |
Compiler stcCompilationOptions:'+optinline +inlineNew'. |
331
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
138 |
|
577
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
139 |
"/ |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
140 |
"/ setup for gcc (which is OK for most systems); |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
141 |
"/ Notice that this setup may be changed by an OS-specific h_xxx file |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
142 |
"/ |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
143 |
conf := Smalltalk configuration. |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
144 |
(conf includesString:'gcc') ifTrue:[ |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
145 |
Compiler ccPath:'gcc' |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
146 |
] ifFalse:[ |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
147 |
Compiler ccPath:'cc' |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
148 |
]. |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
149 |
Compiler ccCompilationOptions:'-O'. |
331
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
150 |
|
577
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
151 |
includes := ''. |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
152 |
incDir := Smalltalk getSystemFileName:'include'. |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
153 |
incDir notNil ifTrue:[ |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
154 |
includes := includes , '-I' , incDir asFilename pathName , ' ' |
331
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
155 |
] ifFalse:[ |
677 | 156 |
('../../../stx/include' asFilename exists) ifTrue:[ |
157 |
"/ running in a development environment ... |
|
158 |
includes := includes , '-I../../../stx/include '. |
|
331
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
159 |
] ifFalse:[ |
677 | 160 |
"/ if this is a production program, dont care for a warning |
161 |
(Smalltalk isStandAloneApp or:[Smalltalk isHeadless]) |
|
162 |
ifFalse:[ |
|
163 |
'host.rc [warning]: no >>include<< directory found along your path.' infoPrintCR. |
|
164 |
'host.rc [warning]: this might affect stc-compilation from within the browser.' infoPrintCR. |
|
405 | 165 |
] |
677 | 166 |
] |
577
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
167 |
]. |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
168 |
|
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
169 |
Compiler stcCompilationIncludes:includes. |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
170 |
|
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
171 |
"/ |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
172 |
"/ for myself: preset flags, so that we can accept GLXWorkstation code |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
173 |
"/ You probably will never do this. |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
174 |
"/ |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
175 |
(Display notNil and:[Display supportsGLDrawing]) ifTrue:[ |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
176 |
sysType = 'irix' ifTrue:[ |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
177 |
Compiler stcCompilationDefines:'-DGLX'. |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
178 |
] ifFalse:[ |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
179 |
Compiler stcCompilationIncludes:'-I../../include -I../../support/VGL/vogl/src'. |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
180 |
Compiler stcCompilationDefines:'-DVGL'. |
331
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
181 |
] |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
182 |
]. |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
183 |
]. |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
184 |
|
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
185 |
"/ |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
186 |
"/ try systemType-specific setup |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
187 |
"/ h_<osType>.rc |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
188 |
"/ |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
189 |
(Smalltalk at:#'_ImageOSTypeName') ~= sysType ifTrue:[ |
333 | 190 |
('host.rc [info]: ') infoPrint. |
191 |
(Smalltalk getSystemFileName:('h_' , sysType , '.rc')) isNil ifTrue:[ |
|
192 |
'trying' infoPrint. |
|
193 |
] ifFalse:[ |
|
194 |
'reading' infoPrint. |
|
195 |
]. |
|
656 | 196 |
(' host setup h_' , sysType , '.rc...') infoPrintCR. |
331
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
197 |
|
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
198 |
s := Smalltalk systemFileStreamFor:('h_' , sysType , '.rc'). |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
199 |
s notNil ifTrue:[ |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
200 |
s fileIn. |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
201 |
s close. |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
202 |
]. |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
203 |
Smalltalk at:#'_ImageOSTypeName' put:host. |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
204 |
]. |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
205 |
|
165 | 206 |
"/ |
207 |
"/ try host-specific setup |
|
331
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
208 |
"/ h_<hostname>.rc |
165 | 209 |
"/ |
2 | 210 |
host isNil ifTrue:[ |
195 | 211 |
'host.rc [warning]: cannot determine host I am running on' errorPrintCR. |
2 | 212 |
] ifFalse:[ |
0 | 213 |
"if there is a corresponding file ..." |
103
9f5c03497b38
example - checking for the domain
Claus Gittinger <cg@exept.de>
parents:
8
diff
changeset
|
214 |
|
5 | 215 |
(Smalltalk at:#'_ImageHostName') ~= host ifTrue:[ |
656 | 216 |
('host.rc [info]: trying host setup h_' , host , '.rc...') infoPrintCR. |
5 | 217 |
|
8 | 218 |
s := Smalltalk systemFileStreamFor:('h_' , host , '.rc'). |
219 |
s notNil ifTrue:[ |
|
220 |
s fileIn. |
|
221 |
s close. |
|
222 |
]. |
|
223 |
Smalltalk at:#'_ImageHostName' put:host. |
|
0 | 224 |
] |
225 |
]. |
|
226 |
! |