fix: 修复wcc.bin wcsc.bin 没有被复制的问题 #24

This commit is contained in:
msojocs 2022-03-05 20:53:21 +08:00
parent 677acf815f
commit 5c4b9fcc22
3 changed files with 7 additions and 4 deletions

View File

@ -4,9 +4,10 @@ root_dir=$(cd `dirname $0`/.. && pwd -P)
a=$1
if [ "$a" == '1' ];then
rm -rf "$root_dir/package.nw/core.wxvpkg.ext"
node tools/wxvpkg/unpack "$root_dir/package.nw/core.wxvpkg" "$root_dir/package.nw/core.wxvpkg.ext"
node tools/wxvpkg_unpack.js "$root_dir/package.nw/core.wxvpkg" "$root_dir/package.nw/core.wxvpkg.ext"
else
node tools/wxvpkg/pack package.nw/core.wxvpkg.ext package.nw/core.wxvpkg
node tools/wxvpkg_pack.js package.nw/core.wxvpkg.ext package.nw/core.wxvpkg
rm -rf ~/.config/wechat_devtools/WeappCache
rm -rf ~/.config/wechat_devtools/WeappVendor
bin/wechat-devtools
fi

View File

@ -39,7 +39,7 @@ if [[ ! $BUILD_VERSION -eq 'continuous' ]];then
else
sed -i "s/BUILD_VERSION/0/" "$app_dir/DEBIAN/control"
fi
cp "$root_dir/res/icons/wechat-devtools.png" "$app_dir/usr/share/icons/wechat-devtools.png"
cp "$root_dir/res/icons/wechat-devtools.svg" "$app_dir/usr/share/icons/wechat-devtools.svg"
cp -r "$root_dir/package.nw" "$app_dir/opt/wechat-devtools/package.nw"
cp -r "$root_dir/nwjs" "$app_dir/opt/wechat-devtools/nwjs"
@ -53,4 +53,4 @@ ls -l "$root_dir/tmp/deb"
mkdir -p "$root_dir/tmp/build"
ver=$( cat "$root_dir/package.nw/package.json" | grep -m 1 -Eo "\"[0-9]{1}\.[0-9]{2}\.[0-9]+" )
ver="${ver//\"/}"
dpkg-deb -b . "$root_dir/tmp/build/WeChat_Dev_Tools_${ver}_$BUILD_VERSION.deb"
dpkg-deb -b . "$root_dir/tmp/build/WeChat_Dev_Tools_${ver}-${BUILD_VERSION}_amd64.deb"

View File

@ -52,6 +52,8 @@ if [[ $NO_WINE == 'true' ]];then
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"
sed -i 's#return I("wcc")#return I("wcc.bin"),I("wcc")#g' "$find_result"
sed -i 's#return I("wcsc")#return I("wcsc.bin"),I("wcsc")#g' "$find_result"
fi
current=`date "+%Y-%m-%d %H:%M:%S"`