-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_build.bat
More file actions
65 lines (54 loc) · 2.17 KB
/
Copy path_build.bat
File metadata and controls
65 lines (54 loc) · 2.17 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
@echo off
setlocal enabledelayedexpansion
:: Default MSYS2 installation path (can be overridden by environment variable)
if not defined MSYS2_ROOT set MSYS2_ROOT=C:\msys64
echo [ENV] Setting up MSYS2 UCRT64 environment...
echo [ENV] Using MSYS2_ROOT: %MSYS2_ROOT%
:: Verify MSYS2 installation
if not exist "%MSYS2_ROOT%\ucrt64\bin" (
echo [ERROR] MSYS2 UCRT64 not found at: %MSYS2_ROOT%
echo [ERROR] Please install MSYS2 or set MSYS2_ROOT environment variable
pause
exit /b 1
)
set PATH=%MSYS2_ROOT%\ucrt64\bin;%MSYS2_ROOT%\usr\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\WindowsPowerShell\v1.0\
set CC=
set CXX=
set MAKE=
set INCLUDE=
set LIB=
echo [CLEAN] Removing old build directory...
if exist "build" rd /s /q build
echo [CMAKE] Configuring project (Debug mode)...
cmake -G "Ninja" -B build -S . -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=%MSYS2_ROOT%/ucrt64/bin/g++.exe
if %ERRORLEVEL% NEQ 0 (
echo [ERROR] CMake configuration failed!
pause
exit /b %ERRORLEVEL%
)
echo [BUILD] Compiling...
cmake --build build
if %ERRORLEVEL% NEQ 0 (
echo [ERROR] Compilation failed!
pause
exit /b %ERRORLEVEL%
)
echo [DEPLOY] Running windeployqt6 (Qt dependencies)...
"%MSYS2_ROOT%\ucrt64\bin\windeployqt6.exe" --no-opengl-sw --no-translations build\selecti.exe
if %ERRORLEVEL% NEQ 0 (
echo [ERROR] windeployqt6 failed!
pause
exit /b %ERRORLEVEL%
)
echo [DEPLOY] Copying additional DLL dependencies (MinGW runtime, ICU, TLS)...
for %%F in (libwinpthread-1.dll libstdc++-6.dll libgcc_s_seh-1.dll libicu*.dll libb2-*.dll libdouble-conversion.dll libpcre2-*.dll libzstd.dll libmd4c.dll libharfbuzz-*.dll libfreetype-*.dll libgraphite2.dll libglib-2.0-*.dll libintl-*.dll libiconv-*.dll libpng*.dll zlib*.dll libbz2-*.dll libbrotli*.dll libcrypto*.dll libssl*.dll) do (
if exist "%MSYS2_ROOT%\ucrt64\bin\%%F" (
copy /Y "%MSYS2_ROOT%\ucrt64\bin\%%F" "build\" >nul
echo [OK] %%F
)
)
echo [DEPLOY] Copying application resources (icon, default locale EN)...
copy /Y "src\res\app_icon.ico" "build\app_icon.ico" >nul
copy /Y "src\res\locales\strings-eng.json" "build\strings.json" >nul
echo [DONE] Selecti ready in the build folder.
pause