Files
mir_server/server/rebuild.sh
aixianling 5c9f1dae4a init
2025-01-09 17:45:40 +08:00

31 lines
759 B
Bash

#! /bin/bash
# 编译模式
if [ -n "$1" ]; then
BuiltType=$1
else
BuiltType=Release
fi
# 移除上次编译cache
rm -rf CMakeCache.txt cmake_install.cmake CMakeFiles/
find /home -iname "*CMakeFiles*" -type d -exec rm -rf {} + ;
find /home -iname "*CMakeCache*" -type f -exec rm -rf {} + ;
find /home -iname "*cmake_install*" -type f -exec rm -rf {} + ;
find /home -iname "makefile" -type f -exec rm -rf {} + ;
# 生成lua注册文件
cd $(cd "$(dirname "$0")" && pwd)
srcDIR=`pwd`
cd LogicServer/script/tolua++
./../../../../common/cpp/libs/src/tolua++/tolua++ -n server -o serverInterface.cpp serverInterface.scp
# 生成项目并编译
cd $srcDIR
cmake -DCMAKE_BUILD_TYPE=${BuiltType} ./
make -j4
# 记录版本
#svn log -l 1 > web/server.version