1 Star 0 Fork 0

有故事的小脑斧/codelite

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
make-weekly 2.15 KB
一键复制 编辑 原始数据 按行查看 历史
#!/bin/bash
# Keep the current folder
curdir=`pwd`
# Clear old installers
os_name=`uname -s`
upload_file="no"
build_gtk3="no"
wx_config_gtk3_path=""
os_name=`uname -s`
if [ ${os_name} == "Darwin" ]; then
echo rm -f $curdir/build-release/codelite.app.tar.gz
rm -f $curdir/build-release/codelite.app.tar.gz
cpu_count=`sysctl -n hw.ncpu`
else
cpu_count=`nproc`
fi
## parse the command line arguments and over defaults
for i in "$@"
do
case $i in
"--upload")
upload_file="yes"
shift
;;
--cpu-count=*)
cpu_count="${i#*=}"
shift
;;
--with-gtk3=*)
wx_config_gtk3_path="${i#*=}"
build_gtk3="yes"
shift
;;
esac
done
echo "Platform : ${os_name}"
echo "CPU count : ${cpu_count}"
echo "Upload binary: ${upload_file}"
echo "GTK3 build : ${wx_config_gtk3_path}"
# Update our source tree
cd $curdir
echo "Pulling CodeLite changes..."
echo `pwd`
git pull --rebase
if [ $? -ne 0 ]; then
exit $?
fi
cd $curdir
ORIG_PATH=$PATH
ORIG_LDPATH=$LD_LIBRARY_PATH
linux_build() {
mkdir -p $curdir/$1
cd $curdir/$1 # cd to the build folder
echo rm -fr *.deb
rm -fr *.deb
export PATH=$2:${ORIG_PATH}
export LD_LIBRARY_PATH=$2/lib:${ORIG_LDPATH}
cmake -DCMAKE_BUILD_TYPE=Release -DMAKE_DEB=1 -DCOPY_WX_LIBS=1 ..
make -j${cpu_count} && make package
if [ "${upload_file}" == "yes" ]; then
deb_file=`ls -lt *.deb|awk '{print $9;}'|head -n 1`
echo Uploading deb file ${deb_file}
scp ${deb_file} root@codelite.org:/var/www/html/downloads/codelite/wip
fi
cd $curdir
}
# Build and upload
if [ ${os_name} == "Darwin" ]; then
cd build-release
cmake -DCMAKE_BUILD_TYPE=Release .. -DWITH_PCH=1
make -j${cpu_count} && make install
if [ "${upload_file}" == "yes" ]; then
tar cvfz codelite.app.tar.gz codelite.app/*
scp codelite.app.tar.gz root@codelite.org:/var/www/html/downloads/codelite/wip
fi
else
linux_build build-release
if [ "${build_gtk3}" == "yes" ]; then
linux_build build-release-gtk3 ${wx_config_gtk3_path}
fi
fi
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/fe.zookeeper/codelite.git
git@gitee.com:fe.zookeeper/codelite.git
fe.zookeeper
codelite
codelite
master

搜索帮助