-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgo.bat
More file actions
58 lines (50 loc) · 1.41 KB
/
Copy pathgo.bat
File metadata and controls
58 lines (50 loc) · 1.41 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
@echo off
REM go.bat - Compilation et execution de AzureArcAgentChecker
REM (c) 2025 Ayi NEDJIMI Consultants
echo ========================================
echo Azure Arc Agent Checker - Compilation
echo (c) Ayi NEDJIMI Consultants
echo ========================================
echo.
set SRC=AzureArcAgentChecker.cpp
set EXE=AzureArcAgentChecker.exe
set LIBS=comctl32.lib psapi.lib wevtapi.lib advapi32.lib user32.lib gdi32.lib shell32.lib
REM Recherche du compilateur
where cl.exe >nul 2>&1
if %errorlevel% neq 0 (
echo [ERREUR] Compilateur MSVC non trouve dans PATH
echo Veuillez executer depuis "Developer Command Prompt for VS"
echo ou "x64 Native Tools Command Prompt for VS"
pause
exit /b 1
)
echo [1/3] Compilation en cours...
cl.exe /nologo /W3 /O2 /EHsc /D_UNICODE /DUNICODE %SRC% /Fe:%EXE% /link %LIBS%
if %errorlevel% neq 0 (
echo.
echo [ERREUR] Echec de la compilation
pause
exit /b 1
)
echo.
echo [2/3] Nettoyage des fichiers intermediaires...
if exist *.obj del *.obj
if exist *.pdb del *.pdb
echo.
echo [3/3] Compilation reussie!
echo.
if exist %EXE% (
echo Executable genere: %EXE%
echo Taille:
dir /-c %EXE% | find "%EXE%"
echo.
echo ========================================
echo Lancement de l'application...
echo ========================================
echo.
%EXE%
) else (
echo [ERREUR] Executable non genere
pause
exit /b 1
)