mirror of
https://github.com/msojocs/wechat-web-devtools-linux.git
synced 2025-07-22 00:00:04 +08:00
Merge branch 'dev' into nw76
This commit is contained in:
commit
e09132815d
@ -60,4 +60,4 @@ USERDATADIR="$APPDATA"
|
|||||||
|
|
||||||
# "$@"参数
|
# "$@"参数
|
||||||
LANG=zh_CN.UTF-8
|
LANG=zh_CN.UTF-8
|
||||||
exec "$root_dir/nwjs/nw" $root_dir/package.nw $EXTENSION2 $INSPECTOR1 "$@"
|
exec "$root_dir/nwjs/nw" $root_dir/package.nw $INSPECTOR1 "$@"
|
@ -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": {
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
version: "3"
|
version: "3"
|
||||||
services:
|
services:
|
||||||
wechat_devtools:
|
wechat_devtools:
|
||||||
image: jiyecafe/wechat-devtools-build:v3
|
# image: jiyecafe/wechat-devtools-build:v3
|
||||||
# build:
|
build:
|
||||||
# context: ./docker
|
context: ./docker
|
||||||
# dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
volumes:
|
volumes:
|
||||||
- .:/workspace
|
- .:/workspace
|
||||||
- ./cache/.npm:/root/.npm
|
# - ./cache/.npm:/root/.npm
|
||||||
environment:
|
environment:
|
||||||
- ACTION_MODE=${ACTION_MODE:-false}
|
- ACTION_MODE=${ACTION_MODE:-false}
|
||||||
# - https_proxy=${https_proxy:-}
|
# - https_proxy=${https_proxy:-}
|
||||||
|
@ -1,31 +1,23 @@
|
|||||||
FROM ubuntu:16.04
|
FROM ubuntu:20.04
|
||||||
|
|
||||||
WORKDIR /workspace
|
WORKDIR /workspace
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list && \
|
RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list && \
|
||||||
sed -i 's/security.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list && \
|
sed -i 's/security.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list && \
|
||||||
sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list && \
|
sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list && \
|
||||||
mkdir -p /build_temp/python36 /build_temp/nodejs && \
|
sed -i 's/security.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list && \
|
||||||
|
mkdir -p /build_temp/nodejs && \
|
||||||
apt update && \
|
apt update && \
|
||||||
apt install -y binutils software-properties-common gcc g++ \
|
apt install -y binutils software-properties-common gcc g++ \
|
||||||
gconf2 libxkbfile-dev p7zip-full make libssh2-1-dev libkrb5-dev wget curl \
|
gconf2 libxkbfile-dev p7zip-full make libssh2-1-dev libkrb5-dev wget curl python python3 \
|
||||||
openssl pkg-config build-essential && \
|
openssl pkg-config build-essential && \
|
||||||
cd /build_temp/python36 && \
|
|
||||||
apt-get install -y aptitude &&\
|
|
||||||
aptitude -y install gcc make zlib1g-dev libffi-dev libssl-dev &&\
|
|
||||||
mkdir -p test && cd test &&\
|
|
||||||
wget http://npmmirror.com/mirrors/python/3.6.5/Python-3.6.5.tgz &&\
|
|
||||||
tar -xvf Python-3.6.5.tgz &&\
|
|
||||||
chmod -R +x Python-3.6.5 &&\
|
|
||||||
cd Python-3.6.5/ &&\
|
|
||||||
./configure &&\
|
|
||||||
aptitude -y install libffi-dev libssl-dev &&\
|
|
||||||
make && make install &&\
|
|
||||||
cd /build_temp/nodejs &&\
|
cd /build_temp/nodejs &&\
|
||||||
wget https://deb.nodesource.com/setup_16.x &&\
|
apt-get update && apt-get install -y ca-certificates curl gnupg
|
||||||
chmod +x setup_16.x &&\
|
|
||||||
./setup_16.x &&\
|
RUN mkdir -p /etc/apt/keyrings && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg &&\
|
||||||
apt-get install -y nodejs &&\
|
NODE_MAJOR=16 &&\
|
||||||
|
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list &&\
|
||||||
|
apt-get update && apt-get install nodejs -y &&\
|
||||||
rm -rf /build_temp && \
|
rm -rf /build_temp && \
|
||||||
apt install -y gosu && \
|
apt install -y gosu && \
|
||||||
gosu nobody true && \
|
gosu nobody true && \
|
||||||
|
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
|
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"
|
@ -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