diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ce42999..f71e5ae 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -92,15 +92,15 @@ jobs: tar -zvcf ${{ env.name }}_${{ env.ARCH }}_wine.tar.gz ${{ env.name }} # reduce wine - export REDUCE_WINE=true + export NO_WINE=true bash ${{ env.name }}/tools/fix-core bash ${{ env.name }}/tools/fix-other bash ./${{ env.name }}/tools/appimage.sh # build AppImage - ./appimagetool-x86_64.AppImage ./${{ env.name }}/tmp/AppDir ${{ env.name }}_${{ env.ARCH }}_reduce_wine.AppImage + ./appimagetool-x86_64.AppImage ./${{ env.name }}/tmp/AppDir ${{ env.name }}_${{ env.ARCH }}_no_wine.AppImage sudo rm -rf compiler nodegit ${{ env.name }}/tmp # pack - tar -zvcf ${{ env.name }}_${{ env.ARCH }}_reduce_wine.tar.gz ${{ env.name }} + tar -zvcf ${{ env.name }}_${{ env.ARCH }}_no_wine.tar.gz ${{ env.name }} sudo rm -rf appimagetool-x86_64.AppImage ${{ env.name }} ls -l diff --git a/docker-compose.yml b/docker-compose.yml index 500157e..1294892 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,4 +8,5 @@ services: environment: - ACTION=${ACTION_MODE:-false} - https_proxy=${https_proxy:-} + - NO_WINE=${NO_WINE:-false} entrypoint: /workspace/docker/entrypoint \ No newline at end of file diff --git a/readme.md b/readme.md index e8cd594..3ca861f 100644 --- a/readme.md +++ b/readme.md @@ -69,7 +69,7 @@ Docker容器启动方法 # 自行构建 > 注: -> 如需进行降低`wine`依赖的操作,请添加环境变量:`REDUCE_WINE=true` +> 如果不想使用`wine`,请添加环境变量:`NO_WINE=true`,但是稳定性未测试 ## 方法0(推荐) diff --git a/test/reduce-wine b/test/reduce-wine index 68283b8..99de2a7 100644 --- a/test/reduce-wine +++ b/test/reduce-wine @@ -1,6 +1,5 @@ #!/bin/bash -export REDUCE_WINE=true - +export NO_WINE=true root_dir=$(cd `dirname $0`/.. && pwd -P) $root_dir/tools/fix-core diff --git a/test/test-bash b/test/test-bash index 097ee12..46322b1 100644 --- a/test/test-bash +++ b/test/test-bash @@ -1,7 +1,7 @@ #!/bin/bash -if [[ $REDUCE_WINE == 'true' ]];then +if [[ $NO_WINE == 'true' ]];then echo "not wine" fi diff --git a/tools/fix-core b/tools/fix-core index 17f95a1..29fcb36 100755 --- a/tools/fix-core +++ b/tools/fix-core @@ -40,13 +40,13 @@ if [[ ! -z $find_result ]];then sed -i "s#open -a Terminal \"\`pwd\`\"#$new_str#g" "$find_result" fi -# wcc、wcsc处理,设置REDUCE_WINE环境变量生效 -if [[ $REDUCE_WINE == 'true' ]];then +# wcc、wcsc处理,设置NO_WINE=true环境变量生效 +if [[ $NO_WINE == 'true' ]];then # "wcc.exe":!0,"wcsc.exe":!0 find_result=$( grep -lr '{wcc:!0,wcsc:!0,DevToolProtector:!0}' "$tmp_dir/core.wxvpkg" ) if [[ ! -z $find_result ]];then echo "wcc: $find_result" - new_str='{"wcc.exe":!0,"wcsc.exe":!0,"wcc.bin":!0,"wcsc.bin":!0,wcc:!0,wcsc:!0,DevToolProtector:!0}' + new_str='{"wcc.bin":!0,"wcsc.bin":!0,wcc:!0,wcsc:!0,DevToolProtector:!0}' sed -i "s#{wcc:!0,wcsc:!0,DevToolProtector:!0}#$new_str#g" "$find_result" new_str='"linux"===process.platform' sed -i "s#\"darwin\"===process.platform#$new_str#g" "$find_result" @@ -61,8 +61,3 @@ fi echo "pack" node "$root_dir/tools/wxvpkg/pack" "$tmp_dir/core.wxvpkg" "$package_dir/core.wxvpkg" rm -rf "$tmp_dir/core.wxvpkg" - -if [ -d ~/.config/wechat_devtools/WeappCache ];then - echo "删除缓存" - rm -rf ~/.config/wechat_devtools/WeappCache -fi \ No newline at end of file diff --git a/tools/fix-other b/tools/fix-other index 2107700..c454a2e 100755 --- a/tools/fix-other +++ b/tools/fix-other @@ -29,9 +29,9 @@ cd $tmp_dir && npm install miniprogram-compiler && cp -r "${srcdir}/compiler/wcsc_node"/* "wcsc" ) -# 预览编译,设置REDUCE_WINE环境变量生效 +# 预览编译,设置NO_WINE=true环境变量生效 # 如果是mac执行wcc,否则wcc.exe -if [[ $REDUCE_WINE == 'true' ]];then +if [[ $NO_WINE == 'true' ]];then \cp -rf "${srcdir}/compiler/generatemd5.js" "${package_dir}/js/vendor/generatemd5.js" \cp -rf "${srcdir}/compiler/nodejs/wcc" "${package_dir}/js/vendor/wcc" \cp -rf "${srcdir}/compiler/nodejs/wcsc" "${package_dir}/js/vendor/wcsc"