Skip to content

Commit

Permalink
GlueGen/JOGL Windows x86 x86_64 Builds
Browse files Browse the repository at this point in the history
x86: Using mingw 20100514, gcc 4.5.0
    - clean
    - passed all junit.run tests

x86_64: Using mingw-w64-bin_x86_64-mingw_20100515_sezero.zip, gcc 4.4.5 20100513
    - clean
    - passed most junit.run tests, still buggy
  • Loading branch information
sgothel committed May 16, 2010
1 parent d86ab08 commit 8e7d075
Show file tree
Hide file tree
Showing 7 changed files with 106 additions and 21 deletions.
10 changes: 8 additions & 2 deletions make/build.xml
Expand Up @@ -214,13 +214,19 @@
<property name="linker.cfg.id" value="linker.cfg.win32.msvc" />
</target>

<target name="declare.win32.mingw" if="isMingW">
<target name="declare.win32.mingw" if="isMingW32">
<echo message="Win32.MingW" />
<property name="compiler.cfg.id" value="compiler.cfg.win32.mingw" />
<property name="linker.cfg.id" value="linker.cfg.win32.mingw" />
</target>

<target name="declare.win32" depends="declare.win32.vc6,declare.win32.vc7,declare.win32.vc8,declare.win32.vc8_x64,declare.win32.vc9,declare.win32.mingw" if="isWindows" >
<target name="declare.win64.mingw" if="isMingW64">
<echo message="Win64.MingW" />
<property name="compiler.cfg.id" value="compiler.cfg.win64.mingw" />
<property name="linker.cfg.id" value="linker.cfg.win64.mingw" />
</target>

<target name="declare.win32" depends="declare.win32.vc6,declare.win32.vc7,declare.win32.vc8,declare.win32.vc8_x64,declare.win32.vc9,declare.win32.mingw,declare.win64.mingw" if="isWindows" >
<property name="c.src.dir.os" value="windows" />
<property name="java.includes.dir.platform" value="${java.includes.dir}/win32" />
</target>
Expand Down
69 changes: 58 additions & 11 deletions make/gluegen-cpptasks-base.xml
Expand Up @@ -76,7 +76,8 @@
- isVC8_X64
- isVC8Family (= isVC8 || isVC8_X64 || isVC9) (requires manifest in DLL)
- isVC9
- isMingW
- isMingW32 (isMingW)
- isMingW64 (isMingW)
-
- The gluegen.cpptasks.configure.compiler target initializes several
- cpptasks compiler and linker configurations designed to support
Expand All @@ -93,6 +94,7 @@
- compiler.cfg.solaris
- compiler.cfg.solaris.sparcv9
- compiler.cfg.solaris.amd64
- compiler.cfg.win64.mingw
- compiler.cfg.win32.mingw
- compiler.cfg.win32.msvc
- compiler.cfg.macosx
Expand All @@ -103,6 +105,7 @@
- linker.cfg.solaris
- linker.cfg.solaris.sparcv9
- linker.cfg.solaris.amd64
- linker.cfg.win64.mingw
- linker.cfg.win32.mingw
- linker.cfg.win32.msvc
- linker.cfg.macosx
Expand Down Expand Up @@ -394,7 +397,10 @@
<and>
<istrue value="${isWindows}" />
<not>
<equals arg1="${win32.c.compiler}" arg2="mingw" />
<or>
<equals arg1="${win32.c.compiler}" arg2="mingw32" />
<equals arg1="${win32.c.compiler}" arg2="mingw64" />
</or>
</not>
</and>
</condition>
Expand Down Expand Up @@ -435,12 +441,24 @@
<istrue value="${isVC9}" />
</or>
</condition>
<condition property="isMingW">
<condition property="isMingW64">
<and>
<istrue value="${isWindows}" />
<equals arg1="${win32.c.compiler}" arg2="mingw64" />
</and>
</condition>
<condition property="isMingW32">
<and>
<istrue value="${isWindows}" />
<equals arg1="${win32.c.compiler}" arg2="mingw" />
<equals arg1="${win32.c.compiler}" arg2="mingw32" />
</and>
</condition>
<condition property="isMingW">
<or>
<isset property="isMingW32" />
<isset property="isMingW64" />
</or>
</condition>
<condition property="WindowsFailure">
<and>
<istrue value="${isWindows}" />
Expand All @@ -449,7 +467,8 @@
<isfalse value="${isVC8}" />
<isfalse value="${isVC8_X64}" />
<isfalse value="${isVC9}" />
<isfalse value="${isMingW}" />
<isfalse value="${isMingW32}" />
<isfalse value="${isMingW64}" />
</and>
</condition>
<fail message="Must specify either win32.c.compiler in e.g. gluegen.properties or use e.g. win32.vc6 build target" if="WindowsFailure" />
Expand All @@ -459,6 +478,8 @@
<echo message="VC8_X64=${isVC8_X64}" />
<echo message="VC9=${isVC9}" />
<echo message="MingW=${isMingW}" />
<echo message="MingW32=${isMingW32}" />
<echo message="MingW64=${isMingW64}" />

<condition property="isVC7Debug">
<and>
Expand Down Expand Up @@ -557,12 +578,27 @@
<define name="NDEBUG" unless="c.compiler.use-debug"/>

<define name="DBUILD_DLL" />
<define name="_WINGDI_" />
<define name="_STRICT_ANSI" />
<define name="_JNI_IMPLEMENTATION_" />
<define name="MINGW" />
<define name="WINVER" value="0x0500"/> <!-- set windows version to >= Windows 2000 -->
<define name="_WIN32_WINNT" value="0x0500"/> <!-- set windows version to >= Windows 2000 -->
<define name="WINVER" value="0x0501"/> <!-- set windows version to >= Windows XP -->
<define name="_WIN32_WINNT" value="0x0501"/> <!-- set windows version to >= Windows XP -->
</defineset>
</compiler>

<compiler id="compiler.cfg.win64.mingw" name="gcc">
<compilerarg value="-g" if="c.compiler.use-debug"/>
<compilerarg value="-O0" if="c.compiler.use-debug"/>
<compilerarg value="-O2" unless="c.compiler.use-debug"/>
<defineset>
<define name="_DEBUG" if="c.compiler.use-debug"/>
<define name="DEBUG" if="c.compiler.use-debug"/>
<define name="NDEBUG" unless="c.compiler.use-debug"/>

<define name="DBUILD_DLL" />
<define name="_STRICT_ANSI" />
<define name="_JNI_IMPLEMENTATION_" />
<define name="WINVER" value="0x0501"/> <!-- set windows version to >= Windows XP -->
<define name="_WIN32_WINNT" value="0x0501"/> <!-- set windows version to >= Windows XP -->
</defineset>
</compiler>

Expand Down Expand Up @@ -673,6 +709,11 @@
<linkerarg value="-Wl,--kill-at" /> <!-- remove @ from function names, ie no __stdcall @nn -->
</linker>

<linker id="linker.cfg.win64.mingw" name="gcc" incremental="false">
<linkerarg value="-m64"/>
<linkerarg value="-Wl,--kill-at" /> <!-- remove @ from function names, ie no __stdcall @nn -->
</linker>

<linker id="linker.cfg.win32.msvc" name="msvc" incremental="false">
<linkerarg value="/OPT:REF,ICF" /> <!-- enable link-time optimisations -->
<linkerarg value="/SUBSYSTEM:WINDOWS" /> <!-- output is not a console app as uses WinMain entry point -->
Expand Down Expand Up @@ -732,13 +773,19 @@
<property name="linker.cfg.id.base" value="linker.cfg.win32.msvc" />
</target>

<target name="gluegen.cpptasks.declare.compiler.win32.mingw" if="isMingW">
<target name="gluegen.cpptasks.declare.compiler.win32.mingw" if="isMingW32">
<echo message="Win32.MingW" />
<property name="compiler.cfg.id.base" value="compiler.cfg.win32.mingw" />
<property name="linker.cfg.id.base" value="linker.cfg.win32.mingw" />
</target>

<target name="gluegen.cpptasks.declare.compiler.win32" depends="gluegen.cpptasks.declare.compiler.win32.vc6,gluegen.cpptasks.declare.compiler.win32.vc7,gluegen.cpptasks.declare.compiler.win32.vc8,gluegen.cpptasks.declare.compiler.win32.vc8_x64,gluegen.cpptasks.declare.compiler.win32.vc9,gluegen.cpptasks.declare.compiler.win32.mingw" if="isWindows">
<target name="gluegen.cpptasks.declare.compiler.win64.mingw" if="isMingW64">
<echo message="Win64.MingW" />
<property name="compiler.cfg.id.base" value="compiler.cfg.win64.mingw" />
<property name="linker.cfg.id.base" value="linker.cfg.win64.mingw" />
</target>

<target name="gluegen.cpptasks.declare.compiler.win32" depends="gluegen.cpptasks.declare.compiler.win32.vc6,gluegen.cpptasks.declare.compiler.win32.vc7,gluegen.cpptasks.declare.compiler.win32.vc8,gluegen.cpptasks.declare.compiler.win32.vc8_x64,gluegen.cpptasks.declare.compiler.win32.vc9,gluegen.cpptasks.declare.compiler.win32.mingw,gluegen.cpptasks.declare.compiler.win64.mingw" if="isWindows">
<property name="java.includes.dir.platform" value="${java.includes.dir}/win32" />
<property name="java.lib.dir.platform" value="${java.home.dir}/lib" />
</target>
Expand Down
18 changes: 16 additions & 2 deletions make/gluegen-properties.xml
Expand Up @@ -7,7 +7,7 @@
- externally:
-
- win32.c.compiler (required to be set on Windows):
- one of "vc6", "vc7", "vc8", or "mingw".
- one of "vc6", "vc7", "vc8", "mingw32" (default) or "mingw64".
- c.compiler.debug:
- set to "true" if debug version of the compiled
- C code is desired.
Expand Down Expand Up @@ -41,7 +41,21 @@
<echo message="Loaded ${gluegen.user.properties.file.set}." />
<property name="antlr.jar" value="${gluegen.root}/make/lib/antlr.jar" />
<property name="junit.jar" value="${gluegen.root}/make/lib/junit.jar" />
<property name="win32.c.compiler" value="mingw" />
<condition property="win32.c.compiler" value="mingw64">
<and>
<os family="windows" />
<os arch="amd64" />
</and>
</condition>
<condition property="win32.c.compiler" value="mingw32">
<and>
<os family="windows" />
<or>
<os arch="i386" />
<os arch="x86" />
</or>
</and>
</condition>
<echo message="antlr.jar=${antlr.jar}" />
<echo message="junit.jar=${junit.jar}" />
<echo message="win32.c.compiler=${win32.c.compiler}" />
Expand Down
5 changes: 3 additions & 2 deletions make/gluegen.properties
Expand Up @@ -26,8 +26,9 @@
# on Windows and have the Microsoft Visual C++ compilers installed,
# you can choose an alternate compiler with which to build the native
# code. Valid strings for MS compiler are "vc6", "vc7", "vc8", "vc8_x64", "vc9".
# Otherwise MinGW is used, hence the default value "mingw".
# win32.c.compiler=mingw
# Valid strings for GCC are "mingw32", "mingw64".
# MinGW is used per default, hence the default value "mingw32".
# win32.c.compiler=mingw32

# MacOsX libraries can be universal / fat binaries.
# The following switches enables/disables a target platform.
Expand Down
4 changes: 2 additions & 2 deletions make/scripts/make.gluegen.all.win32.bat
@@ -1,7 +1,7 @@
set THISDIR="C:\JOGL"

set J2RE_HOME=c:\jre1.6.0_19
set JAVA_HOME=c:\jdk1.6.0_19
set J2RE_HOME=c:\jre1.6.0_20_x32
set JAVA_HOME=c:\jdk1.6.0_20_x32
set ANT_PATH=C:\apache-ant-1.8.0

set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;c:\mingw\bin;%PATH%
Expand Down
17 changes: 17 additions & 0 deletions make/scripts/make.gluegen.all.win64.bat
@@ -0,0 +1,17 @@
set THISDIR="C:\JOGL"

set J2RE_HOME=c:\jre1.6.0_20_x64
set JAVA_HOME=c:\jdk1.6.0_20_x64
set ANT_PATH=C:\apache-ant-1.8.0

set PATH=%JAVA_HOME%\bin;%ANT_PATH%\bin;c:\mingw64\bin;c:\mingw\bin;%PATH%

set LIB_GEN=%THISDIR%\lib
set CLASSPATH=.;%THISDIR%\build-win64\classes
REM -Dc.compiler.debug=true
REM -DuseOpenMAX=true
REM -DuseKD=true
REM -Djogl.cg=1 -D-Dwindows.cg.lib=C:\Cg-2.2

ant -Drootrel.build=build-win64 %1 %2 %3 %4 %5 %6 %7 %8 %9 > make.gluegen.all.win64.log 2>&1

4 changes: 2 additions & 2 deletions src/native/windows/WindowsDynamicLinkerImpl_JNI.c
Expand Up @@ -8,8 +8,8 @@
#include <windows.h>
/* This typedef is apparently needed for compilers before VC8,
and for the embedded ARM compilers we're using */
#if (_MSC_VER < 1400) || defined(UNDER_CE)
typedef int intptr_t;
#if !defined(__MINGW64__) && ( (_MSC_VER < 1400) || defined(UNDER_CE) )
typedef int intptr_t;
#endif
/* GetProcAddress doesn't exist in A/W variants under desktop Windows */
#ifndef UNDER_CE
Expand Down

0 comments on commit 8e7d075

Please sign in to comment.