Skip to content
This repository has been archived by the owner on Jun 28, 2022. It is now read-only.

Commit

Permalink
wcc wcsc 从package.nw 获取
Browse files Browse the repository at this point in the history
  • Loading branch information
炒饭 committed May 21, 2017
1 parent 5066f8b commit f5e7afc
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 28 deletions.
Binary file added bin/WeappVendor/s/wcc.exe
Binary file not shown.
Binary file added bin/WeappVendor/s/wcsc.exe
Binary file not shown.
35 changes: 13 additions & 22 deletions bin/replace_weapp_vendor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,24 @@ root_dir=$(cd `dirname $0`/.. && pwd -P)

dev_tools_config_dir="$HOME/.config/微信web开发者工具"

rm -rf $dev_tools_config_dir
if [ ! -d "$dev_tools_config_dir" ]; then
cd $root_dir/dist;
./nw &

cd $root_dir/dist;
nw_pid=$!

./nw &
echo "please wait 5s!"
for k in $( seq 1 5 ); do
sleep 1s && echo "${k}s"
done
echo "kill nw"

nw_pid=$!

echo "please wait 5s!"
sleep 1s
echo "4s"
sleep 1s
echo "3s"
sleep 1s
echo "2s"
sleep 1s
echo "1s"
sleep 1s
echo "after 5s"
kill -9 $nw_pid
fi

kill -9 $nw_pid
if [ -d "$dev_tools_config_dir" ]; then
cd $dev_tools_config_dir/WeappVendor
mkdir -p s
mv wc* s
echo "cp $root_dir/bin/WeappVendor/* $(pwd)"
cp $root_dir/bin/WeappVendor/* ./
echo "cp -rfu $root_dir/bin/WeappVendor/* $dev_tools_config_dir/WeappVendor"
cp -rf $root_dir/bin/WeappVendor/* "$dev_tools_config_dir/WeappVendor" 2> /dev/null
echo "Success"
else
echo "Fail! Please reinstall"
Expand Down
4 changes: 4 additions & 0 deletions bin/update_package_nw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ wcwd_file="$tmp_dir/wechat_web_devtools_${wechat_v}_x64.exe"
wcwd_download="https://dldir1.qq.com/WechatWebDev/${wechat_v//./}/wechat_web_devtools_${wechat_v}_x64.exe"

wcwd_package_dir="$HOME/.wine/drive_c/Program Files (x86)/Tencent/微信web开发者工具/package.nw"
onlineverdor_dir="$root_dir/package.nw/app/dist/weapp/onlinevendor"

mkdir -p $tmp_dir

Expand All @@ -32,3 +33,6 @@ wine $wcwd_file

rm -rf "$root_dir/package.nw"
cp -r "$wcwd_package_dir" "$root_dir"

# 链接wcc.exe wcsc.exe
ln "$onlineverdor_dir/*.exe" "$root_dir/bin/WeappVendor/s"
5 changes: 2 additions & 3 deletions bin/wxdt
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ if [ "$cur_nwjs_v" != "$nwjs_v" ]; then
fi

want=${1:-"start"}
if [ $want = "replace" ]; then
sh "$root_dir/bin/replace_weapp_vendor.sh"
elif [ $want = "start" ]; then
if [ $want = "start" ]; then
`$root_dir/dist/nw`
elif [ $want = "install" ]; then
sh "$root_dir/bin/replace_weapp_vendor.sh"
echo "安装完成"
else
echo "不支持$want操作"
Expand Down
7 changes: 4 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ linux下使用微信web开发者工具.
- 2017/05/18 更新:微信小程序升级到0.17.170900
- 2017/05/19 更新:微信小程序升级到0.17.171900

## Installation
## Usage

```console
git clone [email protected]:cytle/wechat_web_devtools.git
Expand All @@ -37,7 +37,7 @@ WINEARCH=win32 WINEPREFIX=~/.wine32 winecfg

3. 替换WeappVendor
```console
./bin/wxdt replace
./bin/wxdt install
```

4. 启动
Expand All @@ -56,7 +56,8 @@ git pull origin
如果wcc和wcsc编译有问题,执行以下,让工具重新生成wcc和wcsc,**会删除开发者工具配置文件,所有工程和登录信息会消失**

```console
./bin/wxdt replace
rm -rf "$HOME/.config/微信web开发者工具"
./bin/wxdt install
```

## 截图
Expand Down

0 comments on commit f5e7afc

Please sign in to comment.