jaruba / wcjs-player

Node Player made for WebChimera.js (libVLC wrapper)
http://webchimera.org/
GNU Lesser General Public License v2.1
178 stars 46 forks source link

WCJS player in Elecrton app doesn't work after it has been compiled #68

Closed skaynetmen closed 8 years ago

skaynetmen commented 8 years ago

If I start Electron without compilation - it works perfect. But if I compile it with electron-packager - player doesn't work and shows the black screen.

6e5a08fe75

OS X 10.10.5 electron 1.2.6 wcjs-player 6.0.1 wcjs-prebuilt 3.0.0

a similar problem https://github.com/jaruba/wcjs-player/issues/21

RSATom commented 8 years ago

Binary modules will not work if packaged to any archive.

skaynetmen commented 8 years ago

Binary modules will not work if packaged to any archive.

Yes, I understand, but this is an package for os x

RSATom commented 8 years ago

this is an package for os x

i.e. bundle in Apple terms.

It's just folder, so look inside, and check all binary modules are there.

skaynetmen commented 8 years ago

i.e. bundle in Apple terms. It's just folder, so look inside, and check all binary modules are there.

I replaced webchimera's files in electron.app and everything starts to work. Thank you!

heuuLZP commented 7 years ago

I have the same problem in OSX . I can't understand your answer.

I am not found bundle . What should I do ? @skaynetmen @RSATom

This is contents of electron.app .

image

skaynetmen commented 7 years ago

@heuuLZP

screenshot

Contents/Resources/app/node_modules/wcjs-prebuilt/

heuuLZP commented 7 years ago

I know this folder 'Contents/Resources/app/node_modules/wcjs-prebuilt/' , and then ?

image

RSATom commented 7 years ago

It's hard to explain in details, but usually problem is in symlinks inside lib folder. So just extract files from archive for Mac OS X from releases page

skaynetmen commented 7 years ago

@heuuLZP Download WebChimera.js_v0.2.7_electron_v1.4.13_VLC_v2.2.4_x64_osx.tar.gz from https://github.com/RSATom/WebChimera.js/releases and replace files in Contents/Resources/app/node_modules/wcjs-prebuilt/bin/

heuuLZP commented 7 years ago

Before asking questions ,I download WebChimera.js_v0.2.7_electron_v1.4.13_VLC_v2.2.4_x64_osx.tar

Just now I replaced the contents of the folder bin , it's work !

thank you very much.

heuuLZP commented 7 years ago

@skaynetmen Hi , I have a question , can you help me ?

Now I need to package the app to app.asar , you know the asar is can't open , so I can't replace these vlc's files.

Very large package using electron-package , so I using electron-builder ,and pack to dmg , but it's no app filder .

skaynetmen commented 7 years ago

Hi @heuuLZP

https://github.com/electron/asar npm install -g asar

asar extract /path/to/app.asar ~/tmp

replace bin files in ~/tmp

asar pack ~/tmp ~/app.asar

cp ~/app.asar /path/to/app.asar

heuuLZP commented 7 years ago

I understand your solution , but there have some questions about your answer.

skaynetmen commented 7 years ago

Have you tried to replace the files in the project folder before packaging?

If it still did not work, then there are 2 ways: Do dmg manually, or try using the afterPack/beforeBuild callback function in https://github.com/electron-userland/electron-builder/wiki/Options#Config

Or Options.Config

asar: false, extraResources: [ //list webchimera bin files FilePattern ]

heuuLZP commented 7 years ago

YES. I had try that . It's has replaced files inner asar . It's not work .

I want to only the asar , don't have app folder, but can't work .

I have an important question . The asar is not secrecy ,because people can use asar extract /path/to/app.asar ~/tmp to get resource .

skaynetmen commented 7 years ago

Yes it is. Anyone can access the app files if they want to)