mirror of
https://github.com/msojocs/wechat-web-devtools-linux.git
synced 2025-07-22 00:00:04 +08:00
update: nwjs to v0.76.0
This commit is contained in:
parent
041d451488
commit
3fa0694655
@ -1,6 +1,6 @@
|
|||||||
# 此处版本应与nwjs使用的node版本一致
|
# 此处版本应与nwjs使用的node版本一致
|
||||||
if [ -z $NODE_VERSION ];then
|
if [ -z $NODE_VERSION ];then
|
||||||
NODE_VERSION=16.4.2
|
NODE_VERSION=19.8.1
|
||||||
fi
|
fi
|
||||||
NODE_URL_CN=https://npmmirror.com/mirrors/node/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.gz
|
NODE_URL_CN=https://npmmirror.com/mirrors/node/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.gz
|
||||||
NODE_URL_GLOBAL=https://nodejs.org/download/release/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.gz
|
NODE_URL_GLOBAL=https://nodejs.org/download/release/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.gz
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"version": "0.55.0",
|
"version": "0.76.0",
|
||||||
"url": "https://oss.npmmirror.com/dist/nwjs/v${version}/nwjs-sdk-v${version}-linux-x64.tar.gz",
|
"url": "https://oss.npmmirror.com/dist/nwjs/v${version}/nwjs-sdk-v${version}-linux-x64.tar.gz",
|
||||||
"url-global": "https://dl.nwjs.io/v${version}/nwjs-sdk-v${version}-linux-x64.tar.gz",
|
"url-global": "https://dl.nwjs.io/v${version}/nwjs-sdk-v${version}-linux-x64.tar.gz",
|
||||||
"nw2node": {
|
"nw2node": {
|
||||||
|
20
docs/nwjs.md
Normal file
20
docs/nwjs.md
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
| 版本 | 备注 |
|
||||||
|
|-----|------|
|
||||||
|
| 0.55.0 | 选择文件夹的cancel事件不会被触发 |
|
||||||
|
| 0.56.0 | 选择文件夹的cancel事件不会被触发 |
|
||||||
|
| 0.56.1 | 选择文件夹的cancel事件不会被触发 |
|
||||||
|
| 0.57.0 | 选择文件夹的cancel事件不会被触发 |
|
||||||
|
| 0.57.1 | 选择文件夹的cancel事件不会被触发 |
|
||||||
|
| 0.58.0 | 无法启动,选择文件夹的cancel事件不会被触发 |
|
||||||
|
| 0.59.0 | 无法启动,选择文件夹的cancel事件不会被触发 |
|
||||||
|
| 0.59.1 | 无法启动,选择文件夹的cancel事件不会被触发 |
|
||||||
|
| 0.60.0 | 无法启动,选择文件夹的cancel事件不会被触发 |
|
||||||
|
| 0.61.0 | 无法启动,选择文件夹的cancel事件不会被触发 |
|
||||||
|
| 0.62.0 | 无法启动,选择文件夹的cancel事件不会被触发 |
|
||||||
|
| 0.62.1 | 无法启动,选择文件夹的cancel事件不会被触发 |
|
||||||
|
| 0.70.0 | 无法启动,选择文件夹的cancel事件不会被触发 |
|
||||||
|
| 0.75.0 | 无法启动,选择文件夹的cancel事件不会被触发 |
|
||||||
|
| 0.76.0 | 无法启动 |
|
||||||
|
| 0.77.0 | 无法启动 |
|
||||||
|
| 0.80.0 | 无法启动 |
|
||||||
|
| 0.82.0 | 无法启动 |
|
@ -4,10 +4,12 @@ set -e
|
|||||||
root_dir=$(cd `dirname $0`/.. && pwd -P)
|
root_dir=$(cd `dirname $0`/.. && pwd -P)
|
||||||
a=$1
|
a=$1
|
||||||
if [ "$a" == '1' ];then
|
if [ "$a" == '1' ];then
|
||||||
|
# 解压
|
||||||
rm -rf "$root_dir/package.nw/core.wxvpkg.ext"
|
rm -rf "$root_dir/package.nw/core.wxvpkg.ext"
|
||||||
node tools/wxvpkg_unpack.js "$root_dir/package.nw/core.wxvpkg" "$root_dir/package.nw/core.wxvpkg.ext"
|
node tools/wxvpkg_unpack.js "$root_dir/package.nw/core.wxvpkg" "$root_dir/package.nw/core.wxvpkg.ext"
|
||||||
mv "$root_dir/package.nw/core.wxvpkg" "$root_dir/package.nw/core.wxvpkg.orgi"
|
mv "$root_dir/package.nw/core.wxvpkg" "$root_dir/package.nw/core.wxvpkg.orgi"
|
||||||
else
|
else
|
||||||
|
# 打包测试
|
||||||
node tools/wxvpkg_pack.js package.nw/core.wxvpkg.ext package.nw/core.wxvpkg
|
node tools/wxvpkg_pack.js package.nw/core.wxvpkg.ext package.nw/core.wxvpkg
|
||||||
rm -rf ~/.config/wechat-devtools/WeappCache
|
rm -rf ~/.config/wechat-devtools/WeappCache
|
||||||
rm -rf ~/.config/wechat-devtools/WeappVendor
|
rm -rf ~/.config/wechat-devtools/WeappVendor
|
||||||
|
@ -4,8 +4,22 @@
|
|||||||
<title>Hello World!</title>
|
<title>Hello World!</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<input id="file1" type="file" nwdirectory="true" />
|
||||||
|
<script>
|
||||||
|
console.log('input test')
|
||||||
|
function selectChange(e) {
|
||||||
|
console.log('change:', e)
|
||||||
|
}
|
||||||
|
function selectCancel(e) {
|
||||||
|
console.log('selectCancel:', e)
|
||||||
|
}
|
||||||
|
const file = document.getElementById('file1')
|
||||||
|
file.addEventListener('change', selectChange)
|
||||||
|
file.addEventListener('cancel', selectCancel)
|
||||||
|
</script>
|
||||||
<h1>Hello World!</h1>
|
<h1>Hello World!</h1>
|
||||||
We are using node.js 9999
|
We are using node.js 9999
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
document.write(process.version)
|
document.write(process.version)
|
||||||
console.log(123)
|
console.log(123)
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
|
|
||||||
root_dir=$(cd `dirname $0`/.. && pwd -P)
|
root_dir=$(cd `dirname $0`/.. && pwd -P)
|
||||||
# https://mirror.ghproxy.com/https://github.com/microsoft/ripgrep-prebuilt/releases/download/v12.1.1-1/ripgrep-v12.1.1-1-x86_64-unknown-linux-musl.tar.gz
|
# https://mirror.ghproxy.com/https://github.com/microsoft/ripgrep-prebuilt/releases/download/v12.1.1-1/ripgrep-v12.1.1-1-x86_64-unknown-linux-musl.tar.gz
|
||||||
cd $root_dir/tmp &&\
|
cd $root_dir
|
||||||
mkdir -p vscode-ripgrep/bin && cd vscode-ripgrep && \
|
version=0.76.0
|
||||||
wget https://gh2.yanqishui.work/https://github.com/microsoft/ripgrep-prebuilt/releases/download/v12.1.1-1/ripgrep-v12.1.1-1-x86_64-unknown-linux-musl.tar.gz -O ripgrep-v12.1.1-1-x86_64-unknown-linux-musl.tar.gz && \
|
tools/update-nwjs-node $version
|
||||||
tar xvf ripgrep-v12.1.1-1-x86_64-unknown-linux-musl.tar.gz -C ./bin
|
tar -xf "./cache/nwjs-sdk-v${version}-linux-x64.tar.gz" -C ./cache
|
||||||
|
./cache/nwjs-sdk-v${version}-linux-x64/nw ./test/node-pty/code
|
@ -25,7 +25,7 @@ tmp_dir="$root_dir/tmp/core"
|
|||||||
mkdir -p $tmp_dir
|
mkdir -p $tmp_dir
|
||||||
unpack_script="$root_dir/tools/wxvpkg_unpack.js"
|
unpack_script="$root_dir/tools/wxvpkg_unpack.js"
|
||||||
pack_script="$root_dir/tools/wxvpkg_pack.js"
|
pack_script="$root_dir/tools/wxvpkg_pack.js"
|
||||||
|
|
||||||
echo "Fix Core"
|
echo "Fix Core"
|
||||||
# unpack 文件 到 路径
|
# unpack 文件 到 路径
|
||||||
node "$unpack_script" "$package_dir/core.wxvpkg" "$tmp_dir/core.wxvpkg"
|
node "$unpack_script" "$package_dir/core.wxvpkg" "$tmp_dir/core.wxvpkg"
|
||||||
|
9
tools/fix-nw-gyp.sh
Executable file
9
tools/fix-nw-gyp.sh
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
# from https://github.com/nwjs/nw-gyp/issues/155#issuecomment-1308701166
|
||||||
|
|
||||||
|
gyp_path=$(readlink -f "$(which nw-gyp)")
|
||||||
|
module_path=$(cd `dirname $gyp_path`/.. && pwd -P)
|
||||||
|
config_file="${module_path}/lib/configure.js"
|
||||||
|
echo "fix configure file: $config_file"
|
||||||
|
sed -i "s#process.config || {}#JSON.parse(JSON.stringify(process.config)) || {}#" "$config_file"
|
@ -84,7 +84,7 @@ mkdir -p "${package_dir}/node_modules_tmp/node_modules"
|
|||||||
|
|
||||||
notice "install modules"
|
notice "install modules"
|
||||||
max_thread=$(cat /proc/cpuinfo| grep "processor"| wc -l)
|
max_thread=$(cat /proc/cpuinfo| grep "processor"| wc -l)
|
||||||
export JOBS=$max_thread
|
# export JOBS=$max_thread
|
||||||
(cd "${package_dir}/node_modules_tmp" && npm install \
|
(cd "${package_dir}/node_modules_tmp" && npm install \
|
||||||
extract-file-icon \
|
extract-file-icon \
|
||||||
native-keymap \
|
native-keymap \
|
||||||
@ -93,7 +93,10 @@ export JOBS=$max_thread
|
|||||||
oniguruma \
|
oniguruma \
|
||||||
spdlog@0.11.1 \
|
spdlog@0.11.1 \
|
||||||
trash \
|
trash \
|
||||||
vscode-oniguruma \
|
vscode-oniguruma )
|
||||||
|
|
||||||
|
notice "install nodegit"
|
||||||
|
(cd "${package_dir}/node_modules_tmp" && npm install \
|
||||||
nodegit \
|
nodegit \
|
||||||
--registry=https://registry.npmmirror.com \
|
--registry=https://registry.npmmirror.com \
|
||||||
--nodegit_binary_host_mirror=https://npmmirror.com/mirrors/nodegit/v0.27.0/ ) # reinstall modules
|
--nodegit_binary_host_mirror=https://npmmirror.com/mirrors/nodegit/v0.27.0/ ) # reinstall modules
|
||||||
|
@ -62,16 +62,16 @@ if [ $CURRENT_STEP == $INSTALL_NODE_SUCCESS ];then
|
|||||||
if [ "$ACTION_MODE" != "true" ]; then
|
if [ "$ACTION_MODE" != "true" ]; then
|
||||||
notice "非ACTION模式, 设置镜像源"
|
notice "非ACTION模式, 设置镜像源"
|
||||||
npm config set registry http://registry.npmmirror.com/ # 注册模块镜像
|
npm config set registry http://registry.npmmirror.com/ # 注册模块镜像
|
||||||
npm config set disturl http://npmmirror.com/dist # node-gyp 编译依赖的 node 源码镜像
|
# npm config set disturl http://npmmirror.com/dist # node-gyp 编译依赖的 node 源码镜像
|
||||||
## 以下选择添加
|
## 以下选择添加
|
||||||
npm config set sass_binary_site http://npmmirror.com/mirrors/node-sass # node-sass 二进制包镜像
|
# npm config set sass_binary_site http://npmmirror.com/mirrors/node-sass # node-sass 二进制包镜像
|
||||||
npm config set electron_mirror http://npmmirror.com/mirrors/electron/ # electron 二进制包镜像
|
# npm config set electron_mirror http://npmmirror.com/mirrors/electron/ # electron 二进制包镜像
|
||||||
npm config set puppeteer_download_host http://npmmirror.com/mirrors # puppeteer 二进制包镜像
|
# npm config set puppeteer_download_host http://npmmirror.com/mirrors # puppeteer 二进制包镜像
|
||||||
npm config set chromedriver_cdnurl http://npmmirror.com/mirrors/chromedriver # chromedriver 二进制包镜像
|
# npm config set chromedriver_cdnurl http://npmmirror.com/mirrors/chromedriver # chromedriver 二进制包镜像
|
||||||
npm config set operadriver_cdnurl http://npmmirror.com/mirrors/operadriver # operadriver 二进制包镜像
|
# npm config set operadriver_cdnurl http://npmmirror.com/mirrors/operadriver # operadriver 二进制包镜像
|
||||||
npm config set phantomjs_cdnurl http://npmmirror.com/mirrors/phantomjs # phantomjs 二进制包镜像
|
# npm config set phantomjs_cdnurl http://npmmirror.com/mirrors/phantomjs # phantomjs 二进制包镜像
|
||||||
npm config set selenium_cdnurl http://npmmirror.com/mirrors/selenium # selenium 二进制包镜像
|
# npm config set selenium_cdnurl http://npmmirror.com/mirrors/selenium # selenium 二进制包镜像
|
||||||
npm config set node_inspector_cdnurl http://npmmirror.com/mirrors/node-inspector # node-inspector 二进制包镜像
|
# npm config set node_inspector_cdnurl http://npmmirror.com/mirrors/node-inspector # node-inspector 二进制包镜像
|
||||||
# npm cache clean --force # 清空缓存
|
# npm cache clean --force # 清空缓存
|
||||||
fi
|
fi
|
||||||
step_switch $INSTALL_NPM_CONFIG_SUCCESS
|
step_switch $INSTALL_NPM_CONFIG_SUCCESS
|
||||||
@ -84,6 +84,7 @@ if [ $CURRENT_STEP == $INSTALL_NPM_CONFIG_SUCCESS ];then
|
|||||||
echo $PATH
|
echo $PATH
|
||||||
node-gyp install
|
node-gyp install
|
||||||
node-gyp list
|
node-gyp list
|
||||||
|
"$root_dir/tools/fix-nw-gyp.sh"
|
||||||
step_switch $INSTALL_GYP_SUCCESS
|
step_switch $INSTALL_GYP_SUCCESS
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user