dd-timer/build.bat

51 lines
1.4 KiB
Batchfile

@echo off
net session >nul 2>&1
if %errorlevel% neq 0 (
powershell -Command "Start-Process -FilePath '%~f0' -Verb RunAs -Wait"
exit /b
)
cd /d "%~dp0"
set CSC_IDENTITY_AUTO_DISCOVERY=false
set CSC_LINK=
set WIN_CSC_LINK=
echo.
echo ================================================
echo MINUTEUR DRAGODINDE - Construction du .exe
echo ================================================
echo.
node -v >nul 2>&1
if %errorlevel% neq 0 (
echo [ERREUR] Node.js introuvable.
echo Installez depuis https://nodejs.org
start https://nodejs.org
pause
exit /b 1
)
for /f "tokens=*" %%v in ('node -v') do echo [OK] Node.js %%v
echo Nettoyage cache...
if exist "%LOCALAPPDATA%\electron-builder\Cache\winCodeSign" rmdir /s /q "%LOCALAPPDATA%\electron-builder\Cache\winCodeSign"
echo [OK] Cache nettoye
echo.
echo [1/3] Installation des dependances...
call npm install
if %errorlevel% neq 0 ( echo [ERREUR] npm install & pause & exit /b 1 )
echo [OK] Dependances OK
echo.
echo [2/3] Construction du setup .exe (2-5 minutes)...
call npm run build
if %errorlevel% neq 0 ( echo [ERREUR] Build echoue & pause & exit /b 1 )
echo.
echo [3/3] Termine !
echo.
echo ================================================
echo Installeur pret dans le dossier dist\
echo Fichier : Minuteur Dragodinde Setup 1.0.0.exe
echo ================================================
echo.
if exist dist explorer dist
pause