-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.bat
More file actions
63 lines (56 loc) · 3.13 KB
/
build.bat
File metadata and controls
63 lines (56 loc) · 3.13 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
@echo off
:: ═══════════════════════════════════════════════════════════════
:: RevivaX — Build do Executável (PyInstaller)
:: Gera o executável standalone em dist\RevivaX\RevivaX.exe
:: ═══════════════════════════════════════════════════════════════
setlocal
set "NO_PAUSE="
if /I "%~1"=="--no-pause" set "NO_PAUSE=1"
echo.
echo ╔══════════════════════════════════════════════════════╗
echo ║ RevivaX — Gerando Executavel... ║
echo ╚══════════════════════════════════════════════════════╝
echo.
:: ── Verifica Python ──────────────────────────────────────────────
python --version >nul 2>&1
if %errorlevel% neq 0 (
echo [ERRO] Python nao encontrado. Instale antes de compilar.
pause
exit /b 1
)
:: ── Verifica / instala PyInstaller ───────────────────────────────
python -m PyInstaller --version >nul 2>&1
if %errorlevel% neq 0 (
echo [INFO] PyInstaller nao encontrado. Instalando...
pip install -r requirements-dev.txt
if %errorlevel% neq 0 (
echo [ERRO] Falha ao instalar o PyInstaller.
pause
exit /b 1
)
)
echo [1/2] Compilando... (pode levar alguns minutos)
echo.
:: ── PyInstaller: empacota usando a spec oficial ───────────────────
python -m PyInstaller --noconfirm --clean RevivaX.spec
if %errorlevel% equ 0 (
echo.
echo ╔══════════════════════════════════════════════════════╗
echo ║ [OK] Build concluido com sucesso! ║
echo ║ ║
echo ║ Executavel: dist\RevivaX\RevivaX.exe ║
echo ║ Manifesto: elevacao UAC habilitada ║
echo ║ ║
echo ║ OBSERVACOES: ║
echo ║ - O smartctl.exe sera baixado automaticamente ║
echo ║ na primeira execucao (requer internet) ║
echo ║ - Execute sempre como Administrador para ║
echo ║ acessar discos fisicos ║
echo ╚══════════════════════════════════════════════════════╝
) else (
echo.
echo [ERRO] Falha no build. Verifique os logs acima.
)
echo.
if not defined NO_PAUSE pause
exit /b %errorlevel%