From: Cheng Zhao Date: Sat, 21 Mar 2015 11:11:15 +0000 (+0800) Subject: docs: How to use asar archive with unpacked files X-Git-Tag: v0.22.2~10^2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=f5dc8fc80d529110b8faf7f1ecf01450a3a5cbed;p=electron.git docs: How to use asar archive with unpacked files --- diff --git a/docs/tutorial/application-packaging.md b/docs/tutorial/application-packaging.md index cb95fd48..f7c18b9c 100644 --- a/docs/tutorial/application-packaging.md +++ b/docs/tutorial/application-packaging.md @@ -142,6 +142,22 @@ archives is generated by guessing, because those files do not exist on the filesystem. So you should not trust the `Stats` object except for getting file size and checking file type. -## Unpacking files in `asar` archive +## Adding unpacked files in `asar` archive + +As stated above, some Node APIs will unpack the file to filesystem when +calling, apart from the performance issues, it could also lead to false alerts +of virus scanners. + +To work around this, you can unpack some files creating archives by using the +`--unpack` option, an example of excluding shared libraries of native modules +is: + +```bash +$ asar pack app app.asar --unpack *.node +``` + +After running the command, apart from the `app.asar`, there is also an +`app.asar.unpacked` folder generated which contains the unpacked files, you +should copy it together with `app.asar` when shipping it to users. [asar]: https://github.com/atom/asar