v0.5.2
Python application / build (push) Waiting to run

Что то сделал
This commit is contained in:
Igor20264
2026-09-08 19:37:54 +03:00
parent 1a5b35eb54
commit 510f7e7adf
90 changed files with 11720 additions and 5547 deletions
+15 -17
View File
@@ -13,34 +13,37 @@ if /i "%~2"=="clean" set "PYI_CLEAN=--clean"
echo === md2gost: быстрая сборка exe, onefile, шрифты и plantuml.jar ===
echo Каталог: %CD%
echo Spec: md2gost.fast.spec
echo Python: 3.11 ^(ищем, не берём первый python из PATH^)
echo Кэш: build-fast\ без --clean, пока не передадите clean
echo.
where python >nul 2>&1
call "%~dp0build-find-python311.bat"
if errorlevel 1 goto :nopython
python -c "import sys; raise SystemExit(sys.hexversion < 0x030A0000)"
if errorlevel 1 goto :oldpython
if not defined PYEXE goto :nopython
echo [1/4] Зависимости ...
python -c "import PyInstaller, matplotlib, docx, marko, lxml, pygments, PIL, freetype, latex2mathml, requests, docxcompose" 1>nul 2>nul
"%PYEXE%" -c "import PyInstaller, matplotlib, docx, marko, lxml, pygments, PIL, freetype, latex2mathml, requests, docxcompose, tkinterdnd2" 1>nul 2>nul
if not errorlevel 1 goto :deps_ok
echo Ставлю проект + PyInstaller + matplotlib ...
python -m pip install -q -e . "pyinstaller>=6.0" "matplotlib>=3.7"
echo Ставлю проект + PyInstaller + matplotlib + tkinterdnd2 ...
"%PYEXE%" -m pip install -q -e . "pyinstaller>=6.0" "matplotlib>=3.7" "tkinterdnd2"
if errorlevel 1 goto :pipfail
:deps_ok
if not exist "md2gost\Template.docx" goto :notemplate
echo [2/4] PlantUML jar + Mermaid assets ...
python scripts\fetch_plantuml.py
echo [2/4] PlantUML jar + Graphviz + Mermaid assets ...
"%PYEXE%" scripts\fetch_plantuml.py
if not exist "md2gost\vendor\plantuml.jar" goto :nojar
"%PYEXE%" scripts\fetch_graphviz.py
if not exist "md2gost\vendor\graphviz\bin\dot.exe" (
echo Предупреждение: Graphviz нет — в exe DFD пойдёт через kroki.io / PATH.
)
if not exist "md2gost\diagrams\mermaid.min.js" (
python scripts\fetch_mermaid.py
"%PYEXE%" scripts\fetch_mermaid.py
)
echo [3/4] PyInstaller onefile, кэш build-fast ...
python -m PyInstaller --noconfirm %PYI_CLEAN% --workpath build-fast --distpath dist md2gost.fast.spec
"%PYEXE%" -m PyInstaller --noconfirm %PYI_CLEAN% --workpath build-fast --distpath dist md2gost.fast.spec
if errorlevel 1 goto :pyifail
if not exist "dist\md2gost.exe" goto :noexe
@@ -57,12 +60,7 @@ if "%DO_PAUSE%"=="1" pause
exit /b 0
:nopython
echo Python не найден в PATH. Установите Python 3.10+ и отметьте "Add python.exe to PATH".
goto :fail
:oldpython
echo Нужен Python 3.10 или новее.
python --version
echo Нужен именно Python 3.11. Через uv без системного 3.11: build-exe-uvx.bat
goto :fail
:pipfail