Migrate from node-webkit to NW.js.
[pwl6.git] / tools / nw-linux-wrapper
index d13e39f..9e229f8 100755 (executable)
 SELF=$(readlink -f "$0")
 NWDIR=$(dirname "$SELF")/nw
 NWBIN=$(command -v "$NWDIR/nw" nw | head -n 1)
+NWFLAGS="--enable-webgl --ignore-gpu-blacklist"
 PACKAGE="$NWDIR/package.nw"
 
 if [ ! -x "$NWBIN" ]; then
-    echo "node-webkit (nw) executable could not be found." >&2
+    echo "NW.js (nw) executable could not be found." >&2
     exit 127
 fi
 
-"$NWBIN" "$@" "$PACKAGE"
+"$NWBIN" $NWFLAGS "$@" "$PACKAGE"
 if [ "$?" = "127" -a -w "$NWBIN" ]; then
     echo "Applying libudev.so.1 hack." >&2
     sed -i 's/udev\.so\.0/udev.so.1/g' "$NWBIN"
-    "$NWBIN" "$@" "$PACKAGE"
+    "$NWBIN" $NWFLAGS "$@" "$PACKAGE"
 fi