h_win32.rc
author Claus Gittinger <cg@exept.de>
Mon, 23 Oct 2006 16:52:18 +0200
changeset 723 e308a2b1775b
parent 707 f4f074ef46a8
child 921 99fd24d165f5
permissions -rw-r--r--
*** empty log message ***

"*
 * Encoding: iso8859-1
 *
 * $Header$
 *
 * MIMEType: application/x-smalltalk-source
 *
 * ST/X startup configuration file - for win95, win98 and winNT OS.
 *
 * DONT add site specific things here - use your own h_xxx.rc file instead
 * where xxx stands for your hostname(s)
 *"

"/ look in registry for LibDir ...
|k rel curr libDir|

rel := Smalltalk versionString.
k := Win32OperatingSystem registryEntry key:('HKEY_LOCAL_MACHINE\Software\eXept\Smalltalk/X\',rel).
k isNil ifTrue:[
    k := Win32OperatingSystem registryEntry key:'HKEY_LOCAL_MACHINE\Software\eXept\Smalltalk/X'.
    k notNil ifTrue:[
	curr := k valueNamed:'CurrentVersion'.
	curr isString ifTrue:[
	    k close.
	    k := Win32OperatingSystem registryEntry key:('HKEY_LOCAL_MACHINE\Software\eXept\Smalltalk/X\',curr).
	]
    ]
].
k notNil ifTrue:[
    libDir := k valueNamed:'LibDir'.
    (libDir notNil and:[libDir asFilename exists]) ifTrue:[
	(Smalltalk systemPath includes:(libDir asFilename pathName)) ifFalse:[
	    Smalltalk systemPath addFirst:(libDir asFilename pathName).
	    Smalltalk flushPathCaches
	]
    ].
    k close.
].
!

|incl libs|

false "Smalltalk wasStartedFromImage" ifFalse:[
    "/
    "/ right now, stx can only be used with a
    "/ borland C-compiler.
    "/

    "/ msc
    "/ Compiler ccPath:'cl'.
    "/ Compiler ccCompilationOptions:'/O1'.

    "/ borland
    ParserFlags ccPath:'bcc32'.

    incl := #(
	    '-I..\..\include'
	    "/ '-I..\..\libopengl'
	    ).

    libs := #(
	    '-L..\..\libbc'
	    ).

    #(
	'C:\Programme\exept\SmalltalkX'
	"/ 'D:\STX\PROJECTS\smalltalk'
	'C:\Programme\borland\bcc55'
	'C:\Programme\borland\cbuilder4'
	'C:\Programme\borland\cbuilder3'
	'C:\borland\bcc55'
	'C:\borland\cbuilder4'
	'C:\borland\cbuilder3'
    ) do:[:eachPath | |pI pL|
	pI := eachPath asFilename construct:'include'.
	pI exists ifTrue:[
	    incl := incl copyWith: ( '-I',pI pathName ).
	].
	pL := eachPath asFilename construct:'lib'.
	pL exists ifTrue:[
	    libs := libs copyWith: ( '-L',pL pathName ).
	    pL := pL construct:'psdk'.
	    pL exists ifTrue:[
		libs := libs copyWith: ( '-L',pL pathName ).
	    ].
	].
    ].

    incl := incl asStringWith:Character space.
    libs := libs asStringWith:Character space.

    ParserFlags stcCompilationIncludes: incl.
    ParserFlags stcCompilationDefines: ''.
    ParserFlags stcCompilationOptions: '+optinline +inlineNew'.
    ParserFlags ccCompilationOptions: '-w-'.
    ParserFlags searchedLibraries:#('import32.lib' 'odbc32.lib').

    ParserFlags linkArgs: (libs , ' -r -c -ap -Tpd -Gi -w-dup').
    ParserFlags linkCommand: 'ilink32'.
].

!