mirror of
https://github.com/msojocs/wechat-web-devtools-linux.git
synced 2025-07-22 00:00:04 +08:00
commit 48f6b5450d7d0983f1f697c176cf1e129bb51629 Author: msojocs <jiyecafe@gmail.com> Date: Fri Mar 4 18:12:47 2022 +0800 refactor: build
51 lines
931 B
Bash
Executable File
51 lines
931 B
Bash
Executable File
#!/bin/bash
|
||
|
||
# 脚本执行前提,已完成支持wine的基本构建
|
||
set -e
|
||
root_dir=$(cd `dirname $0`/.. && pwd -P)
|
||
tmp_dir="$root_dir/tmp"
|
||
if [ -z $VERSION ];then
|
||
export VERSION=$1
|
||
fi
|
||
if [ -z $ARCH ];then
|
||
export ARCH=$2
|
||
fi
|
||
|
||
|
||
success() {
|
||
echo -e "\033[42;37m 成功 \033[0m $1"
|
||
}
|
||
notice() {
|
||
echo -e "\033[36m $1 \033[0m "
|
||
}
|
||
|
||
fail() {
|
||
echo -e "\033[41;37m 失败 \033[0m $1"
|
||
}
|
||
|
||
if [[ $VERSION == '' ]];then
|
||
fail "请指定版本号"
|
||
exit 1
|
||
elif [[ $ARCH == '' ]];then
|
||
fail "请指定架构"
|
||
exit 1
|
||
fi
|
||
|
||
for type in wine no_wine; do
|
||
notice "当前构建类型: $type";
|
||
if [[ $type == 'no_wine' ]];then
|
||
notice "no wine handle"
|
||
export NO_WINE=true
|
||
"$root_dir/tools/fix-core.sh"
|
||
"$root_dir/tools/fix-other.sh"
|
||
fi
|
||
|
||
# 构建压缩包
|
||
notice "BUILD Simple Package"
|
||
"$root_dir/tools/build-tar.sh"
|
||
|
||
# 构建AppImage
|
||
notice "BUILD AppImage"
|
||
"$root_dir/tools/build-appimage.sh"
|
||
|
||
done |