Update with more iOS details.
[pwl6.git] / tools / nw-linux-wrapper
1 #!/bin/sh
2
3 # https://github.com/nwjs/nw.js/issues/136
4 # https://github.com/nwjs/nw.js/wiki/The-solution-of-lacking-libudev.so.0
5 #
6 # A fix has landed in Chromium (but not in NW.js yet)
7 # https://code.google.com/p/chromium/issues/detail?id=415212
8 #
9 # Though that page would be more accurately titled "apparently even
10 # Intel, Google, and every commercial distribution can't be bothered
11 # to maintain trivial compatibility on desktop Linux."
12
13 SELF=$(readlink -f "$0")
14 NWDIR=$(dirname "$SELF")/nw
15 NWBIN=$(command -v "$NWDIR/nw" nw | head -n 1)
16 NWFLAGS="--enable-webgl --ignore-gpu-blacklist"
17 PACKAGE="$NWDIR/package.nw"
18
19 if [ ! -x "$NWBIN" ]; then
20 echo "NW.js (nw) executable could not be found." >&2
21 exit 127
22 fi
23
24 "$NWBIN" $NWFLAGS "$@" "$PACKAGE"
25 if [ "$?" = "127" -a -w "$NWBIN" ]; then
26 echo "Applying libudev.so.1 hack." >&2
27 sed -i 's/udev\.so\.0/udev.so.1/g' "$NWBIN"
28 "$NWBIN" $NWFLAGS "$@" "$PACKAGE"
29 fi