author | Stefan Vogel <sv@exept.de> |
Wed, 04 Apr 2012 16:00:06 +0200 | |
changeset 1243 | 1fc6b3f01e48 |
parent 1126 | 9a9ad236db9c |
child 1286 | d55f7c641870 |
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 |
*" |
1243
1fc6b3f01e48
End chung after initial comment / encoding spec
Stefan Vogel <sv@exept.de>
parents:
1126
diff
changeset
|
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:[ |
952
435154ba084b
default printer setup for win32
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
40 |
sysType = 'win32' ifTrue:[ |
435154ba084b
default printer setup for win32
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
41 |
PrinterStream notNil ifTrue:[ |
435154ba084b
default printer setup for win32
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
42 |
Printer := WinPrinterStream. |
435154ba084b
default printer setup for win32
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
43 |
] |
435154ba084b
default printer setup for win32
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
44 |
] ifFalse:[ |
932
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
45 |
"/ |
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
46 |
"/ setup the printer stuff. |
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
47 |
"/ the commands below will be offered in the printer-setting box |
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
48 |
"/ |
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
49 |
PostscriptPrinterStream notNil ifTrue:[ |
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
50 |
isStupidSYSV3 ifTrue:[ |
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
51 |
PostscriptPrinterStream |
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
52 |
defaultCommands:#( |
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
53 |
'lpr' |
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
54 |
'cat | remsh {hostname} lpr -h' |
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
55 |
'cat > preview.ps' |
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
56 |
'cat > preview.ps; gv preview.ps' |
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
57 |
). |
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
58 |
] ifFalse:[ |
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
59 |
PostscriptPrinterStream |
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
60 |
defaultCommands:#( |
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
61 |
'lpr -h' |
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
62 |
'cat | rsh {hostname} lpr -h' |
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
63 |
'cat > preview.ps' |
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
64 |
'cat > preview.ps; gv preview.ps' |
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
65 |
). |
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
66 |
]. |
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
67 |
PostscriptPrinterStream printCommand:'lpr'. |
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
68 |
]. |
239
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
69 |
|
932
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
70 |
PrinterStream notNil ifTrue:[ |
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
71 |
isStupidSYSV3 ifTrue:[ |
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
72 |
PrinterStream |
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
73 |
defaultCommands:#( |
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
74 |
'lpr -h' |
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
75 |
'cat | remsh {hostname} lpr -h' |
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
76 |
'a2ps | remsh {hostname} lpr -h' |
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
77 |
'a2ps > preview.ps; gv preview.ps' |
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
78 |
). |
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
79 |
] ifFalse:[ |
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
80 |
PrinterStream |
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
81 |
defaultCommands:#( |
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
82 |
'lpr -h' |
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
83 |
'cat | rsh {hostname} lpr -h' |
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
84 |
'a2ps | rsh {hostname} lpr -h' |
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
85 |
'a2ps > preview.ps; gv preview.ps' |
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
86 |
). |
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
87 |
]. |
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
88 |
Printer := PrinterStream. |
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
89 |
PrinterStream printCommand:'lpr'. |
239
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
90 |
]. |
932
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
91 |
"/ Printer := PostscriptPrinterStream. |
177
eec6bac738ba
stupid SYSV3: renamed rsh to remsh
Claus Gittinger <cg@exept.de>
parents:
169
diff
changeset
|
92 |
]. |
165 | 93 |
|
932
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
94 |
false ifTrue:[ |
239
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
95 |
"/ 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
|
96 |
"/ on a host called 'ibm'. |
254
9de729ce1390
preset ccPath to 'cl' on msDos
Claus Gittinger <cg@exept.de>
parents:
239
diff
changeset
|
97 |
"/ 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
|
98 |
"/ 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
|
99 |
"/ corresponding setup into a private h_xxxx.rc file. |
165 | 100 |
|
239
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
101 |
domain := OperatingSystem getDomainName. |
394
70ecff920548
Fix DISPLAY access for headless servers.
Stefan Vogel <sv@exept.de>
parents:
376
diff
changeset
|
102 |
(domain = 'exept.de') ifTrue:[ |
376 | 103 |
PostscriptPrinterStream notNil ifTrue:[ |
104 |
isStupidSYSV3 ifTrue:[ |
|
394
70ecff920548
Fix DISPLAY access for headless servers.
Stefan Vogel <sv@exept.de>
parents:
376
diff
changeset
|
105 |
PostscriptPrinterStream printCommand:'cat | remsh exept lpr -h'. |
70ecff920548
Fix DISPLAY access for headless servers.
Stefan Vogel <sv@exept.de>
parents:
376
diff
changeset
|
106 |
PrinterStream printCommand:'cat | remsh exept lpr -h'. |
70ecff920548
Fix DISPLAY access for headless servers.
Stefan Vogel <sv@exept.de>
parents:
376
diff
changeset
|
107 |
PostscriptPrinterStream 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' |
239
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
109 |
'cat > preview.ps' |
498 | 110 |
'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
|
111 |
). |
394
70ecff920548
Fix DISPLAY access for headless servers.
Stefan Vogel <sv@exept.de>
parents:
376
diff
changeset
|
112 |
PrinterStream defaultCommands:#( |
331
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
113 |
'cat | remsh exept lpr -h' |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
114 |
'a2ps | remsh exept lpr -h' |
498 | 115 |
'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
|
116 |
). |
376 | 117 |
] ifFalse:[ |
394
70ecff920548
Fix DISPLAY access for headless servers.
Stefan Vogel <sv@exept.de>
parents:
376
diff
changeset
|
118 |
PostscriptPrinterStream printCommand:'cat | rsh exept lpr -h'. |
70ecff920548
Fix DISPLAY access for headless servers.
Stefan Vogel <sv@exept.de>
parents:
376
diff
changeset
|
119 |
PrinterStream printCommand:'cat | rsh exept lpr -h'. |
70ecff920548
Fix DISPLAY access for headless servers.
Stefan Vogel <sv@exept.de>
parents:
376
diff
changeset
|
120 |
PostscriptPrinterStream 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' |
239
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
122 |
'cat > preview.ps' |
498 | 123 |
'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
|
124 |
). |
394
70ecff920548
Fix DISPLAY access for headless servers.
Stefan Vogel <sv@exept.de>
parents:
376
diff
changeset
|
125 |
PrinterStream defaultCommands:#( |
331
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
126 |
'cat | rsh exept lpr -h' |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
127 |
'a2ps | rsh exept lpr -h' |
498 | 128 |
'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
|
129 |
). |
376 | 130 |
]. |
239
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
131 |
]. |
177
eec6bac738ba
stupid SYSV3: renamed rsh to remsh
Claus Gittinger <cg@exept.de>
parents:
169
diff
changeset
|
132 |
]. |
103
9f5c03497b38
example - checking for the domain
Claus Gittinger <cg@exept.de>
parents:
8
diff
changeset
|
133 |
]. |
932
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
134 |
]. |
103
9f5c03497b38
example - checking for the domain
Claus Gittinger <cg@exept.de>
parents:
8
diff
changeset
|
135 |
|
331
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
136 |
"------------------------------------------------------------------------" |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
137 |
"/ default compiler setup; |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
138 |
"/ 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
|
139 |
"/ |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
140 |
|
678 | 141 |
(Smalltalk wasStartedFromImage not |
142 |
and:[ Smalltalk isPlugin not ]) |
|
143 |
ifTrue:[ |
|
577
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
144 |
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
|
145 |
Compiler stcCompilationOptions:'+optinline +inlineNew'. |
331
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
146 |
|
577
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
147 |
"/ |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
148 |
"/ 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
|
149 |
"/ 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
|
150 |
"/ |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
151 |
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
|
152 |
(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
|
153 |
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
|
154 |
] ifFalse:[ |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
155 |
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
|
156 |
]. |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
157 |
Compiler ccCompilationOptions:'-O'. |
331
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
158 |
|
1126 | 159 |
(conf includesString:'amd64_mode32') ifTrue:[ |
160 |
(ObjectFileLoader linkArgs includesString:'-m32') ifFalse:[ |
|
161 |
ObjectFileLoader linkArgs:(ObjectFileLoader linkArgs , ' -m32 -m elf_i386'). |
|
162 |
]. |
|
163 |
(Compiler ccCompilationOptions includesString:'-m32') ifFalse:[ |
|
164 |
Compiler ccCompilationOptions:(Compiler ccCompilationOptions , ' -m32'). |
|
165 |
]. |
|
166 |
(Compiler stcCompilationDefines includesString:'-D__amd64_mode32__') ifFalse:[ |
|
167 |
Compiler stcCompilationDefines:(Compiler stcCompilationDefines , ' -D__amd64_mode32__'). |
|
168 |
]. |
|
169 |
]. |
|
170 |
||
577
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
171 |
includes := ''. |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
172 |
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
|
173 |
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
|
174 |
includes := includes , '-I' , incDir asFilename pathName , ' ' |
331
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
175 |
] ifFalse:[ |
677 | 176 |
('../../../stx/include' asFilename exists) ifTrue:[ |
177 |
"/ running in a development environment ... |
|
178 |
includes := includes , '-I../../../stx/include '. |
|
331
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
179 |
] ifFalse:[ |
677 | 180 |
"/ if this is a production program, dont care for a warning |
181 |
(Smalltalk isStandAloneApp or:[Smalltalk isHeadless]) |
|
182 |
ifFalse:[ |
|
183 |
'host.rc [warning]: no >>include<< directory found along your path.' infoPrintCR. |
|
184 |
'host.rc [warning]: this might affect stc-compilation from within the browser.' infoPrintCR. |
|
405 | 185 |
] |
677 | 186 |
] |
577
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
187 |
]. |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
188 |
|
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
189 |
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
|
190 |
|
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
191 |
"/ |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
192 |
"/ 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
|
193 |
"/ 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
|
194 |
"/ |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
195 |
(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
|
196 |
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
|
197 |
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
|
198 |
] ifFalse:[ |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
498
diff
changeset
|
199 |
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
|
200 |
Compiler stcCompilationDefines:'-DVGL'. |
331
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
201 |
] |
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 |
]. |
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 |
"/ |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
206 |
"/ try systemType-specific setup |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
207 |
"/ h_<osType>.rc |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
208 |
"/ |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
209 |
(Smalltalk at:#'_ImageOSTypeName') ~= sysType ifTrue:[ |
333 | 210 |
('host.rc [info]: ') infoPrint. |
211 |
(Smalltalk getSystemFileName:('h_' , sysType , '.rc')) isNil ifTrue:[ |
|
212 |
'trying' infoPrint. |
|
213 |
] ifFalse:[ |
|
214 |
'reading' infoPrint. |
|
215 |
]. |
|
656 | 216 |
(' host setup h_' , sysType , '.rc...') infoPrintCR. |
331
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
217 |
|
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
218 |
s := Smalltalk systemFileStreamFor:('h_' , sysType , '.rc'). |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
219 |
s notNil ifTrue:[ |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
220 |
s fileIn. |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
221 |
s close. |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
222 |
]. |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
223 |
Smalltalk at:#'_ImageOSTypeName' put:host. |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
224 |
]. |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
225 |
|
165 | 226 |
"/ |
227 |
"/ try host-specific setup |
|
331
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
228 |
"/ h_<hostname>.rc |
165 | 229 |
"/ |
2 | 230 |
host isNil ifTrue:[ |
195 | 231 |
'host.rc [warning]: cannot determine host I am running on' errorPrintCR. |
2 | 232 |
] ifFalse:[ |
0 | 233 |
"if there is a corresponding file ..." |
103
9f5c03497b38
example - checking for the domain
Claus Gittinger <cg@exept.de>
parents:
8
diff
changeset
|
234 |
|
5 | 235 |
(Smalltalk at:#'_ImageHostName') ~= host ifTrue:[ |
656 | 236 |
('host.rc [info]: trying host setup h_' , host , '.rc...') infoPrintCR. |
5 | 237 |
|
8 | 238 |
s := Smalltalk systemFileStreamFor:('h_' , host , '.rc'). |
239 |
s notNil ifTrue:[ |
|
240 |
s fileIn. |
|
241 |
s close. |
|
242 |
]. |
|
243 |
Smalltalk at:#'_ImageHostName' put:host. |
|
0 | 244 |
] |
245 |
]. |
|
246 |
! |