mirror of
https://github.com/msojocs/wechat-web-devtools-linux.git
synced 2025-07-22 00:00:04 +08:00
update to nwjs v0.53.1
This commit is contained in:
parent
11ee5bc995
commit
13a48fc62d
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,3 +7,4 @@ cache/
|
|||||||
tmp/
|
tmp/
|
||||||
mew/
|
mew/
|
||||||
node_modules
|
node_modules
|
||||||
|
test/mini-ci
|
||||||
|
4
.vscode/launch.json
vendored
4
.vscode/launch.json
vendored
@ -13,9 +13,9 @@
|
|||||||
"reloadAfterAttached": true,
|
"reloadAfterAttached": true,
|
||||||
"runtimeArgs": [
|
"runtimeArgs": [
|
||||||
"--load-extension=${workspaceFolder}/tmp/data/WeappPlugin",
|
"--load-extension=${workspaceFolder}/tmp/data/WeappPlugin",
|
||||||
"--custom-devtools-frontend=file://${workspaceFolder}/tmp/data/WeappPlugin/inspector/",
|
// "--custom-devtools-frontend=file://${workspaceFolder}/tmp/data/WeappPlugin/inspector/",
|
||||||
"--user-data-dir=${workspaceFolder}/tmp/data",
|
"--user-data-dir=${workspaceFolder}/tmp/data",
|
||||||
"--remote-debugging-port=9999"
|
// "--remote-debugging-port=9999"
|
||||||
],
|
],
|
||||||
"env": {
|
"env": {
|
||||||
"LANG": "zh_CN.UTF-8"
|
"LANG": "zh_CN.UTF-8"
|
||||||
|
@ -16,4 +16,4 @@ USERDATADIR="$( echo ~ )/.config/wechat_devtools"
|
|||||||
|
|
||||||
# "$@"参数
|
# "$@"参数
|
||||||
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 $EXTENSION2 $INSPECTOR2 "$@"
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"description": "此处版本应与nwjs使用的node版本一致",
|
"description": "此处版本应与nwjs使用的node版本一致",
|
||||||
"version": "14.5.0",
|
"version": "16.1.0",
|
||||||
"url": "https://npm.taobao.org/mirrors/node/v${version}/node-v${version}-linux-x64.tar.gz",
|
"url": "https://npm.taobao.org/mirrors/node/v${version}/node-v${version}-linux-x64.tar.gz",
|
||||||
"url-global": "https://nodejs.org/download/release/v${version}/node-v${version}-linux-x64.tar.gz"
|
"url-global": "https://nodejs.org/download/release/v${version}/node-v${version}-linux-x64.tar.gz"
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"version": "0.47.0",
|
"version": "0.53.1",
|
||||||
"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"
|
||||||
}
|
}
|
@ -6,4 +6,5 @@ services:
|
|||||||
- .:/workspace
|
- .:/workspace
|
||||||
environment:
|
environment:
|
||||||
- ACTION=${ACTION_MODE:-false}
|
- ACTION=${ACTION_MODE:-false}
|
||||||
|
- https_proxy=${https_proxy:-}
|
||||||
entrypoint: /workspace/docker/entrypoint
|
entrypoint: /workspace/docker/entrypoint
|
@ -23,6 +23,11 @@ echo "start"
|
|||||||
python --version
|
python --version
|
||||||
node --version
|
node --version
|
||||||
|
|
||||||
|
ACTION_MODE=$( export ACTION_MODE )
|
||||||
|
if [ $ACTION_MODE!='true' ]; then
|
||||||
|
npm set registry https://r.npm.taobao.org # 注册模块镜像
|
||||||
|
npm set disturl https://npm.taobao.org/dist # node-gyp 编译依赖的 node 源码镜像
|
||||||
|
npm cache clean --force # 清空缓存
|
||||||
echo "\
|
echo "\
|
||||||
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free\
|
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free\
|
||||||
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free
|
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free
|
||||||
@ -33,11 +38,13 @@ echo "\
|
|||||||
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free\
|
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free\
|
||||||
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free
|
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free
|
||||||
"> /etc/apt/sources.list
|
"> /etc/apt/sources.list
|
||||||
|
fi
|
||||||
|
|
||||||
apt-get clean; # 清空缓存
|
apt-get clean; # 清空缓存
|
||||||
apt-get update; # 更新
|
apt-get update; # 更新
|
||||||
apt-get install -y libx11-dev libxkbfile-dev p7zip-full
|
apt-get install -y libx11-dev libxkbfile-dev p7zip-full
|
||||||
|
|
||||||
|
npm install -g npm
|
||||||
npm install -g node-gyp
|
npm install -g node-gyp
|
||||||
node-gyp install
|
node-gyp install
|
||||||
node-gyp list
|
node-gyp list
|
||||||
|
5
docs/FIX.MD
Normal file
5
docs/FIX.MD
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# 终端修复
|
||||||
|
|
||||||
|
1. 执行`grep -lr "cmd.exe" .`
|
||||||
|
2. 解包`core.wxvpkg`
|
||||||
|
3. `s="darwin"===process.platform,a="win32"===process.platform`
|
36
test/test
36
test/test
@ -1,31 +1,11 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
|
|
||||||
const path = require("path")
|
console.log("12312")
|
||||||
const fs = require("fs")
|
// console.log(process.platform); // linux
|
||||||
const {execSync} = require('child_process')
|
// const cmdPaths = [];
|
||||||
|
// cmdPaths.push("/System/Applications/Utilities/Terminal.app",
|
||||||
|
// "/Applications/Utilities/Terminal.app"
|
||||||
|
// )
|
||||||
|
|
||||||
const workDir = path.resolve(__dirname, "../package.nw")
|
// console.log(cmdPaths);
|
||||||
if(fs.existsSync(`${workDir}/core.wxvpkg`) && fs.stat(`${workDir}/core.wxvpkg`))
|
console.log(process.env.comspec)
|
||||||
fs.renameSync(`${workDir}/core.wxvpkg`, `${workDir}/core.wxvpkg1`)
|
|
||||||
|
|
||||||
if(!fs.existsSync(`${workDir}/core.wxvpkg1`)){
|
|
||||||
console.error('错误')
|
|
||||||
exit(-1)
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log(`unwxapkg ${workDir}/core.wxvpkg1 ${workDir}/core.wxvpkg.ext`)
|
|
||||||
execSync(`cd ${workDir} && unwxapkg core.wxvpkg1 core.wxvpkg.ext`)
|
|
||||||
const search = execSync(`grep -lr "new_instance" ${workDir}/core.wxvpkg.ext`)
|
|
||||||
console.log(search.toString())
|
|
||||||
const filepath = search.toString();
|
|
||||||
execSync(`sed -i 's/"new_instance",/"new_instance","mixed_context",/g' ${filepath}`)
|
|
||||||
execSync(`sed -i 's/o.new_instance=!0,/o.new_instance=!0,o.mixed_context=!0,/g' ${filepath}`)
|
|
||||||
execSync(`node ${path.resolve(__dirname, "pack")}`)
|
|
||||||
// # cd ../package.nw
|
|
||||||
// # mv core.wxvpkg core.wxvpkg.1
|
|
||||||
// # unwxapkg core.wxvpkg.1 core.wxvpkg1
|
|
||||||
// # 添加mixed_context
|
|
||||||
// # 打包
|
|
||||||
// # unwxapkg node_modules.wxvpkg node_modules
|
|
||||||
|
|
||||||
// # mixed_context
|
|
||||||
|
6
test/test1
Normal file
6
test/test1
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
root_dir=$(cd `dirname $0`/.. && pwd -P)
|
||||||
|
export comspec="/bin/bash"
|
||||||
|
echo "test"
|
||||||
|
exec $root_dir/test/test
|
5
test/update
Normal file
5
test/update
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
tools/update-nwjs-node
|
||||||
|
rm -rf ~/.config/wechat_devtools
|
||||||
|
bin/wechat-devtools
|
31
test/upgrade_to_0.49.x
Normal file
31
test/upgrade_to_0.49.x
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
|
||||||
|
const path = require("path")
|
||||||
|
const fs = require("fs")
|
||||||
|
const {execSync} = require('child_process')
|
||||||
|
|
||||||
|
const workDir = path.resolve(__dirname, "../package.nw")
|
||||||
|
if(fs.existsSync(`${workDir}/core.wxvpkg`) && fs.statSync(`${workDir}/core.wxvpkg`).isFile())
|
||||||
|
fs.renameSync(`${workDir}/core.wxvpkg`, `${workDir}/core.wxvpkg1`)
|
||||||
|
|
||||||
|
if(!fs.existsSync(`${workDir}/core.wxvpkg1`)){
|
||||||
|
console.error('错误')
|
||||||
|
exit(-1)
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(`unwxapkg ${workDir}/core.wxvpkg1 ${workDir}/core.wxvpkg.ext`)
|
||||||
|
execSync(`cd ${workDir} && unwxapkg core.wxvpkg1 core.wxvpkg.ext`)
|
||||||
|
const search = execSync(`grep -lr "new_instance" ${workDir}/core.wxvpkg.ext`)
|
||||||
|
console.log(search.toString())
|
||||||
|
const filepath = search.toString();
|
||||||
|
execSync(`sed -i 's/"new_instance",/"new_instance","mixed_context",/g' ${filepath}`)
|
||||||
|
execSync(`sed -i 's/o.new_instance=!0,/o.new_instance=!0,o.mixed_context=!0,/g' ${filepath}`)
|
||||||
|
execSync(`node ${path.resolve(__dirname, "pack")}`)
|
||||||
|
// # cd ../package.nw
|
||||||
|
// # mv core.wxvpkg core.wxvpkg.1
|
||||||
|
// # unwxapkg core.wxvpkg.1 core.wxvpkg1
|
||||||
|
// # 添加mixed_context
|
||||||
|
// # 打包
|
||||||
|
// # unwxapkg node_modules.wxvpkg node_modules
|
||||||
|
|
||||||
|
// # mixed_context
|
@ -14,7 +14,7 @@ const parseFile = function (path) {
|
|||||||
|
|
||||||
content.name = "wechat_devtools";
|
content.name = "wechat_devtools";
|
||||||
// 开启调试,更新参数
|
// 开启调试,更新参数
|
||||||
content['chromium-args'] = content['chromium-args'].replace('--disable-devtools', '').replace('--ignore-gpu-blacklist', '--ignore-gpu-blocklist')
|
content['chromium-args'] = content['chromium-args'].replace('--disable-devtools', '').replace('--ignore-gpu-blacklist', '--ignore-gpu-blocklist') + ' --mixed-context'
|
||||||
|
|
||||||
console.log("arite")
|
console.log("arite")
|
||||||
fs.writeFileSync(path, JSON.stringify(content, null, 4));
|
fs.writeFileSync(path, JSON.stringify(content, null, 4));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user