Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

asar smart unpack unpacks the whole lzma-native module #1738

Closed
jviotti opened this issue Jun 22, 2017 · 7 comments · May be fixed by qcif/data-curator#563
Closed

asar smart unpack unpacks the whole lzma-native module #1738

jviotti opened this issue Jun 22, 2017 · 7 comments · May be fixed by qcif/data-curator#563
Labels

Comments

@jviotti
Copy link
Member

jviotti commented Jun 22, 2017

  • Version: 19.4.0
  • Target: dmg

From #1723.

Enabling smartUnpack causes the whole lzma-native module to be unpacked for some reason.

$ ls dist/mac/Etcher.app/Contents/Resources/app.asar.unpacked/node_modules
lzma-native/
$ ls dist/mac/Etcher.app/Contents/Resources/app.asar.unpacked/node_modules/lzma-native
LICENSE            binding/           build/             deps/              liblzma-build.sh*  node_modules/      src/
bin/               binding.gyp        cflags.sh*         index.js           liblzma-config.sh* package.json

Try to build Etcher (https://github.com/resin-io/etcher) for an example.

@develar
Copy link
Member

develar commented Jun 23, 2017

Unpacked, because of lzma-native/deps/bin_x86-64/liblzma.dll But definitely dll is not required for macOS app. We should skip such files at all.

@develar
Copy link
Member

develar commented Jun 23, 2017

Another reason — lzma-native/build/liblzma/xz-5.2.3/tests/compress_prepared_bcj_sparc Solution — electron-builder will also ignore such files (test only, not requited for production).

develar added a commit to develar/electron-builder that referenced this issue Jun 23, 2017
@develar
Copy link
Member

develar commented Jun 23, 2017

BTW – highly recommended to use yarn and yarn clean (but do not rely on default yarn clean file, please use only https://github.com/develar/onshape-desktop-shell/blob/master/.yarnclean, because *.yml rule must be removed (yml files requited for NSIS).

develar added a commit to develar/electron-builder that referenced this issue Jun 23, 2017
@develar
Copy link
Member

develar commented Jun 23, 2017

Haven't yet time to inspect your app, but this particular feature is implemented.

@develar
Copy link
Member

develar commented Jun 23, 2017

Please note — for windows will be still unpacked because of DLL.

@jviotti
Copy link
Member Author

jviotti commented Jun 23, 2017

Awesome, thanks a lot for the quick fix. Please let me know when you publish this to npm.

BTW – highly recommended to use yarn and yarn clean (but do not rely on default yarn clean file, please use only https://github.com/develar/onshape-desktop-shell/blob/master/.yarnclean, because *.yml rule must be removed (yml files requited for NSIS).

Yeah, we've been wanting to move to Yarn for a while, but there are some issues with optional dependencies that prevented us from adopting it. There were some yarn tickets we were tracking for this, so maybe a good time to give it another go.

@develar
Copy link
Member

develar commented Jun 23, 2017

when you publish this to npm.

19.8.0 released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants