You can clone with HTTPS or Subversion.
Clone in Desktop Download ZIPDue to the removal of `libudev0` and its associated library `libudev.so.0`, node-webkit isn’t able to run on newer distributions such as:
…and possibly others. Until node-webkit is updated to depend on the currently shipped version `libudev.so.1`, the following solutions should provide a stopgap measure for packaging your applications.
1. Create a local symlink to `libudev.so.1`
Same as above install `libudev1` if needed. Now create a local symlink to `libudev.so.1`. On Ubuntu for example, run from the directory where nw files are extracted:
# ln -s /lib/x86_64-linux-gnu/libudev.so.1 ./libudev.so.0Then create a shell script to run nw:
#!/bin/sh
LD_LIBRARY_PATH=/home/omi/nw:$LD_LIBRARY_PATH ./nw $*As you are only modifying local contents of node-webkit directory, this option should not have an impact on the overall stability of your system. However, note that with this method, when the script’s process is killed, its nw child process might not die.
2. Use a wrapper shell script for your application.
In this method, we rename the binary executable file as `myapp-bin`, and then create a shell script named `myapp` as the following. Users will then run the `myapp` file to launch your application.
#!/bin/bash
MYAPP_WRAPPER="`readlink -f "$0"`"
HERE="`dirname "$MYAPP_WRAPPER"`"
# Always use our versions of ffmpeg libs.
# This also makes RPMs find our library symlinks.
export LD_LIBRARY_PATH=$([ -n "$LD_LIBRARY_PATH" ] && echo "$HERE:$HERE/lib:$LD_LIBRARY_PATH" || echo "$HERE:$HERE/lib")
exec -a "$0" "$HERE/myapp-bin" "$@"In the postinstall script of your DEB or RPM package, run the following script to create a local symlink. Use this together with the previous wrapper script.
#!/bin/bash
paths=(
"/lib/x86_64-linux-gnu/libudev.so.1" # Ubuntu, Xubuntu, Mint
"/usr/lib64/libudev.so.1" # SUSE, Fedora
"/usr/lib/libudev.so.1" # Arch, Fedora 32bit
"/lib/i386-linux-gnu/libudev.so.1" # Ubuntu 32bit
)
for i in "${paths[@]}"
do
if [ -f $i ]
then
ln -sf "$i" /opt/myapp/libudev.so.0
break
fi
done3. Modify the nw binary itself
In this method, we navigate (via command line) to the directory containing the nw binary and run the following:
sed -i 's/udev\.so\.0/udev.so.1/g' nwAs should be obvious, this method comes with increased risk of damaging the nw executable and should only be attempted by skilled users which understand what the command is doing.