Codebase list lwjgl / upstream/2.9.3+dfsg
Imported Upstream version 2.9.3+dfsg Markus Koschany 7 years ago
839 changed file(s) with 66274 addition(s) and 12368 deletion(s). Raw diff Collapse all Expand all
66 <import file="platform_build/build-applet.xml"/>
77 <import file="platform_build/build-webstart.xml"/>
88 <import file="platform_build/build-maven.xml"/>
9 <import file="eclipse-update/org.lwjgl.build/build-updatesite.xml"/>
910
1011 <!-- ================================================================== -->
11 <!-- Everything below this line is targets. -->
12 <!-- Do not modify, unless you know what you're doing -->
12 <!-- Everything below this line is targets. -->
13 <!-- Do not modify, unless you know what you're doing -->
1314 <!-- ================================================================== -->
1415
1516 <!-- ================================================================== -->
16 <!-- Initialize build -->
17 <!-- Initialize build -->
1718 <!-- ================================================================== -->
1819 <target name="-initialize">
1920 <mkdir dir="${lwjgl.bin}" taskname="initialiazing bin folder" />
2021 <mkdir dir="${lwjgl.bin}/lwjgl" taskname="initialiazing native bin folder" />
22 <mkdir dir="${lwjgl.bin}/lwjgles" taskname="initialiazing native OpenGL ES bin folder"/>
2123 <mkdir dir="${lwjgl.lib}" taskname="initialiazing lib folder" />
2224 <mkdir dir="${lwjgl.dist}" taskname="initialiazing dist folder" />
2325 <mkdir dir="${lwjgl.docs}/javadoc" taskname="initialiazing docs folder" />
2931 <mkdir dir="${lwjgl.temp}/native" taskname="initialiazing temp/native folder" />
3032 <mkdir dir="${lwjgl.temp}/native/windows" taskname="initialiazing temp/windows folder" />
3133 <mkdir dir="${lwjgl.temp}/native/linux" taskname="initialiazing temp/linux folder" />
34 <mkdir dir="${lwjgl.temp}/native/freebsd" taskname="initialiazing temp/freebsd folder" />
35 <mkdir dir="${lwjgl.temp}/native/openbsd" taskname="initialiazing temp/openbsd folder" />
3236 <mkdir dir="${lwjgl.temp}/native/macosx" taskname="initialiazing temp/macosx folder" />
3337 <mkdir dir="${lwjgl.temp}/native/solaris" taskname="initialiazing temp/solaris folder" />
3438 </target>
4751 <!-- Useful when we need to force native recompilation -->
4852 <target name="clean-native" description="Cleans native files generated by this ant script" depends="clean-generated-native">
4953 <delete dir="${lwjgl.bin}/lwjgl" quiet="true" failonerror="false" taskname="cleaning native bin folder" />
54 <delete dir="${lwjgl.bin}/lwjgles" quiet="true" failonerror="false" taskname="cleaning native OpenGL ES bin folder"/>
5055 </target>
5156
5257 <!-- Creates a distribution of LWJGL -->
5358 <target name="release" description="Creates a distribution of LWJGL using supplied native binaries">
5459 <!-- Warn user -->
55 <echo message="Before running the release target, please manually compile all platforms and place required files in ${lwjgl.lib}/windows, ${lwjgl.lib}/linux and ${lwjgl.lib}/macosx${line.separator}Missing files will result in a successfull built, but with incomplete release zips"/>
60 <echo message="Before running the release target, please manually compile all platforms and place required files in ${lwjgl.lib}/windows, ${lwjgl.lib}/linux, ${lwjgl.lib}/freebsd and ${lwjgl.lib}/macosx${line.separator}Missing files will result in a successfull built, but with incomplete release zips"/>
5661 <input
5762 message="All data in the ${lwjgl.dist} folder will be deleted. Continue? "
5863 validargs="yes,no"
110115 <antcall target="-jars_NoDEP" />
111116 </target>
112117
118 <!-- Create ONLY the jar archives for the ES build -->
119 <target name="jars_es" description="Creates the Java archives ONLY for the ES build and places them in libs/"
120 depends="-initialize, generate-all, compile, -createjars_es">
121 <antcall target="-jars_NoDEP"/>
122 </target>
123
113124 <target name="-jars_NoDEP">
114125 <move todir="libs/">
115126 <fileset dir="${lwjgl.temp}/jar">
123134 <!-- Create lwjgl.jar -->
124135 <jar destfile="${lwjgl.temp}/jar/lwjgl-debug.jar" taskname="lwjgl-debug.jar">
125136 <fileset refid="lwjgl.fileset" />
137 <fileset refid="lwjgl.fileset.dependencies"/>
126138 <manifest>
127139 <attribute name="Sealed" value="true"/>
128140 </manifest>
134146 <!-- Create lwjgl.jar -->
135147 <jar destfile="${lwjgl.temp}/jar/lwjgl.jar" taskname="lwjgl.jar">
136148 <fileset refid="lwjgl.fileset" />
149 <fileset refid="lwjgl.fileset.dependencies"/>
137150 <manifest>
138151 <attribute name="Sealed" value="true"/>
139152 </manifest>
145158 <fileset refid="lwjgl_util_applet.fileset" />
146159 <manifest>
147160 <attribute name="Sealed" value="true"/>
161 <attribute name="Trusted-Library" value="true"/>
162 <attribute name="Permissions" value="all-permissions"/>
163 <attribute name="Codebase" value="*"/>
164 <attribute name="Caller-Allowable-Codebase" value="*"/>
165 <attribute name="Application-Library-Allowable-Codebase" value="*"/>
148166 </manifest>
149167 </jar>
150168
160178 </jar>
161179 </target>
162180
181 <!-- Packages the java files for the ES build -->
182 <target name="-createjars_es">
183 <!-- ================================================================== -->
184 <!-- Generate a list of the OpenGL extension classes -->
185 <!-- ================================================================== -->
186 <fileset id="opengl-template-fileset" dir="${lwjgl.src}/generated/org/lwjgl/opengl" includes="${opengl-template-pattern}"/>
187 <property name="opengl-template-files" refid="opengl-template-fileset"/>
188
189 <tempfile property="temp.file"/>
190 <echo file="${temp.file}" message="${opengl-template-files}" taskname=""/>
191
192 <loadfile srcfile="${temp.file}" property="opengl-template-classes">
193 <filterchain>
194 <tokenfilter delimoutput=",">
195 <stringtokenizer delims=";"/>
196 <replaceregex pattern="(.+)[.]java"
197 replace="org/lwjgl/opengl/\1.class"/>
198 </tokenfilter>
199 </filterchain>
200 </loadfile>
201
202 <delete file="${temp.file}" />
203
204 <!-- Create lwjgl.jar -->
205 <jar destfile="${lwjgl.temp}/jar/lwjgl.jar" taskname="lwjgl.jar">
206 <!-- Files to include in the lwjgl.jar file, for the ES build -->
207 <fileset dir="${lwjgl.bin}" excludes="${opengl-template-classes}">
208 <patternset id="lwjgl_es.package.pattern">
209 <include name="org/**/*"/>
210 <exclude name="org/lwjgl/d3d/**"/>
211 <exclude name="org/lwjgl/test/**"/>
212 <exclude name="org/lwjgl/util/**"/>
213 <exclude name="org/lwjgl/examples/**"/>
214 </patternset>
215 </fileset>
216
217 <manifest>
218 <attribute name="Sealed" value="true"/>
219 </manifest>
220 </jar>
221
222 <!-- Create lwjgl_test.jar -->
223 <jar destfile="${lwjgl.temp}/jar/lwjgl_test.jar" taskname="lwjgl_test.jar">
224 <fileset refid="lwjgl_test_es.fileset"/>
225 </jar>
226 </target>
227
163228 <!-- Distributes files -->
164229 <target name="-distribute">
165230 <delete>
177242 <copy todir="${lwjgl.temp}/native/linux">
178243 <fileset dir="${lwjgl.lib}/linux">
179244 <patternset refid="lwjgl-linux.fileset" />
245 </fileset>
246 </copy>
247 <copy todir="${lwjgl.temp}/native/freebsd" failonerror="false">
248 <fileset dir="${lwjgl.lib}/freebsd">
249 <patternset refid="lwjgl-freebsd.fileset" />
250 </fileset>
251 </copy>
252 <copy todir="${lwjgl.temp}/native/openbsd" failonerror="false">
253 <fileset dir="${lwjgl.lib}/openbsd">
254 <patternset refid="lwjgl-openbsd.fileset" />
180255 </fileset>
181256 </copy>
182257 <copy todir="${lwjgl.temp}/native/macosx">
219294
220295 <!-- Generates the native headers from source files -->
221296 <target name="headers" description="invokes javah on java classes" depends="compile">
222 <javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/linux" force="yes">
297 <javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/linux">
223298 <class name="org.lwjgl.LinuxSysImplementation" />
224299 <class name="org.lwjgl.opengl.LinuxEvent" />
225300 <class name="org.lwjgl.opengl.LinuxMouse" />
226301 <class name="org.lwjgl.opengl.LinuxKeyboard" />
227302 <class name="org.lwjgl.opengl.LinuxDisplay" />
228303 <class name="org.lwjgl.opengl.LinuxPeerInfo" />
229 <class name="org.lwjgl.opengl.LinuxPbufferPeerInfo" />
230 <class name="org.lwjgl.opengl.LinuxDisplayPeerInfo" />
231 <class name="org.lwjgl.opengl.LinuxAWTGLCanvasPeerInfo" />
232 <class name="org.lwjgl.opengl.LinuxContextImplementation" />
233 <class name="org.lwjgl.opengl.LinuxCanvasImplementation" />
234 </javah>
235
236 <javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/windows" force="yes">
304 </javah>
305
306 <javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/linux/opengl">
307 <class name="org.lwjgl.opengl.LinuxPbufferPeerInfo"/>
308 <class name="org.lwjgl.opengl.LinuxDisplayPeerInfo"/>
309 <class name="org.lwjgl.opengl.LinuxAWTGLCanvasPeerInfo"/>
310 <class name="org.lwjgl.opengl.LinuxContextImplementation"/>
311 <class name="org.lwjgl.opengl.LinuxCanvasImplementation"/>
312 </javah>
313
314 <javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/windows">
315 <class name="org.lwjgl.WindowsSysImplementation"/>
237316 <class name="org.lwjgl.opengl.WindowsKeyboard" />
238 <class name="org.lwjgl.opengl.WindowsPbufferPeerInfo" />
239 <class name="org.lwjgl.opengl.WindowsDisplay" />
240317 <class name="org.lwjgl.opengl.WindowsRegistry" />
241 <class name="org.lwjgl.WindowsSysImplementation" />
242 <class name="org.lwjgl.opengl.WindowsAWTGLCanvasPeerInfo" />
243 <class name="org.lwjgl.opengl.WindowsPeerInfo" />
244 <class name="org.lwjgl.opengl.WindowsDisplayPeerInfo" />
245 <class name="org.lwjgl.opengl.WindowsContextImplementation" />
246 </javah>
247
248 <javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/macosx" force="yes">
318 <class name="org.lwjgl.opengl.WindowsDisplay"/>
319 <class name="org.lwjgl.opengl.WindowsDisplayPeerInfo"/>
320 <class name="org.lwjgl.opengl.WindowsAWTGLCanvasPeerInfo"/>
321 </javah>
322
323 <javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/windows/opengl">
324 <class name="org.lwjgl.opengl.WindowsPbufferPeerInfo"/>
325 <class name="org.lwjgl.opengl.WindowsPeerInfo"/>
326 <class name="org.lwjgl.opengl.WindowsContextImplementation"/>
327 </javah>
328
329 <javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/windows/opengles">
330 <class name="org.lwjgl.opengl.WindowsPeerInfo"/>
331 </javah>
332
333 <javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/macosx">
249334 <class name="org.lwjgl.MacOSXSysImplementation" />
250 <class name="org.lwjgl.opengl.MacOSXMouseEventQueue" />
251335 <class name="org.lwjgl.opengl.MacOSXCanvasPeerInfo" />
252336 <class name="org.lwjgl.opengl.MacOSXPeerInfo" />
253337 <class name="org.lwjgl.opengl.MacOSXPbufferPeerInfo" />
254338 <class name="org.lwjgl.opengl.MacOSXDisplay" />
255339 <class name="org.lwjgl.opengl.MacOSXContextImplementation" />
256 </javah>
257
258 <javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.headers}" force="yes">
340 <class name="org.lwjgl.opengl.MacOSXNativeKeyboard" />
341 <class name="org.lwjgl.opengl.MacOSXNativeMouse" />
342 <class name="org.lwjgl.opengl.MacOSXMouseEventQueue" />
343 </javah>
344
345 <javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.headers}">
259346 <class name="org.lwjgl.opengl.AWTSurfaceLock" />
260347 <class name="org.lwjgl.DefaultSysImplementation" />
261348 <class name="org.lwjgl.input.Cursor" />
262349 <class name="org.lwjgl.input.Keyboard" />
263350 <class name="org.lwjgl.input.Mouse" />
264351 <class name="org.lwjgl.openal.AL" />
265 <class name="org.lwjgl.opengl.GLContext" />
266 <class name="org.lwjgl.opengl.Pbuffer" />
267 <class name="org.lwjgl.opengl.CallbackUtil" />
268 <class name="org.lwjgl.opencl.CL" />
352 <class name="org.lwjgl.opencl.CL" />
269353 <class name="org.lwjgl.opencl.CallbackUtil" />
270 <class name="org.lwjgl.BufferUtils" />
354 <class name="org.lwjgl.BufferUtils" />
355 </javah>
356
357 <javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.headers}/opengl">
358 <class name="org.lwjgl.opengl.GLContext"/>
359 <class name="org.lwjgl.opengl.Pbuffer"/>
360 <class name="org.lwjgl.opengl.CallbackUtil"/>
361 <class name="org.lwjgl.opengl.NVPresentVideoUtil"/>
362 <class name="org.lwjgl.opengl.NVVideoCaptureUtil"/>
363 </javah>
364
365 <javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.headers}/opengles">
366 <class name="org.lwjgl.opengles.EGL"/>
367 <class name="org.lwjgl.opengles.EGLKHRFenceSync"/>
368 <class name="org.lwjgl.opengles.EGLKHRReusableSync"/>
369 <class name="org.lwjgl.opengles.EGLNVSync"/>
370 <class name="org.lwjgl.opengles.GLContext"/>
371 <class name="org.lwjgl.opengles.CallbackUtil"/>
271372 </javah>
272373 </target>
273374
325426 lwjgl.native.windows.version = ${lwjgl.native.windows.version}
326427 lwjgl.java.linux.version = ${lwjgl.java.linux.version}
327428 lwjgl.native.linux.version = ${lwjgl.native.linux.version}
429 lwjgl.java.freebsd.version = ${lwjgl.java.linux.version}
430 lwjgl.native.freebsd.version = ${lwjgl.native.linux.version}
431 lwjgl.java.openbsd.version = ${lwjgl.java.linux.version}
432 lwjgl.native.openbsd.version = ${lwjgl.native.linux.version}
328433 lwjgl.java.macosx.version = ${lwjgl.java.macosx.version}
329434 lwjgl.native.macosx.version = ${lwjgl.native.macosx.version}
330435 </echo>
356461
357462 <!-- Compiles the Java source code -->
358463 <target name="compile" description="Compiles the java source code" depends="-initialize">
359 <javac debug="yes" destdir="${lwjgl.bin}" source="1.5" target="1.5" classpath="${lwjgl.lib}/jinput.jar:${lwjgl.lib}/AppleJavaExtensions.jar" taskname="core">
464 <javac debug="yes" destdir="${lwjgl.bin}" source="1.5" target="1.5" classpath="${lwjgl.lib}/jinput.jar:${lwjgl.lib}/AppleJavaExtensions.jar:${lwjgl.lib}/asm-debug-all.jar" taskname="core">
360465 <!--<compilerarg value="-Xlint:unchecked"/>-->
361466 <src path="${lwjgl.src}/java/"/>
362467 <src path="${lwjgl.src}/generated/"/>
363468 <include name="org/lwjgl/*.java"/>
364469 <include name="org/lwjgl/input/**"/>
365470 <include name="org/lwjgl/opengl/**"/>
471 <include name="org/lwjgl/opengles/**"/>
366472 <include name="org/lwjgl/openal/**"/>
367473 <include name="org/lwjgl/opencl/**"/>
368474 <include name="org/lwjgl/util/**"/>
383489 </condition>
384490 <antcall target="-compile_native_linux" />
385491
492 <condition property="lwjgl.platform.freebsd">
493 <os name="FreeBSD" />
494 </condition>
495 <antcall target="-compile_native_freebsd" />
496
497 <condition property="lwjgl.platform.openbsd">
498 <os name="OpenBSD" />
499 </condition>
500 <antcall target="-compile_native_openbsd" />
501
386502 <condition property="lwjgl.platform.solaris">
387503 <os name="SunOS" />
388504 </condition>
411527 </copy>
412528 <!-- headless issues <version-check platform="linux"/> -->
413529 </target>
530
531 <!-- Compiles LWJGL on FreeBSD platforms -->
532 <target name="-compile_native_freebsd" if="lwjgl.platform.freebsd">
533 <ant antfile="platform_build/bsd_ant/build.xml" inheritAll="false"/>
534 <copy todir="${lwjgl.lib}/freebsd">
535 <fileset dir="${lwjgl.bin}/lwjgl" includes="liblwjgl*.so"/>
536 </copy>
537 </target>
538
539 <!-- Compiles LWJGL on OpenBSD platforms -->
540 <target name="-compile_native_openbsd" if="lwjgl.platform.openbsd">
541 <ant antfile="platform_build/bsd_ant/build.xml" inheritAll="false"/>
542 <copy todir="${lwjgl.lib}/openbsd">
543 <fileset dir="${lwjgl.bin}/lwjgl" includes="liblwjgl*.so"/>
544 </copy>
545 </target>
546
414547
415548 <!-- Compiles LWJGL on solaris platforms -->
416549 <target name="-compile_native_solaris" if="lwjgl.platform.solaris">
425558 <!-- Compiles LWJGL on Mac platforms -->
426559 <target name="-compile_native_macosx" if="lwjgl.platform.macosx">
427560 <ant antfile="platform_build/macosx_ant/build.xml" inheritAll="false"/>
428 <copy file="${lwjgl.bin}/lwjgl/liblwjgl.jnilib" todir="${lwjgl.lib}/macosx"/>
561 <copy file="${lwjgl.bin}/lwjgl/liblwjgl.dylib" todir="${lwjgl.lib}/macosx"/>
429562 <version-check platform="macosx"/>
563 </target>
564
565 <target name="compile_native_es" depends="-initialize, headers, touch-version, version-mismatch" description="Compiles the native files">
566 <condition property="lwjgl.platform.windows">
567 <os family="windows"/>
568 </condition>
569 <antcall target="-compile_native_win32_es"/>
570
571 <condition property="lwjgl.platform.linux">
572 <os name="Linux"/>
573 </condition>
574 <antcall target="-compile_native_linux_es"/>
575 </target>
576
577 <!-- Compiles LWJGL ES on Win32 platforms -->
578 <target name="-compile_native_win32_es" if="lwjgl.platform.windows">
579 <ant antfile="platform_build/windows_ant/build_es.xml" inheritAll="false"/>
580 <copy todir="${lwjgl.lib}/windows">
581 <fileset dir="${lwjgl.bin}/lwjgles" includes="lwjgl*.dll"/>
582 </copy>
583 </target>
584
585 <!-- Compiles LWJGL ES on Linux platforms -->
586 <target name="-compile_native_linux_es" if="lwjgl.platform.linux">
587 <ant antfile="platform_build/linux_ant/build_es.xml" inheritAll="false"/>
588 <copy todir="${lwjgl.lib}/linux">
589 <fileset dir="${lwjgl.bin}/lwjgles" includes="liblwjgl*.so"/>
590 </copy>
430591 </target>
431592
432593 <target name="repack200" description="Pack200-repack a jar file">
515676 <bottom><![CDATA[<i>Copyright &#169; 2002-2009 lwjgl.org. All Rights Reserved.</i>]]></bottom>
516677 </javadoc>
517678 </target>
679
680 <!-- get and copy nightly binaries into libs folder -->
681 <target name="copy-nightly-binaries" depends="-initialize" description="Copies latest successful nightly binaries into appropriate libs folder">
682 <delete file="${lwjgl.temp}/lwjgl-${lwjgl.version}.zip" failonerror="false"/>
683 <get src="http://ci.newdawnsoftware.com/job/LWJGL-git-dist/lastBuild/artifact/dist/lwjgl-${lwjgl.version}.zip" dest="${lwjgl.temp}" verbose="true"/>
684 <unzip src="${lwjgl.temp}/lwjgl-${lwjgl.version}.zip" dest="${lwjgl.lib}" overwrite="true">
685 <patternset>
686 <include name="**/native/**/*lwjgl*"/>
687 </patternset>
688 <globmapper from="lwjgl-${lwjgl.version}/native/*" to="*"/>
689 </unzip>
690 </target>
518691 </project>
0 <?xml version="1.0"?>
1
2 <project name="lwjgl native code, bsd" basedir="../../bin/lwjgl" default="compile">
3 <property name="native" location="../../src/native"/>
4 <property name="libname32" value="liblwjgl.so"/>
5 <property name="libname64" value="liblwjgl64.so"/>
6 <property name="libs32" value="-L/usr/X11R6/lib -L/usr/local/lib -lm -lX11 -lXext -lXcursor -lXrandr -pthread -L${java.home}/lib/i386 -ljawt" />
7 <property name="libs64" value="-L/usr/X11R6/lib -L/usr/local/lib -lm -lX11 -lXext -lXcursor -lXrandr -lXxf86vm -pthread -L${java.home}/lib/amd64 -ljawt" />
8 <property name="cflags32" value="-O2 -Wall -c -fPIC -std=c99 -Wunused"/>
9
10 <target name="clean">
11 <delete>
12 <fileset dir="x32"/>
13 <fileset dir="x64"/>
14 <fileset dir="." includes="*.o"/>
15 <fileset dir="." includes="*.so"/>
16 </delete>
17 </target>
18
19 <target name="compile">
20 <exec executable="uname" outputproperty="hwplatform">
21 <arg value="-m"/>
22 </exec>
23 <condition property="xf86vm_lib" value="-lXxf86vm" else="-Wl,-static,-lXxf86vm,-call_shared">
24 <os name="SunOS" />
25 </condition>
26 <condition property="cflags_pthread" value="-pthreads" else="-pthread">
27 <os name="SunOS" />
28 </condition>
29 <condition property="version_script_flags32" value="" else="-Wl,--version-script='${native}/linux/lwjgl.map'">
30 <os name="SunOS" />
31 </condition>
32 <condition property="version_script_flags64" value="-m64" else="-Wl,--version-script='${native}/linux/lwjgl.map'">
33 <and>
34 <os name="SunOS" />
35 </and>
36 </condition>
37 <condition property="cflags64" value="-O2 -m64 -Wall -c -fPIC -std=c99 -Wunused" else="-O2 -Wall -c -fPIC -std=c99 -Wunused">
38 <os name="SunOS" />
39 </condition>
40
41 <property name="linker_flags32" value="${version_script_flags32} -shared -O2 -Wall -o ${libname32} ${libs32} ${xf86vm_lib}"/>
42 <property name="linker_flags64" value="${version_script_flags64} -shared -O2 -Wall -o ${libname64} ${libs64} ${xf86vm_lib}"/>
43
44 <condition property="build.32bit.only">
45 <and>
46 <os name="FreeBSD"/>
47 <equals arg1="${hwplatform}" arg2="i386"/>
48 </and>
49 </condition>
50
51 <condition property="build.32bit.only">
52 <and>
53 <os name="OpenBSD"/>
54 <equals arg1="${hwplatform}" arg2="i386"/>
55 </and>
56 </condition>
57
58 <!-- On freebsd, the 64 bit jre doesn't have the 32 bit libs -->
59 <condition property="build.64bit.only">
60 <and>
61 <os name="FreeBSD"/>
62 <equals arg1="${hwplatform}" arg2="amd64"/>
63 </and>
64 </condition>
65
66 <condition property="build.64bit.only">
67 <and>
68 <os name="OpenBSD"/>
69 <equals arg1="${hwplatform}" arg2="amd64"/>
70 </and>
71 </condition>
72
73 <antcall target="compile32"/>
74 <antcall target="compile64"/>
75 </target>
76
77 <target name="compile32" unless="build.64bit.only">
78 <mkdir dir="x32"/>
79 <apply dir="x32" executable="cc" skipemptyfilesets="true" failonerror="true">
80 <arg line="${cflags32} ${cflags_pthread}"/>
81 <arg value="-I${java.home}/include"/>
82 <arg value="-I${java.home}/include/freebsd"/>
83 <arg value="-I${java.home}/include/openbsd"/>
84 <arg value="-I${java.home}/../include"/>
85 <arg value="-I${java.home}/../include/freebsd"/>
86 <arg value="-I${java.home}/../include/openbsd"/>
87 <arg value="-I/usr/local/include"/>
88 <arg value="-I/usr/X11R6/include"/>
89 <arg value="-I${native}/common"/>
90 <arg value="-I${native}/common/opengl"/>
91 <arg value="-I${native}/linux"/>
92 <arg value="-I${native}/linux/opengl"/>
93 <mapper type="glob" from="*.c" to="*.o"/>
94 <fileset dir="${native}/common" includes="*.c"/>
95 <fileset dir="${native}/common/opengl" includes="*.c"/>
96 <fileset dir="${native}/generated/openal" includes="*.c"/>
97 <fileset dir="${native}/generated/opencl" includes="*.c"/>
98 <fileset dir="${native}/generated/opengl" includes="*.c"/>
99 <fileset dir="${native}/linux" includes="*.c"/>
100 <fileset dir="${native}/linux/opengl" includes="*.c"/>
101 </apply>
102 <apply dir="." parallel="true" executable="cc" failonerror="true">
103 <srcfile/>
104 <arg line="${linker_flags32}"/>
105 <fileset dir="x32" includes="*.o"/>
106 </apply>
107 <apply dir="." parallel="true" executable="strip" failonerror="true">
108 <fileset file="${libname32}"/>
109 </apply>
110 </target>
111
112 <target name="compile64" unless="build.32bit.only">
113 <mkdir dir="x64"/>
114 <apply dir="x64" executable="cc" skipemptyfilesets="true" failonerror="true">
115 <arg line="${cflags64} ${cflags_pthread}"/>
116 <arg value="-I${java.home}/include"/>
117 <arg value="-I${java.home}/include/freebsd"/>
118 <arg value="-I${java.home}/include/openbsd"/>
119 <arg value="-I${java.home}/../include"/>
120 <arg value="-I${java.home}/../include/freebsd"/>
121 <arg value="-I${java.home}/../include/openbsd"/>
122 <arg value="-I/usr/local/include"/>
123 <arg value="-I/usr/X11R6/include"/>
124 <arg value="-I${native}/common"/>
125 <arg value="-I${native}/common/opengl"/>
126 <arg value="-I${native}/linux"/>
127 <arg value="-I${native}/linux/opengl"/>
128 <mapper type="glob" from="*.c" to="*.o"/>
129 <fileset dir="${native}/common" includes="*.c"/>
130 <fileset dir="${native}/common/opengl" includes="*.c"/>
131 <fileset dir="${native}/generated/openal" includes="*.c"/>
132 <fileset dir="${native}/generated/opencl" includes="*.c"/>
133 <fileset dir="${native}/generated/opengl" includes="*.c"/>
134 <fileset dir="${native}/linux" includes="*.c"/>
135 <fileset dir="${native}/linux/opengl" includes="*.c"/>
136 </apply>
137 <apply dir="." parallel="true" executable="cc" failonerror="true">
138 <srcfile/>
139 <arg line="${linker_flags64}"/>
140 <fileset dir="x64" includes="*.o"/>
141 </apply>
142 <apply dir="." parallel="true" executable="strip" failonerror="true">
143 <fileset file="${libname64}"/>
144 </apply>
145 </target>
146 </project>
1111 <property name="lwjgl.docs" location="doc" />
1212 <property name="lwjgl.temp" location="temp" />
1313 <property name="lwjgl.res" location="res" />
14 <property name="lwjgl.version" value="2.7.1" />
14 <property name="lwjgl.version" value="2.9.3" />
1515 <property name="lwjgl.web" location="www" />
1616
17 <property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/AMD*.java,org/lwjgl/opengl/APPLE*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/NVX*.java,org/lwjgl/opengl/HP*.java,org/lwjgl/opengl/IBM*.java,org/lwjgl/opengl/SUN*.java,org/lwjgl/opengl/SGIS*.java,org/lwjgl/opengl/GREMEDY*.java"/>
18 <property name="opencl-template-pattern-extensions" value="org/lwjgl/opencl/KHR*.java,org/lwjgl/opencl/EXT*.java,org/lwjgl/opencl/APPLE*.java,org/lwjgl/opencl/AMD*.java,org/lwjgl/opencl/NV*.java"/>
19 <property name="opencl-template-pattern" value="org/lwjgl/opencl/CL*.java,${opencl-template-pattern-extensions}"/>
17 <property name="lwjgl.src.templates.al" location="${lwjgl.src.templates}/org/lwjgl/openal"/>
18 <property name="lwjgl.src.templates.gl" location="${lwjgl.src.templates}/org/lwjgl/opengl"/>
19 <property name="lwjgl.src.templates.gles" location="${lwjgl.src.templates}/org/lwjgl/opengles"/>
20 <property name="lwjgl.src.templates.cl" location="${lwjgl.src.templates}/org/lwjgl/opencl"/>
21
22 <property name="openal-template-pattern" value="AL*.java,EFX*.java"/>
23 <property name="opengl-template-pattern" value="GL*.java,ARB*.java,EXT*.java,KHR*.java,AMD*.java,APPLE*.java,ATI*.java,NV*.java,NVX*.java,HP*.java,IBM*.java,SUN*.java,SGIS*.java,GREMEDY*.java,INTEL*.java"/>
24 <property name="opengles-template-pattern" value="GLES*.java,ARB*.java,EXT*.java,KHR*.java,AMD*.java,ANGLE*.java,APPLE*.java,ARM*.java,DMP*.java,IMG*.java,NV*.java,OES*.java,QCOM*.java,VIV*.java"/>
25 <property name="opencl-template-pattern-extensions" value="KHR*.java,EXT*.java,APPLE*.java,AMD*.java,INTEL*.java,NV*.java"/>
26 <property name="opencl-template-pattern" value="CL*.java,${opencl-template-pattern-extensions}"/>
2027
2128 <!-- ================================================================== -->
2229 <!-- Filesets used for targets -->
2633 <fileset id="lwjgl.fileset" dir="${lwjgl.bin}">
2734 <patternset id="lwjgl.package.pattern">
2835 <include name="org/**/*" />
36 <exclude name="org/lwjgl/opengles/**"/>
2937 <exclude name="org/lwjgl/d3d/**" />
3038 <exclude name="org/lwjgl/test/**" />
3139 <exclude name="org/lwjgl/util/**" />
3240 <exclude name="org/lwjgl/examples/**" />
3341 </patternset>
3442 </fileset>
35
43 <fileset id="lwjgl.fileset.dependencies" dir="${lwjgl.bin}">
44 <patternset id="lwjgl.package.dependencies.pattern">
45 <include name="org/lwjgl/opengles/ContextAttribs*.*"/>
46 </patternset>
47 </fileset>
48
3649 <!-- Files to include in the lwjgl_util_applet.jar file -->
3750 <fileset id="lwjgl_util_applet.fileset" dir="${lwjgl.bin}">
3851 <patternset id="lwjgl_util_applet.package.pattern">
4558 <fileset id="lwjgl_test.fileset" dir="${lwjgl.bin}">
4659 <exclude name="**.*" />
4760 <include name="org/lwjgl/test/**" />
61 <exclude name="org/lwjgl/test/opengles/**"/>
4862 <include name="org/lwjgl/examples/**" />
4963 </fileset>
5064
5872 <include name="org/lwjgl/test/opencl/gl/*.cl" />
5973 </fileset>
6074
75 <!-- Files to include in the lwjgl_test.jar file for the ES build -->
76 <fileset id="lwjgl_test_es.fileset" dir="${lwjgl.bin}">
77 <exclude name="**.*"/>
78 <include name="org/lwjgl/test/**"/>
79 <exclude name="org/lwjgl/test/opengl/**"/>
80 <exclude name="org/lwjgl/test/*.*"/>
81 </fileset>
82
6183 <!-- Files to include in the lwjgl_util.jar file -->
6284 <fileset id="lwjgl_util.fileset" dir="${lwjgl.bin}">
6385 <patternset id="lwjgl_util.package.pattern">
6789 <include name="org/lwjgl/util/**" />
6890 </patternset>
6991 </fileset>
70
92
7193
7294 <!-- Files to include in the lwjgl_applet.jar file -->
7395 <fileset id="lwjgl_applet.fileset" dir="${lwjgl.bin}">
115137 <include name="liblwjgl*.so" />
116138 <include name="libopenal*.so" />
117139 </patternset>
118 <patternset id="lwjgl-linux-jinput.fileset">
140 <patternset id="lwjgl-linux-jinput.fileset">
119141 <include name="libjinput-linux.so" />
120142 <include name="libjinput-linux64.so" />
121143 </patternset>
124146 <!-- Files to include in mac os x package -->
125147 <patternset id="lwjgl-macosx.fileset">
126148 <patternset id="lwjgl-macosx-lwjgl.fileset">
127 <include name="liblwjgl.jnilib" />
149 <include name="liblwjgl.dylib" />
128150 <include name="openal.dylib" />
129151 </patternset>
130152 <patternset id="lwjgl-macosx-jinput.fileset">
131 <include name="libjinput-osx.jnilib" />
132 <include name="libjinput-osx-legacy.jnilib" />
153 <include name="libjinput-osx.dylib" />
154 <include name="libjinput-osx-legacy.dylib" />
133155 </patternset>
134156 </patternset>
135157
00 <project name="generator">
1
2 <import file="build-definitions.xml"/>
13
24 <!-- clean the generated files -->
35 <target name="clean-generated" description="Deletes the generated java source">
1315 </target>
1416
1517 <!-- Compiles the Java generator source code -->
16 <target name="generators" description="Compiles the native method generators">
17 <javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/util/generator/**.java" source="1.5" target="1.5" taskname="generator">
18 <target name="generators" description="Compiles the native method generators">
19 <mkdir dir="${lwjgl.src}/generated/"/>
20 <mkdir dir="${lwjgl.src.native}/generated/openal"/>
21 <mkdir dir="${lwjgl.src.native}/generated/opengl"/>
22 <mkdir dir="${lwjgl.src.native}/generated/opengles"/>
23 <mkdir dir="${lwjgl.src.native}/generated/opencl"/>
24
25 <javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" source="1.6" target="1.6" includes="org/lwjgl/util/generator/**.java" taskname="generator">
1826 <include name="org/lwjgl/util/generator/openal/**.java"/>
1927 <include name="org/lwjgl/util/generator/opengl/**.java"/>
28 <include name="org/lwjgl/util/generator/opengles/**.java"/>
2029 <include name="org/lwjgl/util/generator/opencl/**.java"/>
21 <compilerarg value="-Xlint:all"/>
30 <compilerarg value="-Xlint:none"/>
2231 </javac>
23 <!-- Compile helper classes used by the templates -->
24 <javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" source="1.5" target="1.5" taskname="generator">
32
33 <!-- Compile helper classes used by the templates -->
34 <javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" source="1.5" target="1.5" taskname="generator">
2535 <include name="org/lwjgl/PointerWrapper.java"/>
2636 <include name="org/lwjgl/PointerBuffer.java"/>
2737 <!-- OpenGL -->
2838 <include name="org/lwjgl/opengl/GLSync.java"/>
2939 <include name="org/lwjgl/opengl/AMDDebugOutputCallback.java"/>
3040 <include name="org/lwjgl/opengl/ARBDebugOutputCallback.java"/>
41 <include name="org/lwjgl/opengl/KHRDebugCallback.java"/>
42 <!-- OpenGL ES -->
43 <include name="org/lwjgl/opengles/EGLImageOES.java"/>
44 <include name="org/lwjgl/opengles/KHRDebugCallback.java"/>
3145 <!-- OpenCL -->
3246 <include name="org/lwjgl/opencl/CLPlatform.java"/>
3347 <include name="org/lwjgl/opencl/CLDevice.java"/>
3448 <include name="org/lwjgl/opencl/CLContext.java"/>
35 <include name="org/lwjgl/opencl/CLContextCallback.java"/>
3649 <include name="org/lwjgl/opencl/CLCommandQueue.java"/>
3750 <include name="org/lwjgl/opencl/CLMem.java"/>
38 <include name="org/lwjgl/opencl/CLMemObjectDestructorCallback.java"/>
39 <include name="org/lwjgl/opencl/CLBuildProgramCallback.java"/>
51 <include name="org/lwjgl/opencl/CL*Callback.java"/>
4052 <include name="org/lwjgl/opencl/CLNativeKernel.java"/>
41 <include name="org/lwjgl/opencl/CLEventCallback.java"/>
4253 <include name="org/lwjgl/opencl/CLFunctionAddress.java"/>
4354 </javac>
4455 </target>
4556
4657 <!-- Proxy target to generate it all -->
47 <target name="generate-all" depends="generate-openal, generate-opengl, generate-opengl-capabilities, generate-opengl-references, generate-opencl, generate-opencl-capabilities" description="Generates java and native source"/>
48
49 <target name="generate-debug" depends="generate-openal-debug, generate-opengl-debug, generate-opengl-capabilities-debug, generate-opengl-references, generate-opencl-debug, generate-opencl-capabilities-debug" description="Generates java and native source with debug functionality"/>
58 <target name="generate-all" depends="generate-openal, generate-opengl, generate-opengl-capabilities, generate-opengl-references, generate-opengles, generate-opengles-capabilities, generate-opencl, generate-opencl-capabilities" description="Generates java and native source"/>
59
60 <target name="generate-debug" depends="generate-openal-debug, generate-opengl-debug, generate-opengl-capabilities-debug, generate-opengl-references, generate-opengles-debug, generate-opengles-capabilities-debug, generate-opencl-debug, generate-opencl-capabilities-debug" description="Generates java and native source with debug functionality"/>
61
62 <!-- ********************************************************************************
63 *********************************************************************************
64 OPENAL
65 *********************************************************************************
66 **************************************************************************** -->
5067
5168 <!-- Generate OpenAL -->
52 <target name="generate-openal" depends="generators" description="Generates java and native source for AL">
53 <apply executable="apt" parallel="true">
54 <arg value="-nocompile"/>
55 <arg value="-factory"/>
56 <arg value="org.lwjgl.util.generator.GeneratorProcessorFactory"/>
57 <arg value="-cp"/>
58 <arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
59 <arg value="-s"/>
60 <arg path="${lwjgl.src}/generated"/>
61 <arg value="-d"/>
62 <arg path="${lwjgl.src.native}/generated"/>
63 <arg value="-Atypemap=org.lwjgl.util.generator.openal.ALTypeMap"/>
64 <fileset dir="${lwjgl.src.templates}" includes="org/lwjgl/openal/AL10.java, org/lwjgl/openal/AL11.java, org/lwjgl/openal/EFX10.java"/>
65 </apply>
69 <target name="generate-openal" depends="generators" description="Generates java and native source for AL">
70 <javac destdir="${lwjgl.bin}" source="1.6" target="1.6" srcdir="${lwjgl.src.templates.al}" fork="true" taskname="processor">
71 <compilerarg value="-proc:only"/>
72 <compilerarg value="-processor"/>
73 <compilerarg value="org.lwjgl.util.generator.GeneratorProcessor"/>
74 <compilerarg value="-cp"/>
75 <compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
76 <compilerarg value="-s"/>
77 <compilerarg path="${lwjgl.src}/generated"/>
78 <compilerarg value="-d"/>
79 <compilerarg path="${lwjgl.src.native}/generated/openal"/>
80 <compilerarg value="-Abinpath=${lwjgl.bin}"/>
81 <compilerarg value="-Atypemap=org.lwjgl.util.generator.openal.ALTypeMap"/>
82 <src>
83 <fileset dir="${lwjgl.src.templates.al}">
84 <include name="${openal-template-pattern}"/>
85 </fileset>
86 </src>
87 </javac>
6688 </target>
6789
6890 <!-- Generate OpenAL [DEBUG] -->
6991 <target name="generate-openal-debug" depends="generators" description="Generates java and native source for AL">
70 <apply executable="apt" parallel="true">
71 <arg value="-nocompile"/>
72 <arg value="-factory"/>
73 <arg value="org.lwjgl.util.generator.GeneratorProcessorFactory"/>
74 <arg value="-cp"/>
75 <arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
76 <arg value="-s"/>
77 <arg path="${lwjgl.src}/generated"/>
78 <arg value="-d"/>
79 <arg path="${lwjgl.src.native}/generated"/>
80 <arg value="-Atypemap=org.lwjgl.util.generator.openal.ALTypeMap"/>
81 <arg value="-Ageneratechecks"/>
82 <fileset dir="${lwjgl.src.templates}" includes="org/lwjgl/openal/AL10.java, org/lwjgl/openal/AL11.java, org/lwjgl/openal/EFX10.java"/>
83 </apply>
84 </target>
92 <javac destdir="${lwjgl.bin}" source="1.6" target="1.6" srcdir="${lwjgl.src.templates.al}" fork="true" taskname="processor">
93 <compilerarg value="-proc:only"/>
94 <compilerarg value="-processor"/>
95 <compilerarg value="org.lwjgl.util.generator.GeneratorProcessor"/>
96 <compilerarg value="-cp"/>
97 <compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
98 <compilerarg value="-s"/>
99 <compilerarg path="${lwjgl.src}/generated"/>
100 <compilerarg value="-d"/>
101 <compilerarg path="${lwjgl.src.native}/generated/openal"/>
102 <compilerarg value="-Abinpath=${lwjgl.bin}"/>
103 <compilerarg value="-Atypemap=org.lwjgl.util.generator.openal.ALTypeMap"/>
104 <compilerarg value="-Ageneratechecks"/>
105 <src>
106 <fileset dir="${lwjgl.src.templates.al}">
107 <include name="${openal-template-pattern}"/>
108 </fileset>
109 </src>
110 </javac>
111 </target>
112
113 <!-- ********************************************************************************
114 *********************************************************************************
115 OPENGL
116 *********************************************************************************
117 **************************************************************************** -->
85118
86119 <!-- Generate OpenGL -->
87120 <target name="generate-opengl" depends="generators" description="Generates java and native source for GL">
88 <apply executable="apt" parallel="true">
89 <arg value="-nocompile"/>
90 <arg value="-factory"/>
91 <arg value="org.lwjgl.util.generator.GeneratorProcessorFactory"/>
92 <arg value="-cp"/>
93 <arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
94 <arg value="-s"/>
95 <arg path="${lwjgl.src}/generated"/>
96 <arg value="-d"/>
97 <arg path="${lwjgl.src.native}/generated"/>
98 <arg value="-Acontextspecific"/>
99 <arg value="-Atypemap=org.lwjgl.util.generator.opengl.GLTypeMap"/>
100 <fileset dir="${lwjgl.src.templates}" includes="${opengl-template-pattern}"/>
101 </apply>
121 <javac destdir="${lwjgl.bin}" source="1.6" target="1.6" srcdir="${lwjgl.src.templates.gl}" fork="true" taskname="processorGL">
122 <compilerarg value="-proc:only"/>
123 <compilerarg value="-processor"/>
124 <compilerarg value="org.lwjgl.util.generator.GeneratorProcessor"/>
125 <compilerarg value="-cp"/>
126 <compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
127 <compilerarg value="-s"/>
128 <compilerarg path="${lwjgl.src}/generated"/>
129 <compilerarg value="-d"/>
130 <compilerarg path="${lwjgl.src.native}/generated/opengl"/>
131 <compilerarg value="-Abinpath=${lwjgl.bin}"/>
132 <compilerarg value="-Atypemap=org.lwjgl.util.generator.opengl.GLTypeMap"/>
133 <compilerarg value="-Acontextspecific"/>
134 <src>
135 <fileset dir="${lwjgl.src.templates.gl}">
136 <include name="${opengl-template-pattern}"/>
137 </fileset>
138 </src>
139 </javac>
102140 </target>
103141
104142 <!-- Generate OpenGL [DEBUG] -->
105 <target name="generate-opengl-debug" depends="generators" description="Generates java and native source for GL">
106 <apply executable="apt" parallel="true">
107 <arg value="-nocompile"/>
108 <arg value="-factory"/>
109 <arg value="org.lwjgl.util.generator.GeneratorProcessorFactory"/>
110 <arg value="-cp"/>
111 <arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
112 <arg value="-s"/>
113 <arg path="${lwjgl.src}/generated"/>
114 <arg value="-d"/>
115 <arg path="${lwjgl.src.native}/generated"/>
116 <arg value="-Ageneratechecks"/>
117 <arg value="-Acontextspecific"/>
118 <arg value="-Atypemap=org.lwjgl.util.generator.opengl.GLTypeMap"/>
119 <fileset dir="${lwjgl.src.templates}" includes="${opengl-template-pattern}"/>
120 </apply>
143 <target name="generate-opengl-debug" depends="generators" description="Generates debug java and native source for GL">
144 <javac destdir="${lwjgl.bin}" source="1.6" target="1.6" srcdir="${lwjgl.src.templates.gl}" fork="true" taskname="processor">
145 <compilerarg value="-proc:only"/>
146 <compilerarg value="-processor"/>
147 <compilerarg value="org.lwjgl.util.generator.GeneratorProcessor"/>
148 <compilerarg value="-cp"/>
149 <compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
150 <compilerarg value="-s"/>
151 <compilerarg path="${lwjgl.src}/generated"/>
152 <compilerarg value="-d"/>
153 <compilerarg path="${lwjgl.src.native}/generated/opengl"/>
154 <compilerarg value="-Abinpath=${lwjgl.bin}"/>
155 <compilerarg value="-Ageneratechecks"/>
156 <compilerarg value="-Acontextspecific"/>
157 <compilerarg value="-Atypemap=org.lwjgl.util.generator.opengl.GLTypeMap"/>
158 <src>
159 <fileset dir="${lwjgl.src.templates.gl}">
160 <include name="${opengl-template-pattern}"/>
161 </fileset>
162 </src>
163 </javac>
121164 </target>
122165
123166 <!-- Generate OpenGL references -->
124167 <target name="generate-opengl-references" depends="generators" description="Generates java and native source for GL">
125 <apply executable="apt" parallel="true">
126 <arg value="-nocompile"/>
127 <arg value="-factory"/>
128 <arg value="org.lwjgl.util.generator.opengl.GLReferencesGeneratorProcessorFactory"/>
129 <arg value="-cp"/>
130 <arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
131 <arg value="-s"/>
132 <arg path="${lwjgl.src}/generated"/>
133 <fileset dir="${lwjgl.src.templates}" includes="${opengl-template-pattern}"/>
134 </apply>
168 <javac destdir="${lwjgl.bin}" source="1.6" target="1.6" srcdir="${lwjgl.src.templates.gl}" fork="true" taskname="processor">
169 <compilerarg value="-proc:only"/>
170 <compilerarg value="-processor"/>
171 <compilerarg value="org.lwjgl.util.generator.opengl.GLReferencesGeneratorProcessor"/>
172 <compilerarg value="-cp"/>
173 <compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
174 <compilerarg value="-s"/>
175 <compilerarg path="${lwjgl.src}/generated"/>
176 <src>
177 <fileset dir="${lwjgl.src.templates.gl}">
178 <include name="${opengl-template-pattern}"/>
179 </fileset>
180 </src>
181 </javac>
135182 </target>
136183
137184 <!-- Generate OpenGL context capabilities -->
138185 <target name="generate-opengl-capabilities" depends="generators" description="Generates java and native source for GL">
139 <apply executable="apt" parallel="true">
140 <arg value="-nocompile"/>
141 <arg value="-factory"/>
142 <arg value="org.lwjgl.util.generator.opengl.GLGeneratorProcessorFactory"/>
143 <arg value="-cp"/>
144 <arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
145 <arg value="-s"/>
146 <arg path="${lwjgl.src}/generated"/>
147 <arg value="-Acontextspecific"/>
148 <fileset dir="${lwjgl.src.templates}" includes="${opengl-template-pattern}"/>
149 </apply>
186 <javac destdir="${lwjgl.bin}" source="1.6" target="1.6" srcdir="${lwjgl.src.templates.gl}" fork="true" taskname="processor">
187 <compilerarg value="-proc:only"/>
188 <compilerarg value="-processor"/>
189 <compilerarg value="org.lwjgl.util.generator.opengl.GLGeneratorProcessor"/>
190 <compilerarg value="-cp"/>
191 <compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
192 <compilerarg value="-s"/>
193 <compilerarg path="${lwjgl.src}/generated"/>
194 <compilerarg value="-Acontextspecific"/>
195 <src>
196 <fileset dir="${lwjgl.src.templates.gl}">
197 <include name="${opengl-template-pattern}"/>
198 </fileset>
199 </src>
200 </javac>
150201 </target>
151202
152203 <!-- Generate OpenGL context capabilities [DEBUG] -->
153 <target name="generate-opengl-capabilities-debug" depends="generators" description="Generates java and native source for GL">
154 <apply executable="apt" parallel="true">
155 <arg value="-nocompile"/>
156 <arg value="-factory"/>
157 <arg value="org.lwjgl.util.generator.opengl.GLGeneratorProcessorFactory"/>
158 <arg value="-cp"/>
159 <arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
160 <arg value="-s"/>
161 <arg path="${lwjgl.src}/generated"/>
162 <arg value="-Ageneratechecks"/>
163 <arg value="-Acontextspecific"/>
164 <fileset dir="${lwjgl.src.templates}" includes="${opengl-template-pattern}"/>
165 </apply>
166 </target>
167
168 <!-- Generate OpenCL -->
204 <target name="generate-opengl-capabilities-debug" depends="generators" description="Generates debug java and native source for GL">
205 <javac destdir="${lwjgl.bin}" source="1.6" target="1.6" srcdir="${lwjgl.src.templates.gl}" fork="true" taskname="processor">
206 <compilerarg value="-proc:only"/>
207 <compilerarg value="-processor"/>
208 <compilerarg value="org.lwjgl.util.generator.opengl.GLGeneratorProcessor"/>
209 <compilerarg value="-cp"/>
210 <compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
211 <compilerarg value="-s"/>
212 <compilerarg path="${lwjgl.src}/generated"/>
213 <compilerarg value="-Ageneratechecks"/>
214 <compilerarg value="-Acontextspecific"/>
215 <src>
216 <fileset dir="${lwjgl.src.templates.gl}">
217 <include name="${opengl-template-pattern}"/>
218 </fileset>
219 </src>
220 </javac>
221 </target>
222
223 <!-- ********************************************************************************
224 *********************************************************************************
225 OPENGL ES
226 *********************************************************************************
227 **************************************************************************** -->
228
229 <!-- Generate OpenGL ES -->
230 <target name="generate-opengles" depends="generators" description="Generates java and native source for GL ES">
231 <javac destdir="${lwjgl.bin}" source="1.6" target="1.6" srcdir="${lwjgl.src.templates.gles}" fork="true" taskname="processor">
232 <compilerarg value="-proc:only"/>
233 <compilerarg value="-processor"/>
234 <compilerarg value="org.lwjgl.util.generator.GeneratorProcessor"/>
235 <compilerarg value="-cp"/>
236 <compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
237 <compilerarg value="-s"/>
238 <compilerarg path="${lwjgl.src}/generated"/>
239 <compilerarg value="-d"/>
240 <compilerarg path="${lwjgl.src.native}/generated/opengles"/>
241 <compilerarg value="-Abinpath=${lwjgl.bin}"/>
242 <!--<compilerarg value="-Acontextspecific"/>-->
243 <compilerarg value="-Atypemap=org.lwjgl.util.generator.opengl.GLESTypeMap"/>
244 <src>
245 <fileset dir="${lwjgl.src.templates.gles}">
246 <include name="${opengles-template-pattern}"/>
247 </fileset>
248 </src>
249 </javac>
250 </target>
251
252 <!-- Generate OpenGL ES [DEBUG] -->
253 <target name="generate-opengles-debug" depends="generators" description="Generates debug java and native source for GL ES">
254 <javac destdir="${lwjgl.bin}" source="1.6" target="1.6" srcdir="${lwjgl.src.templates.gles}" fork="true" taskname="processor">
255 <compilerarg value="-proc:only"/>
256 <compilerarg value="-processor"/>
257 <compilerarg value="org.lwjgl.util.generator.GeneratorProcessor"/>
258 <compilerarg value="-cp"/>
259 <compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
260 <compilerarg value="-s"/>
261 <compilerarg path="${lwjgl.src}/generated"/>
262 <compilerarg value="-d"/>
263 <compilerarg path="${lwjgl.src.native}/generated/opengles"/>
264 <compilerarg value="-Abinpath=${lwjgl.bin}"/>
265 <compilerarg value="-Ageneratechecks"/>
266 <!--<compilerarg value="-Acontextspecific"/>-->
267 <compilerarg value="-Atypemap=org.lwjgl.util.generator.opengl.GLESTypeMap"/>
268 <src>
269 <fileset dir="${lwjgl.src.templates.gles}">
270 <include name="${opengles-template-pattern}"/>
271 </fileset>
272 </src>
273 </javac>
274 </target>
275
276 <!-- Generate OpenGL ES context capabilities -->
277 <target name="generate-opengles-capabilities" depends="generators" description="Generates java and native source for GL ES">
278 <javac destdir="${lwjgl.bin}" source="1.6" target="1.6" srcdir="${lwjgl.src.templates.gles}" fork="true" taskname="processor">
279 <compilerarg value="-proc:only"/>
280 <compilerarg value="-processor"/>
281 <compilerarg value="org.lwjgl.util.generator.opengl.GLESGeneratorProcessor"/>
282 <compilerarg value="-cp"/>
283 <compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
284 <compilerarg value="-s"/>
285 <compilerarg path="${lwjgl.src}/generated"/>
286 <!--<compilerarg value="-Acontextspecific"/>-->
287 <src>
288 <fileset dir="${lwjgl.src.templates.gles}">
289 <include name="${opengles-template-pattern}"/>
290 </fileset>
291 </src>
292 </javac>
293 </target>
294
295 <!-- Generate OpenGL ES context capabilities [DEBUG] -->
296 <target name="generate-opengles-capabilities-debug" depends="generators" description="Generates debug java and native source for GL ES">
297 <javac destdir="${lwjgl.bin}" source="1.6" target="1.6" srcdir="${lwjgl.src.templates.gles}" fork="true" taskname="processor">
298 <compilerarg value="-proc:only"/>
299 <compilerarg value="-processor"/>
300 <compilerarg value="org.lwjgl.util.generator.opengl.GLESGeneratorProcessor"/>
301 <compilerarg value="-cp"/>
302 <compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
303 <compilerarg value="-s"/>
304 <compilerarg path="${lwjgl.src}/generated"/>
305 <compilerarg value="-Ageneratechecks"/>
306 <!--<compilerarg value="-Acontextspecific"/>-->
307 <src>
308 <fileset dir="${lwjgl.src.templates.gles}">
309 <include name="${opengles-template-pattern}"/>
310 </fileset>
311 </src>
312 </javac>
313 </target>
314
315 <!-- ********************************************************************************
316 *********************************************************************************
317 OPENCL
318 *********************************************************************************
319 **************************************************************************** -->
320
321 <!-- Generate OpenCL -->
169322 <target name="generate-opencl" depends="generators" description="Generates java and native source for CL">
170 <apply executable="apt" parallel="true">
171 <arg value="-nocompile"/>
172 <arg value="-factory"/>
173 <arg value="org.lwjgl.util.generator.GeneratorProcessorFactory"/>
174 <arg value="-cp"/>
175 <arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
176 <arg value="-s"/>
177 <arg path="${lwjgl.src}/generated"/>
178 <arg value="-d"/>
179 <arg path="${lwjgl.src.native}/generated"/>
180 <arg value="-Acontextspecific"/>
181 <arg value="-Atypemap=org.lwjgl.util.generator.opencl.CLTypeMap"/>
182 <fileset dir="${lwjgl.src.templates}" includes="${opencl-template-pattern}"/>
183 </apply>
323 <javac destdir="${lwjgl.bin}" source="1.6" target="1.6" srcdir="${lwjgl.src.templates.cl}" fork="true" taskname="processor">
324 <compilerarg value="-proc:only"/>
325 <compilerarg value="-processor"/>
326 <compilerarg value="org.lwjgl.util.generator.GeneratorProcessor"/>
327 <compilerarg value="-cp"/>
328 <compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
329 <compilerarg value="-s"/>
330 <compilerarg path="${lwjgl.src}/generated"/>
331 <compilerarg value="-d"/>
332 <compilerarg path="${lwjgl.src.native}/generated/opencl"/>
333 <compilerarg value="-Abinpath=${lwjgl.bin}"/>
334 <compilerarg value="-Acontextspecific"/>
335 <compilerarg value="-Atypemap=org.lwjgl.util.generator.opencl.CLTypeMap"/>
336 <src>
337 <fileset dir="${lwjgl.src.templates.cl}">
338 <include name="${opencl-template-pattern}"/>
339 </fileset>
340 </src>
341 </javac>
184342 </target>
185343
186344 <!-- Generate OpenCL [DEBUG] -->
187 <target name="generate-opencl-debug" depends="generators" description="Generates java and native source for CL">
188 <apply executable="apt" parallel="true">
189 <arg value="-nocompile"/>
190 <arg value="-factory"/>
191 <arg value="org.lwjgl.util.generator.GeneratorProcessorFactory"/>
192 <arg value="-cp"/>
193 <arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
194 <arg value="-s"/>
195 <arg path="${lwjgl.src}/generated"/>
196 <arg value="-d"/>
197 <arg path="${lwjgl.src.native}/generated"/>
198 <arg value="-Ageneratechecks"/>
199 <arg value="-Acontextspecific"/>
200 <arg value="-Atypemap=org.lwjgl.util.generator.opencl.CLTypeMap"/>
201 <fileset dir="${lwjgl.src.templates}" includes="${opencl-template-pattern}"/>
202 </apply>
345 <target name="generate-opencl-debug" depends="generators" description="Generates debug java and native source for CL">
346 <javac destdir="${lwjgl.bin}" source="1.6" target="1.6" srcdir="${lwjgl.src.templates.cl}" fork="true" taskname="processor">
347 <compilerarg value="-proc:only"/>
348 <compilerarg value="-processor"/>
349 <compilerarg value="org.lwjgl.util.generator.GeneratorProcessor"/>
350 <compilerarg value="-cp"/>
351 <compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
352 <compilerarg value="-s"/>
353 <compilerarg path="${lwjgl.src}/generated"/>
354 <compilerarg value="-d"/>
355 <compilerarg path="${lwjgl.src.native}/generated/opencl"/>
356 <compilerarg value="-Abinpath=${lwjgl.bin}"/>
357 <compilerarg value="-Ageneratechecks"/>
358 <compilerarg value="-Acontextspecific"/>
359 <compilerarg value="-Atypemap=org.lwjgl.util.generator.opencl.CLTypeMap"/>
360 <src>
361 <fileset dir="${lwjgl.src.templates.cl}">
362 <include name="${opencl-template-pattern}"/>
363 </fileset>
364 </src>
365 </javac>
203366 </target>
204367
205368 <!-- Generate OpenCL capabilities -->
206369 <target name="generate-opencl-capabilities" depends="generators" description="Generates capabilities for CL">
207 <apply executable="apt" parallel="true">
208 <arg value="-nocompile"/>
209 <arg value="-factory"/>
210 <arg value="org.lwjgl.util.generator.opencl.CLGeneratorProcessorFactory"/>
211 <arg value="-cp"/>
212 <arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
213 <arg value="-s"/>
214 <arg path="${lwjgl.src}/generated"/>
215 <arg value="-Acontextspecific"/>
216 <fileset dir="${lwjgl.src.templates}" includes="${opencl-template-pattern}"/>
217 </apply>
370 <javac destdir="${lwjgl.bin}" source="1.6" target="1.6" srcdir="${lwjgl.src.templates.cl}" fork="true" taskname="processor">
371 <compilerarg value="-proc:only"/>
372 <compilerarg value="-processor"/>
373 <compilerarg value="org.lwjgl.util.generator.opencl.CLGeneratorProcessor"/>
374 <compilerarg value="-cp"/>
375 <compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
376 <compilerarg value="-s"/>
377 <compilerarg path="${lwjgl.src}/generated"/>
378 <compilerarg value="-Acontextspecific"/>
379 <src>
380 <fileset dir="${lwjgl.src.templates.cl}">
381 <include name="${opencl-template-pattern}"/>
382 </fileset>
383 </src>
384 </javac>
218385 </target>
219386
220387 <!-- Generate OpenCL capabilities [DEBUG] -->
221 <target name="generate-opencl-capabilities-debug" depends="generators" description="Generates capabilities for CL">
222 <apply executable="apt" parallel="true">
223 <arg value="-nocompile"/>
224 <arg value="-factory"/>
225 <arg value="org.lwjgl.util.generator.opencl.CLGeneratorProcessorFactory"/>
226 <arg value="-cp"/>
227 <arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
228 <arg value="-s"/>
229 <arg path="${lwjgl.src}/generated"/>
230 <arg value="-Ageneratechecks"/>
231 <arg value="-Acontextspecific"/>
232 <fileset dir="${lwjgl.src.templates}" includes="${opencl-template-pattern}"/>
233 </apply>
388 <target name="generate-opencl-capabilities-debug" depends="generators" description="Generates debug capabilities for CL">
389 <javac destdir="${lwjgl.bin}" source="1.6" target="1.6" srcdir="${lwjgl.src.templates.cl}" fork="true" taskname="processor">
390 <compilerarg value="-proc:only"/>
391 <compilerarg value="-processor"/>
392 <compilerarg value="org.lwjgl.util.generator.opencl.CLGeneratorProcessor"/>
393 <compilerarg value="-cp"/>
394 <compilerarg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
395 <compilerarg value="-s"/>
396 <compilerarg path="${lwjgl.src}/generated"/>
397 <compilerarg value="-Ageneratechecks"/>
398 <compilerarg value="-Acontextspecific"/>
399 <src>
400 <fileset dir="${lwjgl.src.templates.cl}">
401 <include name="${opencl-template-pattern}"/>
402 </fileset>
403 </src>
404 </javac>
234405 </target>
235406 </project>
22 <property name="lwjgl.src.generated" location="${lwjgl.src}/generated" />
33 <property name="lwjgl.maven" location="maven" />
44 <property name="lwjgl.dstMaven" location="${lwjgl.temp}/maven" />
5
65 <property name="lwjgl.src.java" location="${lwjgl.src}/java" />
7
8 <property name="lwjgl-maven-version" value="2.7.0"/>
9
6 <property name="jinput.version" value="2.0.5" />
7
108 <fileset id="lwjgl-sources.manual.fileset" dir="${lwjgl.src.java}">
119 <patternset refid="lwjgl.package.pattern" />
10 <patternset refid="lwjgl.package.dependencies.pattern"/>
1211 </fileset>
1312
1413 <fileset id="lwjgl-sources.generated.fileset" dir="${lwjgl.src.generated}">
2221 <patternset refid="lwjgl_util.package.pattern" />
2322 </fileset>
2423
24 <target name="-fixmavenversion">
25 <script language="javascript">
26 <![CDATA[
27 importPackage(java.lang);
28 var originalVersion = project.getProperty("lwjgl.version");
29 System.out.println("LWJGL Version: " + originalVersion);
30 var mavenVersion = originalVersion;
31 if(originalVersion.match(/^[0-9]+\.[0-9]+$/)){
32 System.out.println("Fixing LWJGL Maven version (Maven version should be x.y.z)");
33 mavenVersion = originalVersion + ".0";
34 }
35 if(!mavenVersion.match(/^.*-SNAPSHOT$/)){
36 var forceSnapshot = project.getProperty("snapshot")
37 if(forceSnapshot!=null && forceSnapshot!="false"){
38 System.out.println("Forcing Maven Version to Snapshot");
39 mavenVersion = mavenVersion + "-SNAPSHOT";
40 }
41 }
42
43 project.setNewProperty("lwjgl-maven-version",mavenVersion);
44 System.out.println("LWJGL Maven Version: " + project.getProperty("lwjgl-maven-version"));
45 ]]>
46 </script>
47 </target>
48
49 <target name="-checkjinputversion">
50 <script language="javascript" classpath="${lwjgl.lib}/jinput.jar">
51 <![CDATA[
52 importPackage(java.lang);
53 var version = net.java.games.input.Version.getVersion()
54 project.setNewProperty("jinputversion",version);
55 var declaredJinputVersion = project.getProperty("jinput.version");
56 System.out.println("JINPUT Version: " + version + " - DeclaredVersion: " + declaredJinputVersion);
57
58 if(declaredJinputVersion.equals(version)){
59 System.out.println("JINPUT Version Matches");
60 project.setNewProperty("jinputversionmatches", true);
61 } else {
62 System.out.println("JINPUT Version don't match");
63 }
64 ]]>
65 </script>
66 <condition property="failjinputcheck">
67 <and>
68 <not><isset property="jinputversionmatches" /></not>
69 <not><isset property="overridejinput" /></not>
70 </and>
71 </condition>
72 <fail if="failjinputcheck" message="Jinput version in project (${jinputversion}) is different from the declared jinput version for maven (${jinput.version}) add -Doverridejinput=true as a command line option to avoid this check" />
73 </target>
2574
2675 <target name="maven-full">
2776 <antcall target="clean-java" />
3382 <antcall target="maven"/>
3483 </target>
3584
36 <target name="maven">
85 <target name="maven" depends="-fixmavenversion, -checkjinputversion"> <!-- Added as dependency because using antcall creates a new project scope -->
3786 <delete dir="${lwjgl.dstMaven}" quiet="true" failonerror="false" taskname="cleaning maven dist" />
3887 <mkdir dir="${lwjgl.dstMaven}" taskname="initialiazing temp maven folder" />
3988 <antcall target="-copylwjgljars" />
4493 <antcall target="-copymavendeploybuild"/>
4594 <antcall target="-copymaventdist"/>
4695 </target>
96
97
98
99
100
101
47102
48103
49104 <target name="-copylwjgljars">
112167 </target>
113168
114169 <target name="-createmavennativejars">
115 <jar destfile="${lwjgl.dstMaven}/lwjgl-platform-natives-win.jar" taskname="lwjgl-platform-natives-win.jar">
170 <jar destfile="${lwjgl.dstMaven}/lwjgl-platform-natives-windows.jar" taskname="lwjgl-platform-natives-windows.jar">
116171 <fileset dir="${lwjgl.lib}/windows">
117172 <patternset refid="lwjgl-windows-lwjgl.fileset"/>
118173 </fileset>
122177 <patternset refid="lwjgl-linux-lwjgl.fileset"/>
123178 </fileset>
124179 </jar>
125 <jar destfile="${lwjgl.dstMaven}/lwjgl-platform-natives-mac.jar" taskname="lwjgl-platform-natives-mac.jar">
180 <jar destfile="${lwjgl.dstMaven}/lwjgl-platform-natives-osx.jar" taskname="lwjgl-platform-natives-osx.jar">
126181 <fileset dir="${lwjgl.lib}/macosx">
127182 <patternset refid="lwjgl-macosx-lwjgl.fileset"/>
128183 </fileset>
136191 </fileset>
137192 <filterset>
138193 <filter token="VERSION" value="${lwjgl-maven-version}"/>
194 <filter token="JINPUTVERSION" value="${jinput.version}"/>
139195 </filterset>
140196 </copy>
141197 </target>
147203 </fileset>
148204 </copy>
149205 </target>
150
206
151207 <target name="-copymaventdist">
152208 <zip destfile="${lwjgl.dist}/lwjgl-maven-${lwjgl.version}.zip" basedir="${lwjgl.temp}" includes="maven/**" />
153209 </target>
33 <property name="native" location="../../src/native"/>
44 <property name="libname32" value="liblwjgl.so"/>
55 <property name="libname64" value="liblwjgl64.so"/>
6 <property name="libs32" value="-L/usr/X11R6/lib -L/usr/X11/lib -lm -lX11 -lXext -lXcursor -lXrandr -lpthread -L${java.home}/lib/i386 -ljawt" />
6 <property name="libs32" value="-L/usr/X11R6/lib -L/usr/X11/lib -lm -lX11 -lXext -lXcursor -lXrandr -lXxf86vm -lpthread -L${java.home}/lib/i386 -ljawt" />
77 <property name="libs64" value="-L/usr/X11R6/lib64 -L/usr/X11/lib64 -lm -lX11 -lXext -lXcursor -lXrandr -lXxf86vm -lpthread -L${java.home}/lib/amd64 -ljawt" />
88 <property name="cflags32" value="-O2 -Wall -c -fPIC -std=c99 -Wunused"/>
99
2020 <exec executable="uname" outputproperty="hwplatform">
2121 <arg value="-m"/>
2222 </exec>
23 <condition property="xf86vm_lib" value="-lXxf86vm" else="-Wl,-static,-lXxf86vm,-call_shared">
24 <os name="SunOS" />
25 </condition>
2623 <condition property="cflags_pthread" value="-pthreads" else="-pthread">
2724 <os name="SunOS" />
2825 </condition>
3835 <os name="SunOS" />
3936 </condition>
4037
41 <property name="linker_flags32" value="${version_script_flags32} -shared -O2 -Wall -o ${libname32} ${libs32} ${xf86vm_lib}"/>
42 <property name="linker_flags64" value="${version_script_flags64} -shared -O2 -Wall -o ${libname64} ${libs64} ${xf86vm_lib}"/>
38 <property name="linker_flags32" value="${version_script_flags32} -shared -O2 -Wall -o ${libname32} ${libs32}"/>
39 <property name="linker_flags64" value="${version_script_flags64} -shared -O2 -Wall -o ${libname64} ${libs64}"/>
4340
4441 <condition property="build.32bit.only">
4542 <not>
6461
6562 <target name="compile32" unless="build.64bit.only">
6663 <mkdir dir="x32"/>
67 <apply dir="x32" executable="gcc" skipemptyfilesets="true" failonerror="true">
64 <apply dir="x32" executable="gcc" skipemptyfilesets="true" failonerror="true" parallel="true">
6865 <arg line="${cflags32} ${cflags_pthread}"/>
6966 <arg value="-I${java.home}/include"/>
7067 <arg value="-I${java.home}/include/linux"/>
7269 <arg value="-I${java.home}/../include/linux"/>
7370 <arg value="-I${java.home}/../include/solaris"/>
7471 <arg value="-I${native}/common"/>
72 <arg value="-I${native}/common/opengl"/>
7573 <arg value="-I${native}/linux"/>
74 <arg value="-I${native}/linux/opengl"/>
7675 <mapper type="glob" from="*.c" to="*.o"/>
77 <fileset dir="${native}/linux" includes="*.c"/>
78 <fileset dir="${native}/generated" includes="*.c"/>
79 <fileset dir="${native}/common" includes="*.c"/>
80 </apply>
76 <fileset dir="${native}/common" includes="*.c"/>
77 <fileset dir="${native}/common/opengl" includes="*.c"/>
78 <fileset dir="${native}/generated/openal" includes="*.c"/>
79 <fileset dir="${native}/generated/opencl" includes="*.c"/>
80 <fileset dir="${native}/generated/opengl" includes="*.c"/>
81 <fileset dir="${native}/linux" includes="*.c"/>
82 <fileset dir="${native}/linux/opengl" includes="*.c"/>
83 </apply>
8184 <apply dir="." parallel="true" executable="gcc" failonerror="true">
8285 <srcfile/>
8386 <arg line="${linker_flags32}"/>
9093
9194 <target name="compile64" unless="build.32bit.only">
9295 <mkdir dir="x64"/>
93 <apply dir="x64" executable="gcc" skipemptyfilesets="true" failonerror="true">
96 <apply dir="x64" executable="gcc" skipemptyfilesets="true" failonerror="true" parallel="true">
9497 <arg line="${cflags64} ${cflags_pthread}"/>
9598 <arg value="-I${java.home}/include"/>
9699 <arg value="-I${java.home}/include/linux"/>
98101 <arg value="-I${java.home}/../include/linux"/>
99102 <arg value="-I${java.home}/../include/solaris"/>
100103 <arg value="-I${native}/common"/>
104 <arg value="-I${native}/common/opengl"/>
101105 <arg value="-I${native}/linux"/>
106 <arg value="-I${native}/linux/opengl"/>
102107 <mapper type="glob" from="*.c" to="*.o"/>
103 <fileset dir="${native}/linux" includes="*.c"/>
104 <fileset dir="${native}/generated" includes="*.c"/>
105 <fileset dir="${native}/common" includes="*.c"/>
106 </apply>
108 <fileset dir="${native}/common" includes="*.c"/>
109 <fileset dir="${native}/common/opengl" includes="*.c"/>
110 <fileset dir="${native}/generated/openal" includes="*.c"/>
111 <fileset dir="${native}/generated/opencl" includes="*.c"/>
112 <fileset dir="${native}/generated/opengl" includes="*.c"/>
113 <fileset dir="${native}/linux" includes="*.c"/>
114 <fileset dir="${native}/linux/opengl" includes="*.c"/>
115 </apply>
107116 <apply dir="." parallel="true" executable="gcc" failonerror="true">
108117 <srcfile/>
109118 <arg line="${linker_flags64}"/>
0 <?xml version="1.0"?>
1
2 <project name="lwjgl native code, linux" basedir="../../bin/lwjgles" default="compile">
3 <property name="native" location="../../src/native"/>
4 <property name="libname32" value="liblwjgl.so"/>
5 <property name="libname64" value="liblwjgl64.so"/>
6 <property name="lib_folder" value="${lwjgl.lib}/linux"/>
7 <property name="libs32" value="-L${lib_folder} -lEGL -L/usr/X11R6/lib -L/usr/X11/lib -lm -lX11 -lXext -lXcursor -lXrandr -lXxf86vm -lpthread -L${java.home}/lib/i386 -ljawt" />
8 <property name="libs64" value="-L${lib_folder}/x64 -lEGL -L/usr/X11R6/lib64 -L/usr/X11/lib64 -lm -lX11 -lXext -lXcursor -lXrandr -lXxf86vm -lpthread -L${java.home}/lib/amd64 -ljawt" />
9 <property name="cflags32" value="-O2 -Wall -c -fPIC -std=c99 -Wunused"/>
10
11 <target name="clean">
12 <delete>
13 <fileset dir="x32"/>
14 <fileset dir="x64"/>
15 <fileset dir="." includes="*.o"/>
16 <fileset dir="." includes="*.so"/>
17 </delete>
18 </target>
19
20 <target name="compile">
21 <exec executable="uname" outputproperty="hwplatform">
22 <arg value="-m"/>
23 </exec>
24 <condition property="cflags_pthread" value="-pthreads" else="-pthread">
25 <os name="SunOS" />
26 </condition>
27 <condition property="version_script_flags32" value="" else="-Wl,--version-script='${native}/linux/lwjgl.map'">
28 <os name="SunOS" />
29 </condition>
30 <condition property="version_script_flags64" value="-m64" else="-Wl,--version-script='${native}/linux/lwjgl.map'">
31 <and>
32 <os name="SunOS" />
33 </and>
34 </condition>
35 <condition property="cflags64" value="-O2 -m64 -Wall -c -fPIC -std=c99 -Wunused" else="-O2 -Wall -c -fPIC -std=c99 -Wunused">
36 <os name="SunOS" />
37 </condition>
38
39 <property name="linker_flags32" value="${version_script_flags32} -shared -O2 -Wall -o ${libname32} ${libs32}"/>
40 <property name="linker_flags64" value="${version_script_flags64} -shared -O2 -Wall -o ${libname64} ${libs64}"/>
41
42 <condition property="build.32bit.only">
43 <not>
44 <or>
45 <equals arg1="${hwplatform}" arg2="x86_64"/>
46 <equals arg1="${hwplatform}" arg2="i86pc"/>
47 </or>
48 </not>
49 </condition>
50
51 <!-- On linux, the 64 bit jre doesn't have the 32 bit libs -->
52 <condition property="build.64bit.only">
53 <and>
54 <os name="Linux"/>
55 <equals arg1="${hwplatform}" arg2="x86_64"/>
56 </and>
57 </condition>
58
59 <antcall target="compile32"/>
60 <antcall target="compile64"/>
61 </target>
62
63 <target name="compile32" unless="build.64bit.only">
64 <mkdir dir="x32"/>
65 <apply dir="x32" executable="gcc" skipemptyfilesets="true" failonerror="true">
66 <arg line="${cflags32} ${cflags_pthread}"/>
67 <arg value="-I${java.home}/include"/>
68 <arg value="-I${java.home}/include/linux"/>
69 <arg value="-I${java.home}/../include"/>
70 <arg value="-I${java.home}/../include/linux"/>
71 <arg value="-I${java.home}/../include/solaris"/>
72 <arg value="-I${native}/common"/>
73 <arg value="-I${native}/common/opengles"/>
74 <arg value="-I${native}/linux"/>
75 <arg value="-I${native}/linux/opengles"/>
76 <mapper type="glob" from="*.c" to="*.o"/>
77 <fileset dir="${native}/common" includes="*.c"/>
78 <fileset dir="${native}/common/opengles" includes="*.c"/>
79 <fileset dir="${native}/generated/openal" includes="*.c"/>
80 <fileset dir="${native}/generated/opencl" includes="*.c"/>
81 <fileset dir="${native}/generated/opengles" includes="*.c"/>
82 <fileset dir="${native}/linux" includes="*.c"/>
83 <fileset dir="${native}/linux/opengles" includes="*.c"/>
84 </apply>
85 <apply dir="." parallel="true" executable="gcc" failonerror="true">
86 <srcfile/>
87 <arg line="${linker_flags32}"/>
88 <fileset dir="x32" includes="*.o"/>
89 </apply>
90 <apply dir="." parallel="true" executable="strip" failonerror="true">
91 <fileset file="${libname32}"/>
92 </apply>
93 </target>
94
95 <target name="compile64" unless="build.32bit.only">
96 <mkdir dir="x64"/>
97 <apply dir="x64" executable="gcc" skipemptyfilesets="true" failonerror="true">
98 <arg line="${cflags64} ${cflags_pthread}"/>
99 <arg value="-I${java.home}/include"/>
100 <arg value="-I${java.home}/include/linux"/>
101 <arg value="-I${java.home}/../include"/>
102 <arg value="-I${java.home}/../include/linux"/>
103 <arg value="-I${java.home}/../include/solaris"/>
104 <arg value="-I${native}/common"/>
105 <arg value="-I${native}/common/opengles"/>
106 <arg value="-I${native}/linux"/>
107 <arg value="-I${native}/linux/opengles"/>
108 <mapper type="glob" from="*.c" to="*.o"/>
109 <fileset dir="${native}/common" includes="*.c"/>
110 <fileset dir="${native}/common/opengles" includes="*.c"/>
111 <fileset dir="${native}/generated/openal" includes="*.c"/>
112 <fileset dir="${native}/generated/opencl" includes="*.c"/>
113 <fileset dir="${native}/generated/opengles" includes="*.c"/>
114 <fileset dir="${native}/linux" includes="*.c"/>
115 <fileset dir="${native}/linux/opengles" includes="*.c"/>
116 </apply>
117 <apply dir="." parallel="true" executable="gcc" failonerror="true">
118 <srcfile/>
119 <arg line="${linker_flags64}"/>
120 <fileset dir="x64" includes="*.o"/>
121 </apply>
122 <apply dir="." parallel="true" executable="strip" failonerror="true">
123 <fileset file="${libname64}"/>
124 </apply>
125 </target>
126 </project>
00 #!/bin/sh
11
2 nm -g "$1"/*.o | grep "Java_" | cut -d ' ' -f3 | cut -c 1-
3 nm -g "$1"/*.o | grep "JNI_" | cut -d ' ' -f3 | cut -c 1-
2 nm -j -g "$1"/*.o | grep -E "J(ava|NI)_[^.]*$"
0
10 <project name="OS X Native code" basedir="../../bin/lwjgl" default="nativelibrary">
21 <property name="native" location="../../src/native"/>
32
43 <target name="init">
5 <mkdir dir="ppc"/>
6 <mkdir dir="i386"/>
74 <mkdir dir="x86_64"/>
8 </target>
9
5 <property environment="env" />
6 <!-- Ask Xcode for correct path to XCode tools -->
7 <!-- Will fail if XCode Command Line Tools are not installed on 10.7+ (Lion) -->
8 <exec executable="xcode-select" outputproperty="developer_path" errorproperty="xcode-select.error" failonerror="false" failifexecutionfails="false">
9 <arg value="-print-path" />
10 </exec>
11 <!-- Default to /Developer if xcode-select fails -->
12 <condition property="developer_path" value="/Developer">
13 <isset property="xcode-select.error" />
14 </condition>
15
16 <property name="sdk_path" value="Platforms/MacOSX.platform/Developer/SDKs"/>
17 <property name="jvm_headers_path" value="System/Library/Frameworks/JavaVM.framework/Versions/A/Headers"/>
18
19 <!-- Choose a JavaVM.framework -->
20 <condition property="javavmroot" value="${developer_path}/${sdk_path}/MacOSX10.9.sdk">
21 <and>
22 <not><isset property="javavmroot"/></not>
23 <available file="${developer_path}/${sdk_path}/MacOSX10.9.sdk/${jvm_headers_path}" type="dir"/>
24 </and>
25 </condition>
26 <condition property="javavmroot" value="${developer_path}/${sdk_path}/MacOSX10.8.sdk">
27 <and>
28 <not><isset property="javavmroot"/></not>
29 <available file="${developer_path}/${sdk_path}/MacOSX10.8.sdk/${jvm_headers_path}" type="dir"/>
30 </and>
31 </condition>
32 <condition property="javavmroot" value="${developer_path}/${sdk_path}/MacOSX10.7.sdk">
33 <and>
34 <not><isset property="javavmroot"/></not>
35 <available file="${developer_path}/${sdk_path}/MacOSX10.7.sdk/${jvm_headers_path}" type="dir"/>
36 </and>
37 </condition>
38 <condition property="javavmroot" value="${developer_path}/${sdk_path}/MacOSX10.6.sdk">
39 <and>
40 <not><isset property="javavmroot"/></not>
41 <available file="${developer_path}/${sdk_path}/MacOSX10.6.sdk/${jvm_headers_path}" type="dir"/>
42 </and>
43 </condition>
44 <condition property="javavmroot" value=""> <!-- Old location -->
45 <and>
46 <not><isset property="javavmroot"/></not>
47 <available file="/${jvm_headers_path}" type="dir"/>
48 </and>
49 </condition>
50
51 <!-- Choose a MacOSX SDK -->
52 <property name="compiler" value="clang"/> <!-- Default to clang for 10.8 and up -->
53
54 <condition property="sdkroot" value="${developer_path}/${sdk_path}/MacOSX10.9.sdk">
55 <and>
56 <not><isset property="sdkroot"/></not>
57 <available file="${developer_path}/${sdk_path}/MacOSX10.9.sdk" type="dir"/>
58 </and>
59 </condition>
60 <condition property="sdkroot" value="${developer_path}/${sdk_path}/MacOSX10.8.sdk">
61 <and>
62 <not><isset property="sdkroot"/></not>
63 <available file="${developer_path}/${sdk_path}/MacOSX10.8.sdk" type="dir"/>
64 </and>
65 </condition>
66
67 <!-- If we're on 10.7 or lower, use gcc instead of clang -->
68 <condition property="compiler" value="gcc-4.2">
69 <and>
70 <not><isset property="sdkroot"/></not>
71 <available file="gcc-4.2" filepath="${env.PATH}"/>
72 </and>
73 </condition>
74 <condition property="compiler" value="gcc">
75 <and>
76 <not><isset property="sdkroot"/></not>
77 <not><available file="gcc-4.2" filepath="${env.PATH}"/></not>
78 <available file="gcc" filepath="${env.PATH}"/>
79 </and>
80 </condition>
81
82 <condition property="sdkroot" value="${developer_path}/${sdk_path}/MacOSX10.7.sdk">
83 <and>
84 <not><isset property="sdkroot"/></not>
85 <available file="${developer_path}/${sdk_path}/MacOSX10.7.sdk" type="dir"/>
86 </and>
87 </condition>
88 <condition property="sdkroot" value="${developer_path}/${sdk_path}/MacOSX10.6.sdk">
89 <and>
90 <not><isset property="sdkroot"/></not>
91 <available file="${developer_path}/${sdk_path}/MacOSX10.6.sdk" type="dir"/>
92 </and>
93 </condition>
94 <condition property="sdkroot" value="${developer_path}/SDKs/MacOSx10.6.sdk"> <!-- Old XCode location -->
95 <and>
96 <not><isset property="sdkroot"/></not>
97 <available file="${developer_path}/SDKs/MacOSx10.6.sdk" type="dir"/>
98 </and>
99 </condition>
100 </target>
101
10102 <target name="clean">
11103 <delete failonerror="false">
12104 <fileset dir="i386"/>
13105 <fileset dir="x86_64"/>
14 <fileset dir="ppc"/>
15 <fileset dir="." includes="liblwjgl.jnilib"/>
106 <fileset dir="." includes="liblwjgl.dylib"/>
16107 <fileset dir="." includes="lwjgl.symbols"/>
17108 </delete>
18109 </target>
19110
20 <target name="compile">
111 <target name="compile" depends="init">
21112 <apply dir="${dstdir}" executable="${compiler}" os="Mac OS X" skipemptyfilesets="true" failonerror="true" dest="${dstdir}">
22 <arg line="${cflags} -ObjC -O2 -Wall -Wunused -c -fPIC -I${sdkroot}/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers -I${native}/common -I${native}/macosx"/>
113 <arg line="${cflags} -ObjC -O2 -Wall -Wunused -c -fPIC -I${javavmroot}/${jvm_headers_path} -I${native}/common -I${native}/common/opengl -I${native}/macosx"/>
23114 <!-- Map from *.m and *.c to .o -->
24115 <mapper type="regexp" from="^(.*)\.(c|m)" to="\1.o"/>
25116 <fileset dir="${native}/macosx" includes="*.m"/>
26117 <fileset dir="${native}/macosx" includes="*.c"/>
27118 <fileset dir="${native}/common" includes="*.c"/>
28 <fileset dir="${native}/generated" includes="*.c"/>
29 </apply>
30 </target>
31
32 <target name="link">
33 <apply dir="${objdir}" parallel="true" executable="${linker}" os="Mac OS X" failonerror="true" skipemptyfilesets="true">
34 <arg line="${linkerflags} -exported_symbols_list ../lwjgl.symbols -dynamiclib -o ${libname} -framework Foundation -framework AppKit -framework JavaVM -framework Carbon"/>
119 <fileset dir="${native}/common/opengl" includes="*.c"/>
120 <fileset dir="${native}/generated/openal" includes="*.c"/>
121 <fileset dir="${native}/generated/opencl" includes="*.c"/>
122 <fileset dir="${native}/generated/opengl" includes="*.c"/>
123 </apply>
124 </target>
125
126 <target name="link" depends="init">
127 <condition property="jdk_lib" value="${java.home}/lib">
128 <available file="${java.home}/lib/libjawt.dylib" type="file"/>
129 </condition>
130 <condition property="jdk_lib" value="${java.home}/../Libraries">
131 <not><isset property="jdk_lib"/></not>
132 </condition>
133
134 <apply dir="${objdir}" parallel="true" executable="${compiler}" os="Mac OS X" failonerror="true" skipemptyfilesets="true">
135 <arg line="${linkerflags} -exported_symbols_list ../lwjgl.symbols -dynamiclib -o ${libname} -framework Foundation -weak_framework AppKit -framework Carbon -framework OpenGL -framework QuartzCore -L${jdk_lib} -ljawt"/>
35136 <fileset dir="${objdir}" includes="*.o"/>
36137 </apply>
37138 <apply dir="${objdir}" executable="strip" os="Mac OS X" failonerror="true">
39140 <fileset dir="." file="${libname}"/>
40141 </apply>
41142 </target>
42
143
43144 <target name="nativelibrary" depends="init">
44 <property name="universal_sdkroot" location="/Developer/SDKs/MacOSX10.4u.sdk"/>
45 <property name="ppc_sdkroot" location="/Developer/SDKs/MacOSX10.3.9.sdk"/>
46 <property name="x86_64_sdkroot" location="/Developer/SDKs/MacOSX10.5.sdk"/>
145 <echo message=" Compiler: ${compiler}"/>
146 <echo message=" Mac OS SDK: ${sdkroot}"/>
147 <echo message="JavaVM.framework: ${javavmroot}"/>
148
149 <condition property="build_x86_64" value="1">
150 <equals arg1="${compiler}" arg2="clang"/>
151 </condition>
152
153 <antcall target="-build"/>
154 </target>
155
156 <target name="-build" depends="-build_universal,-build_x86_x64"/>
157
158 <target name="-build_universal" unless="build_x86_64">
159 <mkdir dir="i386"/>
160
161 <property name="universal_sdkroot" location="${sdkroot}"/>
162 <property name="x86_64_sdkroot" location="${sdkroot}"/>
47163 <property name="universal_flags" value="-isysroot ${universal_sdkroot}"/>
48 <property name="ppc_flags" value="-isysroot ${ppc_sdkroot}"/>
49 <antcall target="compile">
50 <param name="dstdir" location="ppc"/>
51 <param name="compiler" value="gcc-4.0"/>
52 <param name="sdkroot" location="${ppc_sdkroot}"/>
53 <param name="cflags" value="${universal_flags} -arch ppc -mmacosx-version-min=10.3"/>
54 </antcall>
55164 <antcall target="compile">
56165 <param name="dstdir" location="i386"/>
57 <param name="compiler" value="gcc-4.0"/>
58166 <param name="sdkroot" location="${universal_sdkroot}"/>
59 <param name="cflags" value="${universal_flags} -arch i386 -mmacosx-version-min=10.4"/>
167 <param name="cflags" value="${universal_flags} -arch i386 -mmacosx-version-min=10.5"/>
60168 </antcall>
61169 <antcall target="compile">
62170 <param name="dstdir" location="x86_64"/>
63 <param name="compiler" value="gcc-4.0"/>
64171 <param name="sdkroot" location="${universal_sdkroot}"/>
65172 <param name="cflags" value="-isysroot ${x86_64_sdkroot} -arch x86_64 -mmacosx-version-min=10.5"/>
66173 </antcall>
69176 <arg path="i386"/>
70177 </exec>
71178 <antcall target="link">
72 <param name="objdir" location="ppc"/>
73 <param name="libname" value="liblwjgl-ppc.jnilib"/>
74 <param name="linker" value="gcc-4.0"/>
75 <param name="linkerflags" value="${universal_flags} -arch ppc -mmacosx-version-min=10.3"/>
76 </antcall>
77 <antcall target="link">
78179 <param name="objdir" location="i386"/>
79 <param name="libname" value="liblwjgl-i386.jnilib"/>
80 <param name="linker" value="gcc-4.0"/>
81 <param name="linkerflags" value="${universal_flags} -arch i386 -mmacosx-version-min=10.4"/>
180 <param name="libname" value="liblwjgl-i386.dylib"/>
181 <param name="linkerflags" value="${universal_flags} -arch i386 -mmacosx-version-min=10.5"/>
82182 </antcall>
83183 <antcall target="link">
84184 <param name="objdir" location="x86_64"/>
85 <param name="libname" value="liblwjgl-i86_64.jnilib"/>
86 <param name="linker" value="gcc-4.0"/>
185 <param name="libname" value="liblwjgl-i86_64.dylib"/>
87186 <param name="linkerflags" value="-isysroot ${x86_64_sdkroot} -arch x86_64 -mmacosx-version-min=10.5"/>
88187 </antcall>
89 <apply dir="." parallel="true" executable="lipo" os="Mac OS X" failonerror="true" skipemptyfilesets="true" >
188 <apply dir="." parallel="true" executable="lipo" os="Mac OS X" failonerror="true" skipemptyfilesets="true">
90189 <arg value="-create"/>
91190 <srcfile/>
92191 <arg value="-output"/>
93 <arg path="liblwjgl.jnilib"/>
94 <fileset file="ppc/liblwjgl-ppc.jnilib"/>
95 <fileset file="i386/liblwjgl-i386.jnilib"/>
96 <fileset file="x86_64/liblwjgl-i86_64.jnilib"/>
97 </apply>
98 </target>
99 </project>
192 <arg path="liblwjgl.dylib"/>
193 <fileset file="i386/liblwjgl-i386.dylib"/>
194 <fileset file="x86_64/liblwjgl-i86_64.dylib"/>
195 </apply>
196 </target>
197
198 <target name="-build_x86_x64" if="build_x86_64">
199 <antcall target="compile">
200 <param name="dstdir" location="x86_64"/>
201 <param name="sdkroot" location="${sdkroot}"/>
202 <param name="cflags" value="-isysroot ${sdkroot} -arch x86_64 -mmacosx-version-min=10.5"/>
203 </antcall>
204 <exec vmlauncher="true" executable="sh" output="lwjgl.symbols" failonerror="true">
205 <arg path="../../platform_build/macosx_ant/build-symbol-list"/>
206 <arg path="x86_64"/>
207 </exec>
208 <antcall target="link">
209 <param name="objdir" location="x86_64"/>
210 <param name="libname" value="liblwjgl-i86_64.dylib"/>
211 <param name="linkerflags" value="-isysroot ${sdkroot} -arch x86_64 -mmacosx-version-min=10.5"/>
212 </antcall>
213 <apply dir="." parallel="true" executable="lipo" os="Mac OS X" failonerror="true" skipemptyfilesets="true">
214 <arg value="-create"/>
215 <srcfile/>
216 <arg value="-output"/>
217 <arg path="liblwjgl.dylib"/>
218 <fileset file="x86_64/liblwjgl-i86_64.dylib"/>
219 </apply>
220 </target>
221 </project>
2121 <srcfile/>
2222 <fileset dir="${native}/windows" includes="*.c"/>
2323 <fileset dir="${native}/common" includes="*.c"/>
24 <fileset dir="${native}/generated" includes="*.c"/>
24 <fileset dir="${native}/generated/openal" includes="*.c"/>
25 <fileset dir="${native}/generated/opencl" includes="*.c"/>
26 <fileset dir="${native}/generated/opengl" includes="*.c"/>
2527 <mapper type="glob" from="*.c" to="*.o"/>
2628 </apply>
2729 </target>
5254 <fileset dir="." includes="*.dll"/>
5355 </delete>
5456 </target>
55
57
5658 <target name="compile">
5759 <property name="libs" value="-lkernel32 -lole32 -lopengl32 -lversion -luser32 -lgdi32 -ladvapi32 -lwinmm"/>
5860 <antcall target="compile_dir"/>
55 <property name="sdkhome" location="${env.MSSDK}"/>
66
77 <target name="compile_dir">
8 <apply dir="." failonerror="true" executable="cl" dest="." skipemptyfilesets="true">
9 <arg line="/Ox /W2 /nologo /Ox /Ob2 /Oi /Ot /Oy /FD /EHsc /MT /Gy /W2 /nologo /c"/>
8 <apply dir="." failonerror="true" executable="cl" dest="." skipemptyfilesets="true" parallel="true">
9 <arg line="/c /W2 /EHsc /Ox /Gy /MT /MP /nologo"/>
1010 <arg value="/I${sdkhome}\include"/>
1111 <arg value="/I${java.home}\..\include"/>
1212 <arg value="/I${java.home}\..\include\win32"/>
1313 <arg value="/I${native}\common"/>
14 <arg value="/I${native}\common\opengl"/>
1415 <arg value="/I${native}\windows"/>
16 <arg value="/I${native}\windows\opengl"/>
1517 <srcfile/>
18 <fileset dir="${native}/common" includes="*.c"/>
19 <fileset dir="${native}/common/opengl" includes="*.c"/>
20 <fileset dir="${native}/generated/openal" includes="*.c"/>
21 <fileset dir="${native}/generated/opencl" includes="*.c"/>
22 <fileset dir="${native}/generated/opengl" includes="*.c"/>
1623 <fileset dir="${native}/windows" includes="*.c"/>
17 <fileset dir="${native}/common" includes="*.c"/>
18 <fileset dir="${native}/generated" includes="*.c"/>
24 <fileset dir="${native}/windows/opengl" includes="*.c"/>
1925 <mapper type="glob" from="*.c" to="*.obj"/>
2026 </apply>
2127 </target>
4248 <fileset dir="." includes="*.lib"/>
4349 </delete>
4450 </target>
45
51
4652 <target name="compile">
4753 <condition property="sdkhomelib" value="${sdkhome}\lib" else="${sdkhome}\lib\x64">
4854 <equals arg1="${os.arch}" arg2="x86"/>
0 <?xml version="1.0"?>
1
2 <project name="lwjgl native code, native code" basedir="../../bin/lwjgles" default="compile">
3 <property name="native" location="../../src/native"/>
4 <property environment="env"/>
5 <property name="sdkhome" location="${env.MSSDK}"/>
6
7 <target name="compile_dir">
8 <apply dir="." failonerror="true" executable="cl" dest="." skipemptyfilesets="true" parallel="true">
9 <arg line="/c /W2 /EHsc /Ox /Gy /MT /MP /nologo"/>
10 <arg value="/I${sdkhome}\include"/>
11 <arg value="/I${java.home}\..\include"/>
12 <arg value="/I${java.home}\..\include\win32"/>
13 <arg value="/I${native}\common"/>
14 <arg value="/I${native}\common\opengles"/>
15 <arg value="/I${native}\windows"/>
16 <arg value="/I${native}\windows\opengles"/>
17 <srcfile/>
18 <fileset dir="${native}/common" includes="*.c"/>
19 <fileset dir="${native}/common/opengles" includes="*.c"/>
20 <fileset dir="${native}/generated/openal" includes="*.c"/>
21 <fileset dir="${native}/generated/opencl" includes="*.c"/>
22 <fileset dir="${native}/generated/opengles" includes="*.c"/>
23 <fileset dir="${native}/windows" includes="*.c"/>
24 <fileset dir="${native}/windows/opengles" includes="*.c"/>
25 <mapper type="glob" from="*.c" to="*.obj"/>
26 </apply>
27 </target>
28
29 <target name="link">
30 <apply dir="." parallel="true" executable="cl" failonerror="true">
31 <arg line="/LD /nologo"/>
32 <srcfile/>
33 <arg line="/Fe${dllname} /link"/>
34 <arg value="/LIBPATH:${java.home}\..\lib"/>
35 <arg value="/LIBPATH:${sdkhomelib}"/>
36 <arg value="/LIBPATH:..\..\libs\windows"/>
37 <arg value="/OPT:REF"/>
38 <arg value="/OPT:ICF"/>
39 <arg line="/DLL /DELAYLOAD:jawt.dll ${libs}"/>
40 <fileset dir="." includes="*.obj"/>
41 </apply>
42 </target>
43
44 <target name="clean">
45 <delete>
46 <fileset dir="." includes="*.obj"/>
47 <fileset dir="." includes="*.dll"/>
48 <fileset dir="." includes="*.exp"/>
49 <fileset dir="." includes="*.lib"/>
50 </delete>
51 </target>
52
53 <target name="compile">
54 <condition property="sdkhomelib" value="${sdkhome}\lib" else="${sdkhome}\lib\x64">
55 <equals arg1="${os.arch}" arg2="x86"/>
56 </condition>
57 <condition property="dllname" value="lwjgl.dll" else="lwjgl64.dll">
58 <equals arg1="${os.arch}" arg2="x86"/>
59 </condition>
60 <echo message="${sdkhomelib}"/>
61 <property name="libs" value="Kernel32.lib ole32.lib libEGL.lib Version.lib user32.lib Gdi32.lib Advapi32.lib jawt.lib delayimp.lib winmm.lib Comctl32.lib"/>
62 <antcall target="compile_dir"/>
63 <antcall target="link"/>
64 </target>
65 </project>
66
4141 * </p>
4242 * @author cix_foo <cix_foo@users.sourceforge.net>
4343 * @author elias_naur <elias_naur@users.sourceforge.net>
44 * @version $Revision: 3419 $
45 * $Id: BufferChecks.java 3419 2010-09-30 17:21:50Z spasi $
44 * @version $Revision$
45 * $Id$
4646 */
4747 public class BufferChecks {
4848 /** Static methods only! */
158158 * This is a separate call to help inline checkBufferSize.
159159 */
160160 private static void throwBufferSizeException(Buffer buf, int size) {
161 throw new IllegalArgumentException("Number of remaining buffer elements is " + buf.remaining() + ", must be at least " + size);
161 throw new IllegalArgumentException("Number of remaining buffer elements is " + buf.remaining() + ", must be at least " + size + ". Because at most " + size + " elements can be returned, a buffer with at least " + size + " elements is required, regardless of actual returned element count");
162162 }
163163
164164 private static void throwBufferSizeException(PointerBuffer buf, int size) {
4343 /**
4444 * Some often-used Buffer code for creating native buffers of the appropriate size.
4545 *
46 * @author $Author: matzon $
47 * @version $Revision: 3456 $
48 * $Id: BufferUtils.java 3456 2010-11-24 21:48:23Z matzon $
46 * @author $Author$
47 * @version $Revision$
48 * $Id$
4949 */
5050
5151 public final class BufferUtils {
191191
192192 /** Fill buffer with zeros from position to remaining */
193193 private static native void zeroBuffer0(Buffer b, long off, long size);
194
195 /**
196 * Returns the memory address of the specified buffer.
197 *
198 * @param buffer the buffer
199 *
200 * @return the memory address
201 */
202 static native long getBufferAddress(Buffer buffer);
203
194204 }
3434 /**
3535 *
3636 * @author elias_naur <elias_naur@users.sourceforge.net>
37 * @version $Revision: 3426 $
38 * $Id: DefaultSysImplementation.java 3426 2010-10-01 22:20:14Z spasi $
37 * @version $Revision$
38 * $Id$
3939 */
4040 abstract class DefaultSysImplementation implements SysImplementation {
4141 public native int getJNIVersion();
3636 /**
3737 * A SysImplementation which delegates as much as it can to J2SE.
3838 * <p>
39 * @author $Author: matzon $
40 * @version $Revision: 2983 $
41 * $Id: J2SESysImplementation.java 2983 2008-04-07 18:36:09Z matzon $
39 * @author $Author$
40 * @version $Revision$
41 * $Id$
4242 */
4343 abstract class J2SESysImplementation extends DefaultSysImplementation {
4444
3737 * </p>
3838 *
3939 * @author Brian Matzon <brian@matzon.dk>
40 * @version $Revision: 2983 $
41 * $Id: LWJGLException.java 2983 2008-04-07 18:36:09Z matzon $
40 * @version $Revision$
41 * $Id$
4242 */
4343 public class LWJGLException extends Exception {
4444
4747 * </p>
4848 *
4949 * @author Brian Matzon <brian@matzon.dk>
50 * @version $Revision: 3475 $
51 * $Id: LWJGLUtil.java 3475 2011-01-23 07:48:50Z matzon $
50 * @version $Revision$
51 * $Id$
5252 */
5353 public class LWJGLUtil {
5454 public static final int PLATFORM_LINUX = 1;
5858 public static final String PLATFORM_MACOSX_NAME = "macosx";
5959 public static final String PLATFORM_WINDOWS_NAME = "windows";
6060
61 private static final String LWJGL_ICON_DATA_16x16 =
62 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" +
63 "\377\377\377\377\377\377\377\377\376\377\377\377\302\327\350\377" +
64 "\164\244\313\377\120\213\275\377\124\216\277\377\206\257\322\377" +
65 "\347\357\366\377\377\377\377\377\377\377\377\377\377\377\377\377" +
66 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" +
67 "\377\377\377\377\365\365\365\377\215\217\221\377\166\202\215\377" +
68 "\175\215\233\377\204\231\252\377\224\267\325\377\072\175\265\377" +
69 "\110\206\272\377\332\347\361\377\377\377\377\377\377\377\377\377" +
70 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" +
71 "\364\370\373\377\234\236\240\377\000\000\000\377\000\000\000\377" +
72 "\000\000\000\377\000\000\000\377\344\344\344\377\204\255\320\377" +
73 "\072\175\265\377\133\222\301\377\374\375\376\377\377\377\377\377" +
74 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" +
75 "\221\266\325\377\137\137\137\377\000\000\000\377\000\000\000\377" +
76 "\000\000\000\377\042\042\042\377\377\377\377\377\350\360\366\377" +
77 "\071\174\265\377\072\175\265\377\304\330\351\377\377\377\377\377" +
78 "\377\377\377\377\377\377\377\377\377\377\377\377\306\331\351\377" +
79 "\201\253\316\377\035\035\035\377\000\000\000\377\000\000\000\377" +
80 "\000\000\000\377\146\146\146\377\377\377\377\377\320\340\355\377" +
81 "\072\175\265\377\072\175\265\377\215\264\324\377\377\377\377\377" +
82 "\362\362\362\377\245\245\245\377\337\337\337\377\242\301\334\377" +
83 "\260\305\326\377\012\012\012\377\000\000\000\377\000\000\000\377" +
84 "\000\000\000\377\250\250\250\377\377\377\377\377\227\272\330\377" +
85 "\072\175\265\377\072\175\265\377\161\241\312\377\377\377\377\377" +
86 "\241\241\241\377\000\000\000\377\001\001\001\377\043\043\043\377" +
87 "\314\314\314\377\320\320\320\377\245\245\245\377\204\204\204\377" +
88 "\134\134\134\377\357\357\357\377\377\377\377\377\140\226\303\377" +
89 "\072\175\265\377\072\175\265\377\155\236\310\377\377\377\377\377" +
90 "\136\136\136\377\000\000\000\377\000\000\000\377\000\000\000\377" +
91 "\317\317\317\377\037\037\037\377\003\003\003\377\053\053\053\377" +
92 "\154\154\154\377\306\306\306\377\372\374\375\377\236\277\332\377" +
93 "\167\245\314\377\114\211\274\377\174\250\316\377\377\377\377\377" +
94 "\033\033\033\377\000\000\000\377\000\000\000\377\027\027\027\377" +
95 "\326\326\326\377\001\001\001\377\000\000\000\377\000\000\000\377" +
96 "\000\000\000\377\122\122\122\377\345\345\345\377\075\075\075\377" +
97 "\150\150\150\377\246\246\247\377\332\336\341\377\377\377\377\377" +
98 "\164\164\164\377\016\016\016\377\000\000\000\377\131\131\131\377" +
99 "\225\225\225\377\000\000\000\377\000\000\000\377\000\000\000\377" +
100 "\000\000\000\377\221\221\221\377\233\233\233\377\000\000\000\377" +
101 "\000\000\000\377\000\000\000\377\002\002\002\377\103\103\103\377" +
102 "\377\377\377\377\356\356\356\377\214\214\214\377\277\277\277\377" +
103 "\126\126\126\377\000\000\000\377\000\000\000\377\000\000\000\377" +
104 "\000\000\000\377\323\323\323\377\130\130\130\377\000\000\000\377" +
105 "\000\000\000\377\000\000\000\377\000\000\000\377\063\063\063\377" +
106 "\377\377\377\377\377\377\377\377\374\375\376\377\377\377\377\377" +
107 "\300\300\300\377\100\100\100\377\002\002\002\377\000\000\000\377" +
108 "\033\033\033\377\373\373\373\377\027\027\027\377\000\000\000\377" +
109 "\000\000\000\377\000\000\000\377\000\000\000\377\170\170\170\377" +
110 "\377\377\377\377\377\377\377\377\322\341\356\377\176\251\316\377" +
111 "\340\352\363\377\377\377\377\377\324\324\324\377\155\155\155\377" +
112 "\204\204\204\377\323\323\323\377\000\000\000\377\000\000\000\377" +
113 "\000\000\000\377\000\000\000\377\000\000\000\377\275\275\275\377" +
114 "\377\377\377\377\377\377\377\377\376\376\376\377\146\232\305\377" +
115 "\075\177\266\377\202\254\320\377\344\355\365\377\377\377\377\377" +
116 "\377\377\377\377\345\345\345\377\055\055\055\377\000\000\000\377" +
117 "\000\000\000\377\000\000\000\377\014\014\014\377\366\366\366\377" +
118 "\377\377\377\377\377\377\377\377\377\377\377\377\342\354\364\377" +
119 "\115\211\274\377\072\175\265\377\076\200\266\377\207\260\322\377" +
120 "\347\357\366\377\377\377\377\377\376\376\376\377\274\274\274\377" +
121 "\117\117\117\377\003\003\003\377\112\112\112\377\377\377\377\377" +
122 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" +
123 "\353\362\370\377\214\263\324\377\126\220\300\377\120\214\275\377" +
124 "\167\245\314\377\355\363\370\377\377\377\377\377\377\377\377\377" +
125 "\377\377\377\377\337\337\337\377\346\346\346\377\377\377\377\377";
126
127 private static final String LWJGL_ICON_DATA_32x32 =
128 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" +
129 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\372\374\375\377" +
130 "\313\335\354\377\223\267\326\377\157\240\311\377\134\223\302\377\140\226\303\377\172\247\315\377\254\310\340\377\355\363\370\377" +
131 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" +
132 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" +
133 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\374\375\376\377\265\316\343\377\132\222\301\377" +
134 "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\105\205\271\377" +
135 "\241\301\334\377\374\375\376\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" +
136 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" +
137 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\374\374\374\377\342\352\361\377\270\317\343\377\256\311\340\377" +
138 "\243\302\334\377\230\272\330\377\214\263\323\377\201\254\317\377\156\237\310\377\075\177\266\377\072\175\265\377\072\175\265\377" +
139 "\072\175\265\377\162\242\312\377\365\370\373\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" +
140 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" +
141 "\377\377\377\377\377\377\377\377\377\377\377\377\330\330\330\377\061\061\061\377\044\044\044\377\061\061\061\377\100\100\100\377" +
142 "\122\122\122\377\145\145\145\377\164\164\164\377\217\217\217\377\367\370\370\377\254\310\337\377\073\175\265\377\072\175\265\377" +
143 "\072\175\265\377\072\175\265\377\171\247\315\377\374\375\376\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" +
144 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" +
145 "\377\377\377\377\377\377\377\377\376\376\376\377\150\150\150\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" +
146 "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\266\266\266\377\376\376\376\377\206\256\321\377\072\175\265\377" +
147 "\072\175\265\377\072\175\265\377\072\175\265\377\256\312\341\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" +
148 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" +
149 "\377\377\377\377\323\342\356\377\341\352\362\377\050\050\050\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" +
150 "\000\000\000\377\000\000\000\377\000\000\000\377\002\002\002\377\336\336\336\377\377\377\377\377\365\370\373\377\133\222\301\377" +
151 "\072\175\265\377\072\175\265\377\072\175\265\377\110\206\272\377\364\370\373\377\377\377\377\377\377\377\377\377\377\377\377\377" +
152 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" +
153 "\354\363\370\377\144\231\305\377\327\331\333\377\005\005\005\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" +
154 "\000\000\000\377\000\000\000\377\000\000\000\377\044\044\044\377\376\376\376\377\377\377\377\377\377\377\377\377\300\325\347\377" +
155 "\071\174\265\377\072\175\265\377\072\175\265\377\072\175\265\377\253\310\340\377\377\377\377\377\377\377\377\377\377\377\377\377" +
156 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\376\377\377\377" +
157 "\170\246\314\377\173\247\315\377\236\236\236\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" +
158 "\000\000\000\377\000\000\000\377\000\000\000\377\145\145\145\377\377\377\377\377\377\377\377\377\377\377\377\377\342\354\364\377" +
159 "\067\173\264\377\072\175\265\377\072\175\265\377\072\175\265\377\146\232\305\377\377\377\377\377\377\377\377\377\377\377\377\377" +
160 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\303\327\350\377" +
161 "\071\175\265\377\262\314\341\377\130\130\130\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" +
162 "\000\000\000\377\000\000\000\377\000\000\000\377\251\251\251\377\377\377\377\377\377\377\377\377\377\377\377\377\274\322\345\377" +
163 "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\100\201\267\377\356\364\371\377\377\377\377\377\377\377\377\377" +
164 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\372\374\375\377\132\222\301\377" +
165 "\075\177\266\377\335\345\355\377\034\034\034\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" +
166 "\000\000\000\377\000\000\000\377\007\007\007\377\347\347\347\377\377\377\377\377\377\377\377\377\377\377\377\377\205\256\321\377" +
167 "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\071\175\265\377\314\336\354\377\377\377\377\377\377\377\377\377" +
168 "\377\377\377\377\377\377\377\377\376\376\376\377\377\377\377\377\377\377\377\377\377\377\377\377\272\322\345\377\072\175\265\377" +
169 "\127\220\277\377\320\321\321\377\003\003\003\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" +
170 "\000\000\000\377\000\000\000\377\063\063\063\377\375\375\375\377\377\377\377\377\377\377\377\377\373\374\375\377\120\213\275\377" +
171 "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\071\175\265\377\261\314\342\377\377\377\377\377\377\377\377\377" +
172 "\377\377\377\377\312\312\312\377\067\067\067\377\141\141\141\377\242\242\242\377\335\335\335\377\344\354\363\377\261\313\341\377" +
173 "\264\315\342\377\346\346\346\377\043\043\043\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" +
174 "\000\000\000\377\000\000\000\377\162\162\162\377\377\377\377\377\377\377\377\377\377\377\377\377\330\345\360\377\072\175\265\377" +
175 "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\240\300\333\377\377\377\377\377\377\377\377\377" +
176 "\377\377\377\377\146\146\146\377\000\000\000\377\000\000\000\377\000\000\000\377\006\006\006\377\047\047\047\377\146\146\146\377" +
177 "\324\324\324\377\377\377\377\377\366\366\366\377\320\320\320\377\227\227\227\377\136\136\136\377\047\047\047\377\004\004\004\377" +
178 "\000\000\000\377\003\003\003\377\300\300\300\377\377\377\377\377\377\377\377\377\377\377\377\377\242\301\333\377\072\175\265\377" +
179 "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\236\277\332\377\377\377\377\377\377\377\377\377" +
180 "\373\373\373\377\045\045\045\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" +
181 "\134\134\134\377\377\377\377\377\352\352\352\377\217\217\217\377\265\265\265\377\351\351\351\377\375\375\375\377\347\347\347\377" +
182 "\262\262\262\377\275\275\275\377\376\376\376\377\377\377\377\377\377\377\377\377\377\377\377\377\153\235\307\377\072\175\265\377" +
183 "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\241\301\334\377\377\377\377\377\377\377\377\377" +
184 "\333\333\333\377\003\003\003\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" +
185 "\203\203\203\377\377\377\377\377\137\137\137\377\000\000\000\377\000\000\000\377\013\013\013\377\067\067\067\377\166\166\166\377" +
186 "\267\267\267\377\360\360\360\377\377\377\377\377\377\377\377\377\377\377\377\377\360\365\371\377\113\210\273\377\075\177\266\377" +
187 "\071\174\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\262\314\342\377\377\377\377\377\377\377\377\377" +
188 "\232\232\232\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" +
189 "\305\305\305\377\367\367\367\377\035\035\035\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" +
190 "\000\000\000\377\007\007\007\377\074\074\074\377\337\337\337\377\377\377\377\377\373\374\375\377\374\375\376\377\363\367\372\377" +
191 "\314\335\353\377\236\276\332\377\162\241\311\377\114\211\273\377\072\175\265\377\311\334\353\377\377\377\377\377\377\377\377\377" +
192 "\126\126\126\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\017\017\017\377" +
193 "\371\371\371\377\321\321\321\377\003\003\003\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" +
194 "\000\000\000\377\000\000\000\377\000\000\000\377\216\216\216\377\377\377\377\377\371\371\371\377\204\204\204\377\160\160\160\377" +
195 "\260\260\260\377\352\352\352\377\377\377\377\377\371\373\374\377\334\350\362\377\366\371\374\377\377\377\377\377\377\377\377\377" +
196 "\025\025\025\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\116\116\116\377" +
197 "\377\377\377\377\221\221\221\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" +
198 "\000\000\000\377\000\000\000\377\000\000\000\377\273\273\273\377\377\377\377\377\236\236\236\377\000\000\000\377\000\000\000\377" +
199 "\000\000\000\377\004\004\004\377\057\057\057\377\160\160\160\377\260\260\260\377\346\346\346\377\376\376\376\377\377\377\377\377" +
200 "\071\071\071\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\220\220\220\377" +
201 "\377\377\377\377\115\115\115\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" +
202 "\000\000\000\377\000\000\000\377\020\020\020\377\360\360\360\377\377\377\377\377\132\132\132\377\000\000\000\377\000\000\000\377" +
203 "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\011\011\011\377\062\062\062\377\261\261\261\377" +
204 "\366\366\366\377\241\241\241\377\065\065\065\377\002\002\002\377\000\000\000\377\000\000\000\377\002\002\002\377\321\321\321\377" +
205 "\365\365\365\377\023\023\023\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" +
206 "\000\000\000\377\000\000\000\377\105\105\105\377\376\376\376\377\370\370\370\377\035\035\035\377\000\000\000\377\000\000\000\377" +
207 "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\053\053\053\377" +
208 "\377\377\377\377\377\377\377\377\374\374\374\377\276\276\276\377\120\120\120\377\005\005\005\377\045\045\045\377\371\371\371\377" +
209 "\302\302\302\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" +
210 "\000\000\000\377\000\000\000\377\206\206\206\377\377\377\377\377\322\322\322\377\001\001\001\377\000\000\000\377\000\000\000\377" +
211 "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\103\103\103\377" +
212 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\376\376\376\377\334\334\334\377\340\340\340\377\377\377\377\377" +
213 "\225\225\225\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" +
214 "\000\000\000\377\001\001\001\377\310\310\310\377\377\377\377\377\216\216\216\377\000\000\000\377\000\000\000\377\000\000\000\377" +
215 "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\210\210\210\377" +
216 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" +
217 "\337\337\337\377\051\051\051\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" +
218 "\000\000\000\377\030\030\030\377\365\365\365\377\377\377\377\377\112\112\112\377\000\000\000\377\000\000\000\377\000\000\000\377" +
219 "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\317\317\317\377" +
220 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\361\366\372\377\377\377\377\377\377\377\377\377" +
221 "\377\377\377\377\371\371\371\377\265\265\265\377\113\113\113\377\006\006\006\377\000\000\000\377\000\000\000\377\000\000\000\377" +
222 "\000\000\000\377\122\122\122\377\377\377\377\377\370\370\370\377\020\020\020\377\000\000\000\377\000\000\000\377\000\000\000\377" +
223 "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\034\034\034\377\370\370\370\377" +
224 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\206\257\321\377\220\265\325\377\352\361\367\377" +
225 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\333\333\333\377\170\170\170\377\033\033\033\377\000\000\000\377" +
226 "\000\000\000\377\226\226\226\377\377\377\377\377\306\306\306\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" +
227 "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\132\132\132\377\377\377\377\377" +
228 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\303\330\351\377\072\175\265\377\103\203\270\377" +
229 "\224\270\326\377\355\363\370\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\364\364\364\377\247\247\247\377" +
230 "\205\205\205\377\364\364\364\377\377\377\377\377\206\206\206\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" +
231 "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\235\235\235\377\377\377\377\377" +
232 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\372\373\375\377\135\224\302\377\072\175\265\377" +
233 "\072\175\265\377\106\205\271\377\230\273\330\377\357\364\371\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" +
234 "\377\377\377\377\377\377\377\377\377\377\377\377\233\233\233\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" +
235 "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\005\005\005\377\335\335\335\377\377\377\377\377" +
236 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\305\331\351\377\073\176\266\377" +
237 "\072\175\265\377\072\175\265\377\072\175\265\377\110\206\272\377\236\276\332\377\362\366\372\377\377\377\377\377\377\377\377\377" +
238 "\377\377\377\377\377\377\377\377\377\377\377\377\373\373\373\377\216\216\216\377\045\045\045\377\001\001\001\377\000\000\000\377" +
239 "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\054\054\054\377\374\374\374\377\377\377\377\377" +
240 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\217\265\325\377" +
241 "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\112\207\273\377\243\302\334\377\363\367\372\377" +
242 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\372\372\372\377\260\260\260\377\105\105\105\377" +
243 "\004\004\004\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\156\156\156\377\377\377\377\377\377\377\377\377" +
244 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\374\375\376\377" +
245 "\205\257\321\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\115\211\274\377" +
246 "\250\305\336\377\366\371\374\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\376\376\376\377" +
247 "\322\322\322\377\150\150\150\377\016\016\016\377\000\000\000\377\001\001\001\377\270\270\270\377\377\377\377\377\377\377\377\377" +
248 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" +
249 "\376\376\377\377\261\313\342\377\114\211\274\377\071\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377" +
250 "\072\175\265\377\115\211\274\377\277\324\347\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" +
251 "\377\377\377\377\377\377\377\377\354\354\354\377\223\223\223\377\233\233\233\377\375\375\375\377\377\377\377\377\377\377\377\377" +
252 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" +
253 "\377\377\377\377\377\377\377\377\363\367\372\377\265\316\343\377\201\254\320\377\145\231\305\377\141\227\304\377\154\236\310\377" +
254 "\217\265\325\377\305\331\351\377\367\372\374\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" +
255 "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377";
256
61257 /** LWJGL Logo - 16 by 16 pixels */
62 public static final ByteBuffer LWJGLIcon16x16 = BufferUtils.createByteBuffer(16 * 16 * 4).put(new byte[] {
63 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
64 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -2, -1, -1, -1, -62, -41, -24, -1, 116, -92, -53, -1, 80, -117,
65 -67, -1, 84, -114, -65, -1, -122, -81, -46, -1, -25, -17, -10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
66 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -11, -11, -11, -1,
67 -115, -113, -111, -1, 118, -126, -115, -1, 125, -115, -101, -1, -124, -103, -86, -1, -108, -73, -43, -1,
68 58, 125, -75, -1, 72, -122, -70, -1, -38, -25, -15, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
69 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -12, -8, -5, -1, -100, -98, -96, -1, 0, 0, 0, -1, 0, 0, 0, -1,
70 0, 0, 0, -1, 0, 0, 0, -1, -28, -28, -28, -1, -124, -83, -48, -1, 58, 125, -75, -1, 91, -110, -63, -1, -4,
71 -3, -2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -111, -74, -43,
72 -1, 95, 95, 95, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 34, 34, 34, -1, -1, -1, -1, -1, -24, -16, -10,
73 -1, 57, 124, -75, -1, 58, 125, -75, -1, -60, -40, -23, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
74 -1, -1, -1, -1, -58, -39, -23, -1, -127, -85, -50, -1, 29, 29, 29, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0,
75 -1, 102, 102, 102, -1, -1, -1, -1, -1, -48, -32, -19, -1, 58, 125, -75, -1, 58, 125, -75, -1, -115, -76,
76 -44, -1, -1, -1, -1, -1, -14, -14, -14, -1, -91, -91, -91, -1, -33, -33, -33, -1, -94, -63, -36, -1, -80,
77 -59, -42, -1, 10, 10, 10, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, -88, -88, -88, -1, -1, -1, -1, -1,
78 -105, -70, -40, -1, 58, 125, -75, -1, 58, 125, -75, -1, 113, -95, -54, -1, -1, -1, -1, -1, -95, -95, -95,
79 -1, 0, 0, 0, -1, 1, 1, 1, -1, 35, 35, 35, -1, -52, -52, -52, -1, -48, -48, -48, -1, -91, -91, -91, -1,
80 -124, -124, -124, -1, 92, 92, 92, -1, -17, -17, -17, -1, -1, -1, -1, -1, 96, -106, -61, -1, 58, 125, -75,
81 -1, 58, 125, -75, -1, 109, -98, -56, -1, -1, -1, -1, -1, 94, 94, 94, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0,
82 -1, -49, -49, -49, -1, 31, 31, 31, -1, 3, 3, 3, -1, 43, 43, 43, -1, 108, 108, 108, -1, -58, -58, -58, -1,
83 -6, -4, -3, -1, -98, -65, -38, -1, 119, -91, -52, -1, 76, -119, -68, -1, 124, -88, -50, -1, -1, -1, -1, -1,
84 27, 27, 27, -1, 0, 0, 0, -1, 0, 0, 0, -1, 23, 23, 23, -1, -42, -42, -42, -1, 1, 1, 1, -1, 0, 0, 0, -1, 0,
85 0, 0, -1, 0, 0, 0, -1, 82, 82, 82, -1, -27, -27, -27, -1, 61, 61, 61, -1, 104, 104, 104, -1, -90, -90, -89,
86 -1, -38, -34, -31, -1, -1, -1, -1, -1, 116, 116, 116, -1, 14, 14, 14, -1, 0, 0, 0, -1, 89, 89, 89, -1,
87 -107, -107, -107, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, -111, -111, -111, -1, -101, -101,
88 -101, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 2, 2, 2, -1, 67, 67, 67, -1, -1, -1, -1, -1, -18, -18,
89 -18, -1, -116, -116, -116, -1, -65, -65, -65, -1, 86, 86, 86, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0,
90 0, 0, -1, -45, -45, -45, -1, 88, 88, 88, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 51, 51,
91 51, -1, -1, -1, -1, -1, -1, -1, -1, -1, -4, -3, -2, -1, -1, -1, -1, -1, -64, -64, -64, -1, 64, 64, 64, -1,
92 2, 2, 2, -1, 0, 0, 0, -1, 27, 27, 27, -1, -5, -5, -5, -1, 23, 23, 23, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0,
93 0, -1, 0, 0, 0, -1, 120, 120, 120, -1, -1, -1, -1, -1, -1, -1, -1, -1, -46, -31, -18, -1, 126, -87, -50,
94 -1, -32, -22, -13, -1, -1, -1, -1, -1, -44, -44, -44, -1, 109, 109, 109, -1, -124, -124, -124, -1, -45,
95 -45, -45, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, -67, -67, -67, -1, -1, -1,
96 -1, -1, -1, -1, -1, -1, -2, -2, -2, -1, 102, -102, -59, -1, 61, 127, -74, -1, -126, -84, -48, -1, -28, -19,
97 -11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -27, -27, -27, -1, 45, 45, 45, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0,
98 0, -1, 12, 12, 12, -1, -10, -10, -10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -30, -20, -12,
99 -1, 77, -119, -68, -1, 58, 125, -75, -1, 62, -128, -74, -1, -121, -80, -46, -1, -25, -17, -10, -1, -1, -1,
100 -1, -1, -2, -2, -2, -1, -68, -68, -68, -1, 79, 79, 79, -1, 3, 3, 3, -1, 74, 74, 74, -1, -1, -1, -1, -1, -1,
101 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -21, -14, -8, -1, -116, -77, -44, -1, 86, -112,
102 -64, -1, 80, -116, -67, -1, 119, -91, -52, -1, -19, -13, -8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
103 -1, -1, -33, -33, -33, -1, -26, -26, -26, -1, -1, -1, -1, -1
104 });
258 public static final ByteBuffer LWJGLIcon16x16 = loadIcon(LWJGL_ICON_DATA_16x16);
105259
106260 /** LWJGL Logo - 32 by 32 pixels */
107 public static final ByteBuffer LWJGLIcon32x32 = BufferUtils.createByteBuffer(32 * 32 * 4).put(new byte[] {
108 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
109 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
110 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -6, -4, -3, -1, -53, -35,
111 -20, -1, -109, -73, -42, -1, 111, -96, -55, -1, 92, -109, -62, -1, 96, -106, -61, -1, 122, -89, -51, -1,
112 -84, -56, -32, -1, -19, -13, -8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
113 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
114 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
115 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -4, -3, -2, -1, -75, -50, -29, -1, 90, -110, -63, -1,
116 58, 125, -75, -1, 58, 125, -75, -1, 58, 125, -75, -1, 58, 125, -75, -1, 58, 125, -75, -1, 58, 125, -75, -1,
117 58, 125, -75, -1, 69, -123, -71, -1, -95, -63, -36, -1, -4, -3, -2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
118 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
119 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
120 -1, -1, -1, -1, -1, -1, -1, -1, -1, -4, -4, -4, -1, -30, -22, -15, -1, -72, -49, -29, -1, -82, -55, -32,
121 -1, -93, -62, -36, -1, -104, -70, -40, -1, -116, -77, -45, -1, -127, -84, -49, -1, 110, -97, -56, -1, 61,
122 127, -74, -1, 58, 125, -75, -1, 58, 125, -75, -1, 58, 125, -75, -1, 114, -94, -54, -1, -11, -8, -5, -1, -1,
123 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
124 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
125 -1, -1, -1, -1, -1, -1, -1, -1, -1, -40, -40, -40, -1, 49, 49, 49, -1, 36, 36, 36, -1, 49, 49, 49, -1, 64,
126 64, 64, -1, 82, 82, 82, -1, 101, 101, 101, -1, 116, 116, 116, -1, -113, -113, -113, -1, -9, -8, -8, -1,
127 -84, -56, -33, -1, 59, 125, -75, -1, 58, 125, -75, -1, 58, 125, -75, -1, 58, 125, -75, -1, 121, -89, -51,
128 -1, -4, -3, -2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
129 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
130 -1, -1, -1, -1, -1, -1, -1, -2, -2, -2, -1, 104, 104, 104, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0,
131 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, -74, -74, -74, -1, -2, -2, -2, -1, -122, -82,
132 -47, -1, 58, 125, -75, -1, 58, 125, -75, -1, 58, 125, -75, -1, 58, 125, -75, -1, -82, -54, -31, -1, -1, -1,
133 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
134 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -45, -30, -18,
135 -1, -31, -22, -14, -1, 40, 40, 40, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0,
136 0, 0, -1, 0, 0, 0, -1, 2, 2, 2, -1, -34, -34, -34, -1, -1, -1, -1, -1, -11, -8, -5, -1, 91, -110, -63, -1,
137 58, 125, -75, -1, 58, 125, -75, -1, 58, 125, -75, -1, 72, -122, -70, -1, -12, -8, -5, -1, -1, -1, -1, -1,
138 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
139 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -20, -13, -8, -1, 100, -103, -59, -1, -41, -39, -37,
140 -1, 5, 5, 5, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1,
141 36, 36, 36, -1, -2, -2, -2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -64, -43, -25, -1, 57, 124, -75, -1, 58,
142 125, -75, -1, 58, 125, -75, -1, 58, 125, -75, -1, -85, -56, -32, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
143 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
144 -1, -1, -1, -1, -2, -1, -1, -1, 120, -90, -52, -1, 123, -89, -51, -1, -98, -98, -98, -1, 0, 0, 0, -1, 0, 0,
145 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 101, 101, 101, -1, -1,
146 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -30, -20, -12, -1, 55, 123, -76, -1, 58, 125, -75, -1, 58, 125,
147 -75, -1, 58, 125, -75, -1, 102, -102, -59, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
148 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -61,
149 -41, -24, -1, 57, 125, -75, -1, -78, -52, -31, -1, 88, 88, 88, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1,
150 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, -87, -87, -87, -1, -1, -1, -1, -1, -1, -1,
151 -1, -1, -1, -1, -1, -1, -68, -46, -27, -1, 58, 125, -75, -1, 58, 125, -75, -1, 58, 125, -75, -1, 58, 125,
152 -75, -1, 64, -127, -73, -1, -18, -12, -7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
153 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -6, -4, -3, -1, 90, -110, -63, -1, 61,
154 127, -74, -1, -35, -27, -19, -1, 28, 28, 28, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0,
155 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 7, 7, 7, -1, -25, -25, -25, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
156 -1, -1, -123, -82, -47, -1, 58, 125, -75, -1, 58, 125, -75, -1, 58, 125, -75, -1, 58, 125, -75, -1, 57,
157 125, -75, -1, -52, -34, -20, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -2, -2,
158 -2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -70, -46, -27, -1, 58, 125, -75, -1, 87, -112, -65,
159 -1, -48, -47, -47, -1, 3, 3, 3, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0,
160 0, -1, 0, 0, 0, -1, 51, 51, 51, -1, -3, -3, -3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -5, -4, -3, -1, 80,
161 -117, -67, -1, 58, 125, -75, -1, 58, 125, -75, -1, 58, 125, -75, -1, 58, 125, -75, -1, 57, 125, -75, -1,
162 -79, -52, -30, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -54, -54, -54, -1, 55, 55, 55, -1, 97,
163 97, 97, -1, -94, -94, -94, -1, -35, -35, -35, -1, -28, -20, -13, -1, -79, -53, -31, -1, -76, -51, -30, -1,
164 -26, -26, -26, -1, 35, 35, 35, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0,
165 0, -1, 0, 0, 0, -1, 114, 114, 114, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -40, -27, -16, -1,
166 58, 125, -75, -1, 58, 125, -75, -1, 58, 125, -75, -1, 58, 125, -75, -1, 58, 125, -75, -1, 58, 125, -75, -1,
167 -96, -64, -37, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 102, 102, 102, -1, 0, 0, 0, -1, 0, 0, 0,
168 -1, 0, 0, 0, -1, 6, 6, 6, -1, 39, 39, 39, -1, 102, 102, 102, -1, -44, -44, -44, -1, -1, -1, -1, -1, -10,
169 -10, -10, -1, -48, -48, -48, -1, -105, -105, -105, -1, 94, 94, 94, -1, 39, 39, 39, -1, 4, 4, 4, -1, 0, 0,
170 0, -1, 3, 3, 3, -1, -64, -64, -64, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -94, -63, -37, -1,
171 58, 125, -75, -1, 58, 125, -75, -1, 58, 125, -75, -1, 58, 125, -75, -1, 58, 125, -75, -1, 58, 125, -75, -1,
172 -98, -65, -38, -1, -1, -1, -1, -1, -1, -1, -1, -1, -5, -5, -5, -1, 37, 37, 37, -1, 0, 0, 0, -1, 0, 0, 0,
173 -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 92, 92, 92, -1, -1, -1, -1, -1, -22, -22, -22, -1,
174 -113, -113, -113, -1, -75, -75, -75, -1, -23, -23, -23, -1, -3, -3, -3, -1, -25, -25, -25, -1, -78, -78,
175 -78, -1, -67, -67, -67, -1, -2, -2, -2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 107, -99, -57,
176 -1, 58, 125, -75, -1, 58, 125, -75, -1, 58, 125, -75, -1, 58, 125, -75, -1, 58, 125, -75, -1, 58, 125, -75,
177 -1, -95, -63, -36, -1, -1, -1, -1, -1, -1, -1, -1, -1, -37, -37, -37, -1, 3, 3, 3, -1, 0, 0, 0, -1, 0, 0,
178 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, -125, -125, -125, -1, -1, -1, -1, -1, 95, 95,
179 95, -1, 0, 0, 0, -1, 0, 0, 0, -1, 11, 11, 11, -1, 55, 55, 55, -1, 118, 118, 118, -1, -73, -73, -73, -1,
180 -16, -16, -16, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -16, -11, -7, -1, 75, -120, -69, -1, 61,
181 127, -74, -1, 57, 124, -75, -1, 58, 125, -75, -1, 58, 125, -75, -1, 58, 125, -75, -1, 58, 125, -75, -1,
182 -78, -52, -30, -1, -1, -1, -1, -1, -1, -1, -1, -1, -102, -102, -102, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0,
183 -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, -59, -59, -59, -1, -9, -9, -9, -1, 29, 29, 29, -1,
184 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 7, 7, 7, -1, 60, 60, 60, -1,
185 -33, -33, -33, -1, -1, -1, -1, -1, -5, -4, -3, -1, -4, -3, -2, -1, -13, -9, -6, -1, -52, -35, -21, -1, -98,
186 -66, -38, -1, 114, -95, -55, -1, 76, -119, -69, -1, 58, 125, -75, -1, -55, -36, -21, -1, -1, -1, -1, -1,
187 -1, -1, -1, -1, 86, 86, 86, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0,
188 -1, 15, 15, 15, -1, -7, -7, -7, -1, -47, -47, -47, -1, 3, 3, 3, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1,
189 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, -114, -114, -114, -1, -1, -1, -1, -1, -7,
190 -7, -7, -1, -124, -124, -124, -1, 112, 112, 112, -1, -80, -80, -80, -1, -22, -22, -22, -1, -1, -1, -1, -1,
191 -7, -5, -4, -1, -36, -24, -14, -1, -10, -7, -4, -1, -1, -1, -1, -1, -1, -1, -1, -1, 21, 21, 21, -1, 0, 0,
192 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 78, 78, 78, -1, -1, -1, -1, -1,
193 -111, -111, -111, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0,
194 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, -69, -69, -69, -1, -1, -1, -1, -1, -98, -98, -98, -1, 0, 0, 0, -1, 0, 0,
195 0, -1, 0, 0, 0, -1, 4, 4, 4, -1, 47, 47, 47, -1, 112, 112, 112, -1, -80, -80, -80, -1, -26, -26, -26, -1,
196 -2, -2, -2, -1, -1, -1, -1, -1, 57, 57, 57, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0,
197 0, -1, 0, 0, 0, -1, -112, -112, -112, -1, -1, -1, -1, -1, 77, 77, 77, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0,
198 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 16, 16, 16, -1, -16, -16, -16, -1,
199 -1, -1, -1, -1, 90, 90, 90, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0,
200 -1, 0, 0, 0, -1, 9, 9, 9, -1, 50, 50, 50, -1, -79, -79, -79, -1, -10, -10, -10, -1, -95, -95, -95, -1, 53,
201 53, 53, -1, 2, 2, 2, -1, 0, 0, 0, -1, 0, 0, 0, -1, 2, 2, 2, -1, -47, -47, -47, -1, -11, -11, -11, -1, 19,
202 19, 19, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0,
203 0, 0, -1, 69, 69, 69, -1, -2, -2, -2, -1, -8, -8, -8, -1, 29, 29, 29, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0,
204 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 43, 43, 43, -1, -1,
205 -1, -1, -1, -1, -1, -1, -1, -4, -4, -4, -1, -66, -66, -66, -1, 80, 80, 80, -1, 5, 5, 5, -1, 37, 37, 37, -1,
206 -7, -7, -7, -1, -62, -62, -62, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0,
207 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, -122, -122, -122, -1, -1, -1, -1, -1, -46, -46, -46, -1, 1,
208 1, 1, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0,
209 0, -1, 0, 0, 0, -1, 67, 67, 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -2, -2,
210 -2, -1, -36, -36, -36, -1, -32, -32, -32, -1, -1, -1, -1, -1, -107, -107, -107, -1, 0, 0, 0, -1, 0, 0, 0,
211 -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 1, 1, 1, -1, -56, -56,
212 -56, -1, -1, -1, -1, -1, -114, -114, -114, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0,
213 -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, -120, -120, -120, -1, -1, -1, -1, -1,
214 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
215 -1, -33, -33, -33, -1, 41, 41, 41, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0,
216 0, 0, -1, 0, 0, 0, -1, 24, 24, 24, -1, -11, -11, -11, -1, -1, -1, -1, -1, 74, 74, 74, -1, 0, 0, 0, -1, 0,
217 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0,
218 0, -1, -49, -49, -49, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
219 -15, -10, -6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -7, -7, -7, -1, -75, -75, -75, -1, 75,
220 75, 75, -1, 6, 6, 6, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 82, 82, 82, -1, -1, -1, -1,
221 -1, -8, -8, -8, -1, 16, 16, 16, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0,
222 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 28, 28, 28, -1, -8, -8, -8, -1, -1, -1, -1, -1, -1, -1, -1,
223 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -122, -81, -47, -1, -112, -75, -43, -1, -22, -15, -9,
224 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -37, -37, -37, -1, 120, 120, 120, -1,
225 27, 27, 27, -1, 0, 0, 0, -1, 0, 0, 0, -1, -106, -106, -106, -1, -1, -1, -1, -1, -58, -58, -58, -1, 0, 0, 0,
226 -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1,
227 0, 0, 0, -1, 90, 90, 90, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
228 -1, -1, -1, -1, -1, -61, -40, -23, -1, 58, 125, -75, -1, 67, -125, -72, -1, -108, -72, -42, -1, -19, -13,
229 -8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -12, -12, -12, -1, -89, -89, -89,
230 -1, -123, -123, -123, -1, -12, -12, -12, -1, -1, -1, -1, -1, -122, -122, -122, -1, 0, 0, 0, -1, 0, 0, 0,
231 -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1,
232 -99, -99, -99, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
233 -1, -1, -6, -5, -3, -1, 93, -108, -62, -1, 58, 125, -75, -1, 58, 125, -75, -1, 70, -123, -71, -1, -104,
234 -69, -40, -1, -17, -12, -7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
235 -1, -1, -1, -1, -1, -1, -1, -1, -1, -101, -101, -101, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0,
236 -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 5, 5, 5, -1, -35, -35, -35, -1, -1,
237 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
238 -59, -39, -23, -1, 59, 126, -74, -1, 58, 125, -75, -1, 58, 125, -75, -1, 58, 125, -75, -1, 72, -122, -70,
239 -1, -98, -66, -38, -1, -14, -10, -6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
240 -1, -1, -1, -1, -5, -5, -5, -1, -114, -114, -114, -1, 37, 37, 37, -1, 1, 1, 1, -1, 0, 0, 0, -1, 0, 0, 0,
241 -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 44, 44, 44, -1, -4, -4, -4, -1, -1, -1, -1, -1, -1,
242 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
243 -113, -75, -43, -1, 58, 125, -75, -1, 58, 125, -75, -1, 58, 125, -75, -1, 58, 125, -75, -1, 58, 125, -75,
244 -1, 74, -121, -69, -1, -93, -62, -36, -1, -13, -9, -6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
245 -1, -1, -1, -1, -1, -1, -1, -1, -6, -6, -6, -1, -80, -80, -80, -1, 69, 69, 69, -1, 4, 4, 4, -1, 0, 0, 0,
246 -1, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 110, 110, 110, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
247 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -4, -3,
248 -2, -1, -123, -81, -47, -1, 58, 125, -75, -1, 58, 125, -75, -1, 58, 125, -75, -1, 58, 125, -75, -1, 58,
249 125, -75, -1, 58, 125, -75, -1, 77, -119, -68, -1, -88, -59, -34, -1, -10, -7, -4, -1, -1, -1, -1, -1, -1,
250 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -2, -2, -2, -1, -46, -46, -46, -1, 104, 104,
251 104, -1, 14, 14, 14, -1, 0, 0, 0, -1, 1, 1, 1, -1, -72, -72, -72, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
252 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
253 -1, -1, -1, -1, -2, -2, -1, -1, -79, -53, -30, -1, 76, -119, -68, -1, 57, 125, -75, -1, 58, 125, -75, -1,
254 58, 125, -75, -1, 58, 125, -75, -1, 58, 125, -75, -1, 58, 125, -75, -1, 77, -119, -68, -1, -65, -44, -25,
255 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
256 -1, -1, -20, -20, -20, -1, -109, -109, -109, -1, -101, -101, -101, -1, -3, -3, -3, -1, -1, -1, -1, -1, -1,
257 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
258 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -13, -9, -6, -1, -75, -50, -29, -1, -127,
259 -84, -48, -1, 101, -103, -59, -1, 97, -105, -60, -1, 108, -98, -56, -1, -113, -75, -43, -1, -59, -39, -23,
260 -1, -9, -6, -4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
261 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
262 -1, -1, -1
263 });
261 public static final ByteBuffer LWJGLIcon32x32 = loadIcon(LWJGL_ICON_DATA_32x32);
264262
265263 /** Debug flag. */
266264 public static final boolean DEBUG = getPrivilegedBoolean("org.lwjgl.util.Debug");
270268 private static final int PLATFORM;
271269
272270 static {
273 LWJGLIcon16x16.flip();
274 LWJGLIcon32x32.flip();
275
276271 final String osName = getPrivilegedProperty("os.name");
277272 if ( osName.startsWith("Windows") )
278273 PLATFORM = PLATFORM_WINDOWS;
279 else if ( osName.startsWith("Linux") || osName.startsWith("FreeBSD") || osName.startsWith("SunOS") )
274 else if ( osName.startsWith("Linux") || osName.startsWith("FreeBSD") || osName.startsWith("OpenBSD") || osName.startsWith("SunOS") || osName.startsWith("Unix") )
280275 PLATFORM = PLATFORM_LINUX;
281276 else if ( osName.startsWith("Mac OS X") || osName.startsWith("Darwin") )
282277 PLATFORM = PLATFORM_MACOSX;
283278 else
284279 throw new LinkageError("Unknown platform: " + osName);
280 }
281
282 private static ByteBuffer loadIcon(String data) {
283 int len = data.length();
284 ByteBuffer bb = BufferUtils.createByteBuffer(len);
285 for(int i=0 ; i<len ; i++) {
286 bb.put(i, (byte)data.charAt(i));
287 }
288 return bb.asReadOnlyBuffer();
285289 }
286290
287291 /**
312316 default:
313317 return "unknown";
314318 }
319 }
320
321 /**
322 * Wraps {@link System#mapLibraryName}. On OS X with JDK 6, the .jnilib file
323 * extension will be replaced with .dylib.
324 *
325 * @param name the name of the library.
326 *
327 * @return a platform-dependent native library name.
328 */
329 public static String mapLibraryName(String name) {
330 String libName = System.mapLibraryName(name);
331 return LWJGLUtil.getPlatform() == LWJGLUtil.PLATFORM_MACOSX && libName.endsWith(".jnilib")
332 ? libName.substring(0, libName.length() - ".jnilib".length()) + ".dylib"
333 : libName;
315334 }
316335
317336 /**
415434 * @return Absolute path to library if found, otherwise null
416435 */
417436 private static String getPathFromClassLoader(final String libname, final ClassLoader classloader) {
437 Class<?> c = null;
438
418439 try {
419440 log("getPathFromClassLoader: searching for: " + libname);
420 Class<?> c = classloader.getClass();
441 c = classloader.getClass();
421442 while (c != null) {
422443 final Class<?> clazz = c;
423444 try {
435456 }
436457 }
437458 } catch (Exception e) {
438 log("Failure locating " + e + " using classloader:" + e);
459 log("Failure locating " + e + " using classloader:" + c);
439460 }
440461 return null;
441462 }
443464 /**
444465 * Gets a boolean property as a privileged action.
445466 */
446 private static boolean getPrivilegedBoolean(final String property_name) {
447 Boolean value = AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
467 public static boolean getPrivilegedBoolean(final String property_name) {
468 return AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
448469 public Boolean run() {
449470 return Boolean.getBoolean(property_name);
450471 }
451472 });
452 return value;
473 }
474
475 /**
476 * Gets an integer property as a privileged action.
477 *
478 * @param property_name the integer property name
479 *
480 * @return the property value
481 */
482 public static Integer getPrivilegedInteger(final String property_name) {
483 return AccessController.doPrivileged(new PrivilegedAction<Integer>() {
484 public Integer run() {
485 return Integer.getInteger(property_name);
486 }
487 });
488 }
489
490 /**
491 * Gets an integer property as a privileged action.
492 *
493 * @param property_name the integer property name
494 * @param default_val the default value to use if the property is not defined
495 *
496 * @return the property value
497 */
498 public static Integer getPrivilegedInteger(final String property_name, final int default_val) {
499 return AccessController.doPrivileged(new PrivilegedAction<Integer>() {
500 public Integer run() {
501 return Integer.getInteger(property_name, default_val);
502 }
503 });
453504 }
454505
455506 /**
457508 *
458509 * @param msg Message to print
459510 */
460 public static void log(String msg) {
511 public static void log(CharSequence msg) {
461512 if (DEBUG) {
462 System.err.println(msg);
513 System.err.println("[LWJGL] " + msg);
463514 }
464515 }
465516
568619 * @param field the Field to test
569620 * @param value the integer value of the field
570621 *
571 * @result true if the Field is accepted
622 * @return true if the Field is accepted
572623 */
573624 boolean accept(Field field, int value);
574625
575626 }
576627
577 }
628 }
3030 */
3131 package org.lwjgl;
3232
33 import java.security.AccessController;
34 import java.security.PrivilegedAction;
35 import java.security.PrivilegedExceptionAction;
36 import java.lang.UnsatisfiedLinkError;
3337
3438 /**
3539 *
3640 * @author elias_naur <elias_naur@users.sourceforge.net>
37 * @version $Revision: 3418 $
38 * $Id: LinuxSysImplementation.java 3418 2010-09-28 21:11:35Z spasi $
41 * @version $Revision$
42 * $Id$
3943 */
4044 final class LinuxSysImplementation extends J2SESysImplementation {
4145 private static final int JNI_VERSION = 19;
4246
4347 static {
44 java.awt.Toolkit.getDefaultToolkit(); // This will make sure libjawt.so is loaded
48 // Load libawt.so and libmawt.so, needed for libjawt.so
49 java.awt.Toolkit.getDefaultToolkit();
50
51 // manually load libjawt.so into vm, needed since Java 7
52 AccessController.doPrivileged(new PrivilegedAction<Object>() {
53 public Object run() {
54 try {
55 System.loadLibrary("jawt");
56 } catch (UnsatisfiedLinkError e) {
57 // catch and ignore an already loaded in another classloader
58 // exception, as vm already has it loaded
59 }
60 return null;
61 }
62 });
4563 }
4664
4765 public int getRequiredJNIVersion() {
5270 // Linux may as well resort to pure Java hackery, as there's no Linux native way of doing it
5371 // right anyway.
5472
55 String[] browsers = {"xdg-open", "firefox", "mozilla", "opera", "konqueror", "nautilus", "galeon", "netscape"};
73 String[] browsers = {"sensible-browser", "xdg-open", "google-chrome", "chromium", "firefox", "iceweasel", "mozilla", "opera", "konqueror", "nautilus", "galeon", "netscape"};
5674
5775 for ( final String browser : browsers ) {
5876 try {
3030 */
3131 package org.lwjgl;
3232
33 import java.awt.Toolkit;
34
3533 import com.apple.eio.FileManager;
34 import java.security.AccessController;
35 import java.security.PrivilegedAction;
36 import java.security.PrivilegedExceptionAction;
37 import java.lang.UnsatisfiedLinkError;
3638
3739 /**
3840 *
3941 * @author elias_naur <elias_naur@users.sourceforge.net>
40 * @version $Revision: 3418 $
41 * $Id: MacOSXSysImplementation.java 3418 2010-09-28 21:11:35Z spasi $
42 * @version $Revision$
43 * $Id$
4244 */
4345 final class MacOSXSysImplementation extends J2SESysImplementation {
44 private static final int JNI_VERSION = 19;
46 private static final int JNI_VERSION = 25;
4547
4648 static {
47 // Make sure AWT is properly initialized. This avoids hangs on Mac OS X 10.3
48 Toolkit.getDefaultToolkit();
49 // Manually start the AWT Application Loop
50 java.awt.Toolkit.getDefaultToolkit();
4951 }
50
52
5153 public int getRequiredJNIVersion() {
5254 return JNI_VERSION;
5355 }
0 /*
1 * Copyright (c) 2002-2011 LWJGL Project
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 *
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * * Neither the name of 'LWJGL' nor the names of
16 * its contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31 package org.lwjgl;
32
33 import java.lang.reflect.Field;
34 import java.nio.*;
35 import java.nio.charset.*;
36
37 /**
38 * [INTERNAL USE ONLY]
39 * <p/>
40 * This class provides utility methods for passing buffers to JNI API calls.
41 *
42 * @author Spasi
43 */
44 public final class MemoryUtil {
45
46 private static final Charset ascii;
47 private static final Charset utf8;
48 private static final Charset utf16;
49
50 static {
51 ascii = Charset.forName("ISO-8859-1");
52 utf8 = Charset.forName("UTF-8");
53 utf16 = Charset.forName("UTF-16LE");
54 }
55
56 private static final Accessor memUtil;
57
58 static {
59 Accessor util;
60 try {
61 // Depends on java.nio.Buffer#address and sun.misc.Unsafe
62 util = loadAccessor("org.lwjgl.MemoryUtilSun$AccessorUnsafe");
63 } catch (Exception e0) {
64 try {
65 // Depends on java.nio.Buffer#address and sun.reflect.FieldAccessor
66 util = loadAccessor("org.lwjgl.MemoryUtilSun$AccessorReflectFast");
67 } catch (Exception e1) {
68 try {
69 // Depends on java.nio.Buffer#address
70 util = new AccessorReflect();
71 } catch (Exception e2) {
72 LWJGLUtil.log("Unsupported JVM detected, this will likely result in low performance. Please inform LWJGL developers.");
73 util = new AccessorJNI();
74 }
75 }
76 }
77
78 LWJGLUtil.log("MemoryUtil Accessor: " + util.getClass().getSimpleName());
79 memUtil = util;
80
81 /*
82 BENCHMARK RESULTS - Oracle Server VM:
83
84 Unsafe: 4ns
85 ReflectFast: 8ns
86 Reflect: 10ns
87 JNI: 82ns
88
89 BENCHMARK RESULTS - Oracle Client VM:
90
91 Unsafe: 5ns
92 ReflectFast: 81ns
93 Reflect: 85ns
94 JNI: 87ns
95
96 On non-Oracle VMs, Unsafe should be the fastest implementation as well. In the absence
97 of Unsafe, performance will depend on how reflection and JNI are implemented. For now
98 we'll go with what we see on the Oracle VM (that is, we'll prefer reflection over JNI).
99 */
100 }
101
102 private MemoryUtil() {
103 }
104
105 /**
106 * Returns the memory address of the specified buffer. [INTERNAL USE ONLY]
107 *
108 * @param buffer the buffer
109 *
110 * @return the memory address
111 */
112 public static long getAddress0(Buffer buffer) { return memUtil.getAddress(buffer); }
113
114 public static long getAddress0Safe(Buffer buffer) { return buffer == null ? 0L : memUtil.getAddress(buffer); }
115
116 public static long getAddress0(PointerBuffer buffer) { return memUtil.getAddress(buffer.getBuffer()); }
117
118 public static long getAddress0Safe(PointerBuffer buffer) { return buffer == null ? 0L : memUtil.getAddress(buffer.getBuffer()); }
119
120 // --- [ API utilities ] ---
121
122 public static long getAddress(ByteBuffer buffer) { return getAddress(buffer, buffer.position()); }
123
124 public static long getAddress(ByteBuffer buffer, int position) { return getAddress0(buffer) + position; }
125
126 public static long getAddress(ShortBuffer buffer) { return getAddress(buffer, buffer.position()); }
127
128 public static long getAddress(ShortBuffer buffer, int position) { return getAddress0(buffer) + (position << 1); }
129
130 public static long getAddress(CharBuffer buffer) { return getAddress(buffer, buffer.position()); }
131
132 public static long getAddress(CharBuffer buffer, int position) { return getAddress0(buffer) + (position << 1); }
133
134 public static long getAddress(IntBuffer buffer) { return getAddress(buffer, buffer.position()); }
135
136 public static long getAddress(IntBuffer buffer, int position) { return getAddress0(buffer) + (position << 2); }
137
138 public static long getAddress(FloatBuffer buffer) { return getAddress(buffer, buffer.position()); }
139
140 public static long getAddress(FloatBuffer buffer, int position) { return getAddress0(buffer) + (position << 2); }
141
142 public static long getAddress(LongBuffer buffer) { return getAddress(buffer, buffer.position()); }
143
144 public static long getAddress(LongBuffer buffer, int position) { return getAddress0(buffer) + (position << 3); }
145
146 public static long getAddress(DoubleBuffer buffer) { return getAddress(buffer, buffer.position()); }
147
148 public static long getAddress(DoubleBuffer buffer, int position) { return getAddress0(buffer) + (position << 3); }
149
150 public static long getAddress(PointerBuffer buffer) { return getAddress(buffer, buffer.position()); }
151
152 public static long getAddress(PointerBuffer buffer, int position) { return getAddress0(buffer) + (position * PointerBuffer.getPointerSize()); }
153
154 // --- [ API utilities - Safe ] ---
155
156 public static long getAddressSafe(ByteBuffer buffer) { return buffer == null ? 0L : getAddress(buffer); }
157
158 public static long getAddressSafe(ByteBuffer buffer, int position) { return buffer == null ? 0L : getAddress(buffer, position); }
159
160 public static long getAddressSafe(ShortBuffer buffer) { return buffer == null ? 0L : getAddress(buffer); }
161
162 public static long getAddressSafe(ShortBuffer buffer, int position) { return buffer == null ? 0L : getAddress(buffer, position); }
163
164 public static long getAddressSafe(CharBuffer buffer) { return buffer == null ? 0L : getAddress(buffer); }
165
166 public static long getAddressSafe(CharBuffer buffer, int position) { return buffer == null ? 0L : getAddress(buffer, position); }
167
168 public static long getAddressSafe(IntBuffer buffer) { return buffer == null ? 0L : getAddress(buffer); }
169
170 public static long getAddressSafe(IntBuffer buffer, int position) { return buffer == null ? 0L : getAddress(buffer, position); }
171
172 public static long getAddressSafe(FloatBuffer buffer) { return buffer == null ? 0L : getAddress(buffer); }
173
174 public static long getAddressSafe(FloatBuffer buffer, int position) { return buffer == null ? 0L : getAddress(buffer, position); }
175
176 public static long getAddressSafe(LongBuffer buffer) { return buffer == null ? 0L : getAddress(buffer); }
177
178 public static long getAddressSafe(LongBuffer buffer, int position) { return buffer == null ? 0L : getAddress(buffer, position); }
179
180 public static long getAddressSafe(DoubleBuffer buffer) { return buffer == null ? 0L : getAddress(buffer); }
181
182 public static long getAddressSafe(DoubleBuffer buffer, int position) { return buffer == null ? 0L : getAddress(buffer, position); }
183
184 public static long getAddressSafe(PointerBuffer buffer) { return buffer == null ? 0L : getAddress(buffer); }
185
186 public static long getAddressSafe(PointerBuffer buffer, int position) { return buffer == null ? 0L : getAddress(buffer, position); }
187
188 // --- [ String utilities ] ---
189
190 /**
191 * Returns a ByteBuffer containing the specified text ASCII encoded and null-terminated.
192 * If text is null, null is returned.
193 *
194 * @param text the text to encode
195 *
196 * @return the encoded text or null
197 *
198 * @see String#getBytes()
199 */
200 public static ByteBuffer encodeASCII(final CharSequence text) {
201 return encode(text, ascii);
202 }
203
204 /**
205 * Returns a ByteBuffer containing the specified text UTF-8 encoded and null-terminated.
206 * If text is null, null is returned.
207 *
208 * @param text the text to encode
209 *
210 * @return the encoded text or null
211 *
212 * @see String#getBytes()
213 */
214 public static ByteBuffer encodeUTF8(final CharSequence text) {
215 return encode(text, utf8);
216 }
217
218 /**
219 * Returns a ByteBuffer containing the specified text UTF-16LE encoded and null-terminated.
220 * If text is null, null is returned.
221 *
222 * @param text the text to encode
223 *
224 * @return the encoded text
225 */
226 public static ByteBuffer encodeUTF16(final CharSequence text) {
227 return encode(text, utf16);
228 }
229
230 /**
231 * Wraps the specified text in a null-terminated CharBuffer and encodes it using the specified Charset.
232 *
233 * @param text the text to encode
234 * @param charset the charset to use for encoding
235 *
236 * @return the encoded text
237 */
238 private static ByteBuffer encode(final CharSequence text, final Charset charset) {
239 if ( text == null )
240 return null;
241
242 return encode(CharBuffer.wrap(new CharSequenceNT(text)), charset);
243 }
244
245 /**
246 * A {@link CharsetEncoder#encode(java.nio.CharBuffer)} implementation that uses {@link BufferUtils#createByteBuffer(int)}
247 * instead of {@link ByteBuffer#allocate(int)}.
248 *
249 * @see CharsetEncoder#encode(java.nio.CharBuffer)
250 */
251 private static ByteBuffer encode(final CharBuffer in, final Charset charset) {
252 final CharsetEncoder encoder = charset.newEncoder(); // encoders are not thread-safe, create a new one on every call
253
254 int n = (int)(in.remaining() * encoder.averageBytesPerChar());
255 ByteBuffer out = BufferUtils.createByteBuffer(n);
256
257 if ( n == 0 && in.remaining() == 0 )
258 return out;
259
260 encoder.reset();
261 while ( true ) {
262 CoderResult cr = in.hasRemaining() ? encoder.encode(in, out, true) : CoderResult.UNDERFLOW;
263 if ( cr.isUnderflow() )
264 cr = encoder.flush(out);
265
266 if ( cr.isUnderflow() )
267 break;
268
269 if ( cr.isOverflow() ) {
270 n = 2 * n + 1; // Ensure progress; n might be 0!
271 ByteBuffer o = BufferUtils.createByteBuffer(n);
272 out.flip();
273 o.put(out);
274 out = o;
275 continue;
276 }
277
278 try {
279 cr.throwException();
280 } catch (CharacterCodingException e) {
281 throw new RuntimeException(e);
282 }
283 }
284 out.flip();
285 return out;
286 }
287
288 public static String decodeASCII(final ByteBuffer buffer) {
289 return decode(buffer, ascii);
290 }
291
292 public static String decodeUTF8(final ByteBuffer buffer) {
293 return decode(buffer, utf8);
294 }
295
296 public static String decodeUTF16(final ByteBuffer buffer) {
297 return decode(buffer, utf16);
298 }
299
300 private static String decode(final ByteBuffer buffer, final Charset charset) {
301 if ( buffer == null )
302 return null;
303
304 return decodeImpl(buffer, charset);
305 }
306
307 private static String decodeImpl(final ByteBuffer in, final Charset charset) {
308 final CharsetDecoder decoder = charset.newDecoder(); // decoders are not thread-safe, create a new one on every call
309
310 int n = (int)(in.remaining() * decoder.averageCharsPerByte());
311 CharBuffer out = BufferUtils.createCharBuffer(n);
312
313 if ( (n == 0) && (in.remaining() == 0) )
314 return "";
315
316 decoder.reset();
317 for (; ; ) {
318 CoderResult cr = in.hasRemaining() ? decoder.decode(in, out, true) : CoderResult.UNDERFLOW;
319 if ( cr.isUnderflow() )
320 cr = decoder.flush(out);
321