Corrected a long-standing error in which ending text with a literal
[xcircuit.git] / lib / tcl / xcircuit.bat.in
blob8b78f733ec85c3d26bb6dc593d6d453516a77e88
1 @echo off
2 rem
3 rem This script starts xcircuit under the Tcl interpreter,
4 rem reading commands from a special .wishrc script which
5 rem launches magic and retains the Tcl interactive interpreter.
6 rem
8 set XCIRCUIT_LIB_DIR=XCLIBDIR
9 set XCIRCUIT_WISH=WISH_EXE
11 set loclibdir=%XCIRCUIT_LIB_DIR%
13 set TKCON=1
14 for %%i in (%*) do (
15 if "%%i" == "-noconsole" set TKCON=0
18 if "%TKCON%" == "1" (
20 if not exist %loclibdir%/CONSOLE set loclibdir=%loclibdir%/tcl
22 start %XCIRCUIT_WISH% %loclibdir%/CONSOLE -eval "source %loclibdir%/CONSOLE_SCRIPT" -slave "package require Tk; set argv [list %*]; set argc [llength argv]; source %loclibdir%/WRAPPER_INIT"
24 ) else (
27 rem Run the stand-in for wish (xcircexec), which acts exactly like "wish"
28 rem except that it replaces ~/.wishrc with xcircuit.tcl. This executable is
29 rem *only* needed when running without the console; the console itself is
30 rem capable of sourcing the startup script.
32 %loclibdir%/xcircexec -- %*