mirror of
https://github.com/msojocs/wechat-web-devtools-linux.git
synced 2025-07-22 00:00:04 +08:00
perf: 默认构建纯 Linux 版本
This commit is contained in:
parent
75a7ac47a1
commit
582d296cf9
14
.github/workflows/release.yml
vendored
14
.github/workflows/release.yml
vendored
@ -57,7 +57,7 @@ jobs:
|
||||
export DOCKER_UID=$UID
|
||||
export DOCKER_GID=$GID
|
||||
ls -l
|
||||
export NO_WINE=false
|
||||
export WINE=true
|
||||
docker-compose up
|
||||
|
||||
- name: Compress Resources
|
||||
@ -69,7 +69,7 @@ jobs:
|
||||
cd nwjs && ln -s node node.exe
|
||||
cd ..
|
||||
tar -zcf tmp/src/src-wine.tar.gz bin nwjs package.nw tools
|
||||
export NO_WINE=true
|
||||
export WINE=false
|
||||
"tools/fix-core.sh"
|
||||
"tools/fix-other.sh"
|
||||
tar -zcf tmp/src/src-no-wine.tar.gz bin nwjs package.nw tools
|
||||
@ -142,14 +142,14 @@ jobs:
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
export NO_WINE=false
|
||||
export WINE=true
|
||||
export ACTION_MODE=true
|
||||
# tar.gz AppImage
|
||||
ls -l
|
||||
mkdir -p tmp/build
|
||||
tools/build-prepare.sh
|
||||
tools/build-release.sh ${{ matrix.ARCH }} ${{ steps.tag.outputs.tag }}
|
||||
export NO_WINE=true
|
||||
export WINE=false
|
||||
tools/build-prepare.sh
|
||||
tools/build-release.sh ${{ matrix.ARCH }} ${{ steps.tag.outputs.tag }}
|
||||
|
||||
@ -209,10 +209,10 @@ jobs:
|
||||
ls -l
|
||||
mkdir -p tmp/build
|
||||
tools/build-prepare.sh
|
||||
env NO_WINE=false tools/build-deepin.sh ${{ steps.tag.outputs.tag }}
|
||||
export NO_WINE=true
|
||||
env WINE=true tools/build-deepin.sh ${{ steps.tag.outputs.tag }}
|
||||
export WINE=false
|
||||
tools/build-prepare.sh
|
||||
env NO_WINE=true tools/build-deepin.sh ${{ steps.tag.outputs.tag }}
|
||||
env WINE=false tools/build-deepin.sh ${{ steps.tag.outputs.tag }}
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v2.3.1
|
||||
|
@ -1,3 +1,7 @@
|
||||
# 1.06.2206020-1 / 2022-06-03
|
||||
|
||||
- update: devtools to v1.06.2206020
|
||||
|
||||
# 1.05.2204250-2 / 2022-05-11
|
||||
- fix: 修复wcc编译器不支持单文件编译的bug(感谢 @2715851270 反馈)
|
||||
- fix: 修复cli异常
|
||||
|
@ -11,7 +11,7 @@ services:
|
||||
environment:
|
||||
- ACTION_MODE=${ACTION_MODE:-false}
|
||||
# - https_proxy=${https_proxy:-}
|
||||
- NO_WINE=${NO_WINE:-true}
|
||||
- WINE=${WINE:-false}
|
||||
- LOCAL_USER_ID=${DOCKER_UID:-1000}
|
||||
- LOCAL_GROUP_ID=${DOCKER_GID:-1000}
|
||||
- BUILD_VERSION=${BUILD_VERSION:-v0}
|
||||
|
@ -97,7 +97,7 @@ modules:
|
||||
- --share=network
|
||||
prepend-ld-library-path: /app/lib/x86_64-linux-gnu
|
||||
env:
|
||||
- NO_WINE=true
|
||||
- WINE=false
|
||||
sources:
|
||||
# - type: git
|
||||
# branch: dev
|
||||
|
@ -59,12 +59,14 @@
|
||||
在项目的 `bin` 目录中有 `wechat-devtools-cli` 脚本,是微信开发者工具的命令行支持 的Linux版本。相关资料可以在[微信CLI命令行V2](https://developers.weixin.qq.com/miniprogram/dev/devtools/cli.html)上找到。
|
||||
|
||||
# 使用方法
|
||||
|
||||
1. [在线安装](#在线安装)
|
||||
2. 可以在本项目的[Release](https://github.com/msojocs/wechat-web-devtools-linux/releases)中,寻找已经构筑好了的软件包,下载使用。
|
||||
如果`Release`版本存在问题,可以尝试[Continuous](https://github.com/msojocs/wechat-web-devtools-linux/releases/tag/continuous)版本,这是基于`master`分支的最新提交构建的,会及时修复一些 bug,但也可能会带来新的 bug。
|
||||
3. 你可以 [自行构建](#自行构建)
|
||||
|
||||
# 在线安装
|
||||
|
||||
目前支持以下平台:
|
||||
|
||||
1. [AUR](https://aur.archlinux.org/packages/wechat-devtools)
|
||||
@ -74,7 +76,7 @@
|
||||
# 自行构建
|
||||
|
||||
> 注:
|
||||
> 如果想构建纯 Linux 版本,请添加环境变量:`export NO_WINE=true`
|
||||
> 如果想构建 wine 版本,请添加环境变量:`export WINE=true`
|
||||
|
||||
## 方法0(推荐)
|
||||
|
||||
|
@ -100,7 +100,7 @@ build() {
|
||||
export NW_VERSION=$_nwjs_ver
|
||||
# fix-package-name.js使用
|
||||
export srcdir=$srcdir
|
||||
export NO_WINE=true
|
||||
export WINE=false
|
||||
|
||||
for script in fix-package-name.js fix-cli.sh fix-other.sh fix-menu.sh fix-core.sh rebuild-node-modules.sh; do
|
||||
_log "run ${script}"
|
||||
|
@ -46,7 +46,7 @@ parts:
|
||||
build-environment:
|
||||
- PATH: "$SNAPCRAFT_STAGE/node/bin:$PATH"
|
||||
- NW_VERSION: 0.55.0
|
||||
- NO_WINE: 'true'
|
||||
- WINE: 'false'
|
||||
# - NW_PACKAGE_DIR: "$SNAPCRAFT_PART_BUILD/code/package.nw"
|
||||
# - srcdir: "$SNAPCRAFT_PROJECT_DIR"
|
||||
build-packages:
|
||||
|
@ -1,11 +1,11 @@
|
||||
#!/bin/bash
|
||||
root_dir=$(cd `dirname $0`/.. && pwd -P)
|
||||
cd $root_dir
|
||||
export NO_WINE=false
|
||||
export WINE=true
|
||||
docker-compose up
|
||||
$root_dir/tools/build-deepin.sh $@
|
||||
|
||||
export NO_WINE=true
|
||||
export WINE=false
|
||||
$root_dir/tools/fix-core.sh
|
||||
$root_dir/tools/fix-other.sh
|
||||
$root_dir/tools/build-deepin.sh $@
|
@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
export NO_WINE=true
|
||||
export WINE=fasle
|
||||
|
||||
root_dir=$(cd `dirname $0`/.. && pwd -P)
|
||||
$root_dir/tools/fix-core.sh
|
||||
|
@ -29,7 +29,7 @@ elif [[ $ARCH == '' ]];then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $NO_WINE == 'true' ]];then
|
||||
if [[ "$WINE" != 'true' ]];then
|
||||
TYPE='no_wine'
|
||||
else
|
||||
TYPE='wine'
|
||||
|
@ -31,7 +31,7 @@ fi
|
||||
|
||||
############ 准备构建deb包所需的文件及结构 ################
|
||||
package_name="io.github.msojocs.wechat-devtools"
|
||||
if [[ $NO_WINE == 'true' ]];then
|
||||
if [[ "$WINE" != 'true' ]];then
|
||||
BUILD_MARK='no_wine'
|
||||
package_name="${package_name}-no-wine"
|
||||
else
|
||||
@ -94,8 +94,8 @@ cd "$build_dir"
|
||||
ls -l "$build_dir"
|
||||
mkdir -p "$root_dir/tmp/build"
|
||||
|
||||
if [[ $NO_WINE != 'true' ]];then
|
||||
echo "添加wine依赖 - $NO_WINE"
|
||||
if [[ "$WINE" != 'false' ]];then
|
||||
echo "添加wine依赖 - $WINE"
|
||||
echo "Depends: wine, wine-binfmt" >> "$build_dir/debian/control"
|
||||
fi
|
||||
|
||||
|
@ -20,7 +20,7 @@ tmp_dir="$root_dir/tmp"
|
||||
store_dir="$tmp_dir/build"
|
||||
mkdir -p $store_dir
|
||||
rm -rf nwjs package.nw
|
||||
if [[ $NO_WINE == 'true' ]];then
|
||||
if [[ "$WINE" != 'true' ]];then
|
||||
tar -zxf wechat-devtools-*.src/src-no-wine.tar.gz -C .
|
||||
else
|
||||
tar -zxf wechat-devtools-*.src/src-wine.tar.gz -C .
|
||||
|
@ -37,7 +37,7 @@ elif [[ $ARCH == '' ]];then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $NO_WINE == 'true' ]];then
|
||||
if [[ "$WINE" != 'true' ]];then
|
||||
TYPE='no_wine'
|
||||
else
|
||||
TYPE='wine'
|
||||
|
@ -42,8 +42,8 @@ if [[ ! -z $find_result ]];then
|
||||
sed -i "s#open -a Terminal \"\`pwd\`\"#$new_str#g" "$find_result"
|
||||
fi
|
||||
|
||||
# wcc、wcsc处理,设置NO_WINE=true环境变量生效
|
||||
if [[ $NO_WINE == 'true' ]];then
|
||||
# wcc、wcsc处理,设置WINE=fasle环境变量生效
|
||||
if [[ "$WINE" != 'true' ]];then
|
||||
# "wcc.exe":!0,"wcsc.exe":!0
|
||||
find_result=$( grep -lr '{wcc:!0,wcsc:!0}' "$tmp_dir/core.wxvpkg" )
|
||||
echo "wcc: $find_result"
|
||||
|
@ -23,9 +23,9 @@ ls -l "${srcdir}/compiler"
|
||||
&& chmod +x wcc/bin/linux/*
|
||||
)
|
||||
|
||||
# 预览编译,设置NO_WINE=true环境变量生效
|
||||
# 预览编译,设置 WINE!=true 环境变量生效
|
||||
# 如果是mac执行wcc,否则wcc.exe
|
||||
if [[ $NO_WINE == 'true' ]];then
|
||||
if [[ "$WINE" != 'true' ]];then
|
||||
\cp -rf "${srcdir}/compiler/generatemd5.js" "${package_dir}/js/vendor/generatemd5.js"
|
||||
\cp "${srcdir}/compiler/nodejs"/* "${package_dir}/js/vendor"
|
||||
cd "${package_dir}/js/vendor" && chmod 0755 wcc wcsc wcc.bin wcsc.bin
|
||||
|
Loading…
x
Reference in New Issue
Block a user