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

Commit f5e7afc

Browse files
author
炒饭
committed
wcc wcsc 从package.nw 获取
1 parent 5066f8b commit f5e7afc

File tree

6 files changed

+23
-28
lines changed

6 files changed

+23
-28
lines changed

bin/WeappVendor/s/wcc.exe

1.54 MB
Binary file not shown.

bin/WeappVendor/s/wcsc.exe

1.33 MB
Binary file not shown.

bin/replace_weapp_vendor.sh

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,24 @@ root_dir=$(cd `dirname $0`/.. && pwd -P)
44

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

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

9-
cd $root_dir/dist;
11+
nw_pid=$!
1012

11-
./nw &
13+
echo "please wait 5s!"
14+
for k in $( seq 1 5 ); do
15+
sleep 1s && echo "${k}s"
16+
done
17+
echo "kill nw"
1218

13-
nw_pid=$!
14-
15-
echo "please wait 5s!"
16-
sleep 1s
17-
echo "4s"
18-
sleep 1s
19-
echo "3s"
20-
sleep 1s
21-
echo "2s"
22-
sleep 1s
23-
echo "1s"
24-
sleep 1s
25-
echo "after 5s"
19+
kill -9 $nw_pid
20+
fi
2621

27-
kill -9 $nw_pid
2822
if [ -d "$dev_tools_config_dir" ]; then
29-
cd $dev_tools_config_dir/WeappVendor
30-
mkdir -p s
31-
mv wc* s
32-
echo "cp $root_dir/bin/WeappVendor/* $(pwd)"
33-
cp $root_dir/bin/WeappVendor/* ./
23+
echo "cp -rfu $root_dir/bin/WeappVendor/* $dev_tools_config_dir/WeappVendor"
24+
cp -rf $root_dir/bin/WeappVendor/* "$dev_tools_config_dir/WeappVendor" 2> /dev/null
3425
echo "Success"
3526
else
3627
echo "Fail! Please reinstall"

bin/update_package_nw.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ wcwd_file="$tmp_dir/wechat_web_devtools_${wechat_v}_x64.exe"
1515
wcwd_download="https://dldir1.qq.com/WechatWebDev/${wechat_v//./}/wechat_web_devtools_${wechat_v}_x64.exe"
1616

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

1920
mkdir -p $tmp_dir
2021

@@ -32,3 +33,6 @@ wine $wcwd_file
3233

3334
rm -rf "$root_dir/package.nw"
3435
cp -r "$wcwd_package_dir" "$root_dir"
36+
37+
# 链接wcc.exe wcsc.exe
38+
ln "$onlineverdor_dir/*.exe" "$root_dir/bin/WeappVendor/s"

bin/wxdt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,10 @@ if [ "$cur_nwjs_v" != "$nwjs_v" ]; then
1616
fi
1717

1818
want=${1:-"start"}
19-
if [ $want = "replace" ]; then
20-
sh "$root_dir/bin/replace_weapp_vendor.sh"
21-
elif [ $want = "start" ]; then
19+
if [ $want = "start" ]; then
2220
`$root_dir/dist/nw`
2321
elif [ $want = "install" ]; then
22+
sh "$root_dir/bin/replace_weapp_vendor.sh"
2423
echo "安装完成"
2524
else
2625
echo "不支持$want操作"

readme.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ linux下使用微信web开发者工具.
1515
- 2017/05/18 更新:微信小程序升级到0.17.170900
1616
- 2017/05/19 更新:微信小程序升级到0.17.171900
1717

18-
## Installation
18+
## Usage
1919

2020
```console
2121
git clone git@github.com:cytle/wechat_web_devtools.git
@@ -37,7 +37,7 @@ WINEARCH=win32 WINEPREFIX=~/.wine32 winecfg
3737

3838
3. 替换WeappVendor
3939
```console
40-
./bin/wxdt replace
40+
./bin/wxdt install
4141
```
4242

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

5858
```console
59-
./bin/wxdt replace
59+
rm -rf "$HOME/.config/微信web开发者工具"
60+
./bin/wxdt install
6061
```
6162

6263
## 截图

0 commit comments

Comments
 (0)