Files
tools/bin/setenv.bat
T

46 lines
1.3 KiB
Batchfile

@echo off
REM ================================================================
REM TOOLS - Umgebungsvariablen Setup
REM ================================================================
if defined TOOLS_BIN (
echo TOOLS Umgebung bereits gesetzt.
goto :show
)
echo Setting up environment variables for TOOLS ...
REM Basis-Projektpfad (absolut)
set "PROJECT=c:\tools"
REM Pfade fuer verschiedene Komponenten
set "TOOLS_BIN=%PROJECT%\bin"
set "TOOLS_LIB=%PROJECT%\lib"
set "TOOLS_TEMPLATES=%PROJECT%\templates"
REM Python-Pfad erweitern (nur wenn noch nicht vorhanden)
echo %PYTHONPATH% | find /i "%TOOLS_LIB%" >nul
if errorlevel 1 (
set "PYTHONPATH=%TOOLS_LIB%;%PYTHONPATH%"
)
REM Ordner erstellen falls sie nicht existieren
if not exist "%TOOLS_BIN%" mkdir "%TOOLS_BIN%"
if not exist "%TOOLS_LIB%" mkdir "%TOOLS_LIB%"
if not exist "%TOOLS_TEMPLATES%" mkdir "%TOOLS_TEMPLATES%"
REM Umgebungsvariablen anzeigen
:show
echo.
echo ================================================================
echo TOOLS ENVIRONMENT SETUP COMPLETE
echo ================================================================
echo PROJECT = %PROJECT%
echo TOOLS_BIN = %TOOLS_BIN%
echo TOOLS_LIB = %TOOLS_LIB%
echo TOOLS_TEMPLATES = %TOOLS_TEMPLATES%
echo PYTHONPATH = %PYTHONPATH%
echo ================================================================
echo.