Compare commits
255 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
5b68973fc4 | ||
|
080ee2b6df | ||
|
465af9b79a | ||
|
322de01a35 | ||
|
8c9eeed51f | ||
|
a3e75a647f | ||
|
54ce4f4565 | ||
|
4b9612b7a6 | ||
|
940cd4a12d | ||
|
bf2fbd90ed | ||
|
7972c036f2 | ||
|
75ea918b71 | ||
|
df2d94f3f2 | ||
|
2778d18e9e | ||
|
e2d698f573 | ||
|
ab106f123a | ||
|
f32e4d59c8 | ||
|
5cad0a1fac | ||
|
cab9cb805d | ||
|
99b2a42170 | ||
|
cb363c5326 | ||
|
70a2622fae | ||
|
11cee791d5 | ||
|
5fe2af43d8 | ||
|
e47ef79745 | ||
|
471984aa7b | ||
|
1a5519f125 | ||
|
23b2b57500 | ||
|
fbe81e32ba | ||
|
3ea46144c8 | ||
|
1d38da3d78 | ||
|
817c74ea86 | ||
|
a33d79f0c3 | ||
|
d9dec28b02 | ||
|
1e637f3969 | ||
|
98cbf7202e | ||
|
34c27f5d34 | ||
|
3d941dbe23 | ||
|
4c591f266a | ||
|
f41bffd96a | ||
|
285d29c48f | ||
|
d581d5aa8b | ||
|
d4b8412f98 | ||
|
c5a0c09738 | ||
|
d5b5e5a977 | ||
|
60e77b0df0 | ||
|
afb354792d | ||
|
ac06e4ad9c | ||
|
f7191c2280 | ||
|
4354a28fe5 | ||
|
7fa50693a7 | ||
|
57ccd51771 | ||
|
041d451488 | ||
|
8404792579 | ||
|
4a25d2704b | ||
|
b9874782f9 | ||
|
386900ccf5 | ||
|
b53b420a0c | ||
|
3902faa429 | ||
|
bec0771df6 | ||
|
af247207d4 | ||
|
96360cb0d4 | ||
|
199b994991 | ||
|
f4c6d6cc5f | ||
|
006b61bb0f | ||
|
7a302f6c12 | ||
|
baf4206157 | ||
|
a556ded5f7 | ||
|
3ddeba5923 | ||
|
70c44ccb8c | ||
|
035ffe756f | ||
|
ff3f815e9e | ||
|
277c1bde14 | ||
|
1d169d995a | ||
|
78170a663e | ||
|
0447f18b42 | ||
|
43cea86b7a | ||
|
cc93ba32a5 | ||
|
7ee822f568 | ||
|
7e70819697 | ||
|
e10ad2ff9d | ||
|
701efb0a9f | ||
|
e3a12f710f | ||
|
3f20e31df1 | ||
|
9b4935ac10 | ||
|
89fe4a2375 | ||
|
b351a8945c | ||
|
5ec4cbc186 | ||
|
8b345edb66 | ||
|
ec2e620e9e | ||
|
4764553ecb | ||
|
331e650b44 | ||
|
48dc6497d6 | ||
|
089835db02 | ||
|
5a1851d310 | ||
|
582d296cf9 | ||
|
75a7ac47a1 | ||
|
5f1bd122d7 | ||
|
361ac3a1ba | ||
|
b0a93084aa | ||
|
a83be132e2 | ||
|
1d3352d71d | ||
|
ad2403378d | ||
|
7fd94d143e | ||
|
4c3214e4e7 | ||
|
7db1b17e35 | ||
|
a37cb16a41 | ||
|
6c4251e657 | ||
|
fd12934be2 | ||
|
dca9f5a74d | ||
|
2a4ba5c9e7 | ||
|
fbb16cd24b | ||
|
9549385d20 | ||
|
474efb2863 | ||
|
64a6a2097e | ||
|
35486b1ded | ||
|
99bf79ae66 | ||
|
bd74d566f3 | ||
|
8cc9f1b5e7 | ||
|
49d9077c66 | ||
|
5ce602a8b7 | ||
|
cb8d85eca2 | ||
|
069f18556d | ||
|
0014eac997 | ||
|
6ca62fe4c8 | ||
|
0e50490049 | ||
|
8c02f7a13c | ||
|
943bb8017f | ||
|
0a23c8b0b7 | ||
|
2c88d521f0 | ||
|
8acaef6675 | ||
|
7ee2b2818d | ||
|
c9fcf1d8c8 | ||
|
a8c772b9a0 | ||
|
22b579ec5e | ||
|
05d5494835 | ||
|
5ff4cdc89b | ||
|
8e10e3ddab | ||
|
2734615ac2 | ||
|
98b155b83d | ||
|
c9a5f824a8 | ||
|
484f25b953 | ||
|
87d6149780 | ||
|
eaecd9964e | ||
|
648ea43aa5 | ||
|
6ebac53707 | ||
|
afe64f9042 | ||
|
e1ef2b7754 | ||
|
907afc6c7d | ||
|
1a6fb9e611 | ||
|
54c15a1a9e | ||
|
b0fe0a541a | ||
|
5df3050ee7 | ||
|
66f5a28669 | ||
|
351c9a8613 | ||
|
2f18e2a178 | ||
|
439ca22788 | ||
|
7c24ba198f | ||
|
42c222b34d | ||
|
9cf40d60ee | ||
|
52b8d95a2f | ||
|
a7a2c98d25 | ||
|
cc8bf6af19 | ||
|
59d5adda2f | ||
|
68dd8fecc8 | ||
|
5be7974b85 | ||
|
28e7e834f7 | ||
|
15f29ca887 | ||
|
6f048bf662 | ||
|
039de9c1b3 | ||
|
da0a56a892 | ||
|
9f7fd4ed39 | ||
|
b00dfb3ef7 | ||
|
4ff58b2fb8 | ||
|
1b8d41eee9 | ||
|
76aac0f6a5 | ||
|
3099858f56 | ||
|
150a944c02 | ||
|
6fa17ebca2 | ||
|
3c373a8f6f | ||
|
f29fa16289 | ||
|
324d866482 | ||
|
e463415599 | ||
|
83677cba04 | ||
|
41ad8875e1 | ||
|
00c9a3c105 | ||
|
3e23be4310 | ||
|
5f57bf5c92 | ||
|
f8187dbe76 | ||
|
500af42180 | ||
|
9cc542e569 | ||
|
9d5347be66 | ||
|
fdd36f88e1 | ||
|
b5881c4657 | ||
|
a603376125 | ||
|
848d6c9122 | ||
|
039d72b55a | ||
|
22af906b14 | ||
|
7ff73e13c7 | ||
|
3e489139c0 | ||
|
b9e7fc7381 | ||
|
252f12bc81 | ||
|
76cb151b07 | ||
|
e8498166ea | ||
|
18df6a413f | ||
|
902a964ce0 | ||
|
7684a193ae | ||
|
8f7c81c47d | ||
|
dce49775a9 | ||
|
eec7738545 | ||
|
bbfa5b6dc5 | ||
|
ddb519cfe6 | ||
|
a9446efa16 | ||
|
7f0cd0c8ef | ||
|
79374aa984 | ||
|
4f8384e141 | ||
|
b8c73fd8b0 | ||
|
e3107ae5cb | ||
|
2e6c7bcb18 | ||
|
09a4378c6d | ||
|
086aa5d045 | ||
|
a5bb4e44b9 | ||
|
18e80ba04f | ||
|
418714ca65 | ||
|
b6084b9b3e | ||
|
12a4f88505 | ||
|
53b8f14ccb | ||
|
031ef91e14 | ||
|
5c4b9fcc22 | ||
|
677acf815f | ||
|
3b14d60568 | ||
|
60ddc62a3f | ||
|
924eaf652e | ||
|
6c47ba6f4f | ||
|
2d7d8269eb | ||
|
60b3ff31f7 | ||
|
d0a79076b4 | ||
|
3f7f7a68d5 | ||
|
5bcdb80d8b | ||
|
7f2112e7af | ||
|
5908cdf9dc | ||
|
f521040947 | ||
|
0ba6ca15fe | ||
|
8c67f5ad52 | ||
|
e9c717dd5d | ||
|
41938a29a0 | ||
|
c0a49d650b | ||
|
542531810f | ||
|
38677f49b1 | ||
|
2830b9a408 | ||
|
dc6498e3aa | ||
|
1fb6cb11c6 | ||
|
6dcf602079 | ||
|
f0d100c761 | ||
|
c29f28ffd6 |
41
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
---
|
||||
name: 报告Bug
|
||||
about: 如果阁下提交的 `issue` 属于bug,但没有按模板提交,那么将会被忽略或删除
|
||||
title: ''
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**预先准备**
|
||||
1. 删除 `~/.config/wechat-devtools` 目录,重新打开项目(若发布 `issue` 即默认阁下执行了此操作且问题没有解决);
|
||||
2. HelloWorld是否正常(登录状态新建默认项目,执行复现步骤):正常/不正常
|
||||
3. ***注意:如果你的问题是编译器错误,那么请提供可复现的demo,否则会被直接关闭。***
|
||||
|
||||
**问题描述**
|
||||
<!-- 请对问题做一个简单描述。 -->
|
||||
|
||||
**问题复现**
|
||||
<!-- 复现问题需要进行的操作: -->
|
||||
1. 打开项目
|
||||
2. 点击 '....'
|
||||
3. 看到问题
|
||||
|
||||
**期望的效果**
|
||||
<!-- 经过上述操作你希望得到的结果. -->
|
||||
|
||||
**截屏**
|
||||
<!-- 添加截图图片有助于解释您的问题,请尽量将整个开发工具都涵括在截图在(复制图片后直接粘贴将自动上传图片)。 -->
|
||||
|
||||
**版本信息 (这是必要的):**
|
||||
- OS: e.g. manjaro
|
||||
- Package: e.g. xxx_wine.tar.gz
|
||||
- Wine Version: e.g. 7 可选
|
||||
|
||||
**代码片段**
|
||||
<!-- 提供代码片段对维护者定位与修复问题有极大帮助;
|
||||
若阁下不能提供,且维护者不能复现问题,那么阁下的`issue`将被搁置或者关闭。
|
||||
[查看创建代码片段的教程](https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html) -->
|
||||
|
||||
**额外的信息**
|
||||
<!-- 一些关于此问题的额外信息。 -->
|
66
.github/workflows/build-deb.yml
vendored
Normal file
@ -0,0 +1,66 @@
|
||||
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: Build DEB Package
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
workflow_call:
|
||||
|
||||
jobs:
|
||||
build-deb:
|
||||
name: Build DEB Package
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
ARCH: ['x86_64']
|
||||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
|
||||
- name: Generate TAG
|
||||
id: Tag
|
||||
run: |
|
||||
tag='continuous'
|
||||
name='Continuous Build'
|
||||
if [ 'true' == ${{ startsWith(github.ref, 'refs/tags/') }} ];then
|
||||
tag='${{ github.ref_name }}'
|
||||
name='${{ github.ref_name }}'
|
||||
fi
|
||||
echo "tag result: $tag - $name"
|
||||
echo "::set-output name=tag::$tag"
|
||||
echo "::set-output name=name::$name"
|
||||
# https://stackoverflow.com/questions/61096521/how-to-use-gpg-key-in-github-actions
|
||||
# gpg --generate-key
|
||||
# gpg --export-secret-keys YOUR_ID_HERE | base64 > private.key
|
||||
- name: Configure GPG Key
|
||||
run: |
|
||||
echo -n "$GPG_SIGNING_KEY" | base64 --decode | gpg --import
|
||||
gpg --list-secret-keys jiyecafe@gmail.com
|
||||
env:
|
||||
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
|
||||
|
||||
- name: Prepare
|
||||
run: |
|
||||
sudo apt update -y
|
||||
sudo apt-get install -y build-essential fakeroot devscripts debhelper # debmake lintian pbuilder
|
||||
|
||||
- name: Build Deb Package
|
||||
run: |
|
||||
export BUILD_VERSION=${{ steps.tag.outputs.tag }}
|
||||
ls -l
|
||||
mkdir -p tmp/build
|
||||
export WINE=false
|
||||
tools/build-prepare.sh
|
||||
env WINE=false tools/build-deepin.sh ${{ steps.tag.outputs.tag }}
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
# Artifact name
|
||||
name: wechat-devtools-deb-${{ matrix.ARCH }}.build
|
||||
path: tmp/build
|
88
.github/workflows/build-src.yml
vendored
Normal file
@ -0,0 +1,88 @@
|
||||
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: Build Base Packages
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
workflow_call:
|
||||
|
||||
jobs:
|
||||
build-src:
|
||||
name: Build Base Packages
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [16.x]
|
||||
ARCH: ['x86_64']
|
||||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v2
|
||||
|
||||
- name: Prepare
|
||||
run: |
|
||||
echo "$UID, $GID"
|
||||
|
||||
- name: Generate TAG
|
||||
id: Tag
|
||||
run: |
|
||||
tag='continuous'
|
||||
name='Continuous Build'
|
||||
if [ 'true' == ${{ startsWith(github.ref, 'refs/tags/') }} ];then
|
||||
tag='${{ github.ref_name }}'
|
||||
name='${{ github.ref_name }}'
|
||||
fi
|
||||
echo "tag result: $tag - $name"
|
||||
echo "::set-output name=tag::$tag"
|
||||
echo "::set-output name=name::$name"
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
export ACTION_MODE=true
|
||||
ls -l
|
||||
export WINE=false
|
||||
tools/build-with-docker.sh
|
||||
|
||||
- name: Compress Resources
|
||||
run: |
|
||||
ls -l
|
||||
mkdir -p tmp/src
|
||||
rm -rf nwjs/node nwjs/node.exe
|
||||
cp node/bin/node nwjs/node
|
||||
cd nwjs && ln -s node node.exe
|
||||
cd ..
|
||||
tar -zcf tmp/src/src-linux.tar.gz bin nwjs package.nw tools
|
||||
|
||||
- name: Compress nodegit
|
||||
run: |
|
||||
ls -l
|
||||
mkdir -p tmp/build
|
||||
cp -r package.nw/node_modules/nodegit .
|
||||
tar -zcf nodegit.tar.gz nodegit
|
||||
mv nodegit.tar.gz tmp/build
|
||||
cd tmp/build
|
||||
ls -l
|
||||
|
||||
- name: View Directory
|
||||
run: |
|
||||
ls -l
|
||||
|
||||
- name: Upload src artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
# Artifact name
|
||||
name: wechat-devtools-${{ matrix.ARCH }}.src
|
||||
path: tmp/src
|
||||
|
||||
- name: Upload build artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
# Artifact name
|
||||
name: wechat-devtools-${{ matrix.ARCH }}.build
|
||||
path: tmp/build
|
66
.github/workflows/build-tar.yml
vendored
Normal file
@ -0,0 +1,66 @@
|
||||
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: Build tar.gz AppImage
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
workflow_call:
|
||||
|
||||
jobs:
|
||||
build-tar:
|
||||
name: Build tar.gz AppImage
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [16.x]
|
||||
ARCH: ['x86_64']
|
||||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
- name: Inspect directory after downloading artifacts
|
||||
run: |
|
||||
ls -alFR wechat-devtools-*.build
|
||||
ls -alFR wechat-devtools-*.src
|
||||
- name: Prepare
|
||||
run: |
|
||||
sudo apt install -y fuse
|
||||
echo "$UID, $GID"
|
||||
|
||||
- name: Generate TAG
|
||||
id: Tag
|
||||
run: |
|
||||
tag='continuous'
|
||||
name='Continuous Build'
|
||||
if [ 'true' == ${{ startsWith(github.ref, 'refs/tags/') }} ];then
|
||||
tag='${{ github.ref_name }}'
|
||||
name='${{ github.ref_name }}'
|
||||
fi
|
||||
echo "tag result: $tag - $name"
|
||||
echo "::set-output name=tag::$tag"
|
||||
echo "::set-output name=name::$name"
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
export WINE=false
|
||||
export ACTION_MODE=true
|
||||
# tar.gz AppImage
|
||||
ls -l
|
||||
mkdir -p tmp/build
|
||||
tools/build-prepare.sh
|
||||
tools/build-release.sh ${{ matrix.ARCH }} ${{ steps.tag.outputs.tag }}
|
||||
|
||||
- name: View Directory
|
||||
run: |
|
||||
ls -l
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
# Artifact name
|
||||
name: wechat-devtools-simple-${{ matrix.ARCH }}.build
|
||||
path: tmp/build
|
91
.github/workflows/release.yml
vendored
@ -1,7 +1,7 @@
|
||||
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: Node.js CI
|
||||
name: Build Packages Linux
|
||||
|
||||
on:
|
||||
release:
|
||||
@ -9,41 +9,46 @@ on:
|
||||
push:
|
||||
tags:
|
||||
- v*
|
||||
branches: [ master, actions-dev]
|
||||
branches: [ master, dev, ci, skyline]
|
||||
paths-ignore:
|
||||
- 'README.MD'
|
||||
- 'CHANGELOG.MD'
|
||||
- 'docs/**'
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
# # Allows you to run this workflow manually from the Actions tab
|
||||
# workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
build-src:
|
||||
uses: ./.github/workflows/build-src.yml
|
||||
secrets: inherit
|
||||
build-tar:
|
||||
needs:
|
||||
- build-src
|
||||
uses: ./.github/workflows/build-tar.yml
|
||||
secrets: inherit
|
||||
build-deb:
|
||||
needs:
|
||||
- build-src
|
||||
uses: ./.github/workflows/build-deb.yml
|
||||
secrets: inherit
|
||||
upload:
|
||||
name: Create release and upload artifacts
|
||||
needs:
|
||||
- build-tar
|
||||
- build-deb
|
||||
# - build-snap
|
||||
# - build-arch
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [16.x]
|
||||
ARCH: ['x86_64']
|
||||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: 'npm'
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
- name: Inspect directory after downloading artifacts
|
||||
run: ls -alFR
|
||||
|
||||
- name: Prepare
|
||||
run: |
|
||||
pwd
|
||||
ls -l
|
||||
export ACTION_MODE=true
|
||||
sudo apt-get install -y libx11-dev libxkbfile-dev p7zip-full python2 python3 libkrb5-dev gcc openssl libssh2-1-dev g++ make
|
||||
npm install node-gyp nw-gyp npm -g
|
||||
node-gyp install
|
||||
|
||||
- id: Tag
|
||||
- name: Generate TAG
|
||||
id: Tag
|
||||
run: |
|
||||
tag='continuous'
|
||||
name='Continuous Build'
|
||||
@ -55,38 +60,15 @@ jobs:
|
||||
echo "::set-output name=tag::$tag"
|
||||
echo "::set-output name=name::$name"
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
# docker-compose up
|
||||
tools/setup-wechat-devtools-bash
|
||||
sudo chmod -R 755 package.nw
|
||||
bash tools/build-release.sh ${{ steps.tag.outputs.tag }} ${{ matrix.ARCH }}
|
||||
|
||||
- name: Compress nodegit compiler
|
||||
run: |
|
||||
ls -l
|
||||
sudo cp -r package.nw/node_modules/nodegit tmp/build/nodegit
|
||||
sudo cp -r compiler tmp/build/compiler
|
||||
cd tmp/build
|
||||
ls -l
|
||||
tar -zcf compiler.tar.gz compiler
|
||||
tar -zcf nodegit.tar.gz nodegit
|
||||
sudo rm -rf compiler nodegit
|
||||
ls -l
|
||||
|
||||
- name: View Directory
|
||||
run: |
|
||||
ls -l
|
||||
|
||||
- name: Create release and upload artifacts
|
||||
if: startsWith(github.ref, 'refs/heads/')
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
cd tmp/build
|
||||
sudo apt install -y fuse
|
||||
wget -q https://github.com/TheAssassin/pyuploadtool/releases/download/continuous/pyuploadtool-x86_64.AppImage
|
||||
chmod +x pyuploadtool-x86_64.AppImage
|
||||
./pyuploadtool-x86_64.AppImage WeChat*.AppImage *.tar.gz
|
||||
./pyuploadtool-x86_64.AppImage **build/WeChat*.AppImage **build/*.tar.gz **build/*.deb
|
||||
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
@ -97,5 +79,6 @@ jobs:
|
||||
name: ${{ steps.tag.outputs.name }}
|
||||
tag_name: ${{ steps.tag.outputs.tag }}
|
||||
files: |
|
||||
tmp/build/*.tar.gz
|
||||
tmp/build/*.AppImage
|
||||
**build/WeChat*.AppImage
|
||||
**build/*.tar.gz
|
||||
**build/*.deb
|
||||
|
9
.gitignore
vendored
@ -11,4 +11,11 @@ crash-server
|
||||
build
|
||||
*.snap
|
||||
*.AppImage
|
||||
appimage-builder-cache
|
||||
appimage-builder-cache
|
||||
wcc.bin
|
||||
wcsc.bin
|
||||
temp.sh
|
||||
# flatpak
|
||||
.flatpak-builder
|
||||
build-dir
|
||||
__pycache__
|
||||
|
6
.vscode/launch.json
vendored
@ -8,13 +8,13 @@
|
||||
"type": "nwjs",
|
||||
"request": "launch",
|
||||
"name": "Launch NWjs",
|
||||
"nwjsVersion": "0.47.0",
|
||||
"nwjsVersion": "0.55.0",
|
||||
"webRoot": "${workspaceFolder}/package.nw",
|
||||
"reloadAfterAttached": true,
|
||||
"runtimeArgs": [
|
||||
"--load-extension=${workspaceFolder}/tmp/data/WeappPlugin",
|
||||
// "--load-extension=${workspaceFolder}/tmp/data/WeappPlugin",
|
||||
// "--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"
|
||||
],
|
||||
"env": {
|
||||
|
10
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"files.watcherExclude": {
|
||||
"**/.git/objects/**": true,
|
||||
"**/.git/subtree-cache/**": true,
|
||||
"**/node_modules/*/**": true,
|
||||
"**/.hg/store/**": true,
|
||||
".flatpak/**": true,
|
||||
"_build/**": true
|
||||
}
|
||||
}
|
261
CHANGELOG.MD
Normal file
@ -0,0 +1,261 @@
|
||||
# 1.06.2504010-3 / 2025-07-
|
||||
- refactor: 重构主题监听处理方案
|
||||
|
||||
# 1.06.2504010-2 / 2025-07-15
|
||||
- fix: cli使用异常。#147
|
||||
|
||||
# 1.06.2504010-1 / 2025-07-05
|
||||
- fix: 更新弹窗无法关闭。
|
||||
- update: devtools to v1.06.2504010
|
||||
|
||||
# 1.06.2503290-3 / 2025-05-23
|
||||
- update: compiler(Linux) v0.1.5
|
||||
- fix: worker无法使用 #145
|
||||
|
||||
# 1.06.2503290-2 / 2025-05-02
|
||||
- update: compiler(Linux) v0.1.4
|
||||
|
||||
# 1.06.2503290-1 / 2025-04-30
|
||||
|
||||
- update: node v16.11.0 (解决codebuddy无法使用。)
|
||||
- perf: 替换float-pigment。
|
||||
- update: devtools to v1.06.2503290
|
||||
|
||||
# 1.06.2412050-2 / 2025-02-17
|
||||
|
||||
- update: compiler(Linux) v0.1.3
|
||||
|
||||
# 1.06.2412050-1 / 2025-02-16
|
||||
|
||||
- update: devtools to v1.06.2412050
|
||||
- update: compiler(Linux) v0.1.2
|
||||
|
||||
# 1.06.2412040-1 / 2025-01-16
|
||||
|
||||
- update: devtools to v1.06.2412040
|
||||
|
||||
# 1.06.2409140-3 / 2024-11-16
|
||||
|
||||
- fix: 多开实例会出现卡死的情况
|
||||
|
||||
# 1.06.2409140-2 / 2024-11-15
|
||||
|
||||
- perf: 不对Skyline插件进行初始化(不会弹窗)
|
||||
|
||||
# 1.06.2409140-1 / 2024-10-26
|
||||
|
||||
- update: devtools to v1.06.2409140
|
||||
|
||||
# 1.06.2407120-1 / 2024-09-28
|
||||
|
||||
- update: devtools to v1.06.2407120
|
||||
|
||||
# 1.06.2405020-4 / 2024-09-28
|
||||
|
||||
- fix: 视频无法播放的问题(#118)
|
||||
|
||||
# 1.06.2405020-3 / 2024-08-10
|
||||
|
||||
- update: compiler(Linux) v0.1.1
|
||||
|
||||
# 1.06.2405020-2 / 2024-07-13
|
||||
|
||||
- fix: mock 面板按钮点击无反应
|
||||
- update: compiler(Linux) v0.1.0
|
||||
|
||||
# 1.06.2405020-1 / 2024-07-07
|
||||
|
||||
- update: devtools to v1.06.2405020
|
||||
- update: compiler(Linux) v0.0.9
|
||||
|
||||
# 1.06.2402040-1 / 2024-05-03
|
||||
|
||||
- update: devtools to v1.06.2402040
|
||||
|
||||
# 1.06.2310080-2 / 2024-01-02
|
||||
|
||||
- fix: AppImage的cli使用会闪退
|
||||
|
||||
# 1.06.2310080-1 / 2023-12-30
|
||||
|
||||
- fix: AppImage的cli使用会闪退
|
||||
- update: devtools to v1.06.2310080
|
||||
|
||||
# 1.06.2308310-3 / 2023-12-24
|
||||
|
||||
- update: compiler(Linux) v0.0.7
|
||||
|
||||
# 1.06.2308310-2 / 2023-11-10
|
||||
|
||||
- update: compiler(Linux) v0.0.6
|
||||
|
||||
# 1.06.2308310-1 / 2023-09-30
|
||||
|
||||
- update: devtools to v1.06.2308310
|
||||
|
||||
# 1.06.2307260-2 / 2023-09-23
|
||||
|
||||
- update: compiler(Linux) v0.0.5
|
||||
|
||||
# 1.06.2307260-1 / 2023-09-09
|
||||
|
||||
- update: node-pty to v1.0.0
|
||||
- update: devtools to v1.06.2307260
|
||||
- update: compiler(Linux) v0.0.4
|
||||
- dprecated: wine version
|
||||
|
||||
# 1.06.2306020-1 / 2023-06-04
|
||||
|
||||
- update: devtools to v1.06.2306020
|
||||
|
||||
# 1.06.2301040-1 / 2023-01-21
|
||||
|
||||
- update: devtools to v1.06.2301040
|
||||
|
||||
# 1.06.2209070-1 / 2022-09-09
|
||||
|
||||
- update: devtools to v1.06.2209070
|
||||
|
||||
# 1.06.2208010-1 / 2022-09-04
|
||||
|
||||
- update: devtools to v1.06.2208010
|
||||
|
||||
# 1.06.2207210-1 / 2022-09-03
|
||||
|
||||
- update: devtools to v1.06.2207210
|
||||
- update: compiler
|
||||
|
||||
# 1.06.2206090-2 / 2022-06-15
|
||||
|
||||
- fix: deepin icon
|
||||
|
||||
# 1.06.2206090-1 / 2022-06-13
|
||||
|
||||
- update: devtools to v1.06.2206090
|
||||
|
||||
# 1.06.2206020-1 / 2022-06-03
|
||||
|
||||
- update: devtools to v1.06.2206020
|
||||
|
||||
# 1.05.2204250-2 / 2022-05-11
|
||||
- fix: 修复wcc编译器不支持单文件编译的bug(感谢 @2715851270 反馈)
|
||||
- fix: 修复cli异常
|
||||
|
||||
# 1.05.2204250-1 / 2022-04-26
|
||||
- update: devtools 1.05.2204250
|
||||
- update: 跟进wcc编译器变更
|
||||
|
||||
# 1.05.2204180-2 / 2022-04-26
|
||||
- feat: wcc,wcsc node模块懒加载template解析支持
|
||||
- feat: wcc,wcsc node模块懒加载cut参数支持
|
||||
|
||||
# 1.05.2204180-1 / 2022-04-24
|
||||
- update: devtools 1.05.2204180
|
||||
- update: 跟进更新 wcc,wcsc node模块逻辑
|
||||
- feat: wcc,wcsc编译器template解析支持
|
||||
|
||||
# 1.05.2203070-10 / 2022-04-22
|
||||
- fix: 修正命令行入口
|
||||
- fix: gsettings子进程未退出转为孤儿进程
|
||||
- update: 优化主题监听
|
||||
|
||||
# 1.05.2203070-8 / 2022-04-10
|
||||
- fix: 国内网络vscode-ripgrep安装失败的问题
|
||||
- fix: 内部的更新检查界面无法正常使用(这个更新用处不大,仅用于让维护者知道存在更新)
|
||||
- fix: 修复可能出现扩展宿主意外终止的问题
|
||||
- feat: 主题深浅跟随系统变化,感谢icepie的参与
|
||||
- update: 更新nwjs与nodejs
|
||||
|
||||
# 1.05.2203070-7 / 2022-03-19
|
||||
- fix: cli
|
||||
- 兼容ubuntu16.04
|
||||
|
||||
# 1.05.2203070-6 / 2022-03-19
|
||||
- feat: wcc node模块支持wxml引用
|
||||
- feat: wcc node模块支持自定义函数名
|
||||
|
||||
# 1.05.2203070-5 / 2022-03-18
|
||||
- fix: 增强wcsc编译器
|
||||
|
||||
# 1.05.2203070-4 / 2022-03-12
|
||||
- add: 增加wine版本的deb包
|
||||
|
||||
# 1.05.2203070-3 / 2022-03-11
|
||||
- fix: 修复wcc常量操作问题
|
||||
- fix: 修复deb打包细节问题
|
||||
|
||||
# 1.05.2203070-2 / 2022-03-10
|
||||
- feat: wcc编译器懒加载支持wxml引用
|
||||
|
||||
# 1.05.2203070-1 / 2022-03-08
|
||||
- upgrade: devtools 1.05.2203070
|
||||
- fix: 编译器异常信息显示不完全
|
||||
|
||||
# 1.05.2203030-2 / 2022-03-07
|
||||
- refactor: 规范版本号
|
||||
|
||||
# 0.24 / 2022-03-05
|
||||
- fix: 编译异常的问题
|
||||
- 处理一些包相关细节
|
||||
|
||||
# 0.23 / 2022-03-05
|
||||
- upgrade devtools to 1.05.2203030
|
||||
|
||||
# 0.22 / 2022-03-03
|
||||
- refactor: 使用低版本环境构建deb,提升兼容性
|
||||
|
||||
# 0.21 / 2022-03-02
|
||||
- add: deb aur 打包格式
|
||||
|
||||
# 0.20 / 2022-02-28
|
||||
- fix: node模块中编译器的可执行权限
|
||||
|
||||
# 0.19 / 2022-02-28
|
||||
- 过渡版本,存在问题
|
||||
|
||||
# 0.16 / 2022-02-24
|
||||
- feat: wcc编译器路径异常
|
||||
|
||||
# 0.15 / 2022-02-23
|
||||
- feat: wcc编译器支持`debugWXS`选项
|
||||
|
||||
# 0.14 / 2022-02-22
|
||||
- feat: 正式添加node版本的编译器
|
||||
|
||||
# 0.13 / 2022-02-20
|
||||
- feat: wine弱依赖版本
|
||||
|
||||
# 0.12 / 2022-02-16
|
||||
- fix: 版本管理中的“在终端打开”不可用
|
||||
|
||||
# 0.11 / 2022-02-15
|
||||
- add: appimage打包版本
|
||||
|
||||
# 0.10 / 2022-02-06
|
||||
- fix: 二维码真机调试不可用
|
||||
|
||||
# 0.9 / 2022-02-05
|
||||
- fix: 修复Webview组件(涉及代码分析,插件商店)
|
||||
|
||||
# 0.8 / 2022-02-04
|
||||
- fix: 云开发控制台不可用
|
||||
|
||||
# 0.7 / 2022-02-04
|
||||
- add: 重新使用windows的编译器
|
||||
|
||||
# 0.6 / 2022-02-03
|
||||
- fix: 可视化功能不可用
|
||||
|
||||
# 0.5 / 2022-02-02
|
||||
- fix: 版本管理
|
||||
- feat: node版本编译器
|
||||
- remove: windows的编译器
|
||||
|
||||
# 0.4 / 2022-01-30
|
||||
- fix: 创建终端时会崩溃的问题
|
||||
|
||||
# 0.3 / 2022-01-28
|
||||
- 适配nwjs版本至0.53.1
|
||||
|
||||
# 0.2 / 2022-01-27
|
||||
体验版
|
218
README.MD
Normal file
@ -0,0 +1,218 @@
|
||||
|
||||
|
||||
<div align="center">
|
||||
|
||||
<img src="./res/icons/512x512.png" height="100px" width="100px"/>
|
||||
|
||||
<h3>微信开发者工具 Linux版</h3>
|
||||
<br>
|
||||
|
||||
----
|
||||
|
||||
[](https://github.com/msojocs/wechat-devtools-linux/actions/workflows/release.yml)
|
||||
[](https://developers.weixin.qq.com/miniprogram/dev/devtools/download.html)
|
||||
[](https://nwjs.io/downloads/)
|
||||
[](https://nodejs.org/en/)
|
||||
|
||||
|
||||
这是微信开发者工具 Linux版
|
||||
|
||||
|
||||
<br>
|
||||
</div>
|
||||
|
||||
# 项目说明
|
||||
|
||||
本项目是一个完整的搭建Linux下可用的“微信开发者工具”的脚本和工具集,
|
||||
用于在Linux下的GNOME桌面上搭建可以持续更新和使用的“微信开发者工具”。
|
||||
|
||||
本项目修改自:https://github.com/dragonation/wechat-devtools/
|
||||
|
||||
# 项目地址
|
||||
|
||||
* https://github.com/msojocs/wechat-web-devtools-linux
|
||||
|
||||
# 进度
|
||||
|
||||
当前工具可以在Linux上构筑最新版 `1.06.2503290`,支持CLI模式。
|
||||
另现在已经可以直接在设置界面里面修改字体,手工输入字体名称就可以。
|
||||
|
||||
# 功能测试记录
|
||||
|
||||
[测试记录](docs/Features.MD)
|
||||
|
||||
注意:
|
||||
|
||||
此测试仅在修复某项功能时测试通过,并不代表阁下在使用时是正常可用的;因为我没有精力在每个版本发布前进行一次测试。
|
||||
|
||||
在阁下遇到任何无法解决的问题时,请新建一个 [issue](https://github.com/msojocs/wechat-web-devtools-linux/issues/new/choose)
|
||||
|
||||
# 系统要求
|
||||
|
||||
* 基于Linux的桌面系统,首选GNOME(其他的桌面环境可能会有问题,未测试)
|
||||
* CI自动构建的包对 glibc 和 libstdc++ 有一定的版本要求,glibc 的版本要求>=2.23,libstdc++ 的版本要求>=3.4.21
|
||||
* ~~如果你下载的是 `wine` 版本,那么你需要安装有 `wine` `wine-binfmt` 支持,建议版本在5.0以上,低版本可能会存在有问题~~
|
||||
|
||||
# CLI支持
|
||||
|
||||
在项目的 `bin` 目录中有 `wechat-devtools-cli` 脚本,是微信开发者工具的命令行支持 的Linux版本。相关资料可以在[微信CLI命令行V2](https://developers.weixin.qq.com/miniprogram/dev/devtools/cli.html)上找到。
|
||||
|
||||
# 使用方法
|
||||
|
||||
1. [在线安装](#在线安装)
|
||||
2. 可以在本项目的[Release](https://github.com/msojocs/wechat-web-devtools-linux/releases)中,寻找已经构筑好了的软件包,下载使用。
|
||||
如果`Release`版本存在问题,可以尝试[Continuous](https://github.com/msojocs/wechat-web-devtools-linux/releases/tag/continuous)版本,这是基于`master`分支的最新提交构建的,会及时修复一些 bug,但也可能会带来新的 bug。
|
||||
3. 你可以 [自行构建](#自行构建)
|
||||
|
||||
# 在线安装
|
||||
|
||||
目前支持以下平台:
|
||||
|
||||
1. 统信应用商店(deepin)
|
||||
|
||||
# 自行构建
|
||||
|
||||
> 注:
|
||||
> 如果想构建 wine 版本,请添加环境变量:`export WINE=true` 。注意:不受支持。
|
||||
|
||||
## 方法0(推荐)
|
||||
|
||||
理论上此方法99%成功;在网络不稳定时容易失败(原因懂得都懂,构建过程已经尽量使用镜像源)
|
||||
|
||||
1. 如果构建 `wine` 版本,请先在Linux环境中自行安装 `wine` `wine-binfmt`;
|
||||
2. 请安装 `docker` `docker-compose`
|
||||
3. 克隆本项目:
|
||||
```
|
||||
git clone --recurse-submodules https://github.com/msojocs/wechat-web-devtools-linux.git
|
||||
```
|
||||
4. 在本地项目目录中执行如下的语句,构建开发者工具:
|
||||
```
|
||||
tools/build-with-docker.sh
|
||||
```
|
||||
5. 在本地项目目录中执行如下的语句,可以安装应用图标(非必须):
|
||||
```
|
||||
./tools/install-desktop-icon-node
|
||||
```
|
||||
|
||||
之后即可通过点击应用图标启动微信开发者工具,也可以运行 `bin/wechat-devtools` 通过命令行启动
|
||||
|
||||
## 方法1
|
||||
|
||||
由于使用到 `node-gyp` `nw-gyp`,此方法会受 `python`、`node` 版本影响出现一些难以预料的异常(比如使用 `node15.0.1` 时,大部分模块构建会被忽略,但没有任何报错信息)。但是,`Docker` 构建方式会帮你处理好这些问题。
|
||||
|
||||
1. 如果构建 `wine` 版本,请先在Linux环境中自行安装 `wine` `wine-binfmt`;
|
||||
2. 安装编译 `nodegit` 所需的依赖:`python2.7 python3.6及以上 libkrb5-dev gcc openssl libssh2-1-dev g++ make pkg-config` ;
|
||||
|
||||
另外 `7z` 旧版解压可能存在问题(未测试最低版本号,比如:ubuntu16.04 自带的不行),请参考[`Dockerfile`](docker/Dockerfile)
|
||||
3. 克隆本项目:
|
||||
```
|
||||
git clone --recurse-submodules https://github.com/msojocs/wechat-web-devtools-linux.git
|
||||
```
|
||||
4. 在本地项目目录中执行以下命令,构建开发者工具:
|
||||
```
|
||||
./tools/setup-wechat-devtools-bash
|
||||
```
|
||||
5. 在本地项目目录中执行如下的语句,可以安装应用图标(非必须):
|
||||
```
|
||||
./tools/install-desktop-icon-bash
|
||||
```
|
||||
|
||||
之后即可通过点击应用图标启动微信开发者工具,也可以运行 `bin/wechat-devtools` 通过命令行启动
|
||||
|
||||
# 与其他Linux下的微信开发者工具版本区别
|
||||
|
||||
1. 支持最新版本,并个人会持续更新,在添加新的tag时,actions会自动构建并上传Release;
|
||||
2. 核心构筑过程完全开源,可以自行修改;
|
||||
3. 修复了nwjs上关于Menu的段错误,确保最新版本可以正常启动 (by dragonation);
|
||||
4. 在构筑过程中会重新编译node_modules,确保原生模块可以在Linux上正确运行;
|
||||
5. 下载更新可以支持断点再续,并使用了taobao国内的npm源,加速下载(稳定性待测试)。
|
||||
6. 纯 Linux 支持,使用 cpp 实现模拟官方编译器。[wx-compiler](https://github.com/msojocs/wx-compiler)
|
||||
|
||||
# 后续计划
|
||||
|
||||
请参考: [处理计划](https://github.com/msojocs/wechat-devtools-linux/projects?type=beta)
|
||||
|
||||
# 移植相关
|
||||
|
||||
请参考: [移植流程记录](https://github.com/msojocs/wechat-web-devtools-linux/wiki)
|
||||
|
||||
# FAQ
|
||||
|
||||
请参考: [FAQ](docs/FAQ.MD)
|
||||
|
||||
# 界面截图
|
||||
|
||||
版本 1.05.2201240
|
||||

|
||||
|
||||
版本 1.03.2006090
|
||||

|
||||
|
||||
版本 1.02.2001191
|
||||

|
||||
|
||||
# 赞赏
|
||||
|
||||
如果这个仓库让你感到舒适,可以点个Star或者请这个 ~~菜鸡大学生~~ 打工人喝杯咖啡(请尽量带上github昵称):
|
||||
|
||||

|
||||
|
||||
# 感谢赞赏支持
|
||||
|
||||
时间倒序
|
||||
|
||||
| 赞赏人 | 赞赏 | 时间 |
|
||||
|-------|---------|-----|
|
||||
| returning | 10.00¥ | 2025-07-12 |
|
||||
| 👍 | 10.00¥ | 2025-07-10 |
|
||||
| hanwor | 20.00¥ | 2025-06-17 |
|
||||
| 。。。 | 10.00¥ | 2025-03-29 |
|
||||
| SakuraPuare | 20.00¥ | 2025-03-24 |
|
||||
| [senseab](https://github.com/senseab) | 50.00¥ | 2024-12-21 |
|
||||
| l | 10.00¥ | 2024-12-08 |
|
||||
| lcurk0 | 50.00¥ | 2024-11-29 |
|
||||
| [stvsl](https://github.com/stvsl) | 10.00¥ | 2024-11-26 |
|
||||
| 仙人柱 | 50.00¥ | 2024-11-20 |
|
||||
| [cabbage7th](https://github.com/cabbage7th) | 20.00¥ | 2024-10-06 |
|
||||
| [shao4598](https://github.com/shao4598) | 50.00¥ | 2024-09-24 |
|
||||
| [OWALabuy](https://github.com/OWALabuy) | 16.66¥ | 2024-08-28 |
|
||||
| [wangvation](https://github.com/wangvation) | 50.00¥ | 2024-07-16 |
|
||||
| 孤泉冷月 | 100.00¥ | 2024-07-12 |
|
||||
| [liushuai05](https://github.com/liushuai05) | 88.00¥ | 2023-12-26 |
|
||||
| LGTU | 10.00¥ | 2023-11-25 |
|
||||
| [WRXinYue](https://github.com/WRXinYue) | 10 | 2023-11-09 |
|
||||
| silentdoer | 50.00¥ | 2023-09-26 |
|
||||
| ??? | 20 |2023-08-11 |
|
||||
| Geequlim | 100 | 2023-07-12 |
|
||||
| 对方正在输入 | 10 | 2023-04-28 |
|
||||
| @DaqiongYang | 50 | 2023-03-29 |
|
||||
| AInoob | 5 | 2023-01-30 |
|
||||
| ??? | 5 | 2023-01-18 |
|
||||
| 仙人柱 | 50.00¥ | 2022-08-09 |
|
||||
| [guanzhengyinqin](https://github.com/guanzhengyinqin) | 20.00¥ | 2022-07-14 |
|
||||
| [nsfoxer](https://github.com/nsfoxer) | 10.00¥ | 2022-06-30 |
|
||||
| [chiiihc](https://github.com/chiiihc) | 5.00¥ | 2022-06-17 |
|
||||
| [younland](https://github.com/younland) | 20.00¥ | 2022-06-15 |
|
||||
| [chiiihc](https://github.com/chiiihc) | 5.00¥ | 2022-06-14 |
|
||||
| 陈陈菌 | 10.00¥ | 2022-05-29 |
|
||||
| WWW | 5.00¥ | 2022-05-26 |
|
||||
| 南极の短尾猫 | 20.00¥ | 2022-05-22 |
|
||||
| 猪宝的猪 | 20.00¥ | 2022-05-15 |
|
||||
| finalwhy | 66.60¥ | 2022-05-09 |
|
||||
| [CoryByte](https://github.com/Corybyte) | 5.00¥ | 2022-04-23 |
|
||||
| [Starrah](https://github.com/Starrah) | 50.00¥ | 2022-04-12 |
|
||||
| [zyk-miao](https://github.com/zyk-miao) | 5.00¥ | 2022-04-12 |
|
||||
| [icepie](https://github.com/icepie) | 20.00¥ | 2022-04-08 |
|
||||
| Milder | 50.00¥ | 2022-03-23 |
|
||||
| . | 20.00¥ | 2022-03-21 |
|
||||
| shaoxp | 5.00¥ | 2022-03-16 |
|
||||
| 李喆 | 10.00¥ | 2022-03-05 |
|
||||
| david | 5.00¥ | ??? |
|
||||
|
||||
# 免责声明
|
||||
|
||||
微信开发者工具版权归腾讯公司所有,本项目旨在交流学习之用。如有不当之处,请联系本人,邮箱:jiyecafe@gmail.com
|
||||
|
||||
## Stargazers over time
|
||||
|
||||
[](https://starchart.cc/msojocs/wechat-web-devtools-linux)
|
@ -1,16 +1,43 @@
|
||||
#!/bin/bash
|
||||
|
||||
root_dir=$(cd `dirname $0`/.. && pwd -P)
|
||||
SOURCE="${BASH_SOURCE[0]}"
|
||||
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
|
||||
SOURCE="$(readlink "$SOURCE")"
|
||||
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
|
||||
done
|
||||
root_dir="$( cd -P "$( dirname "$SOURCE" )"/.. >/dev/null 2>&1 && pwd )"
|
||||
|
||||
# 数据目录处理
|
||||
if [ -z $XDG_CONFIG_HOME ];then
|
||||
DATA_DIR=$HOME/.config
|
||||
else
|
||||
DATA_DIR=$XDG_CONFIG_HOME
|
||||
fi
|
||||
|
||||
# 获取App名称
|
||||
APP_NAME=$( cat "$root_dir/package.nw/package.json" | grep -Eo 'name":".*","main' )
|
||||
APP_NAME=${APP_NAME//name\":\"/}
|
||||
APP_NAME=${APP_NAME//\",\"main/}
|
||||
|
||||
export WECHAT_DEVTOOLS_DIR="$root_dir/nwjs"
|
||||
export APPDATA="$( echo ~ )/.config/wechat_devtools"
|
||||
export PATH="$root_dir/wine:$root_dir/node/bin:$root_dir/nwjs:$PATH"
|
||||
export USERPROFILE=$( echo ~ )
|
||||
export APPDATA="$DATA_DIR/$APP_NAME"
|
||||
export PATH="$root_dir/node/bin:$root_dir/nwjs:$PATH"
|
||||
export USERPROFILE=$APPDATA
|
||||
|
||||
# SNAP
|
||||
# if [ -n $SNAP ];then
|
||||
# if [ ! -f $DATA_DIR/nacl_irt_x86_64.nexe ];then
|
||||
# # 解压
|
||||
# tar -zxf $root_dir/nwjs/nacl_irt_x86_64.nexe.tar.gz -C $APPDATA/nacl_irt_x86_64.nexe
|
||||
# fi
|
||||
# fi
|
||||
|
||||
clean_cache() {
|
||||
echo "清理缓存";
|
||||
rm -rf "$APPDATA/WeappCache";
|
||||
rm -rf "$APPDATA/WeappVendor";
|
||||
rm -rf "$DATA_DIR/wechat_devtools"
|
||||
}
|
||||
|
||||
# 检测是否有清除缓存的必要
|
||||
@ -26,11 +53,11 @@ else
|
||||
fi;
|
||||
|
||||
EXTENSION1="--load-extension=$root_dir/nwjs/package.nw/js/ideplugin"
|
||||
EXTENSION2=--load-extension=~/.config/wechat_devtools/WeappPlugin
|
||||
EXTENSION2="--load-extension=$APPDATA/WeappPlugin/inspector"
|
||||
INSPECTOR1="--custom-devtools-frontend=file://$root_dir/package.nw/js/ideplugin/inspector" # 要加file://指明为本地文件路径
|
||||
INSPECTOR2="--custom-devtools-frontend=file://$( echo ~ )/.config/wechat_devtools/WeappPlugin/inspector/"
|
||||
USERDATADIR="$( echo ~ )/.config/wechat_devtools"
|
||||
INSPECTOR2="--custom-devtools-frontend=file://$APPDATA/WeappPlugin/inspector/"
|
||||
USERDATADIR="$APPDATA"
|
||||
|
||||
# "$@"参数
|
||||
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 $EXTENSION1 $INSPECTOR1 "$@"
|
@ -6,12 +6,16 @@ while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symli
|
||||
SOURCE="$(readlink "$SOURCE")"
|
||||
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
|
||||
done
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
|
||||
root_dir="$( cd -P "$( dirname "$SOURCE" )"/.. >/dev/null 2>&1 && pwd )"
|
||||
|
||||
cd $DIR/..
|
||||
cd $root_dir/bin
|
||||
|
||||
export WECHAT_DEVTOOLS_DIR="$DIR/../nwjs"
|
||||
export APPDATA="$DIR/../nwjs"
|
||||
export PATH="$DIR/../wine:$DIR/../node/bin:$DIR/../nwjs:$PATH"
|
||||
export WECHAT_DEVTOOLS_DIR="$root_dir/nwjs"
|
||||
export APPDATA="$root_dir/nwjs"
|
||||
export PATH="$root_dir/node/bin:$root_dir/nwjs:$PATH"
|
||||
|
||||
$DIR/../tools/wechat-devtools-cli "$@"
|
||||
node $root_dir/package.nw/js/common/cli/index.js "$@"
|
||||
if [ ! -z "$APPIMAGE" ];then
|
||||
# AppImage在程序退出后会删除相关程序文件,导致无法启动
|
||||
tail -f /etc/issue
|
||||
fi
|
@ -1,14 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
xhost +
|
||||
|
||||
docker run \
|
||||
-t -i --rm \
|
||||
-v /tmp/.X11-unix:/tmp/.X11-unix:rw \
|
||||
-v $HOME/.Xauthority:/root/.Xauthority \
|
||||
-e DISPLAY=unix:0.0 \
|
||||
-e GDK_SCALE \
|
||||
-e GDK_DPI_SCALE \
|
||||
--privileged \
|
||||
wechat-devtools /opt/wechat/devtools/bin/docker-entrypoint
|
||||
|
@ -1,84 +0,0 @@
|
||||
const path = require('path')
|
||||
const fs = require('fs')
|
||||
const crypto = require('crypto')
|
||||
const os = require('os')
|
||||
const child_process = require('child_process')
|
||||
let platform = process.argv[2]
|
||||
|
||||
let exeList = []
|
||||
const macExeList = [
|
||||
'wcc',
|
||||
'wcsc',
|
||||
'wcc.bin',
|
||||
'wcsc.bin'
|
||||
]
|
||||
const winExeList = [
|
||||
'wcc.exe',
|
||||
'wcsc.exe'
|
||||
]
|
||||
if(platform === 'darwin') {
|
||||
exeList = macExeList;
|
||||
} else if(platform === 'win32') {
|
||||
exeList= winExeList;
|
||||
} else {
|
||||
exeList = macExeList.concat(winExeList)
|
||||
}
|
||||
|
||||
|
||||
|
||||
function generate(vendorPath) {
|
||||
let dirList = fs.readdirSync(vendorPath)
|
||||
let libs = {}
|
||||
dirList.forEach((item) => {
|
||||
if (item == 'dev' || item == 'quickstart' || item == 'beta') {
|
||||
return
|
||||
}
|
||||
|
||||
let itemPath = path.join(vendorPath, item)
|
||||
let stat = fs.statSync(itemPath)
|
||||
if (stat.isDirectory()) {
|
||||
let fileList = fs.readdirSync(itemPath)
|
||||
|
||||
let md5Info = {}
|
||||
fileList.forEach((file) => {
|
||||
if (fs.statSync(path.join(itemPath, file)).isFile()) {
|
||||
let fileData = fs.readFileSync(path.join(itemPath, file))
|
||||
let md5sum = crypto.createHash('md5')
|
||||
md5sum.update(fileData)
|
||||
md5Info[file] = md5sum.digest('hex')
|
||||
}
|
||||
})
|
||||
|
||||
libs[item] = md5Info
|
||||
}
|
||||
})
|
||||
|
||||
let oldConfig = JSON.parse(fs.readFileSync(path.join(vendorPath, 'config.json'), 'utf8'))
|
||||
for (var key in oldConfig.libs) {
|
||||
// libs[key] = Object.assign({}, oldConfig.libs[key], libs[key])
|
||||
oldConfig.libs[key] = Object.assign({}, oldConfig.libs[key], libs[key])
|
||||
}
|
||||
|
||||
// let newLib = {}
|
||||
// let keys = Object.keys(libs)
|
||||
// keys.sort()
|
||||
// for (var i = 0; i < keys.length; i++) {
|
||||
// let key = keys[i]
|
||||
// newLib[key] = libs[key]
|
||||
// }
|
||||
|
||||
// 更新
|
||||
oldConfig.configVersion = Date.now()
|
||||
|
||||
for (let key in exeList) {
|
||||
let file = exeList[key]
|
||||
let fileData = fs.readFileSync(path.join(vendorPath, file))
|
||||
let md5sum = crypto.createHash('md5')
|
||||
md5sum.update(fileData)
|
||||
oldConfig[file] = md5sum.digest('hex')
|
||||
}
|
||||
|
||||
fs.writeFileSync(path.join(vendorPath, 'config.json'), JSON.stringify(oldConfig, null, '\t'))
|
||||
}
|
||||
|
||||
generate(__dirname)
|
@ -1,145 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
const { spawn, spawnSync } = require("child_process");
|
||||
const path = require("path");
|
||||
const args = process.argv.slice(2);
|
||||
const wcscPath = path.resolve(__dirname, "./wcsc.bin")
|
||||
function encode1(s) {
|
||||
return encodeURI(s).replace(
|
||||
/%(u[0-9A-F]{4})|(%[0-9A-F]{2})/gm,
|
||||
function ($0, $1, $2) {
|
||||
return ($1 && "\\" + $1.toLowerCase()) || decodeURI($2);
|
||||
}
|
||||
);
|
||||
}
|
||||
if (args.includes("-ll")) {
|
||||
const wcsc = spawn(wcscPath, args, {
|
||||
cwd: process.cwd(),
|
||||
});
|
||||
const spwanData = [],
|
||||
errData = [];
|
||||
wcsc.stdout.on("data", (e) => {
|
||||
spwanData.push(e);
|
||||
});
|
||||
wcsc.stderr.on("data", (e) => {
|
||||
errData.push(e);
|
||||
});
|
||||
wcsc.on("close", (n) => {
|
||||
// console.log('close', new Date().getTime()/1000)
|
||||
if (0 === n) {
|
||||
const str = Buffer.concat(spwanData).toString().replace(/\\\\/g, '\\\\u005c');
|
||||
const resultSplit = encode1(str).split("=");
|
||||
const tempObj = {};
|
||||
for (
|
||||
let i = 0, total = resultSplit.length;
|
||||
i < total && resultSplit[i + 1];
|
||||
i += 2
|
||||
) {
|
||||
// a=b ---> a: b
|
||||
const key = resultSplit[i];
|
||||
if (key === "version") continue;
|
||||
tempObj[key] = resultSplit[i + 1].replace(
|
||||
/((\\x[\da-f]{2}|\\u[\da-f]{4})){1,}/gi,
|
||||
function ($0, $1, $2) {
|
||||
return eval('"' + $0 + '"');
|
||||
// return dict[$0] ? dict[$0] : eval('"' + $0 + '"')
|
||||
}
|
||||
);
|
||||
}
|
||||
const resultObj = {
|
||||
common: tempObj.comm, //.replace(/\\n/g, '\\u000a'),
|
||||
pageWxss: {},
|
||||
};
|
||||
// console.log(resultObj.common)
|
||||
// console.log('for key', new Date().getTime()/1000)
|
||||
for (const key in tempObj) {
|
||||
if (key.endsWith(".wxss")) {
|
||||
resultObj.pageWxss[key] = tempObj[key];
|
||||
}
|
||||
}
|
||||
let result = JSON.stringify(resultObj);
|
||||
String.prototype.splice = function (start, newStr) {
|
||||
return this.slice(0, start) + newStr + this.slice(start + 1);
|
||||
};
|
||||
result = result.replace(/\\\\/g, "\\");
|
||||
// console.log('main replace', new Date().getTime()/1000)
|
||||
// for (let i = 0; i < result.length; i++) {
|
||||
// if (result[i] === "\\") {
|
||||
// // && result[i + 1] !== 'u'
|
||||
// const c = result[i + 1] === "n" ? "\n" : result[i + 1];
|
||||
// result = result.splice(
|
||||
// i + 1,
|
||||
// "u" + c.charCodeAt(0).toString(16).padStart(4, "0")
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
result = result.replace(/\\[\s\S]{1}/gi, function ($0, $1, $2) {
|
||||
// console.log($0, $1)
|
||||
const c = $0 === "\\n" ? "\n" : $0[1];
|
||||
return "\\u" + c.charCodeAt(0).toString(16).padStart(4, "0")
|
||||
})
|
||||
// console.log('main replace end', new Date().getTime()/1000)
|
||||
// result = result.replace(/u005c"/g, 'u005cx22')
|
||||
// console.log('done', new Date().getTime()/1000)
|
||||
process.stdout.write(result);
|
||||
}
|
||||
});
|
||||
|
||||
// const wcsc = spawnSync(path.resolve(__dirname, "../wcsc"), args, {
|
||||
// cwd: process.cwd(),
|
||||
// });
|
||||
// if (wcsc.status !== 0) {
|
||||
// console.error(wcsc.error);
|
||||
// process.exit(wcsc.status);
|
||||
// }
|
||||
// const str = wcsc.stdout.toString();
|
||||
// // console.log(str)
|
||||
// const resultSplit = encode1(str).split("=");
|
||||
// const tempObj = {};
|
||||
// for (
|
||||
// let i = 0, total = resultSplit.length;
|
||||
// i < total && resultSplit[i + 1];
|
||||
// i += 2
|
||||
// ) {
|
||||
// // a=b ---> a: b
|
||||
// const key = resultSplit[i];
|
||||
// if (key === "version") continue;
|
||||
// tempObj[key] = resultSplit[i + 1].replace(
|
||||
// /((\\x[\da-f]{2}|\\u[\da-f]{4})){1,}/gi,
|
||||
// function ($0, $1, $2) {
|
||||
// return eval('"' + $0 + '"');
|
||||
// // return dict[$0] ? dict[$0] : eval('"' + $0 + '"')
|
||||
// }
|
||||
// );
|
||||
// }
|
||||
// const resultObj = {
|
||||
// common: tempObj.comm, //.replace(/\\n/g, '\\u000a'),
|
||||
// pageWxss: {},
|
||||
// };
|
||||
// // console.log(resultObj.common)
|
||||
// for (const key in tempObj) {
|
||||
// if (key.endsWith(".wxss")) {
|
||||
// resultObj.pageWxss[key] = tempObj[key];
|
||||
// }
|
||||
// }
|
||||
// let result = JSON.stringify(resultObj);
|
||||
// String.prototype.splice = function (start, newStr) {
|
||||
// return this.slice(0, start) + newStr + this.slice(start + 1);
|
||||
// };
|
||||
// result = result.replace(/\\\\/g, "\\");
|
||||
// for (let i = 0; i < result.length; i++) {
|
||||
// if (result[i] === "\\") {
|
||||
// // && result[i + 1] !== 'u'
|
||||
// const c = result[i + 1] === "n" ? "\n" : result[i + 1];
|
||||
// result = result.splice(
|
||||
// i + 1,
|
||||
// "u" + c.charCodeAt(0).toString(16).padStart(4, "0")
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
// process.stdout.write(result);
|
||||
} else {
|
||||
spawn(wcscPath, args, {
|
||||
cwd: process.cwd(),
|
||||
stdio: "inherit",
|
||||
});
|
||||
}
|
BIN
compiler/wcc
@ -1,95 +0,0 @@
|
||||
const util = require('./util')
|
||||
const path = require('path')
|
||||
|
||||
let wcc
|
||||
try {
|
||||
console.warn('wcc load')
|
||||
wcc = require('./src/wcc')
|
||||
} catch (err) {
|
||||
console.error('wcc', err)
|
||||
// wcc = require('./build/Release/wcc.node')
|
||||
}
|
||||
|
||||
const fs = util.fs
|
||||
|
||||
exports = async function (options) {
|
||||
// console.warn('wcc init options:', options);
|
||||
if (!options) throw Error('options is required')
|
||||
|
||||
const lazyload = !!options.lazyloadConfig
|
||||
|
||||
options = Object.assign(
|
||||
{
|
||||
files: [], // FILES
|
||||
contents: [],
|
||||
replaceContent: {},
|
||||
verbose: false,
|
||||
debug: false, // -d
|
||||
debugWXS: false, // -ds
|
||||
showNewTree: false,
|
||||
isPlugin: false,
|
||||
addTestAttre: false,
|
||||
independent: false,
|
||||
genfuncname: '$gwx', // -gn
|
||||
isCut: false, // --split
|
||||
cwd: process.cwd,
|
||||
debug: false,
|
||||
lazyload, // -ll
|
||||
lazyloadConfig: '',
|
||||
},
|
||||
options,
|
||||
)
|
||||
|
||||
return new Promise(async (resolve, reject) => {
|
||||
let st = Date.now()
|
||||
|
||||
// 获取文件内容
|
||||
if (!options.contents.length) {
|
||||
const tasks = options.files.map((file) => {
|
||||
if (typeof options.replaceContent[file] === 'string') {
|
||||
return options.replaceContent[file]
|
||||
}
|
||||
return fs.readFile(path.resolve(options.cwd, file), 'utf8')
|
||||
})
|
||||
options.contents = await Promise.all(tasks) || []
|
||||
}
|
||||
// console.warn('wcc get files', Date.now() - st, options.contents)
|
||||
let result
|
||||
try {
|
||||
// console.warn('final options:', options);
|
||||
result = wcc(options.cwd, options.files, {cut: options.isCut}, options)
|
||||
// console.warn('wcc result', result)
|
||||
} catch(errmsg) {
|
||||
reject(new Error(errmsg))
|
||||
return
|
||||
}
|
||||
|
||||
// console.log('wcc get compile', Date.now() - st)
|
||||
if (options.output) {
|
||||
const output = path.resolve(options.cwd, options.output)
|
||||
const dir = path.dirname(output)
|
||||
if (lazyload) {
|
||||
// lazyload 为 true时,wcc 返回值是个对象, 需要序列化一下
|
||||
// result = JSON.stringify(result)
|
||||
}
|
||||
try {
|
||||
await fs.stat(dir)
|
||||
} catch (e) {
|
||||
await fs.mkdir(dir, {
|
||||
recursive: true,
|
||||
})
|
||||
}
|
||||
await fs.writeFile(output, result, 'utf8')
|
||||
}
|
||||
console.warn('wcc get output', Date.now() - st)
|
||||
resolve(result)
|
||||
})
|
||||
}
|
||||
|
||||
Object.defineProperty(exports, 'version', {
|
||||
get() {
|
||||
return wcc.version
|
||||
},
|
||||
})
|
||||
|
||||
module.exports = exports
|
@ -1,25 +0,0 @@
|
||||
{
|
||||
"name": "miniprogram-wcc",
|
||||
"version": "0.0.1",
|
||||
"description": "WCC node C++ addon",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"install": "node-gyp-build",
|
||||
"rebuild": "node-gyp rebuild",
|
||||
"build:dist": "node scripts/build",
|
||||
"build": "node-gyp build",
|
||||
"test": "node ./test/index",
|
||||
"format": "prettier *.js test/*.js scripts/*.js --write"
|
||||
},
|
||||
"author": "coverguo",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"node-gyp-build": "^4.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eustia-module": "^1.21.2",
|
||||
"licia": "^1.21.2",
|
||||
"ncp": "^2.0.0",
|
||||
"node-gyp": "^7.0.0"
|
||||
}
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
const path = require('path')
|
||||
const vm = require('vm')
|
||||
const glob = require('glob')
|
||||
const unescapeJs = require('unescape-js')
|
||||
|
||||
const wcc = require('./wcc')
|
||||
|
||||
module.exports = {
|
||||
wxmlToJs(rootPath) {
|
||||
// wcc 编译器需要完整的 wxml 文件列表
|
||||
const files = glob.sync('**/*.wxml', {
|
||||
cwd: rootPath,
|
||||
nodir: true,
|
||||
dot: true,
|
||||
ignore: ['node_modules/**/*.wxml'],
|
||||
})
|
||||
const wxsFiles = glob.sync('**/*.wxs', {
|
||||
cwd: rootPath,
|
||||
nodir: true,
|
||||
dot: true,
|
||||
ignore: ['node_modules/**/*.wxs'],
|
||||
})
|
||||
const compileResult = wcc(rootPath, files.map(file => file.substring(0, file.length - 5)), wxsFiles)
|
||||
|
||||
return `
|
||||
${compileResult};
|
||||
return $gwx;
|
||||
`
|
||||
},
|
||||
}
|
@ -1,128 +0,0 @@
|
||||
const { spawnSync } = require('child_process')
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
|
||||
/**
|
||||
* 获取 wxml 编译器路径
|
||||
*/
|
||||
let wxmlParserPath = ''
|
||||
function getWXMLParsePath() {
|
||||
if (wxmlParserPath) return wxmlParserPath
|
||||
|
||||
const fileName = process.platform === 'darwin' ? '../bin/mac/wcc' : process.platform === 'linux' ? '../bin/linux/wcc' : '../bin/windows/wcc.exe'
|
||||
wxmlParserPath = path.join(__dirname, fileName)
|
||||
|
||||
// 尝试修改权限
|
||||
try {
|
||||
fs.chmodSync(wxmlParserPath, 0o777)
|
||||
} catch (err) {
|
||||
// ignore
|
||||
}
|
||||
|
||||
return wxmlParserPath
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取自定义组件编译参数
|
||||
*/
|
||||
function getComponentArgs(files) {
|
||||
let args = []
|
||||
let count = 0
|
||||
|
||||
files.forEach(file => {
|
||||
const fileJson = file.fileJson
|
||||
|
||||
if (fileJson.usingComponents) {
|
||||
args.push(file.pagePath)
|
||||
args.push(Object.keys(fileJson.usingComponents).length)
|
||||
args = args.concat(Object.keys(fileJson.usingComponents))
|
||||
count++
|
||||
}
|
||||
})
|
||||
args.unshift(count)
|
||||
|
||||
return args
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取完整文件列表,包括自定义组件
|
||||
*/
|
||||
function getAllFiles(rootPath, files) {
|
||||
const ret = []
|
||||
const hasCheckMap = {}
|
||||
|
||||
for (let i = 0, len = files.length; i < len; i++) {
|
||||
const file = files[i]
|
||||
|
||||
let fileJson = {}
|
||||
const realPath = path.join(rootPath, file)
|
||||
if (hasCheckMap[realPath]) continue
|
||||
hasCheckMap[realPath] = true
|
||||
try {
|
||||
fileJson = require(`${realPath}.json`)
|
||||
} catch(err) {
|
||||
// ignore
|
||||
}
|
||||
|
||||
// 自定义组件
|
||||
if (fileJson.usingComponents) {
|
||||
Object.keys(fileJson.usingComponents).forEach(subFileKey => {
|
||||
const subFile = fileJson.usingComponents[subFileKey]
|
||||
|
||||
len++
|
||||
|
||||
let relativePath = path.relative(rootPath, path.join(path.dirname(realPath), subFile))
|
||||
relativePath = relativePath.replace(/\\/g, '/')
|
||||
files.push(relativePath)
|
||||
})
|
||||
}
|
||||
|
||||
ret.push({
|
||||
pagePath: `${file}.wxml`,
|
||||
jsonPath: `${file}.json`,
|
||||
fileJson,
|
||||
})
|
||||
}
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
/**
|
||||
* 入口
|
||||
* 编译 wxml 到 js
|
||||
* files
|
||||
*
|
||||
* @param {*} rootPath
|
||||
* @param {*} files 文件列表,包含组件
|
||||
* @param {*} param2
|
||||
* @param {*} options 配置选项
|
||||
* @returns string
|
||||
*/
|
||||
function wxmlToJS(rootPath, files, { cut } = {}, options={}) {
|
||||
const type = cut ? '-xc' : '-cc'
|
||||
// files = getAllFiles(rootPath, files)
|
||||
|
||||
// @TODO,如果遇到参数过长被操作系统干掉的情况,可以使用 --config-path FILE 配置,参数空格换成空行
|
||||
// const componentArgs = getComponentArgs(files), componentArgs.join(' ')
|
||||
const args = ['-d', '--split', options.wxmlCompileConfigSplit, type, options.wxmlCompileConfig]
|
||||
.concat(files)
|
||||
.concat(['-gn', '$gwx'])
|
||||
|
||||
// wxs调试
|
||||
if(options.debugWXS)args.unshift('-ds')
|
||||
// 懒加载
|
||||
if(options.lazyload)args=args.concat(['-ll', options.lazyloadConfig])
|
||||
|
||||
// wxmlParserPath 二进制可执行文件路径
|
||||
const wxmlParserPath = getWXMLParsePath()
|
||||
// console.warn('wcc args:', args)
|
||||
const wcc = spawnSync(wxmlParserPath, args, { cwd: rootPath })
|
||||
|
||||
if (wcc.status === 0) {
|
||||
return wcc.stdout.toString()
|
||||
} else {
|
||||
throw new Error(`编译 .wxml 文件错误:${wcc.stderr.toString()}`)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = wxmlToJS
|
BIN
compiler/wcsc
@ -1,91 +0,0 @@
|
||||
const util = require('./util')
|
||||
const path = require('path')
|
||||
const fs = util.fs
|
||||
|
||||
// TODO:未找到触发操作,所以相关功能未验证
|
||||
let wcsc
|
||||
try {
|
||||
wcsc = require('./src/wcsc')
|
||||
} catch (err) {
|
||||
console.error('wcsc', err)
|
||||
// wcsc = require('./build/Release/wcsc.node')
|
||||
}
|
||||
|
||||
function tranWcscResultToObject(resultStr) {
|
||||
const resultArr = resultStr.split('=')
|
||||
const result = {}
|
||||
for (let i = 0, len = resultArr.length; i < len && resultArr[i + 1]; i += 2) {
|
||||
result[resultArr[i]] = resultArr[i + 1]
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
exports = async function (options) {
|
||||
if (!options) throw Error('options is required')
|
||||
|
||||
// avoid undefined or null
|
||||
if (typeof options.subPackage !== 'string') {
|
||||
delete options.subPackage
|
||||
}
|
||||
|
||||
if (typeof options.lazyload !== 'boolean') {
|
||||
delete options.lazyload
|
||||
}
|
||||
|
||||
options = Object.assign(
|
||||
{
|
||||
files: [],
|
||||
contents: [],
|
||||
pageCount: 0,
|
||||
cwd: process.cwd,
|
||||
replaceContent: {},
|
||||
debug: false,
|
||||
classPrefix: '',
|
||||
lazyload: false,
|
||||
},
|
||||
options,
|
||||
)
|
||||
|
||||
if (!options.contents.length) {
|
||||
const tasks = options.files.map((file) => {
|
||||
if (typeof options.replaceContent[file] === 'string') {
|
||||
return options.replaceContent[file]
|
||||
}
|
||||
return fs.readFile(path.resolve(options.cwd, file), 'utf8')
|
||||
})
|
||||
options.contents = await Promise.all(tasks) || []
|
||||
}
|
||||
|
||||
let wccResult
|
||||
try {
|
||||
console.warn('wcsc options', options)
|
||||
wccResult = wcsc(options.cwd, options.files, options)
|
||||
} catch (errmsg) {
|
||||
throw new Error(errmsg)
|
||||
}
|
||||
|
||||
const result = options.lazyload ? wccResult : tranWcscResultToObject(wccResult)
|
||||
|
||||
if (options.output) {
|
||||
const output = path.resolve(options.cwd, options.output)
|
||||
const dir = path.dirname(output)
|
||||
try {
|
||||
await fs.stat(dir)
|
||||
} catch (e) {
|
||||
await fs.mkdir(dir, {
|
||||
recursive: true,
|
||||
})
|
||||
}
|
||||
await fs.writeFile(output, JSON.stringify(result, null, 2), 'utf8')
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
Object.defineProperty(exports, 'version', {
|
||||
get() {
|
||||
return wcsc.version
|
||||
},
|
||||
})
|
||||
|
||||
module.exports = exports
|
@ -1,30 +0,0 @@
|
||||
{
|
||||
"name": "miniprogram-wcsc",
|
||||
"version": "0.0.2",
|
||||
"description": "WXSS node C++ addon",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"install": "node-gyp-build",
|
||||
"rebuild": "node-gyp rebuild",
|
||||
"build:dist": "node scripts/build",
|
||||
"build": "node-gyp build",
|
||||
"test": "node ./test/index",
|
||||
"format": "prettier *.js test/*.js scripts/*.js --write"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@git.code.oa.com:redhoodsu/wxss.git"
|
||||
},
|
||||
"author": "redhoodsu",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"node-gyp-build": "^4.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eustia-module": "^1.21.2",
|
||||
"licia": "^1.21.2",
|
||||
"ncp": "^2.0.0",
|
||||
"node-gyp": "^7.0.0",
|
||||
"prettier": "^2.3.1"
|
||||
}
|
||||
}
|
@ -1,58 +0,0 @@
|
||||
const path = require('path')
|
||||
const vm = require('vm')
|
||||
const glob = require('glob')
|
||||
const unescapeJs = require('unescape-js')
|
||||
|
||||
const wcc = require('./wcc')
|
||||
const wcsc = require('./wcsc')
|
||||
|
||||
module.exports = {
|
||||
wxmlToJs(rootPath) {
|
||||
// wcc 编译器需要完整的 wxml 文件列表
|
||||
const files = glob.sync('**/*.wxml', {
|
||||
cwd: rootPath,
|
||||
nodir: true,
|
||||
dot: true,
|
||||
ignore: ['node_modules/**/*.wxml'],
|
||||
})
|
||||
const wxsFiles = glob.sync('**/*.wxs', {
|
||||
cwd: rootPath,
|
||||
nodir: true,
|
||||
dot: true,
|
||||
ignore: ['node_modules/**/*.wxs'],
|
||||
})
|
||||
const compileResult = wcc(rootPath, files.map(file => file.substr(0, file.length - 5)), wxsFiles)
|
||||
|
||||
return `
|
||||
${compileResult};
|
||||
return $gwx;
|
||||
`
|
||||
},
|
||||
|
||||
wxssToJs(rootPath) {
|
||||
// wcsc 编译器需要完整的 wxss 文件列表
|
||||
const files = glob.sync('**/*.wxss', {
|
||||
cwd: rootPath,
|
||||
nodir: true,
|
||||
dot: true,
|
||||
ignore: ['node_modules/**/*.wxss'],
|
||||
})
|
||||
const compileResult = wcsc(rootPath, files.map(file => file.substr(0, file.length - 5)))
|
||||
|
||||
// 拼装 wxss map 字符串
|
||||
let wxssMap = ''
|
||||
Object.keys(compileResult).forEach(key => {
|
||||
if (path.extname(key) === '.wxss') {
|
||||
wxssMap += `'${key}': ${unescapeJs(compileResult[key])},`
|
||||
}
|
||||
})
|
||||
|
||||
return `
|
||||
${unescapeJs(compileResult.comm)};
|
||||
var wxssMap = { ${wxssMap} };
|
||||
return function (filePath) {
|
||||
return wxssMap[filePath];
|
||||
};
|
||||
`
|
||||
},
|
||||
}
|
@ -1,81 +0,0 @@
|
||||
const { spawnSync } = require('child_process')
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
|
||||
/**
|
||||
* 获取 wxss 编译器路径
|
||||
*/
|
||||
let wxssParserPath = ''
|
||||
function getWXSSParsePath() {
|
||||
if (wxssParserPath) return wxssParserPath
|
||||
|
||||
const fileName = process.platform === 'darwin' ? '../bin/mac/wcsc' : process.platform === 'linux' ? '../bin/linux/wcsc' : '../bin/windows/wcsc.exe'
|
||||
wxssParserPath = path.join(__dirname, fileName)
|
||||
|
||||
// 尝试修改权限
|
||||
try {
|
||||
fs.chmodSync(wxssParserPath, 0o777)
|
||||
} catch (err) {
|
||||
// ignore
|
||||
}
|
||||
|
||||
return wxssParserPath
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取完整文件列表
|
||||
*/
|
||||
function getAllFiles(rootPath, files) {
|
||||
const ret = []
|
||||
let compWxssNum = 0
|
||||
|
||||
for (let i = 0, len = files.length; i < len; i++) {
|
||||
const file = files[i]
|
||||
|
||||
let fileJson = null
|
||||
try {
|
||||
fileJson = require(path.join(rootPath, `${file}.json`))
|
||||
} catch(err) {
|
||||
// ignore
|
||||
}
|
||||
|
||||
if (fileJson) {
|
||||
// 组件 wxss
|
||||
compWxssNum++
|
||||
ret.unshift(`${file}.wxss`)
|
||||
} else {
|
||||
ret.push(`${file}.wxss`)
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
list: ret,
|
||||
compWxssNum,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 编译 wxss 到 js
|
||||
*/
|
||||
function wxssToJS(rootPath, files, options) {
|
||||
files = getAllFiles(rootPath, files)
|
||||
|
||||
const args = ['-db', '-pc', String(files.compWxssNum)].concat(files.list)
|
||||
|
||||
const wxssParserPath = getWXSSParsePath()
|
||||
console.warn('wcsc args: ', args)
|
||||
const wcsc = spawnSync(wxssParserPath, args, { cwd: rootPath })
|
||||
|
||||
if (wcsc.status === 0) {
|
||||
const res = wcsc.stdout.toString().split('=')
|
||||
const funcList = {}
|
||||
for (let i = 0, len = res.length; i < len && res[i + 1]; i += 2) {
|
||||
funcList[res[i]] = res[i + 1]
|
||||
}
|
||||
return funcList
|
||||
} else {
|
||||
return new Error(`编译 .wxss 文件错误:${wcsc.stderr.toString()}`)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = wxssToJS
|
@ -1,15 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
SOURCE="${BASH_SOURCE[0]}"
|
||||
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
|
||||
SOURCE="$(readlink "$SOURCE")"
|
||||
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
|
||||
done
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
|
||||
|
||||
if [[ $@ =~ -ll ]];then
|
||||
wine "$DIR/wcc.exe" "$@"
|
||||
else
|
||||
"$DIR/wcc.bin" "$@"
|
||||
fi
|
@ -1,16 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
SOURCE="${BASH_SOURCE[0]}"
|
||||
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
|
||||
SOURCE="$(readlink "$SOURCE")"
|
||||
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
|
||||
done
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
|
||||
|
||||
if [[ $@ =~ -ll ]];then
|
||||
wine "$DIR/wcsc.exe" "$@"
|
||||
else
|
||||
"$DIR/wcsc.bin" "$@"
|
||||
fi
|
||||
|
1
conf/compiler_version
Normal file
@ -0,0 +1 @@
|
||||
WX_COMPILER_VERSION=v0.1.5
|
1
conf/devtools_v
Normal file
@ -0,0 +1 @@
|
||||
1.06.2504010,6a579ac93961fbfe04774b26f0c85b78
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"description": "此处版本应与nwjs使用的node版本一致",
|
||||
"version": "16.1.0",
|
||||
"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"
|
||||
}
|
6
conf/node_info
Normal file
@ -0,0 +1,6 @@
|
||||
# 此处版本应与nwjs使用的node版本一致
|
||||
if [ -z $NODE_VERSION ];then
|
||||
NODE_VERSION=16.11.0
|
||||
fi
|
||||
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
|
@ -1,7 +1,9 @@
|
||||
{
|
||||
"version": "0.53.1",
|
||||
"version": "0.55.0",
|
||||
"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",
|
||||
"nw2node": {
|
||||
"0.61.0": "17.3.0",
|
||||
"0.60.0": "17.3.0",
|
||||
"0.59.1": "17.1.0",
|
||||
"0.59.0": "17.1.0",
|
||||
|
@ -1,12 +0,0 @@
|
||||
version: "3"
|
||||
services:
|
||||
wechat_devtools:
|
||||
image: node:16.13.1
|
||||
volumes:
|
||||
- .:/workspace
|
||||
- ./cache/.npm:/root/.npm
|
||||
environment:
|
||||
- ACTION=${ACTION_MODE:-false}
|
||||
- https_proxy=${https_proxy:-}
|
||||
- NO_WINE=${NO_WINE:-false}
|
||||
entrypoint: /workspace/docker/entrypoint
|
@ -1,52 +1,42 @@
|
||||
FROM debian:buster
|
||||
LABEL maintainer="minun (minun@mewmew.cn)"
|
||||
FROM ubuntu:16.04
|
||||
|
||||
ENV LANG=C.UTF-8
|
||||
WORKDIR /workspace
|
||||
|
||||
# update repo sources
|
||||
RUN set -ex; \
|
||||
cp /etc/apt/sources.list /etc/apt/sources.list.bak; \
|
||||
echo "deb http://mirrors.aliyun.com/debian buster main" > /etc/apt/sources.list; \
|
||||
echo "deb http://mirrors.aliyun.com/debian buster-updates main" >> /etc/apt/sources.list; \
|
||||
apt-get clean; \
|
||||
dpkg --add-architecture i386; \
|
||||
apt-get update;
|
||||
|
||||
RUN set -ex; \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
apt-utils \
|
||||
dbus-x11 \
|
||||
libasound2 \
|
||||
libatk1.0-0 \
|
||||
libatomic1 \
|
||||
libcanberra-gtk3-module \
|
||||
libgconf-2-4 \
|
||||
libgtk3.0 \
|
||||
libnss3 \
|
||||
libupower-glib3 \
|
||||
libxtst6 \
|
||||
libx11-6 \
|
||||
libx11-xcb1 \
|
||||
libxss1 \
|
||||
libxrandr2 \
|
||||
mesa-utils \
|
||||
ttf-wqy-microhei \
|
||||
upower \
|
||||
wine \
|
||||
wine32 \
|
||||
wine-binfmt \
|
||||
xserver-xorg-video-all;
|
||||
|
||||
ADD wechat-devtools-compact-1.03.2008270.tar.gz /opt/wechat/devtools
|
||||
|
||||
COPY docker-entrypoint /opt/wechat/devtools/bin/docker-entrypoint
|
||||
|
||||
# COPY spdlog.docker.node /opt/wechat/devtools/package.nw/node_modules/spdlog/build/Release/spdlog.node
|
||||
# COPY spdlog.docker.node /opt/wechat/devtools/package.nw/node_modules/spdlog-node/build/Release/spdlog.node
|
||||
|
||||
# RUN apt-get build-essential python libx11-dev pkg-config libxkbfile-dev
|
||||
# RUN useradd -m minun
|
||||
|
||||
# xhost +
|
||||
# docker run -t -i --rm -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY -v $HOME/.Xauthority:/root/.Xauthority wechat-devtools bash
|
||||
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.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 && \
|
||||
apt update && \
|
||||
apt install -y binutils software-properties-common gcc g++ \
|
||||
gconf2 libxkbfile-dev p7zip-full make libssh2-1-dev libkrb5-dev wget curl \
|
||||
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 &&\
|
||||
wget https://deb.nodesource.com/setup_16.x &&\
|
||||
chmod +x setup_16.x &&\
|
||||
./setup_16.x &&\
|
||||
apt-get install -y nodejs &&\
|
||||
rm -rf /build_temp && \
|
||||
apt install -y gosu unzip python && \
|
||||
gosu nobody true && \
|
||||
useradd -s /bin/bash -m user
|
||||
|
||||
RUN apt remove -y p7zip p7zip-full p7zip-rar &&\
|
||||
rm -rf /opt/7z && \
|
||||
mkdir -p /opt/7z && \
|
||||
cd /opt/7z && \
|
||||
wget https://www.7-zip.org/a/7z2107-linux-x64.tar.xz && \
|
||||
tar -xJf 7z2107-linux-x64.tar.xz && \
|
||||
ln -s 7zz 7z
|
||||
ENV PATH=/opt/7z:$PATH
|
@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
/etc/init.d/dbus start &&
|
||||
|
||||
/opt/wechat/devtools/bin/wechat-devtools "$@"
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e # 命令出错就退出
|
||||
trap 'catchError $LINENO $BASH_COMMAND' SIGHUP SIGINT SIGQUIT EXIT # 捕获错误情况
|
||||
trap 'catchError $LINENO $BASH_COMMAND' ERR # 捕获错误情况
|
||||
|
||||
catchError() {
|
||||
exit_code=$?
|
||||
@ -19,58 +19,16 @@ fail() {
|
||||
echo -e "\033[41;37m 失败 \033[0m $1"
|
||||
}
|
||||
|
||||
echo "start"
|
||||
echo "start $UID"
|
||||
python --version
|
||||
echo "docker 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 set sass_binary_site https://npm.taobao.org/mirrors/node-sass # node-sass 二进制包镜像
|
||||
npm set electron_mirror https://npm.taobao.org/mirrors/electron/ # electron 二进制包镜像
|
||||
npm set puppeteer_download_host https://npm.taobao.org/mirrors # puppeteer 二进制包镜像
|
||||
npm set chromedriver_cdnurl https://npm.taobao.org/mirrors/chromedriver # chromedriver 二进制包镜像
|
||||
npm set operadriver_cdnurl https://npm.taobao.org/mirrors/operadriver # operadriver 二进制包镜像
|
||||
npm set phantomjs_cdnurl https://npm.taobao.org/mirrors/phantomjs # phantomjs 二进制包镜像
|
||||
npm set selenium_cdnurl https://npm.taobao.org/mirrors/selenium # selenium 二进制包镜像
|
||||
npm set node_inspector_cdnurl https://npm.taobao.org/mirrors/node-inspector # node-inspector 二进制包镜像
|
||||
# npm cache clean --force # 清空缓存
|
||||
echo "\
|
||||
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 https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free\
|
||||
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free
|
||||
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free\
|
||||
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports 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
|
||||
"> /etc/apt/sources.list
|
||||
fi
|
||||
|
||||
apt-get clean; # 清空缓存
|
||||
apt-get update; # 更新
|
||||
apt-get install -y libx11-dev libxkbfile-dev p7zip-full
|
||||
|
||||
echo "=====安装node-gyp nw-gyp===="
|
||||
npm uninstall node-gyp -g
|
||||
npm install node-gyp nw-gyp npm -g --registry=https://registry.npm.taobao.org
|
||||
node-gyp install
|
||||
node-gyp list
|
||||
|
||||
|
||||
# test
|
||||
# cd /
|
||||
# mkdir -p test
|
||||
# rm -rf test.a
|
||||
# exec /workspace/tools/rebuild-node-modules
|
||||
|
||||
# exit 0;
|
||||
# end test
|
||||
|
||||
cd /workspace
|
||||
rm -rf node nwjs package.nw
|
||||
export HOME="/tmp/home"
|
||||
mkdir -p /tmp/home
|
||||
#
|
||||
# exec ./tools/rebuild-node-modules 0.53.1
|
||||
exec ./tools/setup-wechat-devtools-bash
|
||||
./tools/setup-wechat-devtools.sh
|
||||
|
||||
# chmod -R 777 tmp node nwjs package.nw
|
||||
# ls -l package.nw
|
||||
|
@ -13,7 +13,7 @@
|
||||
文件路径: `package.nw/core.wxvpkg.ext/284af385b4ef6206861fea66a2452277.js`
|
||||
定位字符串:`nw.Window.open`
|
||||
在回调函数中添加:
|
||||
```
|
||||
```javascript
|
||||
Object.keys(window).forEach(key=>{
|
||||
if(!e.window[key]){
|
||||
/*没有就添加*/
|
||||
|
@ -15,11 +15,11 @@
|
||||
|
||||
3. 为什么自己构筑或更新后的运行时编辑器和调试器是一片空白?
|
||||
|
||||
检查一下`conf/node.json`和`conf/nwjs.json`里面定义的版本是否与最新微信官方开发者工具的一致。如果有修改版本号的情况,则在更新完这两个JSON文件后,执行`tools/update-node`和`tools/update-nwjs`命令。然后删除`package.nw`目录重新执行`tools/setup-wechat-devtools`命令(感谢ReggieCai31的issue和解决方案)
|
||||
检查一下`conf/node_info`和`conf/nwjs.json`里面定义的版本是否与最新微信官方开发者工具的一致。如果有修改版本号的情况,则在更新完这两个JSON文件后,执行`tools/update-node`和`tools/update-nwjs`命令。然后删除`package.nw`目录重新执行`tools/setup-wechat-devtools`命令(感谢ReggieCai31的issue和解决方案)
|
||||
|
||||
4. 为什么自己构筑的运行时加载项目时会卡住?
|
||||
|
||||
检查一下在`package.nw/node_modules`目录下的node文件,是否依旧是Windows版本的dll,而非linux需要的so。如果依旧是Windows下的dll的话,可以考虑执行`tools/rebuild-node-modules`命令重新编译。如果已经是linux的so文件的话,则同问题3解决方法
|
||||
检查一下在`package.nw/node_modules`目录下的node文件,是否依旧是Windows版本的dll,而非linux需要的so。如果依旧是Windows下的dll的话,可以考虑执行`tools/rebuild-node-modules.sh`命令重新编译。如果已经是linux的so文件的话,则同问题3解决方法
|
||||
|
||||
5. 为什么自己构筑或更新后的在加载项目后,IDE界面会显示错误崩溃?
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
|
||||
8. 直接下载下来的发布包,在加载项目后,为什么右侧的编辑界面是空白?
|
||||
|
||||
根据相关的情况分析,可以打开在微信开发者工具菜单里的调试支持。查看里面的日志报错,目前大部分情况是您的系统里libstdc++版本与预编译的版本不一致。可以考虑采用docker版本,或者执行`tools/rebuild-node-modules`命令重新编译系统支持的原生模块。
|
||||
根据相关的情况分析,可以打开在微信开发者工具菜单里的调试支持。查看里面的日志报错,目前大部分情况是您的系统里libstdc++版本与预编译的版本不一致。可以考虑采用docker版本,或者执行`tools/rebuild-node-modules.sh`命令重新编译系统支持的原生模块。
|
||||
|
||||
9. 自己构筑时,为什么会报告python执行错误?
|
||||
|
||||
|
@ -11,8 +11,8 @@
|
||||
|
||||
## 小程序基本功能
|
||||
|
||||
- [x] 编译运行
|
||||
- [x] 可视化
|
||||
- [x] 编译运行(包括普通、懒加载)
|
||||
- [x] 可视化(包括普通、懒加载)
|
||||
- [x] 元素选择
|
||||
- [x] 二维码预览
|
||||
- [x] 自动预览
|
||||
|
@ -1,7 +1,9 @@
|
||||
NodeJS v16.x下安装nodegit
|
||||
1. `apt-get install -y python2 python3 libkrb5-dev gcc openssl libssh2-1-dev g++ make`
|
||||
1. `apt-get install -y python2 python3 libkrb5-dev gcc openssl libssh2-1-dev g++ make pkg-config`
|
||||
2. `npm install nodegit`
|
||||
|
||||
python >= 3.6
|
||||
|
||||
## docker-compose.yaml
|
||||
```yaml
|
||||
version: "3"
|
||||
@ -21,7 +23,7 @@ apt update
|
||||
apt-get install -y python2 python3 libkrb5-dev gcc openssl libssh2-1-dev g++ make
|
||||
|
||||
echo "start"
|
||||
npm install nodegit --registry=https://registry.npm.taobao.org
|
||||
npm install nodegit --registry=http://registry.npmmirror.com/
|
||||
|
||||
npm uninstall nodegit
|
||||
```
|
3
docs/snap.md
Normal file
@ -0,0 +1,3 @@
|
||||
## 需要额外审查的接口
|
||||
|
||||
block-devices
|
160
docs/修正主题监听.MD
Normal file
@ -0,0 +1,160 @@
|
||||
## 设置位置
|
||||
|
||||
菜单栏 -> 设置 -> 外观设置 -> 主题
|
||||
|
||||
## 定位点
|
||||
|
||||
1. F12打开调试器
|
||||
2. 进入Elements标签
|
||||
3. 变更设置,发现`body`标签的`class`属性发生变化
|
||||
4. 变化:深色添加`dark`类,浅色则移除
|
||||
5. 完整class: `class="with-vscode-font-patch --with-theming dark"`
|
||||
|
||||
可以将这三个`class`作为定位点入手处理
|
||||
|
||||
## 定位具体代码
|
||||
|
||||
使用`--with-theming`
|
||||
|
||||
在解压后的`core.wxvpkg`中搜索 `grep -lr '\-\-with\-theming' .`
|
||||
得到两个位置:
|
||||
1. (exports.ThemingEnabledClass = "--with-theming");
|
||||
2. t.body.classList.add("--with-theming"),
|
||||
|
||||
第二个大概率是目标了;
|
||||
正好第二个后面紧接着`this.themeChange()`,好了,看命名可以确定是这个了
|
||||
```javascript
|
||||
this.setup().finally(() => {
|
||||
var e, t;
|
||||
document.body.classList.add("with-vscode-font-patch"),
|
||||
null === (e = this.ourDocumentRef) ||
|
||||
void 0 === e ||
|
||||
e.body.classList.add("with-vscode-font-patch"),
|
||||
null === (t = this.ourDocumentRef) ||
|
||||
void 0 === t ||
|
||||
t.body.classList.add("--with-theming"),
|
||||
this.themeChange();
|
||||
});
|
||||
```
|
||||
|
||||
## 分析实现
|
||||
|
||||
`themeChange` 函数:
|
||||
```javascript
|
||||
themeChange(e) {
|
||||
var t, n, i, s, o;
|
||||
"dark" ===
|
||||
(null !==
|
||||
(n =
|
||||
null === (t = (e = e || this.props).settings.appearance) ||
|
||||
void 0 === t
|
||||
? void 0
|
||||
: t.theme) && void 0 !== n
|
||||
? n
|
||||
: "dark")
|
||||
? null === (i = this.ourDocumentRef) ||
|
||||
void 0 === i ||
|
||||
i.body.classList.add("dark")
|
||||
: null === (s = this.ourDocumentRef) ||
|
||||
void 0 === s ||
|
||||
s.body.classList.remove("dark"),
|
||||
null === (o = this.ourDocumentRef) ||
|
||||
void 0 === o ||
|
||||
o.body.classList.add("with-vscode-font-patch");
|
||||
}
|
||||
```
|
||||
命名处理:
|
||||
```javascript
|
||||
themeChange(config) {
|
||||
var appearance, theme, docRef1, docRef2, docRef3;
|
||||
console.warn('themeChange', config);
|
||||
"dark" ===
|
||||
(null !==
|
||||
(theme =
|
||||
null === (appearance = (config = config || this.props).settings.appearance) ||
|
||||
void 0 === appearance
|
||||
? void 0
|
||||
: appearance.theme) && void 0 !== theme
|
||||
? theme
|
||||
: "dark")
|
||||
? null === (docRef1 = this.ourDocumentRef) ||
|
||||
void 0 === docRef1 ||
|
||||
docRef1.body.classList.add("dark")
|
||||
: null === (docRef2 = this.ourDocumentRef) ||
|
||||
void 0 === docRef2 ||
|
||||
docRef2.body.classList.remove("dark"),
|
||||
null === (docRef3 = this.ourDocumentRef) ||
|
||||
void 0 === docRef3 ||
|
||||
docRef3.body.classList.add("with-vscode-font-patch");
|
||||
}
|
||||
```
|
||||
审查代码,得出大致逻辑:
|
||||
1. 有传入配置使用配置;没有传入,则使用当前配置
|
||||
2. 获取主题配置
|
||||
3. 有主题配置则直接使用,否则默认`dark`
|
||||
4. 主题配置是`dark`添加`dark`类,否则移除
|
||||
|
||||
很明显,`theme`的值只有`dark`和`非dark`的区别(根据`console.warn`的结果看,另一个值是`white`,当然这不重要);
|
||||
此处没有跟随系统的判断,应该在别处。
|
||||
另外,根据`console.warn`可以知道跟随系统也会触发`themeChange`。
|
||||
|
||||
好的,我们卡住了,需要另辟蹊径。
|
||||
|
||||
## 另辟蹊径
|
||||
|
||||
简述: 通过字符串定位触发位置
|
||||
|
||||
1. 搜索`应用(除调试器外)的主题设置`,即`grep -lr '应用(除调试器外)的主题设置' .`
|
||||
2. 获取对应标志`SETTING_THEME_DESC`
|
||||
3. 搜索`SETTING_THEME_DESC`,即`grep -lr 'SETTING_THEME_DESC' .`
|
||||
4. 三个结果,两个翻译,确定了
|
||||
|
||||
关键代码:
|
||||
```javascript
|
||||
t.createElement(
|
||||
"div",
|
||||
{ className: "uiv2-padding" },
|
||||
t.createElement(
|
||||
"label",
|
||||
{
|
||||
className: "uiv2-radio",
|
||||
onClick: this.handleAutoDetectThemeClick,
|
||||
},
|
||||
t.createElement("i", {
|
||||
className: r
|
||||
? "uiv2-radio-icon-o"
|
||||
: "uiv2-radio-icon",
|
||||
}),
|
||||
t.createElement(
|
||||
"span",
|
||||
{ className: "uiv2-radio-text" },
|
||||
o.config.FOLLOW_SYSTEM
|
||||
)
|
||||
)
|
||||
)
|
||||
```
|
||||
|
||||
可以看到处理“跟随系统”的函数是`handleAutoDetectThemeClick`
|
||||
函数内执行`this.props.updateIDESetting("appearance", "autoDetectTheme", !0);`
|
||||
|
||||
通过搜索`autoDetectTheme`,找到一个跟主题控制相关的实现
|
||||
```javascript
|
||||
constructor() {
|
||||
(this.onDidOSThemeChange = () => {
|
||||
const o = s.OSThemeController.shared.getCurrentTheme();
|
||||
if (o === s.OSTheme.Unknown) return;
|
||||
const n = o === s.OSTheme.Dark ? "dark" : "white";
|
||||
this._enabledThemeAutoDetect &&
|
||||
e.dispatch(t.updateIDESetting("appearance", "theme", n)),
|
||||
this._enabledDevtoolsThemeAutoDetect &&
|
||||
e.dispatch(
|
||||
t.updateIDESetting("appearance", "devtoolsTheme", n)
|
||||
);
|
||||
}),
|
||||
(this._enabledThemeAutoDetect = !1),
|
||||
(this._enabledDevtoolsThemeAutoDetect = !1),
|
||||
this.registerListeners();
|
||||
}
|
||||
```
|
||||
|
||||
好了,去看看`OSThemeController`就知道怎么回事了
|
@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2020 dragonation
|
||||
Copyright (c) 2022 msojocs
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -1,61 +0,0 @@
|
||||
FROM debian:stretch
|
||||
LABEL maintainer="minun (minun@mewmew.cn)"
|
||||
|
||||
ENV LANG=C.UTF-8
|
||||
|
||||
# update repo sources
|
||||
RUN set -ex; \
|
||||
cp /etc/apt/sources.list /etc/apt/sources.list.bak; \
|
||||
echo "deb http://mirrors.aliyun.com/debian/ stretch main" > /etc/apt/sources.list; \
|
||||
echo "deb http://mirrors.aliyun.com/debian/ stretch-updates main" >> /etc/apt/sources.list; \
|
||||
rm -rf /var/cache/apt/archives/lock \
|
||||
apt-get clean; \
|
||||
apt-get update --fix-missing;
|
||||
|
||||
RUN DEBIAN_FRONTEND=noninteractive \
|
||||
apt-get install -y --no-install-recommends \
|
||||
apt-utils \
|
||||
build-essential \
|
||||
ca-certificates \
|
||||
git \
|
||||
libx11-dev \
|
||||
libxkbfile-dev \
|
||||
pkg-config \
|
||||
python \
|
||||
p7zip-full
|
||||
|
||||
ADD runtime-mewjs.tar.gz /opt/mewjs
|
||||
COPY node-v12.6.0-linux-x64.tar.gz /opt/wechat/cache/node-v12.6.0-linux-x64.tar.gz
|
||||
COPY nwjs-sdk-v0.39.3-linux-x64.tar.gz /opt/wechat/cache/nwjs-sdk-v0.39.3-linux-x64.tar.gz
|
||||
COPY wechat_devtools_1.03.2009140_x64.exe /opt/wechat/cache/wechat_devtools_1.03.2009140_x64.exe
|
||||
COPY build /opt/wechat/cache/build
|
||||
|
||||
RUN chmod +x /opt/mewjs/bin/hako \
|
||||
/opt/mewjs/bin/mew \
|
||||
/opt/mewjs/bin/chan \
|
||||
/opt/mewjs/bin/mew_* \
|
||||
/opt/mewjs/bin/npm \
|
||||
/opt/mewjs/bin/npx
|
||||
|
||||
RUN set -ex; \
|
||||
useradd -m builder -s /bin/bash; \
|
||||
mkdir -p /opt/local/proj; \
|
||||
cd /opt/local/proj; \
|
||||
git clone https://github.com/dragonation/wechat-devtools.git; \
|
||||
mkdir -p /opt/local/proj/wechat-devtools/cache; \
|
||||
cd wechat-devtools; \
|
||||
cp -fr /opt/wechat/cache/* cache/; \
|
||||
cp -f /opt/wechat/cache/build build; \
|
||||
chmod -R 777 .
|
||||
|
||||
ENV PATH=/opt/mewjs/bin:/usr/local/bin:/usr/bin:/bin
|
||||
|
||||
WORKDIR /opt/local/proj/wechat-devtools
|
||||
|
||||
# docker build -t wechat-devtools-compact-builder .
|
||||
# docker run -ti --rm -v `pwd`:/opt/wechat/output wechat-devtools-compact-builder /bin/bash --login -i
|
||||
|
||||
# su builder
|
||||
# export PATH=/opt/mewjs/bin:$PATH
|
||||
# ./build
|
||||
# cp wechat-devtools-compact.tar.gz /opt/wechat/output/wechat-devtools-1.03.2009140-compact.tar.gz
|
15
other/multipass-change-storage.sh
Normal file
@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
# 由于var目录空间大小不够,故修改multipass镜像的存储位置
|
||||
# https://github.com/canonical/multipass/pull/1789#issuecomment-704991752
|
||||
# as root
|
||||
snap stop multipass
|
||||
snap connect multipass:removable-media # for /mnt /media https://snapcraft.io/docs/removable-media-interface
|
||||
snap connect multipass:all-home # for /home/* https://snapcraft.io/docs/home-interface
|
||||
mkdir -p /mnt/disk2/multipass
|
||||
mkdir /etc/systemd/system/snap.multipass.multipassd.service.d/
|
||||
tee /etc/systemd/system/snap.multipass.multipassd.service.d/override.conf <<EOF
|
||||
[Service]
|
||||
Environment=MULTIPASS_STORAGE=/mnt/disk2/multipass
|
||||
EOF
|
||||
systemctl daemon-reload
|
||||
snap start multipass
|
6
package-lock.json
generated
@ -1,6 +0,0 @@
|
||||
{
|
||||
"name": "wechat-devtools",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {}
|
||||
}
|
@ -1 +0,0 @@
|
||||
{}
|
@ -1,92 +0,0 @@
|
||||
if (typeof nw === "undefined") {
|
||||
return;
|
||||
}
|
||||
|
||||
let log = function (content) {
|
||||
process.stderr.write(content + "\n");
|
||||
};
|
||||
|
||||
let originMenuItem = nw.MenuItem;
|
||||
nw.MenuItem = function MenuItem(options) {
|
||||
|
||||
options = Object.assign({}, options);
|
||||
|
||||
delete options.shortcutName;
|
||||
delete options.shouldEnabled;
|
||||
|
||||
if (options.label && (typeof options.label === "string")) {
|
||||
|
||||
if (options.label.indexOf("[") !== -1) {
|
||||
let rest = options.label.split("[").slice(1).join("[").trim();
|
||||
if (rest[rest.length - 1] === "]") {
|
||||
rest = rest.slice(0, -1).split("+").map((x) => {
|
||||
if (!x) { return "+" }
|
||||
switch (x) {
|
||||
case "↓": { return "Down"; }
|
||||
case "↑": { return "Up"; }
|
||||
case "PAGE↓": { return "PageDown"; }
|
||||
case "PAGE↑": { return "PageUp"; }
|
||||
case "←": { return "Left"; }
|
||||
case "→": { return "Right"; }
|
||||
default: { return x; }
|
||||
}
|
||||
});
|
||||
if (rest.length > 1) {
|
||||
options.key = rest[rest.length - 1];
|
||||
options.modifiers = rest.slice(0, -1).join("+");
|
||||
} else {
|
||||
options.key = rest[0];
|
||||
}
|
||||
}
|
||||
options.label = options.label.split("[")[0];
|
||||
}
|
||||
|
||||
if (options.label.indexOf("(&") !== -1) {
|
||||
options.label = options.label.split("(&")[0];
|
||||
}
|
||||
options.label = options.label.replace("&", "").trim();
|
||||
|
||||
switch (options.label) {
|
||||
case "Go to Declaration": { options.label = "转到声明"; break; }
|
||||
case "Go to References": { options.label = "转到引用"; break; }
|
||||
case "Find All References": { options.label = "查找所有引用"; break; }
|
||||
case "Find All Implementations": { options.label = "查找所有实现"; break; }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return new originMenuItem(options);
|
||||
|
||||
};
|
||||
|
||||
let originAppend = nw.Menu.prototype.append;
|
||||
nw.Menu.prototype.append = function (item) {
|
||||
|
||||
if (item.parentMenu) {
|
||||
item.parentMenu.remove(item);
|
||||
}
|
||||
item.parentMenu = this;
|
||||
|
||||
if ((this.items.length > 0) &&
|
||||
(this.items[this.items.length - 1].type === "separator") &&
|
||||
(item.type === "separator")) {
|
||||
originInsert.call(this, item, this.items.length);
|
||||
return;
|
||||
}
|
||||
|
||||
if ((this.items.length === 0) && (item.type === "separator")) {
|
||||
originInsert.call(this, item, this.items.length);
|
||||
return;
|
||||
}
|
||||
|
||||
return originAppend.call(this, item);
|
||||
};
|
||||
|
||||
let originInsert = nw.Menu.prototype.insert;
|
||||
nw.Menu.prototype.insert = function (item, index) {
|
||||
if (item.parentMenu) {
|
||||
item.parentMenu.remove(item);
|
||||
}
|
||||
item.parentMenu = this;
|
||||
return originInsert.call(this, item, index);
|
||||
};
|
136
readme.md
@ -1,136 +0,0 @@
|
||||
|
||||
|
||||
<div align="center">
|
||||
|
||||
<img src="./res/icons/wechat-devtools.png" height="100px" width="100px"/>
|
||||
|
||||
<h3>微信开发者工具 Linux版</h3>
|
||||
<br>
|
||||
|
||||
----
|
||||
|
||||
[](https://github.com/msojocs/wechat-devtools-linux/actions/workflows/release.yml)
|
||||
[](https://developers.weixin.qq.com/miniprogram/dev/devtools/download.html)
|
||||
[](https://nwjs.io/downloads/)
|
||||
[](https://nodejs.org/en/)
|
||||
|
||||
这是微信开发者工具 Linux版
|
||||
|
||||
图标作者[dragonation](https://github.com/dragonation), 由于是基于其项目修改,未经授权。
|
||||
|
||||
<br>
|
||||
</div>
|
||||
|
||||
# 项目说明
|
||||
|
||||
本项目是一个完整的搭建Linux下可用的“微信开发者工具”的脚本和工具集,
|
||||
用于在Linux下的GNOME桌面上搭建可以持续更新和使用的“微信开发者工具”。
|
||||
本项目修改自:https://github.com/dragonation/wechat-devtools/
|
||||
|
||||
# 项目地址
|
||||
* https://github.com/msojocs/wechat-devtools-linux
|
||||
|
||||
# 进度
|
||||
|
||||
当前工具可以在Linux上构筑最新版1.05.2201240(截止时间2022年1月26日),支持CLI模式,现已经有Docker支持(仅用于测试)。
|
||||
另现在已经可以直接在设置界面里面修改字体,手工输入字体名称就可以。
|
||||
|
||||
# 功能测试记录
|
||||
|
||||
[测试记录](docs/Features.MD)
|
||||
|
||||
# 使用方法
|
||||
|
||||
可以在本项目的[Release](https://github.com/msojocs/wechat-devtools-linux/releases)中,寻找已经构筑好了的`.tar.gz`包,下载解压后,运行其中的`bin/wechat-devtools`即可运行;也可以下载`AppImage`授予可执行权限后,直接运行。
|
||||
|
||||
# 系统要求
|
||||
|
||||
* 基于Linux的桌面系统,首选GNOME(其他的桌面环境可能会有问题,未测试)
|
||||
* 非兼容版对glibc和libstdc++有一定的版本要求,glibc的版本要求2.3,libstdc++的版本要求3.4.26,发布包里已经预编译了的Linux原生Node模块有这个依赖。兼容版本对这两个系统库的要求则较低,如果发现非兼容版本运行有问题可以考虑尝试切换到兼容版本
|
||||
* 如果你下载的是`wine`版本,你么你需要安装有`wine`支持,建议版本在5.0以上,低版本可能会存在有问题
|
||||
|
||||
# CLI支持
|
||||
|
||||
在项目的`bin`目录中有`wechat-devtools-cli`命令,是微信开发者工具的命令行支持Linux版本。相关资料可以在[微信CLI命令行V2](https://developers.weixin.qq.com/miniprogram/dev/devtools/cli.html)上找到。
|
||||
|
||||
# 自行构建
|
||||
|
||||
> 注:
|
||||
> 如果不想使用`wine`,请添加环境变量:`export NO_WINE=true`,但是稳定性未测试
|
||||
|
||||
## 方法0(推荐)
|
||||
|
||||
理论上此方法99%成功;在网络不稳定时容易失败(原因懂得都懂,构建过程已经尽量使用镜像源)
|
||||
|
||||
1. 如果构建`wine`版本,请先在Linux环境中自行安装`wine`;
|
||||
2. 请安装`docker` `docker-compose`
|
||||
3. 克隆本项目:
|
||||
```
|
||||
git clone https://github.com/msojocs/wechat-devtools-linux.git
|
||||
```
|
||||
4. 在本地项目目录中执行如下的语句,构筑开发者工具:
|
||||
```
|
||||
docker-compose up
|
||||
```
|
||||
5. 在本地项目目录中执行如下的语句,可以安装应用图标(非必须):
|
||||
```
|
||||
./tools/install-desktop-icon-node
|
||||
```
|
||||
|
||||
之后即可通过点击应用图标启动微信开发者工具,也可以运行`bin/wechat-devtools`通过命令行启动
|
||||
|
||||
## 方法1
|
||||
|
||||
由于使用到`node-gyp` `nw-gyp`,此方法会受`python`、`node`版本影响出现一些难以预料的异常(比如使用`node15.0.1`时,大部分模块构建会被忽略,但没有任何报错信息)。但是,`Docker`构建方式会帮你处理好这些问题。
|
||||
|
||||
1. 如果构建`wine`版本,请先在Linux环境中自行安装`wine`;
|
||||
2. 请安装nodejs,并配置到PATH环境变量中,版本不限;
|
||||
3. 克隆本项目:
|
||||
```
|
||||
git clone https://github.com/msojocs/wechat-devtools-linux.git
|
||||
```
|
||||
4. 在本地项目目录中执行如下的语句,构筑开发者工具:
|
||||
```
|
||||
./tools/setup-wechat-devtools-bash
|
||||
```
|
||||
5. 在本地项目目录中执行如下的语句,可以安装应用图标(非必须):
|
||||
```
|
||||
./tools/install-desktop-icon-node
|
||||
```
|
||||
|
||||
之后即可通过点击应用图标启动微信开发者工具,也可以运行`bin/wechat-devtools`通过命令行启动
|
||||
|
||||
# 与其他Linux下的微信开发者工具版本区别
|
||||
|
||||
1. 支持最新版本,并个人会持续更新,在添加新的tag时,actions会自动构建并上传Release;
|
||||
2. 核心构筑过程完全开源,可以自行修改;
|
||||
3. 修复了nwjs上关于Menu的段错误,确保最新版本可以正常启动;
|
||||
4. 在构筑过程中会重新编译node_modules,确保原生模块可以在Linux上正确运行;
|
||||
5. 下载更新可以支持断点再续,并使用了taobao国内的npm源,加速下载(稳定性待测试)。
|
||||
|
||||
# 后续计划
|
||||
|
||||
1. [处理计划](https://github.com/msojocs/wechat-devtools-linux/projects?type=beta)
|
||||
|
||||
# FAQ
|
||||
[GO](docs/FAQ.MD)
|
||||
|
||||
# 界面截图
|
||||
|
||||
版本 1.05.2201240
|
||||

|
||||
|
||||
版本 1.03.2006090
|
||||

|
||||
|
||||
版本 1.02.2001191
|
||||

|
||||
|
||||
# 免责声明
|
||||
|
||||
微信开发者工具版权归腾讯公司所有,本项目旨在交流学习之用。如有不当之处,请联系本人,邮箱:jiyecafe@gmail.com
|
||||
|
||||
# 赞赏
|
||||
如果这个仓库让你感到舒适,可以请我喝杯咖啡:
|
||||
|
||||

|
@ -9,4 +9,6 @@ Icon=wechat-devtools
|
||||
Type=Application
|
||||
Terminal=false
|
||||
StartupWMClass=wechat_devtools
|
||||
Actions=
|
||||
Actions=
|
||||
MimeType=x-scheme-handler/wechatide
|
||||
X-AppImage-Version=v0
|
132
res/aur/PKGBUILD
Normal file
@ -0,0 +1,132 @@
|
||||
# Maintainer: msojocs <jiyecafe@gmail.com>
|
||||
# Contributor: ccat3z <c0ldcat3z@gmail.com>
|
||||
# Contributor: bruceutut <zttt183525594@gmail.com>
|
||||
|
||||
# 方法参考
|
||||
# https://github.com/msojocs/wechat-web-devtools-linux
|
||||
# https://github.com/dragonation/wechat-devtools
|
||||
# https://github.com/cytle/wechat_web_devtools
|
||||
|
||||
_wechat_devtools_ver="1.06.2208010"
|
||||
# https://servicewechat.com/wxa-dev-logic/download_redirect?type=x64&from=mpwiki&download_version=1052203030&version_type=1
|
||||
_wechat_devtools_url="https://servicewechat.com/wxa-dev-logic/download_redirect?type=x64&from=mpwiki&download_version=${_wechat_devtools_ver//\./}&version_type=1"
|
||||
# _wechat_devtools_url="https://dldir1.qq.com/WechatWebDev/release/p-ae42ee2cde4d42ee80ac60b35f183a99/wechat_devtools_1.05.2201240_x64.exe"
|
||||
_wechat_devtools_md5="2785d569b88d72a8e238d438d92faf44"
|
||||
|
||||
_wechat_devtools_exe="wechat_devtools_${_wechat_devtools_ver}_x64.exe"
|
||||
_nwjs_ver="0.55.0"
|
||||
_install_dir="/opt/wechat-devtools"
|
||||
_node_version="16.11.0"
|
||||
|
||||
pkgname=wechat-devtools
|
||||
pkgver="${_wechat_devtools_ver}" # 主版本号
|
||||
pkgrel=1 # 修订版本号release
|
||||
epoch=2 # 大版本迭代强制更新(维护者变更,尽量不用)
|
||||
pkgdesc="WeChat Devtools For Linux. "
|
||||
arch=("x86_64")
|
||||
url="https://developers.weixin.qq.com/miniprogram/dev/devtools/download.html"
|
||||
license=('unknown')
|
||||
depends=('gconf' 'libxkbfile')
|
||||
makedepends=('p7zip' 'python2' 'openssl' 'gcc' 'make' 'libssh2' 'krb5' 'wget')
|
||||
# compiler 用于可视化,以及编译
|
||||
source=("nwjs-v${_nwjs_ver}.tar.gz::https://npm.taobao.org/mirrors/nwjs/v${_nwjs_ver}/nwjs-sdk-v${_nwjs_ver}-linux-x64.tar.gz"
|
||||
"${_wechat_devtools_exe}::${_wechat_devtools_url}"
|
||||
"node-v${_node_version}.tar.gz::https://npm.taobao.org/mirrors/node/v${_node_version}/node-v${_node_version}-linux-x64.tar.gz"
|
||||
"compiler.tar.gz::https://github.rc1844.workers.dev/msojocs/wechat-web-devtools-linux/releases/download/v1.05.2203070-6/compiler.tar.gz"
|
||||
"wechat-devtools.desktop"
|
||||
"logo.svg"
|
||||
"wechat-devtools"
|
||||
"wechat-devtools-cli"
|
||||
"fix-cli.sh"
|
||||
"fix-menu.sh"
|
||||
"fix-core.sh"
|
||||
"rebuild-node-modules.sh"
|
||||
"fix-package-name.js"
|
||||
"wxvpkg_pack.js"
|
||||
"wxvpkg_unpack.js"
|
||||
"fix-other.sh")
|
||||
md5sums=(ac7680788544c457daee11aaf69798fe # nwjs
|
||||
"${_wechat_devtools_md5}"
|
||||
4d14589085ebbf79ce504dc27330d33b # nodejs
|
||||
7d78f10d04fff0b525df493d95847b37 # compiler
|
||||
4d3f5273be80a74741c841fcfa4185d3 # desktop
|
||||
0f4353664123320280ea4d6bb295dce2 # svg
|
||||
"SKIP"
|
||||
"SKIP"
|
||||
"SKIP"
|
||||
"SKIP"
|
||||
"SKIP"
|
||||
"SKIP"
|
||||
"SKIP"
|
||||
"SKIP"
|
||||
"SKIP"
|
||||
"SKIP")
|
||||
options=('!strip')
|
||||
|
||||
prepare() {
|
||||
7z x -owechat_devtools ${_wechat_devtools_exe} code/package.nw
|
||||
mv wechat_devtools/code/package.nw package.nw
|
||||
rm -rf wechat_devtools
|
||||
ls | grep node-*linux* | xargs -I{} mv {} node
|
||||
ls | grep nwjs-*linux* | xargs -I{} mv {} nwjs
|
||||
|
||||
mkdir -p tools
|
||||
for file in *.js *.sh; do
|
||||
mv $file tools;
|
||||
done
|
||||
}
|
||||
|
||||
_log() {
|
||||
echo -e "\e[1;34m$@\e[0m"
|
||||
}
|
||||
|
||||
build() {
|
||||
# prepare node
|
||||
_log "prepare node v${_node_version}"
|
||||
export PATH="$srcdir/node/bin:$PATH"
|
||||
|
||||
# prepare nw-gyp
|
||||
_log "prepare nw-gyp"
|
||||
node --version
|
||||
npm uninstall node-gyp -g
|
||||
npm install nw-gyp@3.6.6 node-gyp -g
|
||||
|
||||
# node bin
|
||||
_log "copy node exectuable"
|
||||
cp "$(which node)" "${srcdir}/node.${_node_version}"
|
||||
|
||||
# run fix scripts
|
||||
export NW_PACKAGE_DIR="${srcdir}/package.nw"
|
||||
export NW_VERSION=$_nwjs_ver
|
||||
# fix-package-name.js使用
|
||||
export srcdir=$srcdir
|
||||
export WINE=false
|
||||
|
||||
for script in fix-package-name.js fix-cli.sh fix-other.sh fix-menu.sh fix-core.sh rebuild-node-modules.sh; do
|
||||
_log "run ${script}"
|
||||
"${srcdir}/tools/${script}"
|
||||
done
|
||||
|
||||
# cleanup
|
||||
_log "done"
|
||||
}
|
||||
|
||||
package() {
|
||||
mkdir -p "${pkgdir}${_install_dir}"
|
||||
cd "${pkgdir}${_install_dir}"
|
||||
|
||||
cp -r "${srcdir}/nwjs" .
|
||||
cp -r "${srcdir}/package.nw" .
|
||||
find ./package.nw -type d | xargs -I {} chmod -R a+rx {}
|
||||
|
||||
cp ${srcdir}/node.${_node_version} nwjs/node
|
||||
cd nwjs && ln -s node node.exe && ln -s ../package.nw package.nw
|
||||
|
||||
install -Dm755 "${srcdir}/wechat-devtools" "${pkgdir}${_install_dir}/bin/wechat-devtools"
|
||||
install -Dm755 "${srcdir}/wechat-devtools-cli" "${pkgdir}${_install_dir}/bin/wechat-devtools-cli"
|
||||
install -Dm644 "${srcdir}/wechat-devtools.desktop" "${pkgdir}/usr/share/applications/wechat-devtools.desktop"
|
||||
install -Dm644 "${srcdir}/logo.svg" "${pkgdir}/usr/share/icons/hicolor/scalable/apps/wechat-devtools.svg"
|
||||
mkdir -p "${pkgdir}/usr/bin"
|
||||
ln -s "${_install_dir}/bin/wechat-devtools" "${pkgdir}/usr/bin/wechat-devtools"
|
||||
ln -s "${_install_dir}/bin/wechat-devtools-cli" "${pkgdir}/usr/bin/wechat-devtools-cli"
|
||||
}
|
123
res/aur/logo.svg
Executable file
@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="256px" height="256px" viewBox="0 0 256 256" enable-background="new 0 0 256 256" xml:space="preserve"> <image id="image0" width="256" height="256" x="0" y="0"
|
||||
href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGPC/xhBQAAACBjSFJN
|
||||
AAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAZ
|
||||
YUlEQVR42u3deXycVb3H8c+TpumWmUy6JLMkE5CyXAuIVJaCZS1FvAiIKHIRFRdQ8UULCEXleq9e
|
||||
L4pXcLkgXAQLL0CqIigWkK2tyk5B1tJSCmm2blkmM+maNOf+8Uy3kDTLzDNnnpnv+/WaV9Nm5nm+
|
||||
Z5rzy5lnOQdERERERERERERERERERERERERERERERERERERERCRPObYDSHZ1dXWNAyYCIaACCADj
|
||||
0l+XAMFBNpEEeoFOYDOQSn+dANrLy8s3226jZI8KgI90dXVFgH3Sj3j6EQXC6UcVMN7jGJuA9cDa
|
||||
9KMZaAQagH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
|
||||
RXLJNwUAb4b/jwBz4/G4lhmTouSnApDN6/9XAJfF4/FHbDdKxCZfHANoaGgYhXvgKZThphLAD4Ab
|
||||
4/F4t+12idjmixGAMeYox3FCGWxiO3Ab8O/xeHyD7faI5AtfFADgYyN9oTFmieM4c+PxeMEu7iAy
|
||||
Un4pAEeOYPrv94Cr6urqtIKwyAD8UgDGD+O5G4FrgZ/V1dVpcgiRvfBLAXiZwVcBMsDdwNV1dXUt
|
||||
tgOL+IEvzgKsXr16P9xLdCcM8JTngTl1dXXP284q4ie+WBuwrq5uFXAWsL7Pt5qBzwMz1PlFhs8X
|
||||
I4AdVq9ePQF3lp0o7rJOj9TV1W2xnUtEREREREREREREREREREREREREREREREREREREREQky/4f
|
||||
fZiQb28wgo4AAAAldEVYdGRhdGU6Y3JlYXRlADIwMjItMDItMTdUMDk6MDQ6MjkrMDA6MDB15HKJ
|
||||
AAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIyLTAyLTE3VDA5OjA0OjMwKzAwOjAwXYuPeAAAAABJRU5E
|
||||
rkJggg==" />
|
||||
</svg>
|
After Width: | Height: | Size: 9.4 KiB |
12
res/aur/wechat-devtools.desktop
Executable file
@ -0,0 +1,12 @@
|
||||
[Desktop Entry]
|
||||
Name=WeChat Devtools
|
||||
Name[zh_CN]=微信web开发者工具
|
||||
Comment=The development tools for wechat web develop
|
||||
Categories=Development;WebDevelopment;IDE;
|
||||
Exec=/opt/wechat-devtools/bin/wechat-devtools %U
|
||||
Path=/opt/wechat-devtools
|
||||
Icon=wechat-devtools
|
||||
Type=Application
|
||||
Terminal=false
|
||||
StartupWMClass=nwjs_mbeenbnhnmdhkbicabncjghgnikfbgjh
|
||||
MimeType=x-scheme-handler/wechatide
|
13
res/deb.desktop
Executable file
@ -0,0 +1,13 @@
|
||||
[Desktop Entry]
|
||||
Name=WeChat Dev Tools
|
||||
Name[zh_CN]=微信开发者工具
|
||||
Comment=The development tools for wechat projects
|
||||
Comment[zh_CN]=提供微信开发相关项目的开发IDE支持
|
||||
Categories=Development;WebDevelopment;IDE;
|
||||
Exec=/opt/wechat-devtools/bin/wechat-devtools
|
||||
Icon=wechat-devtools
|
||||
Type=Application
|
||||
Terminal=false
|
||||
StartupWMClass=wechat-devtools
|
||||
Actions=
|
||||
MimeType=x-scheme-handler/wechatide
|
6
res/deepin/debian/changelog
Normal file
@ -0,0 +1,6 @@
|
||||
io.github.msojocs.wechat-devtools (BUILD_VERSION) unstable; urgency=medium
|
||||
|
||||
* update:
|
||||
- devtools 1.06.2206090
|
||||
|
||||
-- msojocs <jiyecafe@gmail.com> Mon, 11 Mar 2022 14:56:04 +0800
|
1
res/deepin/debian/compat
Normal file
@ -0,0 +1 @@
|
||||
10
|
13
res/deepin/debian/control
Normal file
@ -0,0 +1,13 @@
|
||||
Source: io.github.msojocs.wechat-devtools
|
||||
Maintainer: msojocs
|
||||
Standards-Version: BUILD_VERSION
|
||||
Priority: optional
|
||||
Section: application
|
||||
|
||||
Package: io.github.msojocs.wechat-devtools
|
||||
Architecture: amd64
|
||||
Description: WeChat Devtools For Linux.
|
||||
To help developers develop and debug Weixin Mini Programs more simply and efficiently,
|
||||
Tencent have launched the new Weixin DevTools based on the original Official Account
|
||||
web debugging tools. Therefore, we now have two developer modes (Official Account web
|
||||
debugging) and (Mini Program debugging). This version is unofficial.
|
2
res/deepin/debian/install
Normal file
@ -0,0 +1,2 @@
|
||||
opt .
|
||||
usr .
|
28
res/deepin/debian/rules
Executable file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/make -f
|
||||
# See debhelper(7) (uncomment to enable)
|
||||
# output every command that modifies files on the build system.
|
||||
DH_VERBOSE = 1
|
||||
|
||||
# see FEATURE AREAS in dpkg-buildflags(1)
|
||||
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||
|
||||
# see ENVIRONMENT in dpkg-buildflags(1)
|
||||
# package maintainers to append CFLAGS
|
||||
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
|
||||
# package maintainers to append LDFLAGS
|
||||
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
|
||||
|
||||
# 1.20.9ubuntu1 -> 1.20.9ubuntu2修改了默认打包工具为zstd,导致统信平台不能识别,强制设定为xz
|
||||
# changelog: https://launchpad.net/ubuntu/+source/dpkg/1.20.9ubuntu2
|
||||
override_dh_builddeb:
|
||||
dh_builddeb -- -Zxz
|
||||
|
||||
override_dh_strip_nondeterminism:
|
||||
|
||||
override_dh_shlibdeps:
|
||||
dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info -Xswc.linux-x64-musl.node
|
||||
override_dh_strip:
|
||||
dh_strip --no-automatic-dbgsym
|
||||
|
||||
%:
|
||||
dh "$@"
|
21
res/deepin/opt/apps/io.github.msojocs.wechat-devtools/info
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
"appid": "io.github.msojocs.wechat-devtools",
|
||||
"name": "WeChat Dev Tools",
|
||||
"version": "BUILD_VERSION",
|
||||
"arch": ["amd64"],
|
||||
"permissions": {
|
||||
"autostart": false,
|
||||
"notification": false,
|
||||
"trayicon": true,
|
||||
"clipboard": true,
|
||||
"account": false,
|
||||
"bluetooth": false,
|
||||
"camera": false,
|
||||
"audio_record": false,
|
||||
"installed_apps": false
|
||||
},
|
||||
"support-plugins": [
|
||||
],
|
||||
"plugins": [
|
||||
]
|
||||
}
|
4
res/flatpak/startup.sh
Normal file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
export PATH="/var/run/host/usr/bin:$PATH"
|
||||
export LD_LIBRARY_PATH="/app/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH"
|
||||
exec /app/opt/bin/wechat-devtools
|
BIN
res/icons/128x128.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
res/icons/16x16.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
res/icons/256x256.png
Normal file
After Width: | Height: | Size: 6.0 KiB |
BIN
res/icons/32x32.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
res/icons/48x48.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
res/icons/512x512.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
res/icons/64x64.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
res/icons/96x96.png
Normal file
After Width: | Height: | Size: 7.7 KiB |
Before Width: | Height: | Size: 342 KiB |
@ -1,71 +1,123 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="1024px" height="1024px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 61.2 (89653) - https://sketch.com -->
|
||||
<title>wechat-devtools</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<defs>
|
||||
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-1">
|
||||
<stop stop-color="#0E142C" offset="0%"></stop>
|
||||
<stop stop-color="#323C67" offset="100%"></stop>
|
||||
</linearGradient>
|
||||
<linearGradient x1="50%" y1="0%" x2="50%" y2="98.8835515%" id="linearGradient-2">
|
||||
<stop stop-color="#EEEEEE" offset="0%"></stop>
|
||||
<stop stop-color="#D7D7D7" offset="100%"></stop>
|
||||
</linearGradient>
|
||||
<text id="text-3" font-family="Menlo-Bold, Menlo" font-size="230" font-weight="bold">
|
||||
<tspan x="212" y="688"></></tspan>
|
||||
</text>
|
||||
<filter x="-3.4%" y="-4.4%" width="106.9%" height="112.4%" filterUnits="objectBoundingBox" id="filter-4">
|
||||
<feOffset dx="0" dy="5" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
|
||||
<feGaussianBlur stdDeviation="5" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
|
||||
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.761991914 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
|
||||
</filter>
|
||||
<filter x="-9.7%" y="-11.8%" width="123.0%" height="128.1%" filterUnits="objectBoundingBox" id="filter-5">
|
||||
<feOffset dx="0" dy="10" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
|
||||
<feGaussianBlur stdDeviation="10" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
|
||||
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.272536058 0" type="matrix" in="shadowBlurOuter1" result="shadowMatrixOuter1"></feColorMatrix>
|
||||
<feMerge>
|
||||
<feMergeNode in="shadowMatrixOuter1"></feMergeNode>
|
||||
<feMergeNode in="SourceGraphic"></feMergeNode>
|
||||
</feMerge>
|
||||
</filter>
|
||||
<linearGradient x1="50%" y1="0%" x2="50%" y2="100%" id="linearGradient-6">
|
||||
<stop stop-color="#9EEE69" offset="0%"></stop>
|
||||
<stop stop-color="#74CD30" offset="100%"></stop>
|
||||
</linearGradient>
|
||||
<filter x="-8.1%" y="-9.1%" width="116.2%" height="118.2%" filterUnits="objectBoundingBox" id="filter-7">
|
||||
<feOffset dx="0" dy="5" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
|
||||
<feGaussianBlur stdDeviation="5" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
|
||||
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0" type="matrix" in="shadowBlurOuter1" result="shadowMatrixOuter1"></feColorMatrix>
|
||||
<feMerge>
|
||||
<feMergeNode in="shadowMatrixOuter1"></feMergeNode>
|
||||
<feMergeNode in="SourceGraphic"></feMergeNode>
|
||||
</feMerge>
|
||||
</filter>
|
||||
<linearGradient x1="50%" y1="0.269214527%" x2="50%" y2="100%" id="linearGradient-8">
|
||||
<stop stop-color="#FFFFFF" offset="0%"></stop>
|
||||
<stop stop-color="#E5E9EA" offset="100%"></stop>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g id="wechat-devtools" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<rect id="Rectangle" fill="url(#linearGradient-1)" x="95" y="157" width="832" height="710" rx="34"></rect>
|
||||
<path d="M898,153 C916.777681,153 932,168.222319 932,187 L932,837 C932,855.777681 916.777681,871 898,871 L125,871 C106.222319,871 91,855.777681 91,837 L91,187 C91,168.222319 106.222319,153 125,153 L898,153 Z M877,199 L148,199 C141.924868,199 137,203.924868 137,210 L137,210 L137,816 C137,822.075132 141.924868,827 148,827 L148,827 L877,827 C883.075132,827 888,822.075132 888,816 L888,816 L888,210 C888,203.924868 883.075132,199 877,199 L877,199 Z" id="Combined-Shape" fill="url(#linearGradient-2)"></path>
|
||||
<g id="</>" opacity="0.0783110119" fill="#FFFFFF">
|
||||
<use fill-opacity="1" filter="url(#filter-4)" xlink:href="#text-3"></use>
|
||||
<use fill-rule="evenodd" xlink:href="#text-3"></use>
|
||||
<use fill-opacity="1" xlink:href="#text-3"></use>
|
||||
</g>
|
||||
<g id="Group-3" filter="url(#filter-5)" transform="translate(211.000000, 266.000000)">
|
||||
<g id="Group-4">
|
||||
<path d="M216.5,364 C336.069648,364 433,282.515824 433,182 C433,81.4841755 336.069648,-2.84217094e-14 216.5,-2.84217094e-14 C96.9303517,-2.84217094e-14 0,81.4841755 0,182 C0,234.824118 26.7704343,282.392034 69.5285421,315.639256 C93.3413194,334.155246 58.2521249,377.054783 69.5285421,386.023056 C80.8049593,394.99133 128.568238,347 151.295389,355.600627 C171.060829,363.080455 193.777604,364 216.5,364 Z" id="Oval-Copy" fill="url(#linearGradient-6)"></path>
|
||||
<circle id="Oval" fill="#126F20" cx="143.5" cy="126.5" r="29.5"></circle>
|
||||
<circle id="Oval-Copy-2" fill="#126F20" cx="289.5" cy="126.5" r="29.5"></circle>
|
||||
</g>
|
||||
<g id="Group-5" filter="url(#filter-7)" transform="translate(237.000000, 167.000000)">
|
||||
<path d="M182,305 C200.898516,305 228.587306,302.288693 236.262178,298.107116 C255.747671,287.490639 287.208639,328.334705 303.2061,323 C319.203561,317.665295 280.639295,283.352792 303.2061,265.082731 C337.702449,237.154525 364,195.852984 364,152.5 C364,68.2765757 282.515824,2.84217094e-14 182,2.84217094e-14 C81.4841755,2.84217094e-14 0,68.2765757 0,152.5 C0,236.723424 81.4841755,305 182,305 Z" id="Oval" fill="url(#linearGradient-8)"></path>
|
||||
<circle id="Oval-Copy-3" fill="#7B7F7F" cx="244.5" cy="107.5" r="24.5"></circle>
|
||||
<circle id="Oval-Copy-4" fill="#7B7F7F" cx="119.5" cy="107.5" r="24.5"></circle>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="256px" height="256px" viewBox="0 0 256 256" enable-background="new 0 0 256 256" xml:space="preserve"> <image id="image0" width="256" height="256" x="0" y="0"
|
||||
href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGPC/xhBQAAACBjSFJN
|
||||
AAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAZ
|
||||
YUlEQVR42u3deXycVb3H8c+TpumWmUy6JLMkE5CyXAuIVJaCZS1FvAiIKHIRFRdQ8UULCEXleq9e
|
||||
L4pXcLkgXAQLL0CqIigWkK2tyk5B1tJSCmm2blkmM+maNOf+8Uy3kDTLzDNnnpnv+/WaV9Nm5nm+
|
||||
Z5rzy5lnOQdERERERERERERERERERERERERERERERERERERERCRPObYDSHZ1dXWNAyYCIaACCADj
|
||||
0l+XAMFBNpEEeoFOYDOQSn+dANrLy8s3226jZI8KgI90dXVFgH3Sj3j6EQXC6UcVM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ZgTQ0NCwP950/m7gRuD78Xi803Y7
|
||||
RXLJNwUAb4b/jwBz4/G4lhmTouSnApDN6/9XAJfF4/FHbDdKxCZfHANoaGgYhXvgKZThphLAD4Ab
|
||||
4/F4t+12idjmixGAMeYox3FCGWxiO3Ab8O/xeHyD7faI5AtfFADgYyN9oTFmieM4c+PxeMEu7iAy
|
||||
Un4pAEeOYPrv94Cr6urqtIKwyAD8UgDGD+O5G4FrgZ/V1dVpcgiRvfBLAXiZwVcBMsDdwNV1dXUt
|
||||
tgOL+IEvzgKsXr16P9xLdCcM8JTngTl1dXXP284q4ie+WBuwrq5uFXAWsL7Pt5qBzwMz1PlFhs8X
|
||||
I4AdVq9ePQF3lp0o7rJOj9TV1W2xnUtEREREREREREREREREREREREREREREREREREREREQky/4f
|
||||
fZiQb28wgo4AAAAldEVYdGRhdGU6Y3JlYXRlADIwMjItMDQtMjVUMDI6NTc6NTcrMDA6MDAbUd3b
|
||||
AAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIyLTA0LTI1VDAyOjU3OjU4KzAwOjAwnEQVjgAAAABJRU5E
|
||||
rkJggg==" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 9.4 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 106 KiB |
Before Width: | Height: | Size: 4.0 KiB |
7
res/mpr/docker-compose.yml
Normal file
@ -0,0 +1,7 @@
|
||||
version: "3"
|
||||
services:
|
||||
wechat_devtools:
|
||||
image: proget.hunterwittenborn.com/docker/makedeb/makedeb:ubuntu-bionic
|
||||
volumes:
|
||||
- .:/workspace
|
||||
entrypoint: /workspace/docker/entrypoint
|
34
res/mpr/docker/entrypoint
Executable file
@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
|
||||
root_dir=$(cd `dirname $0`/.. && pwd -P)
|
||||
# exit 1
|
||||
sudo sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list
|
||||
|
||||
strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBC
|
||||
strings /lib/x86_64-linux-gnu/libc.so.6 | grep GLIBC_2.2
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt install -y python gconf2 libxkbfile-dev p7zip-full make libssh2-1-dev libkrb5-dev
|
||||
sudo apt-get install -y openssl pkg-config build-essential gcc-8 g++-8 git
|
||||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8
|
||||
|
||||
# install bsdtar 3.3.0
|
||||
wget https://launchpad.net/ubuntu/+source/libarchive/3.3.3-1/+build/15782551/+files/libarchive13_3.3.3-1_amd64.deb
|
||||
sudo dpkg -i libarchive13_3.3.3-1_amd64.deb
|
||||
wget https://launchpad.net/ubuntu/+source/libarchive/3.3.3-1/+build/15782551/+files/libarchive-tools_3.3.3-1_amd64.deb
|
||||
sudo dpkg -i libarchive-tools_3.3.3-1_amd64.deb
|
||||
wget http://launchpadlibrarian.net/401610929/bsdtar_3.3.3-1_all.deb
|
||||
sudo dpkg -i bsdtar_3.3.3-1_all.deb
|
||||
bsdtar --version
|
||||
bsdtar --no-fflags
|
||||
|
||||
# sudo chmod -R 777 /workspace
|
||||
cd /workspace
|
||||
rm -rf src
|
||||
gcc -v
|
||||
g++ -v
|
||||
cc -v
|
||||
makedeb --printsrcinfo | tee .SRCINFO
|
||||
ls -la
|
||||
makedeb -s
|
||||
# tail -f /etc/issue
|
29
res/scripts/cli.js
Normal file
@ -0,0 +1,29 @@
|
||||
(() => {
|
||||
process.argv[0] = 'wechat-devtools-cli'
|
||||
process.env.USERPROFILE = require('os').homedir()
|
||||
Object.defineProperty(global, 'userDirPath', {
|
||||
set: function(value) {
|
||||
if (value.includes('AppData/Local')) {
|
||||
value = value.replace('AppData/Local', '.config')
|
||||
value = value.replace(/User Data\/.*?\//, '')
|
||||
// value = value.replace('~', require('os').homedir())
|
||||
}
|
||||
this._userDirPath = value
|
||||
},
|
||||
get: function() {
|
||||
return this._userDirPath
|
||||
}
|
||||
})
|
||||
// appPath
|
||||
Object.defineProperty(global, 'appPath', {
|
||||
set: function(value) {
|
||||
if (value.includes('.exe')) {
|
||||
value = value.replace('.exe', '')
|
||||
}
|
||||
this._appPath = value
|
||||
},
|
||||
get: function() {
|
||||
return this._appPath
|
||||
}
|
||||
})
|
||||
})();
|
11
res/scripts/entrance.js
Normal file
@ -0,0 +1,11 @@
|
||||
(() => {
|
||||
const http = require('http')
|
||||
const originaleListen = http.Server.prototype.listen
|
||||
http.Server.prototype.listen = function(...args) {
|
||||
if (args[0] == 33233) {
|
||||
console.warn('block port of http server:', args[0])
|
||||
return
|
||||
}
|
||||
return originaleListen.apply(this, args)
|
||||
}
|
||||
})();
|
347
res/scripts/hackrequire.js
Normal file
@ -0,0 +1,347 @@
|
||||
/* patch wechat devtools begin */
|
||||
(() => {
|
||||
try {
|
||||
{
|
||||
// 修正编译器路径
|
||||
const originalSpawn = require("child_process").spawn;
|
||||
require("child_process").spawn = function (command, args, options) {
|
||||
if (command.includes("wcc.exe")) {
|
||||
command = command.replace("code/package.nw", "package.nw");
|
||||
command = command.replace("wcc.exe", "wcc");
|
||||
} else if (command.includes("wcsc.exe")) {
|
||||
command = command.replace("code/package.nw", "package.nw");
|
||||
command = command.replace("wcsc.exe", "wcsc");
|
||||
}
|
||||
return originalSpawn.apply(this, [command, args, options]);
|
||||
};
|
||||
}
|
||||
{
|
||||
// 修正路径错误
|
||||
const originalResolve = require("path").resolve;
|
||||
require("path").resolve = function (...paths) {
|
||||
if (paths.length === 2 && paths[1].includes("code/package.nw")) {
|
||||
paths[1] = paths[1].replace("code/package.nw", "package.nw");
|
||||
}
|
||||
return originalResolve.apply(this, paths);
|
||||
};
|
||||
}
|
||||
if (typeof nw === "undefined") {
|
||||
return;
|
||||
}
|
||||
|
||||
let log = function (content) {
|
||||
process.stderr.write(content + "\n");
|
||||
};
|
||||
|
||||
let originMenuItem = nw.MenuItem;
|
||||
nw.MenuItem = function MenuItem(options) {
|
||||
|
||||
options = Object.assign({}, options);
|
||||
|
||||
delete options.shortcutName;
|
||||
delete options.shouldEnabled;
|
||||
|
||||
if (options.label && (typeof options.label === "string")) {
|
||||
|
||||
if (options.label.indexOf("[") !== -1) {
|
||||
let rest = options.label.split("[").slice(1).join("[").trim();
|
||||
if (rest[rest.length - 1] === "]") {
|
||||
rest = rest.slice(0, -1).split("+").map((x) => {
|
||||
if (!x) { return "+" }
|
||||
switch (x) {
|
||||
case "↓": { return "Down"; }
|
||||
case "↑": { return "Up"; }
|
||||
case "PAGE↓": { return "PageDown"; }
|
||||
case "PAGE↑": { return "PageUp"; }
|
||||
case "←": { return "Left"; }
|
||||
case "→": { return "Right"; }
|
||||
default: { return x; }
|
||||
}
|
||||
});
|
||||
if (rest.length > 1) {
|
||||
options.key = rest[rest.length - 1];
|
||||
options.modifiers = rest.slice(0, -1).join("+");
|
||||
} else {
|
||||
options.key = rest[0];
|
||||
}
|
||||
}
|
||||
options.label = options.label.split("[")[0];
|
||||
}
|
||||
|
||||
if (options.label.indexOf("(&") !== -1) {
|
||||
options.label = options.label.split("(&")[0];
|
||||
}
|
||||
options.label = options.label.replace("&", "").trim();
|
||||
|
||||
switch (options.label) {
|
||||
case "Go to Declaration": { options.label = "转到声明"; break; }
|
||||
case "Go to References": { options.label = "转到引用"; break; }
|
||||
case "Find All References": { options.label = "查找所有引用"; break; }
|
||||
case "Find All Implementations": { options.label = "查找所有实现"; break; }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return new originMenuItem(options);
|
||||
|
||||
};
|
||||
|
||||
let originAppend = nw.Menu.prototype.append;
|
||||
nw.Menu.prototype.append = function (item) {
|
||||
|
||||
if (item.parentMenu) {
|
||||
item.parentMenu.remove(item);
|
||||
}
|
||||
item.parentMenu = this;
|
||||
|
||||
if ((this.items.length > 0) &&
|
||||
(this.items[this.items.length - 1].type === "separator") &&
|
||||
(item.type === "separator")) {
|
||||
originInsert.call(this, item, this.items.length);
|
||||
return;
|
||||
}
|
||||
|
||||
if ((this.items.length === 0) && (item.type === "separator")) {
|
||||
originInsert.call(this, item, this.items.length);
|
||||
return;
|
||||
}
|
||||
|
||||
return originAppend.call(this, item);
|
||||
};
|
||||
|
||||
let originInsert = nw.Menu.prototype.insert;
|
||||
nw.Menu.prototype.insert = function (item, index) {
|
||||
if (item.parentMenu) {
|
||||
item.parentMenu.remove(item);
|
||||
}
|
||||
item.parentMenu = this;
|
||||
return originInsert.call(this, item, index);
|
||||
};
|
||||
{
|
||||
// 修正新窗口数据丢失的问题
|
||||
const originalOpen = nw.Window.open
|
||||
nw.Window.open = function (url, options, callback) {
|
||||
console.warn('[wechat-devtools] nw.Window.open is called, url:', url, 'options:', options);
|
||||
let cb = callback
|
||||
if (options.title === '版本更新提示') {
|
||||
options.inject_js_start = 'js/unpack/hackrequire/index.js';
|
||||
cb = (...args) => {
|
||||
const keys = [
|
||||
"shareData",
|
||||
"windowMap",
|
||||
"isSimple",
|
||||
"masterProxyPort",
|
||||
"proxyPort",
|
||||
"masterH2ProxyPort",
|
||||
"h2ProxyPort"
|
||||
];
|
||||
for(let k of keys)
|
||||
args[0].window.global[k] = global[k];
|
||||
callback(...args)
|
||||
}
|
||||
}
|
||||
else if (options.title === '云开发控制台') {
|
||||
cb = (...args) => {
|
||||
const keys = [
|
||||
"shareData",
|
||||
"windowMap",
|
||||
"isSimple",
|
||||
"masterProxyPort",
|
||||
"proxyPort",
|
||||
"masterH2ProxyPort",
|
||||
"h2ProxyPort",
|
||||
'tokenData',
|
||||
];
|
||||
for(let k of keys)
|
||||
args[0].window.global[k] = global[k];
|
||||
callback(...args)
|
||||
}
|
||||
}
|
||||
else if (options.title.includes('微信开发者工具')) {
|
||||
cb = (...args) => {
|
||||
const keys = [
|
||||
"shareData",
|
||||
"windowMap",
|
||||
"isSimple",
|
||||
"masterProxyPort",
|
||||
"proxyPort",
|
||||
"masterH2ProxyPort",
|
||||
"h2ProxyPort",
|
||||
'tokenData',
|
||||
];
|
||||
for(let k of keys)
|
||||
args[0].window.global[k] = global[k];
|
||||
callback(...args)
|
||||
}
|
||||
}
|
||||
return originalOpen.apply(this, [url, options, cb])
|
||||
}
|
||||
}
|
||||
{
|
||||
// 修正打开外部Terminal的功能
|
||||
const originalExec = require('child_process').exec;
|
||||
require('child_process').exec = function (command, options, callback) {
|
||||
if (command.includes('open -a Terminal')) {
|
||||
command = 'gnome-terminal'
|
||||
}
|
||||
return originalExec.apply(this, [command, options, callback])
|
||||
}
|
||||
}
|
||||
{
|
||||
// 修正 暗色/亮色 自动跟随系统
|
||||
const {spawn, execSync} = require('child_process')
|
||||
let isDark = (function () {
|
||||
try {
|
||||
const { DESKTOP_SESSION } = process.env;
|
||||
console.log(DESKTOP_SESSION);
|
||||
let theme = "";
|
||||
switch (DESKTOP_SESSION) {
|
||||
case "deepin":
|
||||
theme = execSync(
|
||||
`gsettings get com.deepin.dde.appearance gtk-theme`
|
||||
);
|
||||
break;
|
||||
case "gnome":
|
||||
case "gnome-classic":
|
||||
theme = execSync(
|
||||
`gsettings get org.gnome.desktop.interface ${this.gnomeScheme}`
|
||||
);
|
||||
break;
|
||||
|
||||
case "plasma":
|
||||
theme = execSync(
|
||||
`gsettings get org.gnome.desktop.interface color-scheme`,
|
||||
);
|
||||
break;
|
||||
default:
|
||||
console.warn(
|
||||
`NOT SUPPORTED !!! DESKTOP_SESSION: ${DESKTOP_SESSION}`
|
||||
);
|
||||
break;
|
||||
}
|
||||
console.log(theme.toString());
|
||||
return theme.toString().toLowerCase().includes("dark");
|
||||
} catch (error) {
|
||||
console.error("尝试获取主题信息失败,使用默认暗色");
|
||||
return true;
|
||||
}
|
||||
})()
|
||||
const originalMatchMedia = window.matchMedia
|
||||
window.matchMedia = function (...args) {
|
||||
console.warn('----------------> matchMedia:', ...args)
|
||||
const mm = originalMatchMedia.apply(this, args)
|
||||
Object.defineProperty(mm, 'matches', {
|
||||
get(){
|
||||
return isDark
|
||||
}
|
||||
})
|
||||
return mm
|
||||
}
|
||||
class CheckDark {
|
||||
// 监听gsettings monitor org.gnome.desktop.interface gtk-theme
|
||||
monitorTheme(callback) {
|
||||
try {
|
||||
if (this.callback) {
|
||||
this.callback = callback
|
||||
return;
|
||||
}
|
||||
this.callback = callback
|
||||
let monitor = null;
|
||||
const { DESKTOP_SESSION } = process.env;
|
||||
switch (DESKTOP_SESSION) {
|
||||
case "deepin":
|
||||
monitor = spawn("gsettings", [
|
||||
"monitor",
|
||||
"com.deepin.dde.appearance",
|
||||
"gtk-theme",
|
||||
]);
|
||||
break;
|
||||
case "gnome":
|
||||
case "gnome-classic":
|
||||
monitor = spawn("gsettings", [
|
||||
"monitor",
|
||||
"org.gnome.desktop.interface",
|
||||
this.gnomeScheme,
|
||||
]);
|
||||
break;
|
||||
case "plasma":
|
||||
monitor = spawn("gsettings", [
|
||||
"monitor",
|
||||
"org.gnome.desktop.interface",
|
||||
'color-scheme',
|
||||
]);
|
||||
break;
|
||||
default:
|
||||
console.warn(
|
||||
`NOT SUPPORTED !!! DESKTOP_SESSION: ${DESKTOP_SESSION}`
|
||||
);
|
||||
break;
|
||||
}
|
||||
monitor &&
|
||||
monitor.on("error", (err) => {
|
||||
console.error("monitorTheme", err);
|
||||
});
|
||||
monitor &&
|
||||
monitor.stdout.on("data", (chunk) => {
|
||||
const data = chunk.toString();
|
||||
console.warn('Theme changed:', data)
|
||||
isDark = data.toLowerCase().includes("dark");
|
||||
this.callback(isDark)
|
||||
});
|
||||
process.on("SIGTERM", (signal) => {
|
||||
monitor.kill(signal);
|
||||
});
|
||||
} catch (err) {
|
||||
console.error("尝试监听主题失败!", err);
|
||||
}
|
||||
}
|
||||
get gnomeScheme() {
|
||||
try {
|
||||
// 判断 Gnome-Shell 版本 from @icepie
|
||||
const gnomeVersion = execSync(`gnome-shell --version`)
|
||||
.toString()
|
||||
.replace(/[\r\n]/g, "")
|
||||
.split(" ");
|
||||
const gnomeVersionNum =
|
||||
gnomeVersion.length == 3 ? Number(gnomeVersion[2]) : 0;
|
||||
return gnomeVersionNum >= 42 ? "color-scheme" : "gtk-theme";
|
||||
} catch (err) {
|
||||
console.error("检查gnome版本失败, 使用gtk-theme", err);
|
||||
return "gtk-theme";
|
||||
}
|
||||
}
|
||||
}
|
||||
const checkDark = new CheckDark()
|
||||
const original = MediaQueryList.prototype.addEventListener
|
||||
MediaQueryList.prototype.addEventListener = function (...args) {
|
||||
console.warn('----------> MediaQueryList.addEventListener:', ...args)
|
||||
checkDark.monitorTheme((isDark) => {
|
||||
args[1]({
|
||||
matches: isDark
|
||||
})
|
||||
})
|
||||
return original.apply(this, args)
|
||||
}
|
||||
}
|
||||
{
|
||||
// 修复云开发控制台
|
||||
const originalBind = Function.prototype.bind
|
||||
Function.prototype.bind = function(...args) {
|
||||
if (args[0]?._tokenMap) {
|
||||
console.warn('---------set tokenData')
|
||||
if (window.tokenData) {
|
||||
args[0]._sessionToken = window.tokenData._sessionToken
|
||||
args[0]._tokenMap = window.tokenData._tokenMap
|
||||
}
|
||||
else
|
||||
window.tokenData = args[0]
|
||||
}
|
||||
return originalBind.apply(this, args)
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
process.stderr.write(error.message);
|
||||
process.stderr.write(error.stack);
|
||||
}
|
||||
})();
|
||||
/* patch wechat devtools end */
|
2
res/template.desktop
Normal file → Executable file
@ -8,6 +8,6 @@ Exec=dir/bin/wechat-devtools
|
||||
Icon=dir/res/icons/wechat-devtools.svg
|
||||
Type=Application
|
||||
Terminal=false
|
||||
StartupWMClass=wechat_devtools
|
||||
StartupWMClass=wechat-devtools
|
||||
Actions=
|
||||
MimeType=x-scheme-handler/wechatide
|
11
test/buid-deepin.sh
Normal file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
root_dir=$(cd `dirname $0`/.. && pwd -P)
|
||||
cd $root_dir
|
||||
export WINE=true
|
||||
docker-compose up
|
||||
$root_dir/tools/build-deepin.sh $@
|
||||
|
||||
export WINE=false
|
||||
$root_dir/tools/fix-core.sh
|
||||
$root_dir/tools/fix-other.sh
|
||||
$root_dir/tools/build-deepin.sh $@
|
17
test/compiler-replace-test
Executable file
@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
# 此脚本用于使修改 core.wxvpkg 内的代码及时生效
|
||||
set -e
|
||||
root_dir=$(cd `dirname $0`/.. && pwd -P)
|
||||
find_result="$root_dir/package.nw/core.wxvpkg.ext/19c6ae7eff08f795d1f2124f7b0248ad.js"
|
||||
return_exp_wcc=$(cat $find_result | grep -P 'return [a-z]+\("wcc"\)' -o) # return ?("wcc")
|
||||
echo "return exp: $return_exp_wcc"
|
||||
return_exp_wcc_replace="${return_exp_wcc//wcc/wcc.bin}" # return ?("wcc.bin")
|
||||
echo "replace exp1: $return_exp_wcc_replace"
|
||||
return_exp_wcc_replace="${return_exp_wcc//return /${return_exp_wcc_replace},}" # return ?("wcc.bin")
|
||||
echo "replace exp2: $return_exp_wcc_replace"
|
||||
|
||||
return_exp_wcsc=$(cat $find_result | grep -P 'return [a-z]+\("wcsc"\)' -o) # return ?("wcc")
|
||||
return_exp_wcsc_replace="${return_exp_wcc_replace//wcc/wcsc}"
|
||||
|
||||
sed -i "s#$return_exp_wcc#$return_exp_wcc_replace#g" "$find_result"
|
||||
sed -i "s#$return_exp_wcsc#$return_exp_wcsc_replace#g" "$find_result"
|
9
test/core-test
Normal file → Executable file
@ -1,12 +1,15 @@
|
||||
#!/bin/bash
|
||||
# 此脚本用于使修改 core.wxvpkg 内的代码及时生效
|
||||
set -e
|
||||
root_dir=$(cd `dirname $0`/.. && pwd -P)
|
||||
a=$1
|
||||
if [ "$a" == '1' ];then
|
||||
rm -rf "$root_dir/package.nw/core.wxvpkg.ext"
|
||||
node tools/wxvpkg/unpack "$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"
|
||||
else
|
||||
node tools/wxvpkg/pack package.nw/core.wxvpkg.ext package.nw/core.wxvpkg
|
||||
rm -rf ~/.config/wechat_devtools/WeappCache
|
||||
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/WeappVendor
|
||||
bin/wechat-devtools
|
||||
fi
|
5
test/debug-wcsc
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
root_dir=$(cd `dirname $0`/.. && pwd -P)
|
||||
|
||||
rm -rf ~/.config/wechat_devtools/WeappCache/requireCache
|
||||
$root_dir/bin/wechat-devtools
|
16
test/fix-core.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
root_dir=$(cd `dirname $0`/.. && pwd -P)
|
||||
|
||||
package_dir="$root_dir/package.nw"
|
||||
tmp_dir="$root_dir/package.nw"
|
||||
mkdir -p $tmp_dir
|
||||
unpack_script="$root_dir/tools/wxvpkg_unpack.js"
|
||||
pack_script="$root_dir/tools/wxvpkg_pack.js"
|
||||
|
||||
find_result=$( grep -lr "OSThemeController=" "$tmp_dir/core.wxvpkg.ext" )
|
||||
echo "theme: $find_result"
|
||||
sed -i 's/"use strict";O/"use strict";const {execSync,spawn}=require("child_process");O/' $find_result
|
||||
sed -i 's/this.registerListeners()/this.monitorTheme()/' $find_result
|
||||
sed -i 's/}registerListeners/}monitorTheme(){let monitor=null;const{DESKTOP_SESSION}=process.env;switch(DESKTOP_SESSION){case"deepin":monitor=spawn("gsettings",["monitor","com.deepin.dde.appearance","gtk-theme",]);break;case"gnome":case"gnome-classic":monitor=spawn("gsettings",["monitor","org.gnome.desktop.interface","gtk-theme",]);break;default:console.warn(`NOT SUPPORTED!!!DESKTOP_SESSION:${DESKTOP_SESSION}`);break}monitor\&\&monitor.on("error",(err)=>{console.error("monitorTheme",err)});monitor\&\&monitor.stdout.on("data",e.debounce((chunk)=>{const data=chunk.toString();const t=data.includes("dark");console.warn(data);console.warn("dark",t);(this._theme=t?i.Dark:i.Light),this._onDidThemeChange.fire(this._theme)},400))}registerListeners/' $find_result
|
||||
sed -i 's/mediaQuery.matches/isDark/' $find_result
|
||||
sed -i 's/}getDefaultTheme/}get isDark(){const{DESKTOP_SESSION}=process.env;console.log(DESKTOP_SESSION);let theme="";switch(DESKTOP_SESSION){case"deepin":theme=execSync(`gsettings get com.deepin.dde.appearance gtk-theme`);break;case"gnome":case"gnome-classic":theme=execSync(`gsettings get org.gnome.desktop.interface gtk-theme`);break;default:break}return theme.includes("dark")}getDefaultTheme/' $find_result
|
12
test/fix-spdlog
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
root_dir=$(cd `dirname $0`/.. && pwd -P)
|
||||
export PATH="$root_dir/node/bin:$PATH"
|
||||
|
||||
module="spdlog"
|
||||
cd "$root_dir/tmp"
|
||||
mkdir -p node_test/node_modules
|
||||
cd node_test
|
||||
npm install $module --save
|
||||
rm -rf "$root_dir/package.nw/node_modules/$module"
|
||||
cp -rf "$root_dir/tmp/node_test/node_modules/$module" "$root_dir/package.nw/node_modules"
|
10
test/miniumT.py
Normal file
@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env python3
|
||||
#-- coding: UTF-8 --
|
||||
import minium
|
||||
# print(minium)
|
||||
mini = minium.Minium({
|
||||
"project_path": r"/home/msojocs/Documents/we1", #小程序项目路径
|
||||
"dev_tool_path": r"/mnt/disk2/wechat-web-devtools-linux/bin/wechat-devtools-cli",#开发者工具的命令行工具路径
|
||||
"test_port": 9420 #minitest自动化端口
|
||||
})
|
||||
print(mini.get_system_info())#输出开发者工具模拟器的信息
|
9
test/nw-gyp-rebuild
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
root_dir=$(cd `dirname $0`/.. && pwd -P)
|
||||
export PATH="$root_dir/node/bin:$PATH"
|
||||
ln -s "$( which python2 )" "$root_dir/node/bin/python"
|
||||
|
||||
cd "$root_dir/tmp/node_test/node_modules/spdlog"
|
||||
# node-gyp rebuild
|
||||
nw-gyp rebuild --arch=x64 "--target=0.55.0" --dist-url=https://registry.npmmirror.com/-/binary/nwjs
|
9
test/nw-gyp.sh
Normal file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
root_dir=$(cd `dirname $0`/.. && pwd -P)
|
||||
NW_VERSION=0.53.0
|
||||
ln -s $( which python2 ) "$root_dir/tmp/python"
|
||||
export PATH="$root_dir/tmp:$PATH"
|
||||
export all_proxy="sock5://127.0.0.1:7890"
|
||||
|
||||
cd /mnt/disk1/GitHub/wechat-devtools-linux/node_modules/node-pty
|
||||
nw-gyp rebuild --arch=x64 "--target=$NW_VERSION" --dist-url=https://registry.npmmirror.com/-/binary/nwjs
|
9
test/nw-simple/index.html
Normal file
@ -0,0 +1,9 @@
|
||||
<!-- <video src="https://vjs.zencdn.net/v/oceans.mp4"></video> -->
|
||||
<hr />
|
||||
<video autoplay width="320" height="240" controls>
|
||||
<source src="https://media.w3.org/2010/05/sintel/trailer.mp4" type="video/mp4">
|
||||
您的浏览器不支持 HTML5 video 标签。
|
||||
</video>
|
||||
<script>
|
||||
// window.open('chrome://media-internals/')
|
||||
</script>
|
4
test/nw-simple/package.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"name": "test",
|
||||
"main": "index.html"
|
||||
}
|