Skip to content

Commit b789192

Browse files
committed
feat: no wine support
1 parent d14fd2c commit b789192

File tree

7 files changed

+12
-17
lines changed

7 files changed

+12
-17
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,15 @@ jobs:
9292
tar -zvcf ${{ env.name }}_${{ env.ARCH }}_wine.tar.gz ${{ env.name }}
9393
9494
# reduce wine
95-
export REDUCE_WINE=true
95+
export NO_WINE=true
9696
bash ${{ env.name }}/tools/fix-core
9797
bash ${{ env.name }}/tools/fix-other
9898
bash ./${{ env.name }}/tools/appimage.sh
9999
# build AppImage
100-
./appimagetool-x86_64.AppImage ./${{ env.name }}/tmp/AppDir ${{ env.name }}_${{ env.ARCH }}_reduce_wine.AppImage
100+
./appimagetool-x86_64.AppImage ./${{ env.name }}/tmp/AppDir ${{ env.name }}_${{ env.ARCH }}_no_wine.AppImage
101101
sudo rm -rf compiler nodegit ${{ env.name }}/tmp
102102
# pack
103-
tar -zvcf ${{ env.name }}_${{ env.ARCH }}_reduce_wine.tar.gz ${{ env.name }}
103+
tar -zvcf ${{ env.name }}_${{ env.ARCH }}_no_wine.tar.gz ${{ env.name }}
104104
105105
sudo rm -rf appimagetool-x86_64.AppImage ${{ env.name }}
106106
ls -l

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ services:
88
environment:
99
- ACTION=${ACTION_MODE:-false}
1010
- https_proxy=${https_proxy:-}
11+
- NO_WINE=${NO_WINE:-false}
1112
entrypoint: /workspace/docker/entrypoint

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Docker容器启动方法
6969
# 自行构建
7070

7171
> 注:
72-
> 如需进行降低`wine`依赖的操作,请添加环境变量:`REDUCE_WINE=true`
72+
> 如果不想使用`wine`,请添加环境变量:`NO_WINE=true`,但是稳定性未测试
7373
7474
## 方法0(推荐)
7575

test/reduce-wine

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#!/bin/bash
2-
export REDUCE_WINE=true
3-
2+
export NO_WINE=true
43

54
root_dir=$(cd `dirname $0`/.. && pwd -P)
65
$root_dir/tools/fix-core

test/test-bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33

4-
if [[ $REDUCE_WINE == 'true' ]];then
4+
if [[ $NO_WINE == 'true' ]];then
55
echo "not wine"
66
fi
77

tools/fix-core

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ if [[ ! -z $find_result ]];then
4040
sed -i "s#open -a Terminal \"\`pwd\`\"#$new_str#g" "$find_result"
4141
fi
4242

43-
# wcc、wcsc处理,设置REDUCE_WINE环境变量生效
44-
if [[ $REDUCE_WINE == 'true' ]];then
43+
# wcc、wcsc处理,设置NO_WINE=true环境变量生效
44+
if [[ $NO_WINE == 'true' ]];then
4545
# "wcc.exe":!0,"wcsc.exe":!0
4646
find_result=$( grep -lr '{wcc:!0,wcsc:!0,DevToolProtector:!0}' "$tmp_dir/core.wxvpkg" )
4747
if [[ ! -z $find_result ]];then
4848
echo "wcc: $find_result"
49-
new_str='{"wcc.exe":!0,"wcsc.exe":!0,"wcc.bin":!0,"wcsc.bin":!0,wcc:!0,wcsc:!0,DevToolProtector:!0}'
49+
new_str='{"wcc.bin":!0,"wcsc.bin":!0,wcc:!0,wcsc:!0,DevToolProtector:!0}'
5050
sed -i "s#{wcc:!0,wcsc:!0,DevToolProtector:!0}#$new_str#g" "$find_result"
5151
new_str='"linux"===process.platform'
5252
sed -i "s#\"darwin\"===process.platform#$new_str#g" "$find_result"
@@ -61,8 +61,3 @@ fi
6161
echo "pack"
6262
node "$root_dir/tools/wxvpkg/pack" "$tmp_dir/core.wxvpkg" "$package_dir/core.wxvpkg"
6363
rm -rf "$tmp_dir/core.wxvpkg"
64-
65-
if [ -d ~/.config/wechat_devtools/WeappCache ];then
66-
echo "删除缓存"
67-
rm -rf ~/.config/wechat_devtools/WeappCache
68-
fi

tools/fix-other

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ cd $tmp_dir && npm install miniprogram-compiler
2929
&& cp -r "${srcdir}/compiler/wcsc_node"/* "wcsc"
3030
)
3131

32-
# 预览编译,设置REDUCE_WINE环境变量生效
32+
# 预览编译,设置NO_WINE=true环境变量生效
3333
# 如果是mac执行wcc,否则wcc.exe
34-
if [[ $REDUCE_WINE == 'true' ]];then
34+
if [[ $NO_WINE == 'true' ]];then
3535
\cp -rf "${srcdir}/compiler/generatemd5.js" "${package_dir}/js/vendor/generatemd5.js"
3636
\cp -rf "${srcdir}/compiler/nodejs/wcc" "${package_dir}/js/vendor/wcc"
3737
\cp -rf "${srcdir}/compiler/nodejs/wcsc" "${package_dir}/js/vendor/wcsc"

0 commit comments

Comments
 (0)