-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_executable.bat
More file actions
108 lines (96 loc) · 2.91 KB
/
build_executable.bat
File metadata and controls
108 lines (96 loc) · 2.91 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
@echo off
echo ========================================
echo WhatsAppBlitz - Generador de Ejecutable
echo ========================================
echo.
:: Check Si Python is installed
alado
python --version >nul 2>&1
if %errorlevel% neq 0 (
echo ERROR: Python no está instalado o no está en el PATH
echo Por favor instala Python desde https://python.org
pause
exit /b 1
)
echo [1/5] Verificando Python... OK
:: Create virtual environment if there is no
if not exist "venv" (
echo [2/5] Creando entorno virtual...
python -m venv .venv
if %errorlevel% neq 0 (
echo ERROR: No se pudo crear el entorno virtual
pause
exit /b 1
)
) else (
echo [2/5] Entorno virtual ya existe... OK
)
:: Activate virtual environment
echo [3/5] Activando entorno virtual...
call .venv\Scripts\activate.bat
if %errorlevel% neq 0 (
echo ERROR: No se pudo activar el entorno virtual
pause
exit /b 1
)
:: Install dependencies
echo [4/5] Instalando dependencias...
pip install --upgrade pip
pip install -r requirements.txt
pip install pyinstaller
if %errorlevel% neq 0 (
echo ERROR: No se pudieron instalar las dependencias
pause
exit /b 1
)
:: Check if audio template files exist
echo [5/6] Verificando archivos de plantilla de audio...
if not exist "config\img\theme_ligth_audio.png" (
echo ERROR: No se encontró config\img\theme_ligth_audio.png
echo Este archivo es necesario para la funcionalidad de audio
pause
exit /b 1
)
if not exist "config\img\theme_dark_audio.png" (
echo ERROR: No se encontró config\img\theme_dark_audio.png
echo Este archivo es necesario para la funcionalidad de audio
pause
exit /b 1
)
echo Archivos de plantilla de audio verificados... OK
:: Clean previous Builds
echo [6/6] Limpiando builds anteriores...
if exist "build" rmdir /s /q "build"
if exist "dist" rmdir /s /q "dist"
if exist "__pycache__" rmdir /s /q "__pycache__"
:: Generate executable
echo.
echo ========================================
echo Generando ejecutable...
echo ========================================
echo.
pyinstaller WhatsAppBlitz.spec --clean --noconfirm
if %errorlevel% neq 0 (
echo.
echo ERROR: No se pudo generar el ejecutable
echo Revisa los errores anteriores
pause
exit /b 1
)
echo.
echo ========================================
echo ¡Ejecutable generado exitosamente!
echo ========================================
echo.
echo El ejecutable se encuentra en: dist\WhatsAppBlitz.exe
echo.
echo IMPORTANTE:
echo - Copia la carpeta 'config' junto al ejecutable
echo - Asegúrate de que los archivos de configuración estén presentes
echo - Las imágenes de plantilla de audio están incluidas automáticamente
echo - El ejecutable incluye todas las dependencias necesarias
echo - Se nececitara una licencia valida para que funcione correctamente.
echo.
echo Presiona cualquier tecla para abrir la carpeta dist...
pause >nul
explorer dist