@echo off pushd "%CD%" CD /D "%~dp0" set extdesc=the Echoprint-codegen 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 GEXT_ECHOPRINT=%CD% set PATH=%GEXT_ECHOPRINT%\bin\script;%PATH% set PATH=%GEXT_ECHOPRINT%\bin\windows;%PATH% set PATH=%GEXT_ECHOPRINT%\lib;%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 GEXT_ECHOPRINT=%CD% set PATH="%GEXT_ECHOPRINT%\bin\script";"%PATH%" set PATH="%GEXT_ECHOPRINT%\bin\windows";"%PATH%" set PATH="%GEXT_ECHOPRINT%\lib";"%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% :: Back to delayed expansion to avoid problems with environment :: variables with brackets in them, such as "Program Files (x86)" :End popd