author | Claus Gittinger <cg@exept.de> |
Tue, 16 Jan 2007 12:13:39 +0100 | |
changeset 781 | a40503a94982 |
parent 723 | e308a2b1775b |
child 921 | 99fd24d165f5 |
permissions | -rw-r--r-- |
331
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
1 |
"* |
609 | 2 |
* Encoding: iso8859-1 |
3 |
* |
|
331
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
4 |
* $Header$ |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
5 |
* |
399 | 6 |
* MIMEType: application/x-smalltalk-source |
7 |
* |
|
331
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
8 |
* ST/X startup configuration file - for win95, win98 and winNT OS. |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
9 |
* |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
10 |
* DONT add site specific things here - use your own h_xxx.rc file instead |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
11 |
* where xxx stands for your hostname(s) |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
12 |
*" |
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
13 |
|
357
dc01b7bc319e
add LibDir setting from registry to systemPath
Claus Gittinger <cg@exept.de>
parents:
331
diff
changeset
|
14 |
"/ look in registry for LibDir ... |
723 | 15 |
|k rel curr libDir| |
357
dc01b7bc319e
add LibDir setting from registry to systemPath
Claus Gittinger <cg@exept.de>
parents:
331
diff
changeset
|
16 |
|
dc01b7bc319e
add LibDir setting from registry to systemPath
Claus Gittinger <cg@exept.de>
parents:
331
diff
changeset
|
17 |
rel := Smalltalk versionString. |
672 | 18 |
k := Win32OperatingSystem registryEntry key:('HKEY_LOCAL_MACHINE\Software\eXept\Smalltalk/X\',rel). |
357
dc01b7bc319e
add LibDir setting from registry to systemPath
Claus Gittinger <cg@exept.de>
parents:
331
diff
changeset
|
19 |
k isNil ifTrue:[ |
672 | 20 |
k := Win32OperatingSystem registryEntry key:'HKEY_LOCAL_MACHINE\Software\eXept\Smalltalk/X'. |
357
dc01b7bc319e
add LibDir setting from registry to systemPath
Claus Gittinger <cg@exept.de>
parents:
331
diff
changeset
|
21 |
k notNil ifTrue:[ |
dc01b7bc319e
add LibDir setting from registry to systemPath
Claus Gittinger <cg@exept.de>
parents:
331
diff
changeset
|
22 |
curr := k valueNamed:'CurrentVersion'. |
dc01b7bc319e
add LibDir setting from registry to systemPath
Claus Gittinger <cg@exept.de>
parents:
331
diff
changeset
|
23 |
curr isString ifTrue:[ |
dc01b7bc319e
add LibDir setting from registry to systemPath
Claus Gittinger <cg@exept.de>
parents:
331
diff
changeset
|
24 |
k close. |
672 | 25 |
k := Win32OperatingSystem registryEntry key:('HKEY_LOCAL_MACHINE\Software\eXept\Smalltalk/X\',curr). |
357
dc01b7bc319e
add LibDir setting from registry to systemPath
Claus Gittinger <cg@exept.de>
parents:
331
diff
changeset
|
26 |
] |
dc01b7bc319e
add LibDir setting from registry to systemPath
Claus Gittinger <cg@exept.de>
parents:
331
diff
changeset
|
27 |
] |
dc01b7bc319e
add LibDir setting from registry to systemPath
Claus Gittinger <cg@exept.de>
parents:
331
diff
changeset
|
28 |
]. |
dc01b7bc319e
add LibDir setting from registry to systemPath
Claus Gittinger <cg@exept.de>
parents:
331
diff
changeset
|
29 |
k notNil ifTrue:[ |
dc01b7bc319e
add LibDir setting from registry to systemPath
Claus Gittinger <cg@exept.de>
parents:
331
diff
changeset
|
30 |
libDir := k valueNamed:'LibDir'. |
410 | 31 |
(libDir notNil and:[libDir asFilename exists]) ifTrue:[ |
670 | 32 |
(Smalltalk systemPath includes:(libDir asFilename pathName)) ifFalse:[ |
33 |
Smalltalk systemPath addFirst:(libDir asFilename pathName). |
|
34 |
Smalltalk flushPathCaches |
|
35 |
] |
|
357
dc01b7bc319e
add LibDir setting from registry to systemPath
Claus Gittinger <cg@exept.de>
parents:
331
diff
changeset
|
36 |
]. |
dc01b7bc319e
add LibDir setting from registry to systemPath
Claus Gittinger <cg@exept.de>
parents:
331
diff
changeset
|
37 |
k close. |
dc01b7bc319e
add LibDir setting from registry to systemPath
Claus Gittinger <cg@exept.de>
parents:
331
diff
changeset
|
38 |
]. |
dc01b7bc319e
add LibDir setting from registry to systemPath
Claus Gittinger <cg@exept.de>
parents:
331
diff
changeset
|
39 |
! |
dc01b7bc319e
add LibDir setting from registry to systemPath
Claus Gittinger <cg@exept.de>
parents:
331
diff
changeset
|
40 |
|
478 | 41 |
|incl libs| |
42 |
||
669 | 43 |
false "Smalltalk wasStartedFromImage" ifFalse:[ |
577
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
478
diff
changeset
|
44 |
"/ |
609 | 45 |
"/ right now, stx can only be used with a |
577
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
478
diff
changeset
|
46 |
"/ borland C-compiler. |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
478
diff
changeset
|
47 |
"/ |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
478
diff
changeset
|
48 |
|
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
478
diff
changeset
|
49 |
"/ msc |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
478
diff
changeset
|
50 |
"/ Compiler ccPath:'cl'. |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
478
diff
changeset
|
51 |
"/ Compiler ccCompilationOptions:'/O1'. |
331
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
52 |
|
577
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
478
diff
changeset
|
53 |
"/ borland |
707 | 54 |
ParserFlags ccPath:'bcc32'. |
331
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
55 |
|
577
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
478
diff
changeset
|
56 |
incl := #( |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
478
diff
changeset
|
57 |
'-I..\..\include' |
707 | 58 |
"/ '-I..\..\libopengl' |
577
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
478
diff
changeset
|
59 |
). |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
478
diff
changeset
|
60 |
|
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
478
diff
changeset
|
61 |
libs := #( |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
478
diff
changeset
|
62 |
'-L..\..\libbc' |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
478
diff
changeset
|
63 |
). |
331
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
64 |
|
669 | 65 |
#( |
66 |
'C:\Programme\exept\SmalltalkX' |
|
67 |
"/ 'D:\STX\PROJECTS\smalltalk' |
|
68 |
'C:\Programme\borland\bcc55' |
|
69 |
'C:\Programme\borland\cbuilder4' |
|
70 |
'C:\Programme\borland\cbuilder3' |
|
71 |
'C:\borland\bcc55' |
|
72 |
'C:\borland\cbuilder4' |
|
73 |
'C:\borland\cbuilder3' |
|
74 |
) do:[:eachPath | |pI pL| |
|
75 |
pI := eachPath asFilename construct:'include'. |
|
76 |
pI exists ifTrue:[ |
|
77 |
incl := incl copyWith: ( '-I',pI pathName ). |
|
78 |
]. |
|
79 |
pL := eachPath asFilename construct:'lib'. |
|
80 |
pL exists ifTrue:[ |
|
81 |
libs := libs copyWith: ( '-L',pL pathName ). |
|
707 | 82 |
pL := pL construct:'psdk'. |
83 |
pL exists ifTrue:[ |
|
84 |
libs := libs copyWith: ( '-L',pL pathName ). |
|
85 |
]. |
|
669 | 86 |
]. |
577
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
478
diff
changeset
|
87 |
]. |
478 | 88 |
|
577
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
478
diff
changeset
|
89 |
incl := incl asStringWith:Character space. |
d574370a1da5
only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents:
478
diff
changeset
|
90 |
libs := libs asStringWith:Character space. |
478 | 91 |
|
707 | 92 |
ParserFlags stcCompilationIncludes: incl. |
93 |
ParserFlags stcCompilationDefines: ''. |
|
94 |
ParserFlags stcCompilationOptions: '+optinline +inlineNew'. |
|
95 |
ParserFlags ccCompilationOptions: '-w-'. |
|
96 |
ParserFlags searchedLibraries:#('import32.lib' 'odbc32.lib'). |
|
578
dfa929970bef
bugfix: do not overwrite compiler settings after restart from image
ca
parents:
577
diff
changeset
|
97 |
|
707 | 98 |
ParserFlags linkArgs: (libs , ' -r -c -ap -Tpd -Gi -w-dup'). |
99 |
ParserFlags linkCommand: 'ilink32'. |
|
478 | 100 |
]. |
366 | 101 |
|
331
a0be330a1f43
moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
102 |
! |