48 lines
1.6 KiB
Batchfile
48 lines
1.6 KiB
Batchfile
@echo off
|
|
REM ================================================================
|
|
REM mkpyproject.bat - Standard Python Projekt Template erstellen
|
|
REM ================================================================
|
|
REM Verwendung: mkpyproject.bat <projektname> [zielverzeichnis]
|
|
REM ================================================================
|
|
|
|
REM Umgebung laden
|
|
call "%~dp0setenv.bat"
|
|
|
|
REM Pruefen ob Umgebung gesetzt wurde
|
|
if not defined PV_LIB (
|
|
echo.
|
|
echo FEHLER: Umgebung konnte nicht geladen werden!
|
|
echo setenv.bat hat die Variablen nicht gesetzt.
|
|
echo.
|
|
exit /b 1
|
|
)
|
|
|
|
REM Pruefen ob Python verfuegbar ist
|
|
py --version >nul 2>&1
|
|
if errorlevel 1 (
|
|
python --version >nul 2>&1
|
|
if errorlevel 1 (
|
|
echo.
|
|
echo ================================================================
|
|
echo FEHLER: Kein Python-Interpreter gefunden!
|
|
echo ================================================================
|
|
echo.
|
|
echo Weder 'py' noch 'python' konnten ausgefuehrt werden.
|
|
echo.
|
|
echo Bitte sicherstellen, dass Python installiert ist und der
|
|
echo Pfad zur python.exe in der PATH-Umgebungsvariable enthalten ist.
|
|
echo.
|
|
echo 1. Python installieren: https://www.python.org/downloads/
|
|
echo 2. Bei der Installation "Add Python to PATH" aktivieren
|
|
echo 3. Oder manuell den Pfad hinzufuegen:
|
|
echo set PATH=%%PATH%%;C:\Python312
|
|
echo.
|
|
echo ================================================================
|
|
exit /b 1
|
|
)
|
|
python "%PV_LIB%\mkpyproject.py" %*
|
|
goto :eof
|
|
)
|
|
|
|
py "%PV_LIB%\mkpyproject.py" %*
|