Closed oleander closed 9 years ago
@oleander, thanks! I'll look soon.
@oleander, FYI, I've caught the problem, but didn't find the reason yet.
@RSATom Okay, thanks!
@oleander, I've found the reason.
the problem is in this line:
https://github.com/oleander/wcjs-fail/blob/master/deploy.sh#L15
on latest Mac OS X versions, cp
command don't copy symbolic links, but copy binaries it points to. I'm talking about this symlinks: https://github.com/oleander/wcjs-fail/tree/master/lib/vlc/lib.
The solution is copy links some other way, or recreate symlinks after copy.
cp
didn't include the the symlinks. The same apparently goes with electron-packager
. It doesn't include symlinks either. I ended up doing this, which worked.
# Same as before
echo "Build package using electron-packager"
./node_modules/electron-packager/cli.js build/ $APP --out=dist/ --version=$VERSION --icon=assets/icon.icns --platform=darwin --arch=x64
# New
LIBFILE=tmp/libvlc.zip
if [ ! -f $LIBFILE ]; then
echo "Downloading bindings"
wget -N https://github.com/RSATom/WebChimera.js/releases/download/v.0.1.3/libvlc_2.2.1_mac.zip -O $LIBFILE
else
echo "Libfile already exists"
fi
echo "Copy VLC bindings"
unzip -q -o tmp/libvlc.zip -d dist/MyApp-darwin-x64/MyApp.app/Contents/Resources/app/node_modules/wcjs-player/node_modules/wcjs-renderer/node_modules/webchimera.js/build/Release
@RSATom Thanks for your help!
If I just package an Electron app using
electron-packager
(withwcjs-player
as a dependency) everything works fine. But if I move my compiled application the app freezes.I have created a simple application that reproduces this error here: https://github.com/oleander/wcjs-fail
Here's how to use it: Create a binary using
./deploy.sh
. I've included the latest bindings for VLC for OSX. If you're using something else you might have to manually change the deploy script. The script will create a runnable binary in thedist/WCJSFail-darwin-x64
folder. Running the binary from here works, but fails if its moved (i.e to the applications folder).After moving the app and starting it, this is what's shown.
Is there a way to solve it?