@echo off echo ======================================== echo AI File Converter Pro - Build Script echo ======================================== echo. REM Clean previous builds echo [1/4] Cleaning previous builds... if exist build rmdir /s /q build if exist dist rmdir /s /q dist if exist *.spec del /q *.spec REM Run PyInstaller echo [2/4] Creating executable with PyInstaller... pyinstaller --noconsole --onefile --icon=logo.ico --name="AIFileConverter" main.py if %errorlevel% neq 0 ( echo ERROR: PyInstaller failed! pause exit /b %errorlevel% ) REM Check if executable was created if not exist "dist\AIFileConverter.exe" ( echo ERROR: Executable not found! pause exit /b 1 ) REM Create installer with Inno Setup echo [3/4] Creating installer with Inno Setup... REM Try to find Inno Setup compiler set ISCC_PATH="" if exist "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" set ISCC_PATH="C:\Program Files (x86)\Inno Setup 6\ISCC.exe" if exist "C:\Program Files\Inno Setup 6\ISCC.exe" set ISCC_PATH="C:\Program Files\Inno Setup 6\ISCC.exe" if %ISCC_PATH% == "" ( echo ERROR: Inno Setup not found! echo Please install Inno Setup from: https://jrsoftware.org/isdl.php pause exit /b 1 ) %ISCC_PATH% setup_advanced.iss if %errorlevel% neq 0 ( echo ERROR: Inno Setup compilation failed! pause exit /b %errorlevel% ) REM Done echo. echo [4/4] Build completed successfully! echo. echo Installer created: InstallerOutput\AI_File_Converter_Pro_v2.0_Setup.exe echo. pause