build: back to cmake.

This commit is contained in:
2025-07-06 23:51:45 +08:00
parent 13be630726
commit a04202c00e
33 changed files with 436 additions and 5247 deletions

View File

@@ -1,22 +1,17 @@
#!/bin/bash
current_user=$(whoami)
qt_path="/home/${current_user}/Qt5.14.2/5.14.2/gcc_64"
build_dir="build-linux/linux/x64/release"
if [ -d "$qt_path" ]; then
echo "Found Qt directory: $qt_path"
cd ..
xmake f -a x64 -m release --qt="$qt_path" --gui=y --qt5=y -o build-linux -v
xmake
cmake -B../build -S../ -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="$qt_path" -DQT_DEFAULT_MAJOR_VERSION=5 -DCOMPILE_GUI=ON
cmake --build ../build --config Release
if [ $? -eq 0 ]; then
find "$build_dir" -name "*.a" -delete 2>/dev/null
find "$build_dir" -name "*Test*" -type f -delete 2>/dev/null
echo "xmake command executed successfully"
echo "cmake command executed successfully"
else
echo "xmake command failed"
echo "cmake command failed"
exit 1
fi
else

View File

@@ -1,13 +1,9 @@
@echo off
@echo on
set QT_DIR=C:/Qt/6.8.3
cd ..
xmake f -p windows -a x64 -m release --qt=C:\Qt\6.8.3 --gui=y -o build-qt6 -v
xmake -r
set outDir=%~dp0..\build-qt6\windows\x64\release\
if %errorlevel% equ 0 (
del /q "%outDir%\*.lib" 2>nul
for /f "delims=" %%f in ('dir /b /a-d "%outDir%\*Test*" 2^>nul') do (
del /q "%outDir%\%%f"
)
C:\Qt\6.8.3\bin\windeployqt.exe %outDir%frelayGUI.exe
)
cmake -Bbuild-qt6 -S. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=%QT_DIR% -DQT_DEFAULT_MAJOR_VERSION=6 -DCOMPILE_GUI=ON
cmake --build build-qt6 --config Release
cd build-qt6
cpack
pause

View File

@@ -1,11 +1,2 @@
#!/bin/bash
cd ..
xmake f -a x64 -m release --qt="/data/data/com.termux/files/usr/lib" --qt5=y -o build-linux -v
xmake
if [ $? -eq 0 ]; then
echo "xmake command executed successfully"
else
echo "xmake command failed"
exit 1
fi
cmake -B../build -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/data/data/com.termux/files/usr/lib -S../
cmake --build ../build --config Release

View File

@@ -1,17 +1,12 @@
@echo on
set QT_DIR=C:\Qt\Qt5.7.1\5.7\mingw53_32
set COMPILE_DIR=C:\Qt\Qt5.7.1\Tools\mingw530_32
set QT_DIR=C:/Qt/Qt5.7.1/5.7/mingw53_32
set COMPILE_DIR=C:/Qt/Qt5.7.1/Tools/mingw530_32
set PATH=%PATH%;%COMPILE_DIR%/bin
set PATH=%PATH%;%COMPILE_DIR\bin%
xmake f -p mingw --sdk=C:\Qt\Qt5.7.1\Tools\mingw530_32 -a i386 -m release --qt=%QT_DIR% --gui=y --qt5=y --xp=y -o build-xp -v
xmake
set outDir=%~dp0..\build-xp\mingw\i386\release\
if %errorlevel% equ 0 (
del /q "%outDir%\*.a" 2>nul
for /f "delims=" %%f in ('dir /b /a-d "%outDir%\*Test*" 2^>nul') do (
del /q "%outDir%\%%f"
)
%QT_DIR%\bin\windeployqt.exe %outDir%frelayGUI.exe
)
cd ..
cmake -Bbuild-xp -S. -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=%QT_DIR% -DQT_DEFAULT_MAJOR_VERSION=5 -DXP_PLATFORM_SUPPORT=ON -DCOMPILE_GUI=ON
cmake --build build-xp --config Release
cd build-xp
cpack
pause