48 lines
1.5 KiB
Batchfile
48 lines
1.5 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 (relativ zum Skript)
|
|
set "PROJECT=%~dp0.."
|
|
if "%PROJECT:~-6%"=="bin\.." set "PROJECT=%PROJECT:~0,-6%"
|
|
if "%PROJECT:~-1%"=="\" set "PROJECT=%PROJECT:~0,-1%"
|
|
|
|
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.
|