Win32: Fixed startup script `smalltalk.bat`
...to correctly set `STX_LIBDIR` environment so
running Smalltalk finds it's resources.
See https://swing.fit.cvut.cz/projects/stx-jv/ticket/109#comment:1
@echo off
: $Header$
: startup script for smalltalk
: actually, simply calls stx, passing all arguments.
: In previous versions, smalltalk used to be the executable itself.
: This lead to problems on systems, where things like the PATH
: or STX_LIBDIR should be set in advance.
: Now, here is a place to do such things ...
if {%1}=={--help} goto usage
: change the line below, if
: the support stuff is not found in the
: directory where stx.com / stx.exe resides ...
: STX_LIB_DIR=<path_to_support_files>
set STX_BIN_DIR=%~dp0
set VERSION=6.2.6
if exist %STX_BIN_DIR%\stx-bin.com (
set "STX_HOME=%STX_BIN_DIR%.."
set "STX_TOPDIR=%STX_BIN_DIR%..\lib\smalltalkx\%VERSION%"
set "STX_LIBDIR=%STX_BIN_DIR%..\lib\smalltalkx\%VERSION%\lib"
set "STX_EXE=%STX_BIN_DIR%stx-bin.com"
) else (
set "STX_EXE=%STX_BIN_DIR%\stx.com"
)
%STX_EXE% %1 %2 %3 %4 %5 %6 %7 %8 %9 %10
goto end
:usage
echo.
echo usage: smalltalk stx-args
echo.
echo STX args:
%STX_EXE% --help
:end