File size: 1,580 Bytes
1decbc8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
@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