aboutsummaryrefslogtreecommitdiffstats
path: root/make/scripts/java-run-all.sh
blob: 0d7e5b21d16b06611b0a29d3da7db52887cd32ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#! /bin/bash

scriptdir=`dirname $0`

function print_usage() {
    echo "Usage: $0 [-libdir pre-lib-dir] jogl-build-dir ..."
}

if [ "$1" = "-libdir" ] ; then
    shift
    if [ -z "$1" ] ; then
        echo libdir argument missing
        print_usage
        exit
    fi
    PRELIB=$1
    shift
    LD_LIBRARY_PATH=$PRELIB:$LD_LIBRARY_PATH
    export LD_LIBRARY_PATH
    # Mesa/Gallium  EGL driver
    EGL_DRIVER=$PRELIB/egl_glx.so
    export EGL_DRIVER
    # unset DRI/ATI ..
    unset LIBGL_DRIVERS_PATH
fi

if [ -z "$1" ] ; then
    echo JOGL BUILD DIR missing
    print_usage
    exit
fi

. $scriptdir/setenv-jogl.sh $1 JOGL_ALL
shift

MOSX=0
uname -a | grep -i Darwin && MOSX=1

# D_ARGS="-Djogamp.debug.ProcAddressHelper=true -Djogamp.debug.NativeLibrary=true -Djogl.debug=all"
# D_ARGS="-Djogamp.debug.ProcAddressHelper=true -Djogamp.debug.NativeLibrary=true -Dnativewindow.debug=all -Djogl.debug=all -Dnewt.debug=all"
# D_ARGS="-Dnativewindow.debug=all -Djogl.debug=all -Dnewt.debug=all -Djogl.debug.GLSLState"
# D_ARGS="-Dnativewindow.debug.X11Util=true -Djogl.debug.GLDrawableFactory=true"
# D_ARGS="-Dnativewindow.debug.X11Util=true"
# D_ARGS="-Dnewt.debug=all -Dnativewindow.debug=all"
# D_ARGS="-Djogl.debug=all -Dnewt.debug=all -Dnativewindow.debug=all"
# D_ARGS="-Dnewt.debug=all"
# D_ARGS="-Dnewt.debug.Window"
# D_ARGS="-Dnewt.debug.Display"
# D_ARGS="-Dnewt.debug.Window -Dnewt.debug.Display"
# D_ARGS="-Dnewt.debug.Window -Dnewt.debug.TestEDTMainThread"
# D_ARGS="-Dnewt.debug.TestEDTMainThread"
# D_ARGS="-Djogl.debug=all -Djogl.debug.DynamicLookup=true -Djogamp.debug.NativeLibrary=true"
# D_ARGS="-Djogl.debug=all"
# D_ARGS="-Djogamp.debug.JNILibLoader=true -Djogamp.debug.NativeLibrary=true -Djogamp.debug.NativeLibrary.Lookup=true -Djogl.debug.GLProfile=true"

rm -f java-run.log

# export LIBGL_DRIVERS_PATH=/usr/lib/fglrx/dri:/usr/lib32/fglrx/dri
# export LIBGL_DEBUG=verbose
echo LIBXCB_ALLOW_SLOPPY_LOCK: $LIBXCB_ALLOW_SLOPPY_LOCK 2>&1 | tee -a java-run.log
echo LIBGL_DRIVERS_PATH: $LIBGL_DRIVERS_PATH 2>&1 | tee -a java-run.log
echo LIBGL_DEBUG: $LIBGL_DEBUG 2>&1 | tee -a java-run.log
echo java $X_ARGS $D_ARGS $* 2>&1 | tee -a java-run.log
java $X_ARGS $D_ARGS $* 2>&1 | tee -a java-run.log