41 lines
779 B
Batchfile
41 lines
779 B
Batchfile
@echo off
|
|
setlocal
|
|
|
|
cd /d "%~dp0"
|
|
|
|
echo.
|
|
echo === MailExporter build ===
|
|
echo Working directory: %CD%
|
|
echo.
|
|
|
|
python -m PyInstaller --version >nul 2>&1
|
|
if errorlevel 1 (
|
|
echo PyInstaller non risulta installato nell'ambiente Python corrente.
|
|
echo.
|
|
echo Installa le dipendenze con:
|
|
echo python -m pip install pyinstaller customtkinter pywin32
|
|
echo.
|
|
exit /b 1
|
|
)
|
|
|
|
echo Pulizia build precedente...
|
|
if exist build rmdir /s /q build
|
|
if exist dist\MailExporter rmdir /s /q dist\MailExporter
|
|
|
|
echo.
|
|
echo Avvio PyInstaller...
|
|
python -m PyInstaller --clean --noconfirm mailexporter.spec
|
|
if errorlevel 1 (
|
|
echo.
|
|
echo Build fallita.
|
|
exit /b 1
|
|
)
|
|
|
|
echo.
|
|
echo Build completata.
|
|
echo Eseguibile:
|
|
echo %CD%\dist\MailExporter\MailExporter.exe
|
|
echo.
|
|
|
|
endlocal
|