]> khamidou — GitHub mirrors - electron.git/commitdiff
docs: How to use asar archive with unpacked files
authorCheng Zhao <zcbenz@gmail.com>
Sat, 21 Mar 2015 11:11:15 +0000 (19:11 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Sat, 21 Mar 2015 11:11:15 +0000 (19:11 +0800)
docs/tutorial/application-packaging.md

index cb95fd487d406f55886383861e28390130f18afd..f7c18b9c6a46fcea6b0b5ac87e6ec74e54b74ddf 100644 (file)
@@ -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