linux运行微信开发者工具,我是nixos使用flatpack
相关项目msojocs/wechat-web-devtools-linux,我不能直接使用,作以下修改
推荐还是下载wine版本的,毕竟官方的兼容性更高一点
# 下载,并解压
WeChat_Dev_Tools_v1.06.2207210-continuous_x86_64_wine
# 使用exec重新对exe文件进行链接
╭─jcleng@nixos ~/desktop/work/flatpack/wechat_dev_tool/WeChat_Dev_Tools_v1.06.2207210-continuous_x86_64_wine/package.nw/node_modules/wcc-exec
╰─$ ls
wcc.exe wcc.exe.bak wcsc.exe wcsc.exe.bak
flatpack配置文件 manifest.json, 把所有的sdk/extensions/base的依赖手动全部安装好,都是x86_64/21.08
{
"id": "org.jcleng.wechat_web_devtools_linux",
"runtime": "org.freedesktop.Platform",
"runtime-version": "21.08",
"sdk": "org.freedesktop.Sdk/x86_64/21.08",
"sdk-extensions": [
"org.freedesktop.Sdk.Extension.node12",
"org.freedesktop.Sdk.Compat.i386",
"org.freedesktop.Sdk.Extension.toolchain-i386"
],
"command": "run.sh",
"finish-args": [
"--share=ipc",
"--socket=x11",
"--socket=wayland",
"--share=network",
"--filesystem=host",
"--allow=multiarch"
],
"base": "org.winehq.Wine",
"base-version": "stable-21.08",
"add-extensions": {
"org.freedesktop.Platform.Compat.i386": {
"directory": "lib/i386-linux-gnu",
"version": "21.08"
}
},
"inherit-extensions": [
"org.winehq.Wine.gecko",
"org.winehq.Wine.mono",
"org.winehq.Wine.DLLs"
],
"modules": [
{
"name": "wechat-devtools",
"buildsystem": "simple",
"build-commands": [
"ls",
"mkdir -p /app/bin/wechat-devtools",
"cp ./run.sh /app/bin/",
"cp -r ./WeChat_Dev_Tools_v1.06.2207210-continuous_x86_64_wine/* /app/bin/wechat-devtools",
"ls /app/bin/",
"mkdir -p /app/share/applications/",
"mkdir -p /app/share/icons/hicolor/scalable/apps/",
"install -Dm644 wechat-devtools.desktop /app/share/applications/org.jcleng.wechat_web_devtools_linux.desktop",
"install -Dm644 wechat-devtools.svg /app/share/icons/hicolor/scalable/apps/wechat-devtools.svg",
"mkdir -p /app/bin/wechat-devtools/nwjs/code/package.nw",
"cp -r /app/bin/wechat-devtools/package.nw/* /app/bin/wechat-devtools/nwjs/code/package.nw/",
"echo --------",
"ls /app/bin/"
],
"sources": [
{
"type": "dir",
"path": "./"
}
]
}
]
}
构建即可
flatpak-builder --user --install --force-clean build-dir manifest.json
# 测试用的 https://github.com/dingyong0214/ThorUI 可以运行
# 自己的项目不能跑的都能跑了