author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Mon, 24 Sep 2018 20:52:34 +0100 | |
branch | jv |
changeset 1579 | e6c2667b4692 |
parent 1403 | 4f390a9d33f9 |
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 |
* |
|
1366 | 8 |
* DON'T 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 |
! |
1308 | 16 |
|sysType host domain s 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 |
|
331
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
20 |
"------------------------------------------------------------------------" |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
21 |
"/ printer setup |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
22 |
"/ 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
|
23 |
"/ |
239
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
24 |
"/ 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
|
25 |
"/ on another host. |
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
26 |
|
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
27 |
host := OperatingSystem getHostName. |
610af02f6b7e
only reset printer settings, if started on another host.
Claus Gittinger <cg@exept.de>
parents:
216
diff
changeset
|
28 |
(Smalltalk at:#'_ImageHostName') ~= host ifTrue:[ |
952
435154ba084b
default printer setup for win32
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
29 |
sysType = 'win32' ifTrue:[ |
1306 | 30 |
Printer := Smalltalk at:#WinPrinterStream. |
952
435154ba084b
default printer setup for win32
Claus Gittinger <cg@exept.de>
parents:
932
diff
changeset
|
31 |
] ifFalse:[ |
1306 | 32 |
Printer := Smalltalk at:#PostscriptPrinterStream. |
177
eec6bac738ba
stupid SYSV3: renamed rsh to remsh
Claus Gittinger <cg@exept.de>
parents:
169
diff
changeset
|
33 |
]. |
932
910313a689a6
printer setup: default for win32
Claus Gittinger <cg@exept.de>
parents:
678
diff
changeset
|
34 |
]. |
103
9f5c03497b38
example - checking for the domain
Claus Gittinger <cg@exept.de>
parents:
8
diff
changeset
|
35 |
|
331
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
36 |
|
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
37 |
"/ |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
38 |
"/ try systemType-specific setup |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
39 |
"/ h_<osType>.rc |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
40 |
"/ |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
41 |
(Smalltalk at:#'_ImageOSTypeName') ~= sysType ifTrue:[ |
333 | 42 |
('host.rc [info]: ') infoPrint. |
331
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
43 |
|
1295 | 44 |
"/ ('trying host setup h_' , sysType , '.rc...') infoPrintCR. |
331
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
45 |
s := Smalltalk systemFileStreamFor:('h_' , sysType , '.rc'). |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
46 |
s notNil ifTrue:[ |
1295 | 47 |
('reading host setup h_' , sysType , '.rc...') infoPrintCR. |
331
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
48 |
s fileIn. |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
49 |
s close. |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
50 |
]. |
1321 | 51 |
Smalltalk at:#'_ImageOSTypeName' put:sysType. |
331
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
52 |
]. |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
53 |
|
165 | 54 |
"/ |
55 |
"/ try host-specific setup |
|
331
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
270
diff
changeset
|
56 |
"/ h_<hostname>.rc |
165 | 57 |
"/ |
2 | 58 |
host isNil ifTrue:[ |
195 | 59 |
'host.rc [warning]: cannot determine host I am running on' errorPrintCR. |
2 | 60 |
] ifFalse:[ |
0 | 61 |
"if there is a corresponding file ..." |
103
9f5c03497b38
example - checking for the domain
Claus Gittinger <cg@exept.de>
parents:
8
diff
changeset
|
62 |
|
5 | 63 |
(Smalltalk at:#'_ImageHostName') ~= host ifTrue:[ |
1295 | 64 |
"/ ('host.rc [info]: trying host setup h_' , host , '.rc...') infoPrintCR. |
5 | 65 |
|
8 | 66 |
s := Smalltalk systemFileStreamFor:('h_' , host , '.rc'). |
67 |
s notNil ifTrue:[ |
|
1295 | 68 |
('host.rc [info]: reading host setup h_' , host , '.rc...') infoPrintCR. |
8 | 69 |
s fileIn. |
70 |
s close. |
|
71 |
]. |
|
72 |
Smalltalk at:#'_ImageHostName' put:host. |
|
0 | 73 |
] |
74 |
]. |
|
75 |
! |