From: cascade Date: Fri, 7 Sep 2007 14:50:58 +0000 (+0000) Subject: OCC16602 [OCC Forum] Integration of code porting to MacOSX by Torsten Sadowski X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=9ce9d05d17f9cdde96c8ab6800d1eb68af810ed5;p=occt-wok.git OCC16602 [OCC Forum] Integration of code porting to MacOSX by Torsten Sadowski --- diff --git a/src/WOKsite/DEFAULT.edl b/src/WOKsite/DEFAULT.edl index 410a20f..c265a20 100755 --- a/src/WOKsite/DEFAULT.edl +++ b/src/WOKsite/DEFAULT.edl @@ -17,7 +17,7 @@ $BAG\^ @end; @template DEFAULT_Stations ( %Entity ) is -$sun sil lin hp aix wnt\^ +$sun sil lin hp aix wnt mac bsd\^ @end; @template DEFAULT_DBMSystems ( %Entity ) is @@ -64,6 +64,14 @@ $%Entity_Home\^ $%Entity_Home\^ @end; +@template DEFAULT_DFLT_mac ( %Entity_Home ) is +$%Entity_Home\^ +@end; + +@template DEFAULT_DFLT_bsd ( %Entity_Home ) is +$%Entity_Home\^ +@end; + @template DEFAULT_WOKVersion ( %WOK_VERSION ) is $%WOK_VERSION\^ @end; diff --git a/src/WOKsite/tclshrc_Wok b/src/WOKsite/tclshrc_Wok index aa22b96..9984839 100755 --- a/src/WOKsite/tclshrc_Wok +++ b/src/WOKsite/tclshrc_Wok @@ -43,9 +43,18 @@ ;# global env tcl_platform -if { "$tcl_platform(platform)" == "unix" && ![info exists env(LD_LIBRARY_PATH)] } { - puts stderr "You must set LD_LIBRARY_PATH to point where you have installed Wok" - exit +if { "$tcl_platform(platform)" == "unix" } { + if { "$tcl_platform(os)" == "HP-UX" } { + set ldpathvar SHLIB_PATH + } elseif { "$tcl_platform(os)" == "Darwin" } { + set ldpathvar DYLD_LIBRARY_PATH + } else { + set ldpathvar LD_LIBRARY_PATH + } + if { ![info exists env($ldpathvar)] } { + puts stderr "You must set $ldpathvar to point where you have installed Wok" + exit + } } if { "$tcl_platform(platform)" == "windows" && ![info exists env(Path)] } { @@ -58,9 +67,10 @@ if [info exists wm] { if { "$tcl_platform(platform)" == "unix" } { set sprtor ":" set fmtshr "lib%s.so" - set wrk [split $env(LD_LIBRARY_PATH) $sprtor] - if { $tcl_platform(os) == "HP-UX" } { set fmtshr "lib%s.sl" } - set msgnotfound "Please check your variable LD_LIBRARY_PATH" + set wrk [split $env($ldpathvar) $sprtor] + if { $tcl_platform(os) == "HP-UX" } { set fmtshr "lib%s.sl" } + if { $tcl_platform(os) == "Darwin" } { set fmtshr "lib%s.dylib" } + set msgnotfound "Please check your variable $ldpathvar" } if { "$tcl_platform(platform)" == "windows" } { set sprtor ";" diff --git a/src/WOKsite/wok.csh b/src/WOKsite/wok.csh index 4d53720..a357807 100755 --- a/src/WOKsite/wok.csh +++ b/src/WOKsite/wok.csh @@ -68,6 +68,17 @@ switch ( `uname` ) setenv TCLLIBPATH "${TCLLIB}/itcl ${TCLLIB} ${WOKHOME}/lib ${WOKHOME}/lib/${WOKSTATION}" setenv TRAP_FPE "UNDERFL=FLUSH_ZERO;OVERFL=DEFAULT;DIVZERO=DEFAULT;INT_OVERFL=DEFAULT" breaksw + case HP-UX: + setenv WOKSTATION "hp" + setenv SHLIB_PATH "${TCLLIB}:${WOKHOME}/lib/${WOKSTATION}:${SHLIB_PATH}:" + breaksw + case Darwin: + setenv WOKSTATION "mac" + setenv DYLD_LIBRARY_PATH "${TCLLIB}:${WOKHOME}/lib/${WOKSTATION}:${DYLD_LIBRARY_PATH}:" + breaksw + case FreeBSD: + setenv WOKSTATION "bsd" + breaksw default: echo "Error : unknown platform" breaksw diff --git a/src/WOKsite/wokinit.csh b/src/WOKsite/wokinit.csh index 86a5a51..15fe872 100755 --- a/src/WOKsite/wokinit.csh +++ b/src/WOKsite/wokinit.csh @@ -7,6 +7,12 @@ if ( $OS_NAME == "SunOS" ) then set OS_PLATFORM="sun" else if ( $OS_NAME == "Linux" ) then set OS_PLATFORM="lin" +else if ( $OS_NAME == "HP-UX" ) then + set OS_PLATFORM="hp" +else if ( $OS_NAME == "Darwin" ) then + set OS_PLATFORM="mac" +else if ( $OS_NAME == "FreeBSD" ) then + set OS_PLATFORM="bsd" endif setenv WOKHOME ${CASROOT}/../wok