-
Notifications
You must be signed in to change notification settings - Fork 66
1 安装包分析
msojocs edited this page May 2, 2022
·
3 revisions
本节将对开发工具的安装包进行解析,以分析移植的可行性。
一般exe会使用7z压缩,压缩管理器一般会自动识别压缩方式 解压后得到如下结构:
.
├── $PLUGINSDIR
├── bin
├── cli.bat
├── cli.js
├── code
├── credits.html
├── d3dcompiler_47.dll
├── dll
├── ffmpeg.dll
├── icudtl.dat
├── libEGL.dll
├── libGLESv2.dll
├── locales
├── node.dll
├── node.exe
├── notification_helper.exe
├── nw_100_percent.pak
├── nw_200_percent.pak
├── nw.dll
├── nw_elf.dll
├── resources.pak
├── swiftshader
├── v8_context_snapshot.bin
├── wechatdevtools.exe
├── wxfilewatcher.exe
├── wxfilewatcher_x64.exe
├── 卸载微信开发者工具.exe.nsis
└── 微信开发者工具.exe
使用wine逐个打开exe文件
打开wechatdevtools.exe
可以看到这是一个nw.js
应用:
在官网能够看到支持的平台,是支持Linux的,那么移植的可能性大大增加了
- Windows 64-bit
- Windows 32-bit
- Linux 64-bit
- Linux 32-bit
- Mac OS X 64-bit
在文档的Getting Started
可以了解到基本的应用结构
.
├── 应用代码
└── package.json
查找解压后的文件夹可以找到类似结构,位于:code/package.nw
,这就是应用的主要代码所在了。
打开cli.bat
:
@echo off
set CALLING_DIR=%CD%
cd /d %~dp0
.\node.exe .\cli.js %*
cd "%CALLING_DIR%"
使用node
执行cli.js
并传入参数
这个用shell脚本与Linux的node实现,问题不大
.
├── $PLUGINSDIR
├── bin ------里面放着adb, 处理起来问题不大
├── cli.bat ------cli
├── cli.js
├── code ------代码存放处
├── credits.html
├── d3dcompiler_47.dll
├── dll
├── ffmpeg.dll
├── icudtl.dat
├── libEGL.dll
├── libGLESv2.dll
├── locales
├── node.dll
├── node.exe -----nodejs
├── notification_helper.exe
├── nw_100_percent.pak
├── nw_200_percent.pak
├── nw.dll
├── nw_elf.dll
├── resources.pak
├── swiftshader
├── v8_context_snapshot.bin
├── wechatdevtools.exe ----nwjs
├── wxfilewatcher.exe
├── wxfilewatcher_x64.exe
├── 卸载微信开发者工具.exe.nsis
└── 微信开发者工具.exe -----启动器