Improve Python launcher discovery docs
This commit is contained in:
@@ -40,6 +40,39 @@ Wichtig: Das Fenster waehrend des Encodings offen lassen. Am Ende bleibt es steh
|
|||||||
- FFmpeg und FFprobe
|
- FFmpeg und FFprobe
|
||||||
- Schreibzugriff auf das Zielverzeichnis
|
- Schreibzugriff auf das Zielverzeichnis
|
||||||
|
|
||||||
|
Hinweis: Auf manchen Windows-Rechnern gibt es den Befehl `py` nicht. Das ist normal. `create_mezzanine.bat` sucht deshalb automatisch nach mehreren Python-Varianten:
|
||||||
|
|
||||||
|
1. lokale Python-Installationen wie `Python313`, `Python312`, `Python311`, `Python310`
|
||||||
|
2. `py`
|
||||||
|
3. `python`
|
||||||
|
4. `python3`
|
||||||
|
|
||||||
|
Wenn nichts davon gefunden wird, zeigt die Batch-Datei eine Installationsmeldung.
|
||||||
|
|
||||||
|
### Python und `py` installieren
|
||||||
|
|
||||||
|
`py` ist ein kleiner Python-Starter fuer Windows. Er hilft, die passende Python-Version zu finden. Fuer dieses Tool ist `py` praktisch, aber nicht zwingend notwendig, weil `create_mezzanine.bat` auch nach `python` und lokalen Python-Installationen sucht.
|
||||||
|
|
||||||
|
Einfachster Weg fuer einen neuen Rechner:
|
||||||
|
|
||||||
|
1. Python fuer Windows von [python.org](https://www.python.org/downloads/windows/) installieren.
|
||||||
|
2. Im Installer diese Optionen aktivieren:
|
||||||
|
- `Add python.exe to PATH`
|
||||||
|
- `py launcher` bzw. `Python Launcher for Windows`, falls angeboten
|
||||||
|
- `tcl/tk and IDLE`, damit die grafische Oberflaeche funktioniert
|
||||||
|
3. Nach der Installation ein neues PowerShell-Fenster oeffnen.
|
||||||
|
4. Pruefen:
|
||||||
|
```powershell
|
||||||
|
python --version
|
||||||
|
py --version
|
||||||
|
```
|
||||||
|
|
||||||
|
Wenn `python --version` funktioniert, aber `py --version` nicht, ist das fuer dieses Tool nicht schlimm. Dann startet die Batch-Datei Python ueber `python`.
|
||||||
|
|
||||||
|
Wenn weder `python` noch `py` funktioniert, Python erneut installieren und darauf achten, dass `Add python.exe to PATH` aktiviert ist.
|
||||||
|
|
||||||
|
Bei neueren Python-Versionen kann auch der Python Install Manager verwendet werden. Danach sollten normalerweise `python` und `py` verfuegbar sein.
|
||||||
|
|
||||||
FFmpeg und FFprobe werden automatisch gesucht:
|
FFmpeg und FFprobe werden automatisch gesucht:
|
||||||
|
|
||||||
1. explizite Pfade aus `config.ini`
|
1. explizite Pfade aus `config.ini`
|
||||||
@@ -64,13 +97,19 @@ Mit direktem Dateiparameter:
|
|||||||
Direkt per Python:
|
Direkt per Python:
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
py -3 .\pvd_mezzanine.py "D:\Trailers\Film_DEU51_ENG20.mov"
|
python .\pvd_mezzanine.py "D:\Trailers\Film_DEU51_ENG20.mov"
|
||||||
```
|
```
|
||||||
|
|
||||||
Kompatibler CLI-Modus:
|
Kompatibler CLI-Modus:
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
py -3 .\pvd_mezzanine.py --cli "D:\Trailers\Film_DEU51_ENG20.mov"
|
python .\pvd_mezzanine.py --cli "D:\Trailers\Film_DEU51_ENG20.mov"
|
||||||
|
```
|
||||||
|
|
||||||
|
Falls `python` nicht gefunden wird, aber der Python-Launcher vorhanden ist:
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
py -3 .\pvd_mezzanine.py "D:\Trailers\Film_DEU51_ENG20.mov"
|
||||||
```
|
```
|
||||||
|
|
||||||
Wenn Tkinter in der verwendeten Python-Installation verfuegbar ist, startet eine UI mit Analyse, Audio-Uebersicht und Encoding-Log.
|
Wenn Tkinter in der verwendeten Python-Installation verfuegbar ist, startet eine UI mit Analyse, Audio-Uebersicht und Encoding-Log.
|
||||||
@@ -122,11 +161,23 @@ Wenn Python nicht in der App-Liste auftaucht oder die Option fehlt, Python von [
|
|||||||
|
|
||||||
Pruefen, ob Tkinter verfuegbar ist:
|
Pruefen, ob Tkinter verfuegbar ist:
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
python -m tkinter
|
||||||
|
```
|
||||||
|
|
||||||
|
Wenn `python` nicht gefunden wird, alternativ versuchen:
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
py -3 -m tkinter
|
py -3 -m tkinter
|
||||||
```
|
```
|
||||||
|
|
||||||
Wenn ein kleines Testfenster erscheint, ist Tkinter installiert. Wenn eine Fehlermeldung erscheint, fehlt Tkinter in dieser Python-Installation.
|
Wenn ein kleines Testfenster erscheint, ist Tkinter installiert. Wenn eine Fehlermeldung erscheint, fehlt Tkinter in dieser Python-Installation oder Python ist nicht im `PATH`.
|
||||||
|
|
||||||
|
Wenn weder `python` noch `py` gefunden wird, Python neu von [python.org](https://www.python.org/downloads/windows/) installieren. Im Installer diese Optionen aktivieren:
|
||||||
|
|
||||||
|
- `Add python.exe to PATH`
|
||||||
|
- `py launcher` bzw. `Python Launcher for Windows`, falls angeboten
|
||||||
|
- `tcl/tk and IDLE`
|
||||||
|
|
||||||
## Ausgabe
|
## Ausgabe
|
||||||
|
|
||||||
|
|||||||
+39
-5
@@ -1,8 +1,42 @@
|
|||||||
@echo off
|
@echo off
|
||||||
set "PYTHON_EXE=%LocalAppData%\Programs\Python\Python311\python.exe"
|
setlocal
|
||||||
if exist "%PYTHON_EXE%" (
|
set "SCRIPT=%~dp0pvd_mezzanine.py"
|
||||||
"%PYTHON_EXE%" "%~dp0pvd_mezzanine.py" %*
|
set "PYTHON_EXE="
|
||||||
) else (
|
set "PYTHON_ARGS="
|
||||||
py -3 "%~dp0pvd_mezzanine.py" %*
|
|
||||||
|
for %%V in (313 312 311 310) do (
|
||||||
|
if not defined PYTHON_EXE if exist "%LocalAppData%\Programs\Python\Python%%V\python.exe" (
|
||||||
|
set "PYTHON_EXE=%LocalAppData%\Programs\Python\Python%%V\python.exe"
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if not defined PYTHON_EXE (
|
||||||
|
where py.exe >nul 2>nul
|
||||||
|
if not errorlevel 1 (
|
||||||
|
set "PYTHON_EXE=py"
|
||||||
|
set "PYTHON_ARGS=-3"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
if not defined PYTHON_EXE (
|
||||||
|
where python.exe >nul 2>nul
|
||||||
|
if not errorlevel 1 set "PYTHON_EXE=python"
|
||||||
|
)
|
||||||
|
|
||||||
|
if not defined PYTHON_EXE (
|
||||||
|
where python3.exe >nul 2>nul
|
||||||
|
if not errorlevel 1 set "PYTHON_EXE=python3"
|
||||||
|
)
|
||||||
|
|
||||||
|
if not defined PYTHON_EXE (
|
||||||
|
echo FEHLER: Python wurde nicht gefunden.
|
||||||
|
echo Bitte Python 3.10 oder neuer installieren:
|
||||||
|
echo https://www.python.org/downloads/windows/
|
||||||
|
echo.
|
||||||
|
echo Im Installer "Add python.exe to PATH", "py launcher" und "tcl/tk and IDLE" aktivieren.
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
"%PYTHON_EXE%" %PYTHON_ARGS% "%SCRIPT%" %*
|
||||||
pause
|
pause
|
||||||
|
|||||||
Reference in New Issue
Block a user