Skip to content

Commit f5173fa

Browse files
committed
chore: 文件名优化
1 parent 8b79c40 commit f5173fa

6 files changed

Lines changed: 11 additions & 23 deletions

README.MD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
```
116116
5. 在本地项目目录中执行如下的语句,可以安装应用图标(非必须):
117117
```
118-
./tools/install-desktop-icon-bash
118+
./tools/install-desktop-icon-bash.sh
119119
```
120120
121121
之后即可通过点击应用图标启动微信开发者工具,也可以运行 `bin/wechat-devtools` 通过命令行启动
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
set -ex
33

4-
root_dir=$(cd `dirname $0`/.. && pwd -P)
4+
root_dir=$(cd "$(dirname "$0")/../.." && pwd -P)
55

66
mkdir -p $root_dir/cache/pkg
77
if [ ! -f "$root_dir/cache/x86_64-cross-tools-loongarch64-binutils_2.45-gcc_15.1.0-glibc_2.42.tar.xz" ]; then

tools/rebuild-node-modules.sh

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,25 +39,21 @@ hash nw-gyp 2>/dev/null || {
3939
echo "=======请安装nw-gyp======="
4040
exit 1
4141
}
42-
42+
4343
arch=$(node "$root_dir/tools/parse-config.js" --get-arch $@)
4444

4545
if [ "$arch" == "loongarch64" ] && [ "$(uname -m)" == "x86_64" ];then
4646
notice "在x86构建龙架构,准备交叉编译"
4747
export PATH="$root_dir/cache/cross-tools/target/usr/bin:$root_dir/cache/cross-tools/loongarch64-unknown-linux-gnu/bin:$root_dir/cache/cross-tools/bin:$PATH"
48-
tools/cross-loong64-prepare.sh
48+
tools/cross/toolchain-prepare-loong64.sh
4949
export CC=loongarch64-unknown-linux-gnu-gcc
5050
export CXX=loongarch64-unknown-linux-gnu-g++
5151
export AR=loongarch64-unknown-linux-gnu-ar
5252
export LINK=loongarch64-unknown-linux-gnu-g++
5353
export RANLIB=loongarch64-unknown-linux-gnu-ranlib
5454
export CFLAGS="-I$root_dir/cache/cross-tools/target/usr/include -I$root_dir/cache/cross-tools/target/usr/include/loongarch64-linux-gnu"
55-
export CXXFLAGS="-I$root_dir/cache/cross-tools/target/usr/include -I$root_dir/cache/cross-tools/target/usr/include/loongarch64-linux-gnu" # -fpermissive
55+
export CXXFLAGS="-I$root_dir/cache/cross-tools/target/usr/include -I$root_dir/cache/cross-tools/target/usr/include/loongarch64-linux-gnu"
5656
export LDFLAGS="-L$root_dir/cache/cross-tools/target/usr/lib64 -L$root_dir/cache/cross-tools/target/usr/lib/loongarch64-linux-gnu"
57-
58-
# sed -i 's#-m64##' /home/user/.node-gyp/16.11.0/include/node/common.gypi
59-
# sed -i 's#-pthread##' /home/user/.node-gyp/16.11.0/include/node/common.gypi
60-
# sed -i 's#-rdynamic##' /home/user/.node-gyp/16.11.0/include/node/common.gypi
6157
fi
6258

6359
echo -e "\033[42;37m ######## 版本信息 $(date '+%Y-%m-%d %H:%M:%S') ########\033[0m"
@@ -123,7 +119,7 @@ export JOBS=$max_thread
123119
cd "${package_dir}/node_modules_tmp/node_modules"
124120

125121
node_version=$(node $root_dir/tools/parse-config.js --get-node-version $@)
126-
configure_args=(--target_platform=linux --target_arch="$arch" --verbose --host --target="v$node_version")
122+
configure_args=(--target_platform=linux --target_arch="$arch" --verbose --host --target="v$node_version" --registry=https://registry.npmmirror.com)
127123

128124
# 对于崩溃模块,要判断一下环境是nwjs还是node
129125
# nwjs需要使用nw-gyp,node则需要使用node-gyp

tools/setup-wechat-devtools.sh

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ if [ $CURRENT_STEP == $INSTALL_START ];then
3636
rm -rf "$root_dir"/{node,nwjs,package.nw}
3737
echo "==========Initializing node=========="
3838
if [ -f "$root_dir/node/bin/node" ]; then
39-
step_switch $INSTALL_NODE_SUCCESS
39+
step_switch $INSTALL_NPM_CONFIG_SUCCESS
4040
success "node安装完毕"
4141
else
4242
"$root_dir/tools/update-node.sh" $@
43-
step_switch $INSTALL_NODE_SUCCESS
43+
step_switch $INSTALL_NPM_CONFIG_SUCCESS
4444
success "node ok"
4545
fi
4646

@@ -61,16 +61,8 @@ if [[ -z "$HOME" || "$HOME" = "/" ]]; then
6161
export HOME="/tmp/home"
6262
mkdir -p /tmp/home
6363
fi
64-
if [ $CURRENT_STEP == $INSTALL_NODE_SUCCESS ];then
65-
npm config set prefix "$root_dir/cache/npm/node_global"
66-
npm config set cache "$root_dir/cache/npm/node_cache"
67-
if [ "$ACTION_MODE" != "true" ]; then
68-
notice "非ACTION模式, 设置镜像源"
69-
npm config set registry http://registry.npmmirror.com/ # 注册模块镜像
70-
npm config set disturl http://npmmirror.com/dist # node-gyp 编译依赖的 node 源码镜像
71-
fi
72-
step_switch $INSTALL_NPM_CONFIG_SUCCESS
73-
fi
64+
npm config set prefix "$root_dir/cache/npm/node_global"
65+
npm config set cache "$root_dir/cache/npm/node_cache"
7466

7567
if [ $CURRENT_STEP == $INSTALL_NPM_CONFIG_SUCCESS ];then
7668
notice "=====安装node-gyp nw-gyp===="
@@ -136,7 +128,7 @@ if [ $CURRENT_STEP == $INSTALL_WECHAT_SUCCESS ];then
136128
"$root_dir/tools/fix-package-name.js"
137129

138130
notice "Patching wechat-devtools editor selection autocopy"
139-
"$root_dir/tools/fix-selection-copy-node"
131+
"$root_dir/tools/fix-selection-copy-node.js"
140132

141133
notice "Patching wechat-devtools CLI supports"
142134
"$root_dir/tools/fix-cli.sh"

0 commit comments

Comments
 (0)