Skip to content

Commit e16c840

Browse files
committed
add: 添加nw-gyp的镜像
1 parent 5c542ed commit e16c840

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tools/rebuild-node-modules

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@ echo "NW VERSION: $NW_VERSION"
3333
echo "nw-gyp version: $( nw-gyp --version )"
3434
echo "node version: $(node --version )"
3535
echo "npm version: $(npm --version )"
36+
python --version
3637

3738
if [[ ! -z $https_proxy || ! -z $http_proxy ]]; then
38-
echo -e "\033[41;37m 警告: 你设置了代理,这有可能导致安装出现异常 \033[0m"
39+
echo -e "\033[41;37m 警告: 你设置了代理,这有可能导致安装出现异常 $http_proxy, $https_proxy \033[0m"
3940
fi
4041

4142
rm -fr "${package_dir}/node_modules/vscode-windows-ca-certs" # the module is only available in windows
@@ -77,13 +78,13 @@ rm -fr "${package_dir}/node_modules_tmp/node_modules/spdlog-node"
7778
--nodegit_binary_host_mirror=https://npm.taobao.org/mirrors/nodegit/v0.27.0/) # reinstall modules
7879

7980
# rebuild
80-
cd "$package_dir/node_modules_tmp/node_modules/node-pty" && nw-gyp rebuild --arch=x64 "--target=$NW_VERSION"
81+
cd "$package_dir/node_modules_tmp/node_modules/node-pty" && nw-gyp rebuild --arch=x64 "--target=$NW_VERSION" --dist-url=https://registry.npmmirror.com/-/binary/nwjs
8182
(cp -fr "${package_dir}/node_modules_tmp/node_modules/node-pty" "${package_dir}/node_modules_tmp/node_modules/node-pty-node")
8283
rm -rf "${package_dir}/node_modules/node-pty" "${package_dir}/node_modules/node-pty-node"
8384
cp -fr "${package_dir}/node_modules_tmp/node_modules/node-pty" "${package_dir}/node_modules"
8485
(cp -fr "${package_dir}/node_modules/node-pty" "${package_dir}/node_modules/node-pty-node")
8586

86-
cd "$package_dir/node_modules_tmp/node_modules/native-watchdog" && nw-gyp rebuild --arch=x64 "--target=$NW_VERSION"
87+
cd "$package_dir/node_modules_tmp/node_modules/native-watchdog" && nw-gyp rebuild --arch=x64 "--target=$NW_VERSION" --dist-url=https://registry.npmmirror.com/-/binary/nwjs
8788
rm -rf "${package_dir}/node_modules/native-watchdog" && cp -fr "${package_dir}/node_modules_tmp/node_modules/native-watchdog" "${package_dir}/node_modules"
8889

8990
cd "${package_dir}/node_modules_tmp/node_modules/nodegit" && rm -rf .github include src lifecycleScripts vendor utils build/vendor build/Release/.deps

0 commit comments

Comments
 (0)