h_win32.rc
author convert-repo
Sun, 10 Feb 2019 04:31:24 +0000
changeset 1590 a1e0688b2f39
parent 1430 b02e9366f9fc
child 1440 b822d6dc20e7
child 1595 4049d133aef2
permissions -rw-r--r--
update tags
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
331
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     1
"*
609
f0f51d4a0066 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 578
diff changeset
     2
 * Encoding: iso8859-1
f0f51d4a0066 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 578
diff changeset
     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
5a842f5d7196 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 366
diff changeset
     6
 * MIMEType: application/x-smalltalk-source
5a842f5d7196 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 366
diff changeset
     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
 *"
1243
1fc6b3f01e48 End chung after initial comment / encoding spec
Stefan Vogel <sv@exept.de>
parents: 921
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
e308a2b1775b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 707
diff changeset
    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
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
    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
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
    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
43a67655f4f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 670
diff changeset
    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
abb01ec3a9b6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 399
diff changeset
    31
    (libDir notNil and:[libDir asFilename exists]) ifTrue:[
670
7f89ef33a8cf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 669
diff changeset
    32
	(Smalltalk systemPath includes:(libDir asFilename pathName)) ifFalse:[
7f89ef33a8cf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 669
diff changeset
    33
	    Smalltalk systemPath addFirst:(libDir asFilename pathName).
7f89ef33a8cf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 669
diff changeset
    34
	    Smalltalk flushPathCaches
7f89ef33a8cf *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 669
diff changeset
    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
1294
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
    41
|incl libs tryPathesForBin path usedCompiler
1301
ac987c5eaab3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1300
diff changeset
    42
 bccPath msvcPath mingw64Path mingw32Path
1294
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
    43
 searchedLibraries
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
    44
 linkCommand linkArgs ccCommand ccCompilationOptions
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
    45
 |
478
28165b2e5451 *** empty log message ***
bg
parents: 410
diff changeset
    46
669
95d1e3c57d95 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 635
diff changeset
    47
false "Smalltalk wasStartedFromImage" ifFalse:[
331
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
577
d574370a1da5 only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
    49
    incl := #(
1294
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
    50
		'-I..\..\include'
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
    51
		"/ '-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
    52
	    ).
d574370a1da5 only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
    53
1294
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
    54
    tryPathesForBin := [:pathes |
1304
c66b66cb465d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1303
diff changeset
    55
	|foundPath|
c66b66cb465d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1303
diff changeset
    56
	pathes do:[:eachPath |
c66b66cb465d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1303
diff changeset
    57
	    |thisPath|
c66b66cb465d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1303
diff changeset
    58
1305
874217996e56 fixed compiler setup
Claus Gittinger <cg@exept.de>
parents: 1304
diff changeset
    59
	    (thisPath := eachPath asFilename) exists ifTrue:[
1304
c66b66cb465d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1303
diff changeset
    60
		foundPath := thisPath
1294
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
    61
	    ].
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
    62
	].
1304
c66b66cb465d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1303
diff changeset
    63
	foundPath
1294
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
    64
    ].
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
    65
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
    66
    "/
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
    67
    "/ right now, stx can be used with one of:
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
    68
    "/     - borland C-compiler (bcc32).
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
    69
    "/     - visual studio C (actually: SDK) (msc)
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
    70
    "/     - mingw64 gcc
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
    71
1418
1c1e5f644a19 compiler setup for mingw
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
    72
    "/ uncomment one of the following to enforce a compiler
1c1e5f644a19 compiler setup for mingw
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
    73
    "/ bccPath := 'C:\borland\bcc55\bin'.
1c1e5f644a19 compiler setup for mingw
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
    74
    "/ msvcPath := 'C:\Programme\Microsoft Visual Studio 10.0\VC\bin'.
1c1e5f644a19 compiler setup for mingw
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
    75
    "/ mingw64Path := 'C:\mingw64\bin'.
1c1e5f644a19 compiler setup for mingw
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
    76
    "/ mingw32Path := 'C:\mingw\bin'.
331
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
1294
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
    78
    "/ or take a look what we find installed:
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
    79
    path := (OperatingSystem getEnvironment:'PATH') asCollectionOfSubstringsSeparatedBy:$;.
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
    80
    ExternalBytes sizeofPointer == 8 ifTrue:[
1418
1c1e5f644a19 compiler setup for mingw
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
    81
	mingw64Path := path detect:[:d | d asLowercase includesString:'mingw'] ifNone:nil.
1301
ac987c5eaab3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1300
diff changeset
    82
	mingw64Path isNil ifTrue:[
ac987c5eaab3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1300
diff changeset
    83
	    mingw64Path := tryPathesForBin value:
1294
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
    84
			    #(
1305
874217996e56 fixed compiler setup
Claus Gittinger <cg@exept.de>
parents: 1304
diff changeset
    85
				'C:\Programme\mingw64\bin'
1430
b02e9366f9fc compiler setup
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
    86
				'C:\Programme\mingw-w64\mingw64\bin'
b02e9366f9fc compiler setup
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
    87
				'C:\Programme\mingw-w64\mingw\bin'
1305
874217996e56 fixed compiler setup
Claus Gittinger <cg@exept.de>
parents: 1304
diff changeset
    88
				'C:\Programs\mingw64\bin'
1430
b02e9366f9fc compiler setup
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
    89
				'C:\Programs\mingw-w64\mingw64\bin'
b02e9366f9fc compiler setup
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
    90
				'C:\Programs\mingw-w64\mingw\bin'
1305
874217996e56 fixed compiler setup
Claus Gittinger <cg@exept.de>
parents: 1304
diff changeset
    91
				'C:\Program Files\mingw64\bin'
1430
b02e9366f9fc compiler setup
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
    92
				'C:\Program Files\mingw-w64\mingw64\bin'
b02e9366f9fc compiler setup
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
    93
				'C:\Program Files\mingw-w64\mingw\bin'
1305
874217996e56 fixed compiler setup
Claus Gittinger <cg@exept.de>
parents: 1304
diff changeset
    94
				'C:\mingw64\bin'
1430
b02e9366f9fc compiler setup
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
    95
				'C:\mingw-w64\mingw64\bin'
1294
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
    96
			    ).
669
95d1e3c57d95 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 635
diff changeset
    97
	].
1294
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
    98
    ] ifFalse:[
1418
1c1e5f644a19 compiler setup for mingw
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
    99
	mingw32Path := path detect:[:d | d asLowercase includesString:'mingw'] ifNone:nil.
1c1e5f644a19 compiler setup for mingw
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
   100
	mingw32Path isNil ifTrue:[
1c1e5f644a19 compiler setup for mingw
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
   101
	    mingw32Path := tryPathesForBin value:
1c1e5f644a19 compiler setup for mingw
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
   102
			    #(
1c1e5f644a19 compiler setup for mingw
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
   103
				'C:\Programme\mingw\bin'
1430
b02e9366f9fc compiler setup
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
   104
				'C:\Programme\mingw-w32\mingw32\bin'
b02e9366f9fc compiler setup
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
   105
				'C:\Programme\mingw-w32\mingw\bin'
1418
1c1e5f644a19 compiler setup for mingw
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
   106
				'C:\Programs\mingw\bin'
1430
b02e9366f9fc compiler setup
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
   107
				'C:\Programs\mingw-w32\mingw32\bin'
b02e9366f9fc compiler setup
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
   108
				'C:\Programs\mingw-w32\mingw\bin'
1418
1c1e5f644a19 compiler setup for mingw
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
   109
				'C:\Program Files\mingw\bin'
1430
b02e9366f9fc compiler setup
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
   110
				'C:\Program Files\mingw-w32\mingw32\bin'
b02e9366f9fc compiler setup
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
   111
				'C:\Program Files\mingw-w32\mingw\bin'
1418
1c1e5f644a19 compiler setup for mingw
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
   112
				'C:\mingw\bin'
1430
b02e9366f9fc compiler setup
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
   113
				'C:\mingw-w32\mingw32\bin'
b02e9366f9fc compiler setup
Claus Gittinger <cg@exept.de>
parents: 1418
diff changeset
   114
				'C:\mingw-w32\mingw\bin'
1418
1c1e5f644a19 compiler setup for mingw
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
   115
			    ).
1c1e5f644a19 compiler setup for mingw
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
   116
	].
1c1e5f644a19 compiler setup for mingw
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
   117
1294
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   118
	bccPath := path detect:[:d | d asLowercase includesString:'borland'] ifNone:nil.
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   119
	bccPath isNil ifTrue:[
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   120
	    bccPath := tryPathesForBin value:
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   121
			    #(
1305
874217996e56 fixed compiler setup
Claus Gittinger <cg@exept.de>
parents: 1304
diff changeset
   122
				'C:\Programme\borland\bcc55\bin'
874217996e56 fixed compiler setup
Claus Gittinger <cg@exept.de>
parents: 1304
diff changeset
   123
				'C:\Programs\borland\bcc55\bin'
874217996e56 fixed compiler setup
Claus Gittinger <cg@exept.de>
parents: 1304
diff changeset
   124
				'C:\Program Files\borland\bcc55\bin'
874217996e56 fixed compiler setup
Claus Gittinger <cg@exept.de>
parents: 1304
diff changeset
   125
				'C:\borland\bcc55\bin'
1294
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   126
			    ).
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   127
	].
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   128
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   129
	msvcPath isNil ifTrue:[
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   130
	    msvcPath := tryPathesForBin value:
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   131
			    #(
1305
874217996e56 fixed compiler setup
Claus Gittinger <cg@exept.de>
parents: 1304
diff changeset
   132
				'C:\Programme\Microsoft Visual Studio 11.0\VC\bin'
874217996e56 fixed compiler setup
Claus Gittinger <cg@exept.de>
parents: 1304
diff changeset
   133
				'C:\Programme\Microsoft Visual Studio 10.0\VC\bin'
874217996e56 fixed compiler setup
Claus Gittinger <cg@exept.de>
parents: 1304
diff changeset
   134
				'C:\Programme\Microsoft Visual Studio 9.0\VC\bin'
874217996e56 fixed compiler setup
Claus Gittinger <cg@exept.de>
parents: 1304
diff changeset
   135
				'C:\Programme\Microsoft Visual Studio 8.0\VC\bin'
874217996e56 fixed compiler setup
Claus Gittinger <cg@exept.de>
parents: 1304
diff changeset
   136
				'C:\Program Files\Microsoft Visual Studio 11.0\VC\bin'
874217996e56 fixed compiler setup
Claus Gittinger <cg@exept.de>
parents: 1304
diff changeset
   137
				'C:\Program Files\Microsoft Visual Studio 10.0\VC\bin'
874217996e56 fixed compiler setup
Claus Gittinger <cg@exept.de>
parents: 1304
diff changeset
   138
				'C:\Program Files\Microsoft Visual Studio 9.0\VC\bin'
874217996e56 fixed compiler setup
Claus Gittinger <cg@exept.de>
parents: 1304
diff changeset
   139
				'C:\Program Files\Microsoft Visual Studio 8.0\VC\bin'
1294
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   140
			    ).
669
95d1e3c57d95 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 635
diff changeset
   141
	].
577
d574370a1da5 only change compiler settings in host.rc, if not started from an image.
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   142
    ].
478
28165b2e5451 *** empty log message ***
bg
parents: 410
diff changeset
   143
1294
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   144
    bccPath notNil ifTrue:[
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   145
	"/ borland
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   146
	ExternalBytes sizeofPointer == 8 ifTrue:[
1303
b24bddd15722 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1302
diff changeset
   147
	    'host.rc [info]: ignore bcc32 compiler (cannot be used with 64 bit architecture)' infoPrintCR.
1294
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   148
	] ifFalse:[
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   149
	    'host.rc [info]: setup for borland bcc32 compiler' infoPrintCR.
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   150
	    bccPath := bccPath asFilename.
1309
12c42943654b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1305
diff changeset
   151
	    "/ 'host.rc [info]: bccPath=' infoPrint. bccPath infoPrintCR.
1305
874217996e56 fixed compiler setup
Claus Gittinger <cg@exept.de>
parents: 1304
diff changeset
   152
	    ccCommand := (bccPath / 'bcc32') pathName.
874217996e56 fixed compiler setup
Claus Gittinger <cg@exept.de>
parents: 1304
diff changeset
   153
	    linkCommand := (bccPath / 'ilink32') pathName.
1300
a153aa1ed4a5 compiler setup
Claus Gittinger <cg@exept.de>
parents: 1294
diff changeset
   154
	    bccPath := bccPath directory.
1310
334663bda239 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1309
diff changeset
   155
	    'host.rc [info]: bccPath=' infoPrint. bccPath pathName infoPrintCR.
1294
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   156
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   157
	    libs := #(
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   158
		    '-L..\..\lib\bc'
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   159
		    ).
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   160
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   161
	    incl := incl copyWith: ( '-I',(bccPath / 'include') pathName ).
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   162
	    libs := libs copyWith: ( '-L',(bccPath  / 'lib') pathName ).
1305
874217996e56 fixed compiler setup
Claus Gittinger <cg@exept.de>
parents: 1304
diff changeset
   163
	    (bccPath / 'lib' / 'psdk') exists ifTrue:[
874217996e56 fixed compiler setup
Claus Gittinger <cg@exept.de>
parents: 1304
diff changeset
   164
		libs := libs copyWith: ( '-L',(bccPath / 'lib' / 'psdk') pathName ).
1294
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   165
	    ].
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   166
	    ccCompilationOptions := '-w-'.
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   167
	    searchedLibraries := #('import32.lib' 'odbc32.lib' 'glu32.lib' 'opengl32.lib').
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   168
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   169
	    libs := libs asStringWith:Character space.
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   170
	    linkArgs := (libs , ' -r -c -ap -Tpd -Gi -w-dup').
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   171
	    incl := incl asStringWith:Character space.
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   172
	    usedCompiler := 'bcc'.
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   173
	].
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   174
    ].
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   175
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   176
    (usedCompiler isNil and:[msvcPath notNil]) ifTrue:[
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   177
	"/ msvc
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   178
	ExternalBytes sizeofPointer == 8 ifTrue:[
1303
b24bddd15722 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1302
diff changeset
   179
	    'host.rc [info]: ignore msvc compiler (cannot be used with 64 bit architecture)' infoPrintCR.
1294
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   180
	] ifFalse:[
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   181
	    'host.rc [info]: setup for msvc compiler' infoPrintCR.
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   182
	    msvcPath := msvcPath asFilename.
1305
874217996e56 fixed compiler setup
Claus Gittinger <cg@exept.de>
parents: 1304
diff changeset
   183
	    ccCommand := (msvcPath / 'cl') pathName.
874217996e56 fixed compiler setup
Claus Gittinger <cg@exept.de>
parents: 1304
diff changeset
   184
	    linkCommand := (msvcPath / 'ilink32') pathName.
1294
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   185
	    ccCompilationOptions := '/O1'.
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   186
	    searchedLibraries := #('import32.lib' 'odbc32.lib' 'glu32.lib' 'opengl32.lib').
478
28165b2e5451 *** empty log message ***
bg
parents: 410
diff changeset
   187
1294
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   188
	    libs := #(
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   189
		    '-L..\..\lib\vc'
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   190
		    ).
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   191
	    libs := libs asStringWith:Character space.
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   192
	    linkArgs := (libs).
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   193
	    incl := incl asStringWith:Character space.
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   194
	    usedCompiler := 'msvc'.
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   195
	].
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   196
    ].
578
dfa929970bef bugfix: do not overwrite compiler settings after restart from image
ca
parents: 577
diff changeset
   197
1301
ac987c5eaab3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1300
diff changeset
   198
    usedCompiler isNil ifTrue:[
ac987c5eaab3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1300
diff changeset
   199
	ExternalBytes sizeofPointer == 8 ifTrue:[
ac987c5eaab3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1300
diff changeset
   200
	    mingw64Path notNil ifTrue:[
ac987c5eaab3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1300
diff changeset
   201
		"/ mingw64
ac987c5eaab3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1300
diff changeset
   202
		'host.rc [info]: setup for mingw64 compiler' infoPrintCR.
ac987c5eaab3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1300
diff changeset
   203
		mingw64Path := mingw64Path asFilename.
1305
874217996e56 fixed compiler setup
Claus Gittinger <cg@exept.de>
parents: 1304
diff changeset
   204
		ccCommand := (mingw64Path / 'gcc') pathName.
874217996e56 fixed compiler setup
Claus Gittinger <cg@exept.de>
parents: 1304
diff changeset
   205
		linkCommand := (mingw64Path / 'gcc') pathName.
874217996e56 fixed compiler setup
Claus Gittinger <cg@exept.de>
parents: 1304
diff changeset
   206
		mingw64Path := mingw64Path directory.
1301
ac987c5eaab3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1300
diff changeset
   207
		ccCompilationOptions := ''.
1302
257bd1bb74f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1301
diff changeset
   208
		searchedLibraries := #('-lodbc32' '-lglu32' '-lopengl32').
1301
ac987c5eaab3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1300
diff changeset
   209
1302
257bd1bb74f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1301
diff changeset
   210
		libs := {
257bd1bb74f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1301
diff changeset
   211
			    '-L..\..\lib\mingw' .
1304
c66b66cb465d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1303
diff changeset
   212
			    ( '-L',(mingw64Path / 'lib') pathName ) .
1302
257bd1bb74f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1301
diff changeset
   213
			}.
1301
ac987c5eaab3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1300
diff changeset
   214
		libs := libs asStringWith:Character space.
ac987c5eaab3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1300
diff changeset
   215
		linkArgs := (libs).
ac987c5eaab3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1300
diff changeset
   216
		incl := incl asStringWith:Character space.
ac987c5eaab3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1300
diff changeset
   217
		usedCompiler := 'mingw'.
ac987c5eaab3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1300
diff changeset
   218
	    ].
1294
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   219
	] ifFalse:[
1301
ac987c5eaab3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1300
diff changeset
   220
	    mingw32Path notNil ifTrue:[
ac987c5eaab3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1300
diff changeset
   221
		"/ mingw32
ac987c5eaab3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1300
diff changeset
   222
		'host.rc [info]: setup for mingw32 compiler' infoPrintCR.
ac987c5eaab3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1300
diff changeset
   223
		mingw32Path := mingw32Path asFilename.
1305
874217996e56 fixed compiler setup
Claus Gittinger <cg@exept.de>
parents: 1304
diff changeset
   224
		ccCommand := (mingw32Path / 'gcc') pathName.
874217996e56 fixed compiler setup
Claus Gittinger <cg@exept.de>
parents: 1304
diff changeset
   225
		linkCommand := (mingw32Path / 'gcc') pathName.
874217996e56 fixed compiler setup
Claus Gittinger <cg@exept.de>
parents: 1304
diff changeset
   226
		mingw32Path := mingw32Path directory.
1301
ac987c5eaab3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1300
diff changeset
   227
		ccCompilationOptions := ''.
1302
257bd1bb74f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1301
diff changeset
   228
		searchedLibraries := #('-lodbc32' '-lglu32' '-lopengl32').
1294
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   229
1302
257bd1bb74f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1301
diff changeset
   230
		libs := {
257bd1bb74f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1301
diff changeset
   231
			    '-L..\..\lib\mingw' .
1305
874217996e56 fixed compiler setup
Claus Gittinger <cg@exept.de>
parents: 1304
diff changeset
   232
			    ( '-L',(mingw32Path / 'lib') pathName ) .
1302
257bd1bb74f2 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1301
diff changeset
   233
			}.
1301
ac987c5eaab3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1300
diff changeset
   234
		libs := libs asStringWith:Character space.
ac987c5eaab3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1300
diff changeset
   235
		linkArgs := (libs).
ac987c5eaab3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1300
diff changeset
   236
		incl := incl asStringWith:Character space.
ac987c5eaab3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1300
diff changeset
   237
		usedCompiler := 'mingw'.
ac987c5eaab3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1300
diff changeset
   238
	    ].
1294
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   239
	].
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   240
    ].
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   241
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   242
    usedCompiler notNil ifTrue:[
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   243
	ParserFlags ccPath:ccCommand.
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   244
	ParserFlags linkCommand:linkCommand.
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   245
	ParserFlags stcCompilationIncludes: incl.
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   246
	ParserFlags stcCompilationDefines: ''.
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   247
	ParserFlags stcCompilationOptions: '+optinline +inlineNew'.
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   248
	ParserFlags ccCompilationOptions: ccCompilationOptions.
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   249
	ParserFlags searchedLibraries:searchedLibraries.
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   250
	ParserFlags linkArgs: linkArgs.
3e8e0aef789c compiler setup
Claus Gittinger <cg@exept.de>
parents: 1264
diff changeset
   251
    ]
478
28165b2e5451 *** empty log message ***
bg
parents: 410
diff changeset
   252
].
366
397c5e4955e6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 357
diff changeset
   253
331
a0be330a1f43 moved compiler setup into host-specific file.
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   254
!