X-Git-Url: https://git.yukkurigames.com/?p=pwl6.git;a=blobdiff_plain;f=tools%2Fnw-linux-wrapper;h=5dfd68702feee1e13d8f050e424c43de41704620;hp=d13e39fbe5928dfd5447541e54d1a372bff1ae00;hb=fa194684cec12c5e2099e55897c6fb976b6adc80;hpb=d2962105772fbdc548118bd65cd5bb4934e66085 diff --git a/tools/nw-linux-wrapper b/tools/nw-linux-wrapper index d13e39f..5dfd687 100755 --- a/tools/nw-linux-wrapper +++ b/tools/nw-linux-wrapper @@ -1,7 +1,10 @@ #!/bin/sh -# https://github.com/rogerwang/node-webkit/issues/136 -# https://github.com/rogerwang/node-webkit/wiki/The-solution-of-lacking-libudev.so.0 +# https://github.com/nwjs/nw.js/issues/136 +# https://github.com/nwjs/nw.js/wiki/The-solution-of-lacking-libudev.so.0 +# +# A fix has landed in Chromium (but not in NW.js yet) +# https://code.google.com/p/chromium/issues/detail?id=415212 # # Though that page would be more accurately titled "apparently even # Intel, Google, and every commercial distribution can't be bothered @@ -10,16 +13,17 @@ 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