[英]How can I get source files from a compiled Electron application?
how can I unpack a .app Application for Mac OS built with Electron?我怎样才能解压一个用 Electron 构建的 Mac OS 的 .app 应用程序? I want to view the source files, but I don't know how to access them.我想查看源文件,但我不知道如何访问它们。
Generally, Electron apps are bundled using Electron's asar
tool.通常,使用 Electron 的asar
工具捆绑 Electron 应用程序。 Usually, you can unpack the source for these apps using the same tool.通常,您可以使用相同的工具解压缩这些应用程序的源代码。
If the app was bundled using a different tool, you will need to do your own research into whether the bundling process can be trivially reversed.如果应用程序是使用不同的工具捆绑的,您需要自己研究捆绑过程是否可以简单地逆转。
If you don't have asar
installed, you can install it via npm
:如果你没有安装asar
,你可以通过npm
安装它:
npm install -g asar
Then try using asar
to unpack the source:然后尝试使用asar
解压源:
cd /Applications/Slack.app/Contents/Resources
mkdir example-sourcecode
asar extract app.asar example-sourcecode
I found the above information on this blog post .我在这篇博文中找到了上述信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.