aboutsummaryrefslogtreecommitdiffstats
path: root/make/jawt-win32.cfg
blob: 7f9d74e7b708e582d8790259b8ca793682600427 (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
# This .cfg file is used to generate the interface to the JAWT, which
# is used by the WindowsOnscreenGLContext.
Style AllStatic
Package com.sun.opengl.impl
JavaClass JAWTFactory
JavaOutputDir ..\build\gensrc\classes
NativeOutputDir ..\build\gensrc\native\jogl

HierarchicalNativeOutput false

Opaque boolean jboolean
Opaque long HDC

IgnoreField JAWT GetComponent
IgnoreField JAWT_DrawingSurfaceInfo      platformInfo
IgnoreField JAWT_Win32DrawingSurfaceInfo null
IgnoreField JAWT_Win32DrawingSurfaceInfo hpalette

IncludeAs CustomJavaCode JAWT jawt-CustomJavaCode.java

CustomCCode #include <jawt.h>
CustomCCode /* This typedef is only needed for VC6 */
CustomCCode #if _MSC_VER <= 1200
CustomCCode typedef int intptr_t;
CustomCCode #endif

import java.security.*
Import com.sun.opengl.impl.JAWT_PlatformInfo
StructPackage JAWT_Win32DrawingSurfaceInfo com.sun.opengl.impl.windows
EmitStruct JAWT_Win32DrawingSurfaceInfo
Implements JAWT_Win32DrawingSurfaceInfo JAWT_PlatformInfo

CustomJavaCode JAWT_DrawingSurfaceInfo   public JAWT_PlatformInfo platformInfo() {
CustomJavaCode JAWT_DrawingSurfaceInfo     return platformInfo0(getBuffer());
CustomJavaCode JAWT_DrawingSurfaceInfo   }
CustomJavaCode JAWT_DrawingSurfaceInfo   private native JAWT_PlatformInfo platformInfo0(Buffer jthis0);
a> 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106
#! /bin/sh

THISDIR=$(pwd)

BUILDDIR=$1
shift
BUILDDIR_GLUEGEN=$1
shift
if [ -z "$BUILDDIR" -o -z "$BUILDDIR_GLUEGEN" ] ; then 
    echo "usage $0 <BUILDDIR-JOGL> <BUILDDIR-GLUEGEN> [-pack200]"
    exit 1
fi

STATDIR=$BUILDDIR-stats

pack200=0
if [ "$1" = "-pack200" ] ; then
    pack200=1
fi

function report() {
    #ls -1 -s --block-size=1024 $*
    #ls -1 -s --block-size=1024 $* | awk ' BEGIN { sum=0 ; } { sum=sum+$1; } END { printf("%d Total\n", sum); }'
    du -ksc $*
}

OSS=x11
ARCH=linux-amd64

function listdeployment() {
    JAR_SUFFIX=$1
    shift

    echo JOGL Deployment Payload for $JAR_SUFFIX
    echo

    echo JOGL ALL
    report gluegen-rt.$JAR_SUFFIX jogl.all.$JAR_SUFFIX libgluegen-rt.so.gz libnativewindow_awt.so.gz libnativewindow_x11.so.gz libjogl_desktop.so.gz libnewt.so.gz
    echo

    echo JOGL ALL no AWT
    report gluegen-rt.$JAR_SUFFIX jogl.all-noawt.$JAR_SUFFIX libgluegen-rt.so.gz libnativewindow_x11.so.gz libjogl_desktop.so.gz libnewt.so.gz
    echo

    echo JOGL Android - mobile egl es1 es2
    report gluegen-rt.$JAR_SUFFIX jogl.all-android.$JAR_SUFFIX libgluegen-rt.so.gz libjogl_mobile.so.gz
    echo
}

rm -rf $STATDIR
mkdir -p $STATDIR
cp -a $BUILDDIR/lib/*.so $STATDIR
cp -a $BUILDDIR/jar/*    $STATDIR
cp -a $BUILDDIR_GLUEGEN/gluegen-rt.jar $STATDIR
cp -a $BUILDDIR_GLUEGEN/obj/libgluegen-rt.so $STATDIR

cd $STATDIR

rm -rf nope
mkdir -p nope/atomic
mv gluegen*jar *-natives*.jar nope/
mv atomic/gluegen-gl.jar nope/atomic

for i in *.so ; do
    gzip $i
done

echo Native Libraries
report *.gz
echo

rm -f *.lst

for i in *.jar atomic/*.jar ; do
    fname=$i
    bname=$(dirname $fname)/$(basename $fname .jar)
    echo list $fname to $bname.lst
    jar tf $fname | grep class | sort > $bname.lst
done

echo duplicates in atomics
echo
sort atomic/jogl*.lst | uniq -d

cat atomic/*.lst | sort -u > allparts.lst
mv nope/*jar .
cat jogl.all.lst gluegen-rt.lst  | sort -u > allall.lst

echo all vs allparts delta
echo
diff -Nur allparts.lst allall.lst

mv nope/* .

listdeployment jar

if [ $pack200 -eq 1 ] ; then
    for i in *.jar ; do
        fname=$i