-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.bat
More file actions
48 lines (40 loc) · 1.13 KB
/
build.bat
File metadata and controls
48 lines (40 loc) · 1.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
@echo off
setlocal
REM Check for OpenSSL environment variables
if not defined OPENSSL_DIR (
echo Setting default OpenSSL directory...
set OPENSSL_DIR=C:\Program Files\OpenSSL-Win64
)
if not exist "%OPENSSL_DIR%" (
echo Error: OpenSSL directory not found at %OPENSSL_DIR%
echo Please install OpenSSL or set OPENSSL_DIR to the correct path
exit /b 1
)
REM Create build directory if it doesn't exist
if not exist "build" mkdir build
REM Compile with OpenSSL includes and libraries
g++ -std=c++17 ^
-I include ^
-I"%OPENSSL_DIR%\include" ^
-L"%OPENSSL_DIR%\lib" ^
-o build/aqadel.exe ^
src/main.cpp ^
src/CLI.cpp ^
src/Encryption.cpp ^
src/UserManager.cpp ^
-lssl ^
-lcrypto ^
-lws2_32 ^
-lgdi32 ^
-lcrypt32
if %ERRORLEVEL% EQU 0 (
echo Build successful!
REM Copy required DLLs to build directory
copy "%OPENSSL_DIR%\bin\libssl-3-x64.dll" build\
copy "%OPENSSL_DIR%\bin\libcrypto-3-x64.dll" build\
echo Executable and dependencies are in the build directory
echo Execute build\aqadel.exe to run the program
) else (
echo Build failed!
)
endlocal