3 # This script starts xcircuit under the Tcl interpreter,
4 # reading commands from a special .wishrc script which
5 # launches xcircuit and retains the Tcl interactive interpreter.
8 loclibdir
=${XCIRCUIT_LIB_DIR:=XCLIBDIR}
9 export XCIRCUIT_LIB_DIR
10 XCIRCUIT_WISH
=WISH_EXE
14 if [ ${TERM:=""} = "cygwin" ]; then
15 export PATH
=$PATH:TCLLIBDIR
16 export DISPLAY
=${DISPLAY:=":0"}
29 echo "Standard usage:"
30 echo " xcircuit [filename]"
31 echo "Online documentation:"
32 echo " http://opencircuitdesign.com/xcircuit"
36 echo "XCircuit version PROG_VERSION revision PROG_REVISION"
44 if [ ! -f ${loclibdir}/CONSOLE
]; then
45 loclibdir
=${loclibdir}/tcl
48 exec ${loclibdir}/CONSOLE \
49 -eval "source ${loclibdir}/CONSOLE_SCRIPT" \
50 -slave "package require Tk; set argc $#; set argv [list $*]; \
51 source ${loclibdir}/WRAPPER_INIT"
55 # Run the stand-in for wish (xcircexec), which acts exactly like "wish"
56 # except that it replaces ~/.wishrc with xcircuit.tcl. This executable is
57 # *only* needed when running without the console; the console itself is
58 # capable of sourcing the startup script.
61 exec ${loclibdir}/xcircdnull
-- $@
63 exec ${loclibdir}/xcircexec
-- $@