diff --git a/bin/install.sh b/bin/install.sh index a6916f5bd..d99a25d49 100755 --- a/bin/install.sh +++ b/bin/install.sh @@ -1,16 +1,10 @@ #! /bin/sh -package=$1 -target_dir="$HOME/wechat-dev-tools-xsp" +cur_dir=${dirname $0} dev_tools_config_dir="$HOME/.config/微信web开发者工具" -rm -rf $target_dir -mkdir $target_dir - -tar -xzvf $package -C $HOME - rm -rf $dev_tools_config_dir -cd $target_dir && + ./nw # TODO close nw @@ -18,7 +12,7 @@ if [ -d "$dev_tools_config_dir" ]; then cd $dev_tools_config_dir/WeappVendor mkdir -p s mv wc* s - cp $target_dir/WeappVendor/* ./ + cp $cur_dir/WeappVendor/* ./ fi diff --git a/build.sh b/build.sh index 9de7252e5..b1220b6fc 100755 --- a/build.sh +++ b/build.sh @@ -31,6 +31,7 @@ mkdir -p $tmp_dir/$dist_wechat_dir cp -rl "$nwjs_dir"/* "$tmp_dir/$dist_wechat_dir" && cp -rl "$package_dir" "$tmp_dir/$dist_wechat_dir" && cp -rl "$cur_dir/WeappVendor" "$tmp_dir/$dist_wechat_dir" && +cp -rl "$cur_dir/bin/install.sh" "$tmp_dir/$dist_wechat_dir" && tar -zcvf "$dist_wechat_package" -C "$tmp_dir" "$dist_wechat_dir" mkdir -p $build_dir