From: cas Date: Thu, 5 Oct 2000 11:39:20 +0000 (+0000) Subject: Initial revision X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=904ad4b9cf10bea1d7fa5daa4ad8fc47649707c6;p=occt-wok.git Initial revision --- diff --git a/src/WOKsite/CreateFactory.tcl b/src/WOKsite/CreateFactory.tcl new file mode 100755 index 0000000..14e7418 --- /dev/null +++ b/src/WOKsite/CreateFactory.tcl @@ -0,0 +1,166 @@ +;# +;# This file is used to create from scratch a minimal set of WOK entities +;# A Factory, a warehouse, a workshop and a workbench. It can be used to import +;# sources files from a previously Cascade download. +;# this script has 5 arguments: +;# HOME_ENTITIES is a directory name. This is the name where all further entities +;# will be created. +;# FNAM is a factory name ( a factory is a set of workshop and a warehouse) +;# WSNAM is a workshop name ( a workshop is dedicated to contains a workbenches tree) +;# WBNAM is a workbench name. Typically it will be the name of the root workbench. +;# IMPORT_DIR is a directory name. If IMPORT_DIR is /dev/null no import is done +;# and WBNAM is created as empty workbench. To populate it with development units +;# please refer to the Wok documentation. +;# +proc FileToList { path {sort 0} {trim 0} {purge 0} {emptl 1} } { + if ![ catch { set id [ open $path r ] } ] { + set l {} + while {[gets $id line] >= 0 } { + if { $trim } { + regsub -all {[ ]+} $line " " line + } + if { $emptl } { + if { [string length ${line}] != 0 } { + lappend l $line + } + } else { + lappend l $line + } + } + close $id + if { $sort } { + return [lsort $l] + } else { + return $l + } + } else { + return {} + } +} +;# +;# +;# +proc lreplace { fin fout ls1s2 } { + if { [catch { set in [ open $fin r ] } errin] == 0 } { + if { [catch { set out [ open $fout w ] } errout] == 0 } { + set strin [read $in [file size $fin]] + close $in + foreach [list s1 s2] $ls1s2 { + set done 0 + if { [set nbsub [regsub -all -- $s1 $strin $s2 strout]] != 0 } { + set done 1 + } + set strin $strout + } + puts $out $strout + close $out + return $done + } else { + puts stderr "Error: $errout" + return 0 + } + } else { + puts stderr "Error: $errin" + return 0 + } +} +;# +;# +proc CreateFactory { HOME_ENTITIES FNAM WSNAM WBNAM IMPORT_DIR } { + + package require Wok + package require Ms + global env + + if [catch { package require Tclx } TclXHere] { + puts stderr "Warning : You'll need package TclX to correctly use WOK." + puts stderr " Check for variable TCLLIBPATH" + } + if [catch { package require Expect } ExpectHere] { + puts stderr "Warning : You'll need package Expect to use WOK integration package.." + puts stderr " Check for variable TCLLIBPATH" + } + + ;# + set savpwd [pwd] + + ;# + ;# Create factory FNAM and warehouse attached to it + ;# + if { ![wokinfo -x ${FNAM}] } { + puts "Creating the factory : ${FNAM}" + if ![catch {fcreate -DHome=$HOME_ENTITIES/${FNAM} -d ${FNAM} } astatus ] { + wokcd ${FNAM} + if { ![wokinfo -x ${FNAM}:BAG] } { + puts "Creating the WareHouse in $HOME_ENTITIES/${FNAM}/BAG" + if [ catch {Wcreate -DHome=$HOME_ENTITIES/${FNAM}/BAG -d -DAdm=$HOME_ENTITIES/${FNAM}/BAG/adm BAG } astatus ] { + puts $astatus + cd $savpwd + } + } + } else { + puts $astatus + cd $savpwd + } + } + + ;# + ;# Create workshop WSNAM + ;# + if { ![wokinfo -x ${FNAM}:${WSNAM}] } { + puts "Creating the workshop : ${FNAM}:${WSNAM}" + if ![ catch {screate -DHome=$HOME_ENTITIES/${FNAM}/${WSNAM} -d ${WSNAM} } astatus] { + wokcd -PAdm ${FNAM}:${WSNAM} + catch { mkdir Repository } + lreplace $env(WOK_LIBRARY)/VC.example [pwd]/VC.edl [list /dev/null [pwd]/Repository SCCS NOBASE] + exec cp $env(WOK_LIBRARY)/VC.tcldef [pwd]/VC.tcl + } else { + puts $astatus + cd $savpwd + } + } + ;# + ;# Create workbench WBNAM + ;# + if { ![wokinfo -x ${FNAM}:${WSNAM}:${WBNAM}] } { + puts "Creating the workbench : ${FNAM}:${WSNAM}:${WBNAM}" + wokcd ${FNAM}:${WSNAM} + set WBROOT $HOME_ENTITIES/${FNAM}/${WSNAM}/${WBNAM} + if { "$IMPORT_DIR" != {} } { + set WBROOT [file join [file dirname $IMPORT_DIR] ${WBNAM}] + puts "Renaming $IMPORT_DIR to $WBROOT" + frename $IMPORT_DIR $WBROOT + puts " the Home directory of your ${WBNAM} WorkBench is now : ${WBROOT}" + } + if [ catch {wcreate -DHome=$WBROOT -d ${WBNAM} } astatus] { + puts $astatus + cd $savpwd + exit + } + } + + + if { "$IMPORT_DIR" != {} } { + wokcd -PAdm ${FNAM}:${WSNAM}:${WBNAM} + foreach udl [glob -nocomplain *.UDLIST] { + puts "Importing units from module $udl" + foreach unit [FileToList $udl] { + if [ catch { ucreate -[lindex $unit 0] [lindex $unit 1] } astatus] { + puts $astatus + } + } + } + } + cd $savpwd +} + +set HOME_ENTITIES [lindex $argv 0] +set FNAM [lindex $argv 1] +set WSNAM [lindex $argv 2] +set WBNAM [lindex $argv 3] +set IMPORT_DIR [lindex $argv 4] + +CreateFactory $HOME_ENTITIES $FNAM $WSNAM $WBNAM $IMPORT_DIR + +exit + diff --git a/src/WOKsite/DEFAULT.edl b/src/WOKsite/DEFAULT.edl new file mode 100755 index 0000000..410a20f --- /dev/null +++ b/src/WOKsite/DEFAULT.edl @@ -0,0 +1,73 @@ +-- DEFAULT.edl +-- +-- +@ifnotdefined ( %DEFAULT_EDL) then +@set %DEFAULT_EDL = ""; + +@template DEFAULT_Home ( %Entity ) is +$/dp_xx/%Entity\^ +@end; + +@template DEFAULT_Adm ( %Entity_Home ) is +$%Entity_Home/adm\^ +@end; + +@template DEFAULT_Warehouse ( %Entity ) is +$BAG\^ +@end; + +@template DEFAULT_Stations ( %Entity ) is +$sun sil lin hp aix wnt\^ +@end; + +@template DEFAULT_DBMSystems ( %Entity ) is +$ DFLT \^ +@end; + +@template DEFAULT_ParcelConfig ( %Entity ) is +$ \^ +@end; + +@template DEFAULT_Src ( %Entity_Home ) is +$%Entity_Home\^ +@end; + +@template DEFAULT_Drv ( %Entity_Home ) is +$%Entity_Home\^ +@end; + +@template DEFAULT_DFLT ( %Entity_Home ) is +$%Entity_Home\^ +@end; + +@template DEFAULT_DFLT_sun ( %Entity_Home ) is +$%Entity_Home\^ +@end; + +@template DEFAULT_DFLT_sil ( %Entity_Home ) is +$%Entity_Home\^ +@end; + +@template DEFAULT_DFLT_lin ( %Entity_Home ) is +$%Entity_Home\^ +@end; + +@template DEFAULT_DFLT_hp ( %Entity_Home ) is +$%Entity_Home\^ +@end; + +@template DEFAULT_DFLT_aix ( %Entity_Home ) is +$%Entity_Home\^ +@end; + +@template DEFAULT_DFLT_wnt ( %Entity_Home ) is +$%Entity_Home\^ +@end; + +@template DEFAULT_WOKVersion ( %WOK_VERSION ) is +$%WOK_VERSION\^ +@end; + + + +@endif; diff --git a/src/WOKsite/FILES b/src/WOKsite/FILES new file mode 100755 index 0000000..c58b2d8 --- /dev/null +++ b/src/WOKsite/FILES @@ -0,0 +1,15 @@ +srcinc:::CreateFactory.tcl +srcinc:::WOKSESSION.edl +srcinc:::DEFAULT.edl +srcinc:::FILES +srcinc:::InstallJava.csh +srcinc:::InstallMesa.csh +srcinc:::InstallTcl.csh +srcinc:::examples.bck.Z +srcinc:::tclshrc_Wok +srcinc:::wokcfg.bat +srcinc:::wokcfg +srcinc:::INSTALL +srcinc:::wokfac1.html +srcinc:::wokfac2.html +srcinc:::wokfac3.html diff --git a/src/WOKsite/INSTALL b/src/WOKsite/INSTALL new file mode 100755 index 0000000..e47954a --- /dev/null +++ b/src/WOKsite/INSTALL @@ -0,0 +1,106 @@ + + Section A) of this paper is the Unix guidelines for installing + WOK on SunOS, Linux, HP-UX and IRIX systems. + + + + +PRE-REQUISITES: +--------------- + + On SunOS and IRIX WOK requires at least Tcl 7.5, Tclx 7.5.1 and Tk 4.1. + On Linux you can use Tcl 8.0 or later. + We suppose that on SunOS and IRIX, tcltk is installed in /usr/tcltk, and in /usr on Linux + If it is not the case, modify the TCLHOME variable in the file /home/me/wok-C40/site/wokcfg. + (We suppose you have downloaded this tarball in /home/me) + +A) INSTALLATION on Unix like systems. +------------------------------------- + + This section assumes that you have never installed WOK on your system. Performing the + four following steps will install WOK and create a minimal environment for working. + + 1. From the current directory where this README is located, move to the sub-directory + site. + % cd /home/me/wok-C40/site + + 2. Configure WOK so that its administration files will be located in + . You do this by typing: + + % ./wokcfg configure /home/me/wokentities ~/wok + + This will create the directory /home/me/entities if it does not exist, then create + a c-shell executable file ~/wok. This file will be your wok launcher. This file is + used in the next step. + + 3. Insert in your ~/.tclshrc the lines listed in the file /home/me/wok-C40/site/tclshrc_Wok. + This file is sourced by the tclsh shell at the beginning of a session. + (See tclsh documentation for more information about the .tclshrc file.) + + At this point either you want to create WOK entitites or import files from a previously Cascade + source download. To create new entities from scratch execute step 4., to import files execute + step 5. + + 4. Once configured, you can create minimal entities and tell WOK where to + physically create them. The following command setup WOK environment so that they will be + implemented under the directory /home/me/workarea. These entities are a factory + (named KAS below), a workshop ( say C40 ), and a workbench (ref). + + % mkdir /home/me/workarea + % cd ~ + % ./wok setup /home/me/workarea KAS C40 ref + + + 5. You perform this step if you want to use WOK on a previously Cascade source download. + + % mkdir /home/me/workarea + % cd ~ + % ./wok import /home/me/workarea KAS C40 ref /somewhere/source/downloaded/CAS3.0 + or if you have the variable CASROOT already pointing to this location : + % ./wok import /home/me/workarea KAS C40 ref $CASROOT + + This will create and populate the workbench KAS:C40:ref with all development units downloaded in + directory /somewhere/source/downloaded/CAS3.0. You can build them using the WOK commands umake + and wprocess. See documentation for details. + + + 6. Then running wok and accessing previously created entities looks like this: + + % ~/wok + tclsh> wokcd KAS:C40:ref + KAS:C40:ref> + + At this point, you run wok by using the above created command ~/wok. No additional + operation is required. + Note that the wok procedure can be placed in any directory listed in your path. + It can also be published to a set of developers by placing it in a shared location. + + +B) INSTALLATION on WindowsNT. +----------------------------- + + We suppose that you have doanloaded the zip archive for WOK in directory W:\wok-C31 + + 1. Open a MS-DOS command console and set the current directory as follow + + W:> cd wok-C31\site + + 2. Configure WOK so that its administration files will be located + in directory W:/home/me/wokentities. (IMPORTANT : You must create the + directories W:/home/me/entities using the explorer or the command mkdir) + You can now issue the following command (Note precise usage of / instead of \ below): + + W:\site> wokcfg.bat configure W:/wok-C31 W:/home/me/wokentities w:/home/me/wok.bat + + This will create the file w:/home/me/wok, your wok launcher. + + 3. Tell WOK where to physically create entities. The following command setup WOK so that they will be + implemented under the directory W:/home/me/wokarea + (IMPORTANT : Create directory W:/home/me/wokarea before) + + W:\site> wokcfg.bat setup W:/wok-C31 W:/home/me/wokarea + + 4. You can now use the wok.bat launcher to create entities. + W:\home\me\wok.bat + tclsh> source $env(WOKHOME)/site/CreateFactory.tcl + tclsh> CreateFactory W:/home/me/wokarea KAS C30 ref /dev/null diff --git a/src/WOKsite/InstallJava.csh b/src/WOKsite/InstallJava.csh new file mode 100755 index 0000000..0b3c76e --- /dev/null +++ b/src/WOKsite/InstallJava.csh @@ -0,0 +1,78 @@ +#! /bin/csh -f + +if ( !($?JAVAHOME) ) then + + echo " " + echo " " + echo " ---- Open Cascade : requirement " + echo " --------------------------------" + echo " " + echo " the JDK 1.2.2 ( Java 2 )is needed to run and install the Samples Application and the ShapeViewer" + echo " and the ShapeViewer demonstration application " + echo " " + echo " Java 2 can be downloaded from : http://developer.java.sun.com " + echo " " + echo " " + echo " Please refer to Distributor pages to know if some system patch are required" + echo " the Distribution can be downloaded at :" + echo " on SunOS :" + echo " http://www.sun.com/software/solaris/java/download.html" + echo " on Linux :" + echo " http://java.sun.com/products/jdk/1.2/download-linux.html" + echo " on IRIX :" + echo " http://www.sgi.com/developers/devtools/languages/java2_122.html" + echo " on AIX : " + echo " http://www6.software.ibm.com/dl/dka/dka-p" + echo " " + echo " " + +endif + +# Verification + +set WhereITcl = `which java | awk '{print $1}' ` +set defaultTcl = "" + +if ( ${WhereITcl} != "no" && ${WhereITcl} != "which:" ) then + set defaultTcl = ${WhereITcl} + set dir = `dirname ${WhereITcl}` + if ( `basename ${dir}` == "bin" ) then + set defaultTcl = `dirname ${dir}` + endif +endif +set notDefine = 1 + +while ( ${notDefine} == 1 ) + if (! ($?JAVAHOME)) then + + echo " " + echo " " + echo -n " Please define the Path where you have installed your JAVA distribution :[$defaultTcl]" + set rep = $< + if ( ${rep} == "" ) then + setenv JAVAHOME ${defaultTcl} + else + + if (!(-e ${rep})) then + echo "This Directory doen't exist " + echo "Please try again" + else + setenv JAVAHOME ${rep} + endif + unset rep + endif + + endif + if ($?JAVAHOME) then + if (! (-e ${JAVAHOME}/bin/java)) then + echo "java not found in ${JAVAHOME}/bin" + if ($?JAVAHOME) unsetenv JAVAHOME + else + set notDefine = 0 + endif + endif +end + +echo "JAVAHOME ${JAVAHOME} " > $argv[1] +exit + diff --git a/src/WOKsite/InstallMesa.csh b/src/WOKsite/InstallMesa.csh new file mode 100755 index 0000000..5a2dbc7 --- /dev/null +++ b/src/WOKsite/InstallMesa.csh @@ -0,0 +1,23 @@ +#! /bin/csh -f + + +set neededLibrary = "libGL.so libGLU.so libglut.so" +set MesaDirectory = /usr/X11R6/lib + +foreach lib (${neededLibrary}) + + if (!(-e ${MesaDirectory}/${lib})) then + echo "${MesaDirectory}/${lib} not exist " + echo " Mesa is required to Run OpenCascade " + echo " Mesa-3.1 or Mesa3.2 is recommended " + echo " you can download it on : http://sourceforge.net/project/showfiles.php?group_id=3" + echo " MesaLib-3.1.tar.gz and MesaDemos-3.1.tar.gz " + echo " or " + echo " MesaLib-3.2.tar.gz and MesaDemos-3.2.tar.gz " + echo " Rq: if you use a Mesa3.0 you can use it with some link " + echo " cd ${MesaDirectory}" + echo " ln -s libGL.so libMesaGL.so " + echo " ln -s libGLU.so libMesaGLU.so " + endif + +end diff --git a/src/WOKsite/InstallTcl.csh b/src/WOKsite/InstallTcl.csh new file mode 100755 index 0000000..88a0ea6 --- /dev/null +++ b/src/WOKsite/InstallTcl.csh @@ -0,0 +1,119 @@ +#! /bin/csh -f + +if ( !($?TCLHOME) ) then + + echo " " + echo " " + echo " ---- Open Cascade : requirement " + echo " --------------------------------" + echo " " + echo " " + echo " TclTk is needed to Run Test Harness ( Topology , Viewer or DataExchange ) " + echo " This product is available at : http://dev.scriptics.com " + echo " " + echo " on SunOS , IRIX : " + echo " libtcl7.5i.so and libtk4.1i.so " + echo " source distribution available at http://dev.scriptics.com/software/tcltk/7.5.html" + echo " " + echo " on Windows_NT : " + echo " libtcl7.6i.so and libtk4.1i.so " + echo " source distribution available at http://dev.scriptics.com/software/tcltk/7.6.html" + echo " " + echo " on Linux : " + echo " libtcl8.0.so and libtk8.0.so " + echo " source distribution available at http://dev.scriptics.com/software/tcltk/8.0.html" + echo " " + echo " on AIX : " + echo " libtcl8.1.so and libtk8.1.so " + echo " source distribution available at http://dev.scriptics.com/software/tcltk/8.1.html" + echo " " +endif + +if (! ($?STATION)) then + + setenv STATION `uname` + if ( ${STATION} == "IRIX64" ) setenv STATION IRIX + +endif +set notDefine = 1 + + switch ( ${STATION} ) + + case "IRIX" + case "SunOS" + set tclLib = libtcl7.5i.so + set tkLib = libtk4.1i.so + breaksw + case "AIX" : + set tclLib = libtcl8.1.so + set tkLib = libtk8.1.so + breaksw + case "Linux" : + set tclLib = libtcl.so + set tkLib = libtk.so +# set tclLib = libtcl8.0.so +# set tkLib = libtk8.0.so + breaksw + endsw +endif + +set WhereITcl = `which tclsh | awk '{print $1}' ` +if ( ${WhereITcl} != "no" && ${WhereITcl} != "which:" ) then + set defaultTcl = ${WhereITcl} + set dir = `dirname ${WhereITcl}` + if ( `basename ${dir}` == "bin" ) then + set defaultTcl = `dirname ${dir}` + else + set defaultTcl = "" + endif +endif + +while ( ${notDefine} == 1 ) + if (!($?TCLHOME)) then + echo -n " Please define the Path where you have installed your Tcl/TK distribution [${defaultTcl}] :" + set rep = $< + if ( ${rep} == "" ) then + setenv TCLHOME ${defaultTcl} + else + if (!(-e ${rep})) then + echo "This Directory doen't exist " + echo "Please try again" + else + setenv TCLHOME ${rep} + endif + unset rep + endif + endif + if ( $?TCLHOME) then + if (! (-e ${TCLHOME}/lib/${tclLib})) then + echo "${tclLib} not found in ${TCLHOME}/lib" + if ($?TCLHOME) unsetenv TCLHOME + else + if (!(-e ${TCLHOME}/lib/${tkLib})) then + echo "${tkLib} not found in ${TCLHOME}/lib" + if ($?TCLHOME) unsetenv TCLHOME + else + # cas specifique IRIX N32 + if ( ${STATION} == "IRIX" ) then + set typename = `file ${TCLHOME}/lib/${tclLib} | awk ' {print $3 } '` + if ( ${typename} == "N32") then + set notDefine = 0 + else + echo " ${TCLHOME}/lib/${tclLib} is not N32" + if ($?TCLHOME) unsetenv TCLHOME + endif + else + set notDefine = 0 + endif + endif + endif + endif +end + +if ($?tclLib) unset tclLib +if ($?tkLib) unset tkLib +if ($?rep) unset rep +if ($?defaultTcl) unset defaultTcl + +echo "TCLHOME ${TCLHOME} " > $argv[1] + diff --git a/src/WOKsite/WOKSESSION.edl b/src/WOKsite/WOKSESSION.edl new file mode 100755 index 0000000..50c32fd --- /dev/null +++ b/src/WOKsite/WOKSESSION.edl @@ -0,0 +1,20 @@ +-- File: WOKSESSION.edl +-- Author: Atelier CAS2000 +-- History: Fri Mar 10 16:43:31 2000 Atelier CAS2000 Creation +-- Copyright: Matra Datavision 2000 + +@ifnotdefined ( %WOKSESSION_EDL) then +@set %WOKSESSION_EDL = ""; + +-- +-- The name of the directory that will contains the ATLIST file , WOKSESSION.edl and DEFAULT.edl +-- This directory will be pointed to by the V.E. WOK_ROOTADMDIR in the wok launcher. +-- +@set %WOKSESSION_Home = "TOSUBSTITUTE"; +-- +-- Nothing need to be changed below this line. +-- +@string %WOKSESSION_Adm = %WOKSESSION_Home ; +@string %WOKSESSION_ATListFile = %WOKSESSION_Home "/ATLIST"; + +@endif; diff --git a/src/WOKsite/examples.bck.Z b/src/WOKsite/examples.bck.Z new file mode 100755 index 0000000..664be23 Binary files /dev/null and b/src/WOKsite/examples.bck.Z differ diff --git a/src/WOKsite/tclshrc_Wok b/src/WOKsite/tclshrc_Wok new file mode 100755 index 0000000..1178ce2 --- /dev/null +++ b/src/WOKsite/tclshrc_Wok @@ -0,0 +1,29 @@ +;# This file should be inserted in your .tclshrc file +;# in order to launch wok properly. +;# +if { ! [info exists env(WOK_SESSIONID)] } { + set env(WOK_SESSIONID) "$env(HOME)/.wok" +} + +global tcl_platform + +if { "$tcl_platform(platform)" == "WindowsNT" } { + wm withdraw . +} + +package require Wok +package require Ms + +if [catch { package require Tclx } TclXHere] { + puts stderr "Warning : You'll need package TclX to correctly use WOK." + puts stderr " Check for variable TCLLIBPATH" +} +if [catch { package require Expect } ExpectHere] { + puts stderr "Warning : You'll need package Expect to use WOK integration package.." + puts stderr " Check for variable TCLLIBPATH" +} + +set tcl_prompt1 {if {[info commands wokcd] != ""} then \ + {puts -nonewline stdout "[wokcd]> "} else \ + {puts -nonewline stdout "tclsh> "}} + diff --git a/src/WOKsite/wokcfg b/src/WOKsite/wokcfg new file mode 100755 index 0000000..f6bb99a --- /dev/null +++ b/src/WOKsite/wokcfg @@ -0,0 +1,154 @@ +#!/bin/csh -f +# +# This file is a small easy wok launcher and configurator. +# It will be used as a template for configuring your wok +# Important restriction: +# The environment setted below allows you to use Wok as a tool +# for compiling and linking. +# It CANNOT be used to execute and/or set adequate environment for your +# applications to work. +# Different usages: +# +# 1. Launches a Tcl script file. +# > wokcfg script myscript.tcl +# 2. Creates a c-shell proc to launch wok according to a previous configuration +# > wokcfg configure dir1 dir2 myproc +# 3. Creates a minimal set of wok entities to begin work under wok. +# > wokcfg setup home_entities myFac myShop MyWb +# 4. Import a directory tree containing a previous Cascade download. Such a tree +# looks like /someroot/src, /someroot/adm, /someroot/inc, /someroot/drv +# This will create workbench MyWb and populate it with a Cascade download found in /someroot. +# > wokcfg import home_entities myFac myShop MyWb /someroot +# +set noglob ; onintr bye ; set narg = $#argv ; set here = `pwd` + +set justrun=1 +set script=0 +switch ( $narg ) + + case '2': + if ( "$argv[1]" == "script" ) then + if (-e $argv[2]) then + set justrun=1 + set script=1 + set scriptfile=$argv[2] + else + echo " the Script File : $argv[2] does not exist " + endif + endif + breaksw + + case '3' : + if ( "$argv[1]" == "configure" ) then + set fact=$argv[2] + set temp=$argv[3] + if ( ! -d $fact) then + echo "Creating directory $fact." + mkdir $fact + endif + cp -f $here/WOKSESSION.edl ${fact}/. + cp -f $here/DEFAULT.edl ${fact}/. + cp -f $here/tclshrc_Wok ${fact}/. + set root=`dirname $here` + sed -e s@TOSUBSTITUTE_WOKHOME@$root@g -e s@TOSUBSTITUTE_FACTORYPROC@$fact@g $0 >$temp + chmod +x $temp + echo "File $temp has been created." + exit + endif + breaksw + + case '5' : + if ( "$argv[1]" == "setup" ) then + set justrun=0 + set home_entities=$argv[2] + set factoryname=$argv[3] + set workshopname=$argv[4] + set workbenchname=$argv[5] + set importdir=/dev/null + endif + breaksw + + case '6' : + if ( "$argv[1]" == "import" ) then + set justrun=0 + set home_entities=$argv[2] + set factoryname=$argv[3] + set workshopname=$argv[4] + set workbenchname=$argv[5] + set importdir=$argv[6] + endif + breaksw + + +endsw + +setenv WOKHOME TOSUBSTITUTE_WOKHOME +setenv WOK_ROOTADMDIR TOSUBSTITUTE_FACTORYPROC +setenv WOK_SESSIONID $HOME/.wok + +if (! ($?LD_LIBRARY_PATH) ) setenv LD_LIBRARY_PATH "" + +setenv WOK_LIBRARY $WOKHOME/lib + +switch ( `uname` ) + + case IRIX*: + setenv WOKSTATION sil + setenv TCLHOME /usr/tcltk + breaksw + + case SunOS: + setenv WOKSTATION sun + setenv TCLHOME /usr/tcltk + breaksw + + case AIX: + setenv WOKSTATION aix + setenv TCLHOME /usr/local + breaksw + + case Linux: + setenv WOKSTATION lin + setenv TCLHOME /usr + breaksw + + case HP-UX: + setenv WOKSTATION hp + setenv TCLHOME /usr/tcltk + breaksw + + default: + echo "Error : This platform is not supported." + exit +endsw + +setenv PATH "${TCLHOME}/bin:${PATH}" +setenv TCLLIBPATH "${TCLHOME}/lib/itcl ${TCLHOME}/lib $WOK_LIBRARY/${WOKSTATION} $WOK_LIBRARY " +setenv WOK_LIBPATH ${WOK_LIBRARY}:${WOK_LIBRARY}/${WOKSTATION} +setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${WOK_LIBRARY}/${WOKSTATION} +if ( "`uname`" == "HP-UX" ) setenv SHLIB_PATH "${LD_LIBRARY_PATH}:${TCLHOME}/lib/" +if ( "`uname`" == "AIX" ) setenv LIBPATH "${LD_LIBRARY_PATH}:${TCLHOME}/lib/" + +if ( $justrun ) then + echo "Now running tclsh using :" + echo "LD_LIBRARY_PATH = $LD_LIBRARY_PATH" + echo "TCLLIBPATH = $TCLLIBPATH" + echo "WOKHOME = $WOKHOME" + echo "PATH = $PATH" + if ( $script ) then + ${TCLHOME}/bin/tclsh $scriptfile + else + ${TCLHOME}/bin/tclsh + endif + echo "Bye bye `whoami`" +else + sed -e s@TOSUBSTITUTE@$WOK_ROOTADMDIR@g $WOKHOME/site/WOKSESSION.edl > ${WOK_ROOTADMDIR}/WOKSESSION.edl + sed -e s@/dp_xx@$home_entities@g $WOKHOME/site/DEFAULT.edl > ${WOK_ROOTADMDIR}/DEFAULT.edl + ${TCLHOME}/bin/tclsh $WOKHOME/site/CreateFactory.tcl \ + $home_entities $factoryname $workshopname $workbenchname $importdir +endif + +bye: +exit + + diff --git a/src/WOKsite/wokcfg.bat b/src/WOKsite/wokcfg.bat new file mode 100755 index 0000000..09fc553 --- /dev/null +++ b/src/WOKsite/wokcfg.bat @@ -0,0 +1,36 @@ +if "%1" == "" goto run +set option=%1 +rem *** +rem *** Set basic Wok environment with adequate defaulted value. +rem *** +if not %1%==configure goto next1 +%2\lib\wnt\sed.exe -e s@TOSUBSTITUTE_WOKHOME@"%2"@g -e s@TOSUBSTITUTE_FACTORYPROC@"%3"@g %2/site/wokcfg.bat > %4 +%2\lib\wnt\sed.exe -e s@TOSUBSTITUTE@"%3"@g %2/site/WOKSESSION.edl > %3/WOKSESSION.edl +goto end +:next1 +rem *** +rem *** Set directory where wok creates entities. +rem *** +if not %1%==setup goto next2 +%2\lib\wnt\sed.exe -e s@/dp_xx/@"%3"@g %2/site/DEFAULT.edl > TOSUBSTITUTE_FACTORYPROC/DEFAULT.edl +goto end +:next2 +rem *** +rem *** Modify the TCLHOME variable according to you installation of Tcl +rem *** Modify the TIX_LIBRARY variable according to you installation of Tix +:run +set TCLHOME=D:\DevTools\Tcltk +set TIX_LIBRARY=D:/DevTools/Tcltk/lib/tix4.1 +rem set WOK_SESSIONID=W:\home\me +set WOKHOME=TOSUBSTITUTE_WOKHOME +set WOK_ROOTADMDIR=TOSUBSTITUTE_FACTORYPROC +set WOK_LIBRARY=%WOKHOME%/lib +set WOKSTATION=wnt +set path=%path%;%TCLHOME%\bin; +set path=%path%%WOKHOME%/lib/wnt; +set WOK_LIBPATH=%WOK_LIBRARY%;%WOK_LIBRARY%/wnt +set TCLLIBPATH=%WOK_LIBRARY%/wnt %WOK_LIBRARY% +set TCL_RCFILE=%WOKHOME%\site\tclshrc_Wok +%TCLHOME%/bin/ntsh.exe +:end + diff --git a/src/WOKsite/wokfac1.html b/src/WOKsite/wokfac1.html new file mode 100755 index 0000000..136ce43 --- /dev/null +++ b/src/WOKsite/wokfac1.html @@ -0,0 +1,30 @@ + + + + + + + +1. 1 What is WOK ? +
WOK is a development environment. Using it you can organize the source +files of an application as a set of development units, build them using +a make like process and assemble results in toolkits (Unix like shareable +or DLL files) . All kind of platforms are supported. +

Developement units are gathered in entities named workbenches that can +be organized in a tree structure. Typically a workbench tree (also called +a workshop)  allow you to manage a reference space ( the root workbench)  +and private workspaces connected to it. In these workbenches only resides +files currently being modified. WOK automatically locates all needed components +during the build process (source files, include files, shareable etc..). +

WOK manages an integration process so that the modifications done in +a son workbench can be queued before being integrated in the reference +space. This minimize the time during the reference space in a inconsistant +state, and allow this reference area to be managed by only one or a few +or persons. +

WOK contains a C++ extractor processor that allow you to create +C++ classes using the CDL language. CDL is the component definition language +of the OpenCascade programming platform. +
  +
  + + diff --git a/src/WOKsite/wokfac2.html b/src/WOKsite/wokfac2.html new file mode 100755 index 0000000..7a6f0d5 --- /dev/null +++ b/src/WOKsite/wokfac2.html @@ -0,0 +1,43 @@ + + + + + + + +  +
1.2 How to install WOK on Unix/Linux platform? +

WOK is available as a download archive  <here> which contains +run time for SunOS, IRIX, Linux,AIX,HP-UX platform. +

a) Download the archive. +

b) Restore the files (say in your directory /home/me) : +
    % gzip -d WOKxxx.tar.gz | tar xf - +
    This will create a directory tree rooted at /home/me/wok-K4-5 +

c) Configure WOK so that its administration files will be located in +</home/me/wokentities>. +
    % cd /home/me/wok-K4-5 +
    % wokcfg configure  /home/me/wokentities ~/wok +

   This will create the directory /home/me/entities if it +does not exist, then create +
    a c-shell executable file named~/wok. This file +will be your wok launcher. +

 d) Insert in your ~/.tclshrc the lines listed in the file /home/me/wok-C40/site/tclshrc_Wok. +
    This file is sourced by the tclsh shell at the beginning +of a session. +
    (See tcl documentation for more information about +the .tclshrc file.) +

 e) Once configured, you need to create minimal entities and tell +WOK where to +
    physically create them. The following command setup +WOK environment so that they will be +
    implemented under the directory /home/me/workarea. +These entities are a factory +
    (named  KAS below), a workshop ( C40 ), and +a workbench (ref). +

    % mkdir /home/me/workarea +
    % cd ~ +
    % ./wok setup  /home/me/workarea KAS C40 ref +
  +
  + + diff --git a/src/WOKsite/wokfac3.html b/src/WOKsite/wokfac3.html new file mode 100755 index 0000000..a7388fa --- /dev/null +++ b/src/WOKsite/wokfac3.html @@ -0,0 +1,39 @@ + + + + + + + +  +

1.3  I have already downloaded OpenCascade source code. I want +to install WOK and import my directory tree. How to process ? +

    Let us suppose your previous OpenCascade download +is under directory /home/me/down. Say you have a tree structure +
    beginning at /home/me/down/CAS4.0DVP1 +

a) Download the archive. +

b) Restore the files (say in your directory /home/me) : +
    % gzip -d WOKxxx.tar.gz | tar xf - +
    This will create a directory tree rooted at /home/me/wok-K4-5 +

c) Configure WOK so that its administration files will be located in +</home/me/wokentities>. +
    % cd /home/me/wok-K4-5 +
    % wokcfg configure  /home/me/wokentities ~/wok +

   This will create the directory /home/me/entities if it +does not exist, then create +
    a c-shell executable file named~/wok. This file +will be your wok launcher. +

 d) Insert in your ~/.tclshrc the lines listed in the file /home/me/wok-C40/site/tclshrc_Wok. +
    This file is sourced by the tclsh shell at the beginning +of a session. +
    (See tcl documentation for more information about +the .tclshrc file.) +

 e) Import your /home/me/down/CAS4.0DVP1 directory tree under WOK +as the workbench KAS:C40:ref by typing : +

    % mkdir /home/me/workarea +
    % cd ~ +
    % ~/wok import  /home/me/workarea KAS C40 ref  +/home/me/down/CAS4.0DVP1 +
  + +