如何解压缩.asar文件?


Answers:


179

从asar文档

(npx此处的使用是为了避免使用asar全局安装该工具npm install -g asar)

提取整个档案:

npx asar extract app.asar destfolder 

提取特定文件:

npx asar extract-file app.asar main.js

使用sudo运行时效果很好。感谢您的回答,您是救命的人:)
— Vikas Bansal

19
该电子文档说:“你也可以打包你的应用程序到ASAR存档,以避免您的应用程序的源代码暴露给用户。” 但是如果您能够解开包装,那不是真的吗?对??
— neoDev

11
旁注:您可以使用安装命令npm install -g asar。
— Mike Chamberlain

8
好的,如何在不安装整个节点开发环境的情况下解压缩asar文件?
— 假名称

24
@FakeName-我在7Zip项目的此线程中使用了7Zip插件:sourceforge.net/p/sevenzip/discussion/45797/thread/74cf1dec允许一个人打开7Zip中的任何ASAR文件。
— MayaPosch

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.