From 9b436747308cb9358bb7e03c7110d2873dd0f4b2 Mon Sep 17 00:00:00 2001 From: taynpg Date: Tue, 21 Jan 2025 16:56:39 +0800 Subject: [PATCH] =?UTF-8?q?add=EF=BC=9A=E6=B7=BB=E5=8A=A0xp=E6=9E=84?= =?UTF-8?q?=E5=BB=BA=E8=84=9A=E6=9C=AC=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xp_build.bat | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 xp_build.bat diff --git a/xp_build.bat b/xp_build.bat new file mode 100644 index 0000000..8d0fefc --- /dev/null +++ b/xp_build.bat @@ -0,0 +1,33 @@ +@echo off +REM Step 1: 配置 xmake +echo Configuring xmake... +xmake f -p mingw -a i386 --boost=y +if %errorlevel% neq 0 ( + echo Error: xmake configuration failed. + pause + exit /b 1 +) + +REM Step 2: 设置环境变量 +echo Setting environment variables... +set BOOST_HEADER_DIR=C:\boost\include\boost-1_83 +set BOOST_LIB_DIR=C:\boost\lib +set BOOST_LIBS=boost_filesystem-mgw7-mt-x32-1_83 + +REM 验证设置的环境变量 +echo BOOST_HEADER_DIR=%BOOST_HEADER_DIR% +echo BOOST_LIB_DIR=%BOOST_LIB_DIR% +echo BOOST_LIBS=%BOOST_LIBS% + +REM Step 3: 构建项目 +echo Building project with xmake... +xmake +if %errorlevel% neq 0 ( + echo Error: xmake build failed. + pause + exit /b 1 +) + +REM 完成 +echo Build completed successfully. +pause \ No newline at end of file