diff options
author | sg215889 <[email protected]> | 2009-07-24 14:29:08 -0700 |
---|---|---|
committer | sg215889 <[email protected]> | 2009-07-24 14:29:08 -0700 |
commit | 0b7a4d59af3ec29740720c4c8d9b249efe06ff5f (patch) | |
tree | 9ddaf55c48000c8a6255185136406f16a94e2fb3 | |
parent | 0906140a18690a9dced8dec12dfdd8cf4c95a4df (diff) |
NEWT: Adding KD if building with OpenGL. Fixing build in case no native library is being build. Fixing KD build for non windows.
-rw-r--r-- | make/build-newt.xml | 28 | ||||
-rw-r--r-- | make/make.jogl.all.linux-x86.sh | 1 | ||||
-rw-r--r-- | make/make.jogl.cdcfp.linux-x86.sh | 1 | ||||
-rwxr-xr-x | src/newt/native/KDWindow.c | 28 |
4 files changed, 40 insertions, 18 deletions
diff --git a/make/build-newt.xml b/make/build-newt.xml index 8ef77c7c7..4895318e0 100644 --- a/make/build-newt.xml +++ b/make/build-newt.xml @@ -97,6 +97,22 @@ </or> </condition> + <condition property="useKD"> + <not> + <isset property="${setup.noOpenGL}" /> + </not> + </condition> + + <condition property="setup.nonatives"> + <and> + <isfalse value="${isWindows}" /> + <isfalse value="${isOSX}" /> + <isfalse value="${isX11}" /> + <isfalse value="${useKD}" /> + </and> + </condition> + + <echo message="setup.nonatives: ${setup.nonatives}" /> <echo message="setup.nodesktop: ${setup.nodesktop}" /> <echo message="setup.noall: ${setup.noall}" /> <echo message="setup.noall-cdc: ${setup.noall-cdc}" /> @@ -104,6 +120,7 @@ <echo message="setup.noAWT: ${setup.noAWT}" /> <echo message="setup.noOpenGL: ${setup.noOpenGL}" /> <echo message="javac.bootclasspath-cdc.jar: ${javac.bootclasspath-cdc.jar}" /> + <echo message="useKD: ${useKD}" /> <!-- partitioning --> @@ -569,7 +586,7 @@ </sequential> </macrodef> - <target name="c.build.newt.prepare.opengl" unless="setup.noOpenGL"> + <target name="c.build.newt.prepare.KD" if="useKD"> <javah destdir="../${rootrel.build.newt}/gensrc/native/newt/KD" classpath="${classes}" class="com.sun.javafx.newt.opengl.kd.KDWindow" /> </target> @@ -579,9 +596,9 @@ <javah destdir="../${rootrel.build.newt}/gensrc/native/newt/X11" classpath="${classes}" class="com.sun.javafx.newt.x11.X11Window" /> </target> - <target name="c.build.newt.prepare" depends="c.build.newt.prepare.opengl,c.build.newt.prepare.desktop" /> + <target name="c.build.newt.prepare" depends="c.build.newt.prepare.KD,c.build.newt.prepare.desktop" /> - <target name="c.build.newt.windowlib"> + <target name="c.build.newt.windowlib" unless="setup.nonatives"> <c.build c.compiler.src.files="c.src.files.newt" output.lib.name="newt" compiler.cfg.id="${compiler.cfg.id}" @@ -593,7 +610,10 @@ <msvc.manifest objdir="${obj}" dllname="newt" /> </target> - <target name="c.build.newt" depends="c.configure,c.build.newt.prepare,c.build.newt.windowlib"> + <target name="c.build.newt.natives" depends="c.build.newt.windowlib" unless="setup.nonatives"> + </target> + + <target name="c.build.newt" depends="c.configure,c.build.newt.prepare,c.build.newt.natives"> <antcall target="c.manifest" inheritRefs="true" /> <!-- Create the Java Web Start jar file for the built native code --> <jar destfile="${build}/newt-natives-${os.and.arch}.jar"> diff --git a/make/make.jogl.all.linux-x86.sh b/make/make.jogl.all.linux-x86.sh index 2b791c6dd..915bacaf3 100644 --- a/make/make.jogl.all.linux-x86.sh +++ b/make/make.jogl.all.linux-x86.sh @@ -19,6 +19,5 @@ ant \ -DisLinux=true \ -DisLinuxX86=true \ -DisX11=true \ - -DuseKD=true \ -DuseOpenMAX=true \ $* 2>&1 | tee make.jogl.all.linux-x86.log diff --git a/make/make.jogl.cdcfp.linux-x86.sh b/make/make.jogl.cdcfp.linux-x86.sh index 67ef9fb65..4a2241669 100644 --- a/make/make.jogl.cdcfp.linux-x86.sh +++ b/make/make.jogl.cdcfp.linux-x86.sh @@ -23,7 +23,6 @@ ant -v \ -DisLinux=true \ -DisLinuxX86=true \ -DisX11=true \ - -DuseKD=true \ -DuseOpenMAX=true \ $* 2>&1 | tee make.jogl.cdcfp.linux-x86.log diff --git a/src/newt/native/KDWindow.c b/src/newt/native/KDWindow.c index 682edff24..8e57237b3 100755 --- a/src/newt/native/KDWindow.c +++ b/src/newt/native/KDWindow.c @@ -39,20 +39,24 @@ #include <stdio.h> #include <string.h> -/* This typedef is apparently needed for Microsoft compilers before VC8, - and on Windows CE */ -#if (_MSC_VER < 1400) || defined(UNDER_CE) - #ifdef _WIN64 - typedef long long intptr_t; +#ifdef _WIN32 + /* This typedef is apparently needed for Microsoft compilers before VC8, + and on Windows CE */ + #if (_MSC_VER < 1400) || defined(UNDER_CE) + #ifdef _WIN64 + typedef long long intptr_t; + #else + typedef int intptr_t; + #endif + #elif _MSC_VER <= 1500 + #ifdef _WIN64 // [ + typedef __int64 intptr_t; + #else // _WIN64 ][ + typedef int intptr_t; + #endif // _WIN64 ] #else - typedef int intptr_t; + #include <inttypes.h> #endif -#elif _MSC_VER <= 1500 - #ifdef _WIN64 // [ - typedef __int64 intptr_t; - #else // _WIN64 ][ - typedef int intptr_t; - #endif // _WIN64 ] #else #include <inttypes.h> #endif |