@echo off pushd "%CD%" CD /D "%~dp0" set GSDLLANG=en set extdesc=the Ngram-Java Extension if "%OS%" == "Windows_NT" goto WinNT if "%OS%" == "" goto Win95 if "%GSDLLANG%" == "en" echo Setup failed - your PATH has not been set if "%GSDLLANG%" == "es" echo No se pudo realizar la configuraci˘n - no se ha establecido la RUTA. if "%GSDLLANG%" == "fr" echo Ech‚c de l'installation - votre variable PATH n'a pas ‚t‚ ajust‚e if "%GSDLLANG%" == "ru" echo “áâ ­®˘Ş  ­Ą 㤠« áě - Ź“’ś ­Ą ˇë« ăáâ ­®˘«Ą­ goto End :WinNT set GEXTNGRAMJ=%CD% set GEXTNGRAMJ_INSTALLED=%GEXTNGRAMJ%\windows set PATH=%GEXTNGRAMJ_INSTALLED%\bin;%PATH% set GS_CP_SET=yes goto Success :Win95 if "%1" == "SetEnv" goto Win95Env REM We'll invoke a second copy of the command processor to make REM sure there's enough environment space COMMAND /E:2048 /K %0 SetEnv goto End :Win95Env set GEXTNGRAMJ=%CD% set PATH="%GEXTNGRAMJ_INSTALLED%\bin";"%PATH%" set GS_CP_SET=yes goto Success :Success set fulldir=%~dp0 :: strip off everything up to (and including) ext dir set extdir=%fulldir:*ext\=% :: remove trailing slash set extdir=%extdir:\=% setlocal enabledelayedexpansion if "x%GSDLEXTS%" == "x" ( set GSDLEXTS=!extdir! ) else ( set GSDLEXTS=!GSDLEXTS!:!extdir! ) endlocal & set GSDLEXTS=%GSDLEXTS% echo +Your environment is now setup for %extdesc% :End popd