]> OCCT Git - occt-wok.git/commitdiff
OCC16602 [OCC Forum] Integration of code porting to MacOSX by Torsten Sadowski
authorcascade <cascade@opencascade.com>
Fri, 7 Sep 2007 14:50:58 +0000 (14:50 +0000)
committercascade <cascade@opencascade.com>
Fri, 7 Sep 2007 14:50:58 +0000 (14:50 +0000)
src/WOKsite/DEFAULT.edl
src/WOKsite/tclshrc_Wok
src/WOKsite/wok.csh
src/WOKsite/wokinit.csh

index 410a20f204804d23c0cb0e16bf0ec47e1a5a3e9c..c265a20116011233efac2005e5cb358b07e08f41 100755 (executable)
@@ -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;
index aa22b96e4158a0b8f2783ff1d6d19fc8d37e522a..998483937472c0d182682077565b3e4a4c8c80c1 100755 (executable)
 ;#
 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 ";"
index 4d537201f53d2dd3b45a696eb9d2bdb0f0081d82..a3578079ab9434443010c3e74ca11b75f5bbb391 100755 (executable)
@@ -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
index 86a5a5120a7bdfc9bca2561f3c44d58be137b2c7..15fe872c625a829be0be9a27005dd2043e57a9c7 100755 (executable)
@@ -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