@echo off REM ============================================================ REM Build completo: PyInstaller (onedir) + Inno Setup REM Genera installer_output\UtileriasReconV2_Setup_X.X.X.exe REM ============================================================ setlocal cd /d "%~dp0" REM ------------------------------------------------------------ REM 1) Localizar el compilador de Inno Setup (ISCC.exe) REM ------------------------------------------------------------ set "ISCC=" if exist "%ProgramFiles(x86)%\Inno Setup 6\ISCC.exe" set "ISCC=%ProgramFiles(x86)%\Inno Setup 6\ISCC.exe" if exist "%ProgramFiles%\Inno Setup 6\ISCC.exe" set "ISCC=%ProgramFiles%\Inno Setup 6\ISCC.exe" if "%ISCC%"=="" ( echo [ERROR] No se encontro Inno Setup 6. echo Descargalo de: https://jrsoftware.org/isdl.php echo Instala la version "Stable Release", luego vuelve a ejecutar este script. goto :end ) echo [INFO] Inno Setup encontrado en: %ISCC% REM ------------------------------------------------------------ REM 2) Construir el .exe con PyInstaller (onedir) REM ------------------------------------------------------------ echo. echo [INFO] Paso 1/2: PyInstaller... call build_exe.bat if errorlevel 1 ( echo [ERROR] PyInstaller fallo. Revisa el log arriba. goto :end ) if not exist "dist\UtileriasReconV2\UtileriasReconV2.exe" ( echo [ERROR] No se genero dist\UtileriasReconV2\UtileriasReconV2.exe goto :end ) REM ------------------------------------------------------------ REM 3) Limpiar build previo del instalador REM ------------------------------------------------------------ if exist installer_output rmdir /s /q installer_output REM ------------------------------------------------------------ REM 4) Compilar el instalador REM ------------------------------------------------------------ echo. echo [INFO] Paso 2/2: Inno Setup... "%ISCC%" installer.iss if errorlevel 1 ( echo [ERROR] Inno Setup fallo. goto :end ) echo. echo ============================================================ echo INSTALADOR LISTO echo Archivo: installer_output\UtileriasReconV2_Setup_1.0.0.exe echo. echo Distribuye SOLO ese .exe. El usuario: echo 1. Ejecuta el instalador (1 vez, ~30 seg) echo 2. Edita .env desde el menu Inicio (acceso directo) echo 3. Doble clic en el icono del escritorio echo 4. La app arranca en ~3 seg (sin re-extraer) echo ============================================================ :end echo. pause endlocal