Imported Upstream version 2.9.3+dfsg
Markus Koschany
7 years ago
6 | 6 | <import file="platform_build/build-applet.xml"/> |
7 | 7 | <import file="platform_build/build-webstart.xml"/> |
8 | 8 | <import file="platform_build/build-maven.xml"/> |
9 | <import file="eclipse-update/org.lwjgl.build/build-updatesite.xml"/> | |
9 | 10 | |
10 | 11 | <!-- ================================================================== --> |
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 --> | |
13 | 14 | <!-- ================================================================== --> |
14 | 15 | |
15 | 16 | <!-- ================================================================== --> |
16 | <!-- Initialize build --> | |
17 | <!-- Initialize build --> | |
17 | 18 | <!-- ================================================================== --> |
18 | 19 | <target name="-initialize"> |
19 | 20 | <mkdir dir="${lwjgl.bin}" taskname="initialiazing bin folder" /> |
20 | 21 | <mkdir dir="${lwjgl.bin}/lwjgl" taskname="initialiazing native bin folder" /> |
22 | <mkdir dir="${lwjgl.bin}/lwjgles" taskname="initialiazing native OpenGL ES bin folder"/> | |
21 | 23 | <mkdir dir="${lwjgl.lib}" taskname="initialiazing lib folder" /> |
22 | 24 | <mkdir dir="${lwjgl.dist}" taskname="initialiazing dist folder" /> |
23 | 25 | <mkdir dir="${lwjgl.docs}/javadoc" taskname="initialiazing docs folder" /> |
29 | 31 | <mkdir dir="${lwjgl.temp}/native" taskname="initialiazing temp/native folder" /> |
30 | 32 | <mkdir dir="${lwjgl.temp}/native/windows" taskname="initialiazing temp/windows folder" /> |
31 | 33 | <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" /> | |
32 | 36 | <mkdir dir="${lwjgl.temp}/native/macosx" taskname="initialiazing temp/macosx folder" /> |
33 | 37 | <mkdir dir="${lwjgl.temp}/native/solaris" taskname="initialiazing temp/solaris folder" /> |
34 | 38 | </target> |
47 | 51 | <!-- Useful when we need to force native recompilation --> |
48 | 52 | <target name="clean-native" description="Cleans native files generated by this ant script" depends="clean-generated-native"> |
49 | 53 | <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"/> | |
50 | 55 | </target> |
51 | 56 | |
52 | 57 | <!-- Creates a distribution of LWJGL --> |
53 | 58 | <target name="release" description="Creates a distribution of LWJGL using supplied native binaries"> |
54 | 59 | <!-- 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"/> | |
56 | 61 | <input |
57 | 62 | message="All data in the ${lwjgl.dist} folder will be deleted. Continue? " |
58 | 63 | validargs="yes,no" |
110 | 115 | <antcall target="-jars_NoDEP" /> |
111 | 116 | </target> |
112 | 117 | |
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 | ||
113 | 124 | <target name="-jars_NoDEP"> |
114 | 125 | <move todir="libs/"> |
115 | 126 | <fileset dir="${lwjgl.temp}/jar"> |
123 | 134 | <!-- Create lwjgl.jar --> |
124 | 135 | <jar destfile="${lwjgl.temp}/jar/lwjgl-debug.jar" taskname="lwjgl-debug.jar"> |
125 | 136 | <fileset refid="lwjgl.fileset" /> |
137 | <fileset refid="lwjgl.fileset.dependencies"/> | |
126 | 138 | <manifest> |
127 | 139 | <attribute name="Sealed" value="true"/> |
128 | 140 | </manifest> |
134 | 146 | <!-- Create lwjgl.jar --> |
135 | 147 | <jar destfile="${lwjgl.temp}/jar/lwjgl.jar" taskname="lwjgl.jar"> |
136 | 148 | <fileset refid="lwjgl.fileset" /> |
149 | <fileset refid="lwjgl.fileset.dependencies"/> | |
137 | 150 | <manifest> |
138 | 151 | <attribute name="Sealed" value="true"/> |
139 | 152 | </manifest> |
145 | 158 | <fileset refid="lwjgl_util_applet.fileset" /> |
146 | 159 | <manifest> |
147 | 160 | <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="*"/> | |
148 | 166 | </manifest> |
149 | 167 | </jar> |
150 | 168 | |
160 | 178 | </jar> |
161 | 179 | </target> |
162 | 180 | |
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 | ||
163 | 228 | <!-- Distributes files --> |
164 | 229 | <target name="-distribute"> |
165 | 230 | <delete> |
177 | 242 | <copy todir="${lwjgl.temp}/native/linux"> |
178 | 243 | <fileset dir="${lwjgl.lib}/linux"> |
179 | 244 | <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" /> | |
180 | 255 | </fileset> |
181 | 256 | </copy> |
182 | 257 | <copy todir="${lwjgl.temp}/native/macosx"> |
219 | 294 | |
220 | 295 | <!-- Generates the native headers from source files --> |
221 | 296 | <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"> | |
223 | 298 | <class name="org.lwjgl.LinuxSysImplementation" /> |
224 | 299 | <class name="org.lwjgl.opengl.LinuxEvent" /> |
225 | 300 | <class name="org.lwjgl.opengl.LinuxMouse" /> |
226 | 301 | <class name="org.lwjgl.opengl.LinuxKeyboard" /> |
227 | 302 | <class name="org.lwjgl.opengl.LinuxDisplay" /> |
228 | 303 | <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"/> | |
237 | 316 | <class name="org.lwjgl.opengl.WindowsKeyboard" /> |
238 | <class name="org.lwjgl.opengl.WindowsPbufferPeerInfo" /> | |
239 | <class name="org.lwjgl.opengl.WindowsDisplay" /> | |
240 | 317 | <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"> | |
249 | 334 | <class name="org.lwjgl.MacOSXSysImplementation" /> |
250 | <class name="org.lwjgl.opengl.MacOSXMouseEventQueue" /> | |
251 | 335 | <class name="org.lwjgl.opengl.MacOSXCanvasPeerInfo" /> |
252 | 336 | <class name="org.lwjgl.opengl.MacOSXPeerInfo" /> |
253 | 337 | <class name="org.lwjgl.opengl.MacOSXPbufferPeerInfo" /> |
254 | 338 | <class name="org.lwjgl.opengl.MacOSXDisplay" /> |
255 | 339 | <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}"> | |
259 | 346 | <class name="org.lwjgl.opengl.AWTSurfaceLock" /> |
260 | 347 | <class name="org.lwjgl.DefaultSysImplementation" /> |
261 | 348 | <class name="org.lwjgl.input.Cursor" /> |
262 | 349 | <class name="org.lwjgl.input.Keyboard" /> |
263 | 350 | <class name="org.lwjgl.input.Mouse" /> |
264 | 351 | <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" /> | |
269 | 353 | <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"/> | |
271 | 372 | </javah> |
272 | 373 | </target> |
273 | 374 | |
325 | 426 | lwjgl.native.windows.version = ${lwjgl.native.windows.version} |
326 | 427 | lwjgl.java.linux.version = ${lwjgl.java.linux.version} |
327 | 428 | 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} | |
328 | 433 | lwjgl.java.macosx.version = ${lwjgl.java.macosx.version} |
329 | 434 | lwjgl.native.macosx.version = ${lwjgl.native.macosx.version} |
330 | 435 | </echo> |
356 | 461 | |
357 | 462 | <!-- Compiles the Java source code --> |
358 | 463 | <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"> | |
360 | 465 | <!--<compilerarg value="-Xlint:unchecked"/>--> |
361 | 466 | <src path="${lwjgl.src}/java/"/> |
362 | 467 | <src path="${lwjgl.src}/generated/"/> |
363 | 468 | <include name="org/lwjgl/*.java"/> |
364 | 469 | <include name="org/lwjgl/input/**"/> |
365 | 470 | <include name="org/lwjgl/opengl/**"/> |
471 | <include name="org/lwjgl/opengles/**"/> | |
366 | 472 | <include name="org/lwjgl/openal/**"/> |
367 | 473 | <include name="org/lwjgl/opencl/**"/> |
368 | 474 | <include name="org/lwjgl/util/**"/> |
383 | 489 | </condition> |
384 | 490 | <antcall target="-compile_native_linux" /> |
385 | 491 | |
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 | ||
386 | 502 | <condition property="lwjgl.platform.solaris"> |
387 | 503 | <os name="SunOS" /> |
388 | 504 | </condition> |
411 | 527 | </copy> |
412 | 528 | <!-- headless issues <version-check platform="linux"/> --> |
413 | 529 | </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 | ||
414 | 547 | |
415 | 548 | <!-- Compiles LWJGL on solaris platforms --> |
416 | 549 | <target name="-compile_native_solaris" if="lwjgl.platform.solaris"> |
425 | 558 | <!-- Compiles LWJGL on Mac platforms --> |
426 | 559 | <target name="-compile_native_macosx" if="lwjgl.platform.macosx"> |
427 | 560 | <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"/> | |
429 | 562 | <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> | |
430 | 591 | </target> |
431 | 592 | |
432 | 593 | <target name="repack200" description="Pack200-repack a jar file"> |
515 | 676 | <bottom><![CDATA[<i>Copyright © 2002-2009 lwjgl.org. All Rights Reserved.</i>]]></bottom> |
516 | 677 | </javadoc> |
517 | 678 | </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> | |
518 | 691 | </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> |
11 | 11 | <property name="lwjgl.docs" location="doc" /> |
12 | 12 | <property name="lwjgl.temp" location="temp" /> |
13 | 13 | <property name="lwjgl.res" location="res" /> |
14 | <property name="lwjgl.version" value="2.7.1" /> | |
14 | <property name="lwjgl.version" value="2.9.3" /> | |
15 | 15 | <property name="lwjgl.web" location="www" /> |
16 | 16 | |
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}"/> | |
20 | 27 | |
21 | 28 | <!-- ================================================================== --> |
22 | 29 | <!-- Filesets used for targets --> |
26 | 33 | <fileset id="lwjgl.fileset" dir="${lwjgl.bin}"> |
27 | 34 | <patternset id="lwjgl.package.pattern"> |
28 | 35 | <include name="org/**/*" /> |
36 | <exclude name="org/lwjgl/opengles/**"/> | |
29 | 37 | <exclude name="org/lwjgl/d3d/**" /> |
30 | 38 | <exclude name="org/lwjgl/test/**" /> |
31 | 39 | <exclude name="org/lwjgl/util/**" /> |
32 | 40 | <exclude name="org/lwjgl/examples/**" /> |
33 | 41 | </patternset> |
34 | 42 | </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 | ||
36 | 49 | <!-- Files to include in the lwjgl_util_applet.jar file --> |
37 | 50 | <fileset id="lwjgl_util_applet.fileset" dir="${lwjgl.bin}"> |
38 | 51 | <patternset id="lwjgl_util_applet.package.pattern"> |
45 | 58 | <fileset id="lwjgl_test.fileset" dir="${lwjgl.bin}"> |
46 | 59 | <exclude name="**.*" /> |
47 | 60 | <include name="org/lwjgl/test/**" /> |
61 | <exclude name="org/lwjgl/test/opengles/**"/> | |
48 | 62 | <include name="org/lwjgl/examples/**" /> |
49 | 63 | </fileset> |
50 | 64 | |
58 | 72 | <include name="org/lwjgl/test/opencl/gl/*.cl" /> |
59 | 73 | </fileset> |
60 | 74 | |
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 | ||
61 | 83 | <!-- Files to include in the lwjgl_util.jar file --> |
62 | 84 | <fileset id="lwjgl_util.fileset" dir="${lwjgl.bin}"> |
63 | 85 | <patternset id="lwjgl_util.package.pattern"> |
67 | 89 | <include name="org/lwjgl/util/**" /> |
68 | 90 | </patternset> |
69 | 91 | </fileset> |
70 | ||
92 | ||
71 | 93 | |
72 | 94 | <!-- Files to include in the lwjgl_applet.jar file --> |
73 | 95 | <fileset id="lwjgl_applet.fileset" dir="${lwjgl.bin}"> |
115 | 137 | <include name="liblwjgl*.so" /> |
116 | 138 | <include name="libopenal*.so" /> |
117 | 139 | </patternset> |
118 | <patternset id="lwjgl-linux-jinput.fileset"> | |
140 | <patternset id="lwjgl-linux-jinput.fileset"> | |
119 | 141 | <include name="libjinput-linux.so" /> |
120 | 142 | <include name="libjinput-linux64.so" /> |
121 | 143 | </patternset> |
124 | 146 | <!-- Files to include in mac os x package --> |
125 | 147 | <patternset id="lwjgl-macosx.fileset"> |
126 | 148 | <patternset id="lwjgl-macosx-lwjgl.fileset"> |
127 | <include name="liblwjgl.jnilib" /> | |
149 | <include name="liblwjgl.dylib" /> | |
128 | 150 | <include name="openal.dylib" /> |
129 | 151 | </patternset> |
130 | 152 | <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" /> | |
133 | 155 | </patternset> |
134 | 156 | </patternset> |
135 | 157 |
0 | 0 | <project name="generator"> |
1 | ||
2 | <import file="build-definitions.xml"/> | |
1 | 3 | |
2 | 4 | <!-- clean the generated files --> |
3 | 5 | <target name="clean-generated" description="Deletes the generated java source"> |
13 | 15 | </target> |
14 | 16 | |
15 | 17 | <!-- 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"> | |
18 | 26 | <include name="org/lwjgl/util/generator/openal/**.java"/> |
19 | 27 | <include name="org/lwjgl/util/generator/opengl/**.java"/> |
28 | <include name="org/lwjgl/util/generator/opengles/**.java"/> | |
20 | 29 | <include name="org/lwjgl/util/generator/opencl/**.java"/> |
21 | <compilerarg value="-Xlint:all"/> | |
30 | <compilerarg value="-Xlint:none"/> | |
22 | 31 | </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"> | |
25 | 35 | <include name="org/lwjgl/PointerWrapper.java"/> |
26 | 36 | <include name="org/lwjgl/PointerBuffer.java"/> |
27 | 37 | <!-- OpenGL --> |
28 | 38 | <include name="org/lwjgl/opengl/GLSync.java"/> |
29 | 39 | <include name="org/lwjgl/opengl/AMDDebugOutputCallback.java"/> |
30 | 40 | <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"/> | |
31 | 45 | <!-- OpenCL --> |
32 | 46 | <include name="org/lwjgl/opencl/CLPlatform.java"/> |
33 | 47 | <include name="org/lwjgl/opencl/CLDevice.java"/> |
34 | 48 | <include name="org/lwjgl/opencl/CLContext.java"/> |
35 | <include name="org/lwjgl/opencl/CLContextCallback.java"/> | |
36 | 49 | <include name="org/lwjgl/opencl/CLCommandQueue.java"/> |
37 | 50 | <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"/> | |
40 | 52 | <include name="org/lwjgl/opencl/CLNativeKernel.java"/> |
41 | <include name="org/lwjgl/opencl/CLEventCallback.java"/> | |
42 | 53 | <include name="org/lwjgl/opencl/CLFunctionAddress.java"/> |
43 | 54 | </javac> |
44 | 55 | </target> |
45 | 56 | |
46 | 57 | <!-- 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 | **************************************************************************** --> | |
50 | 67 | |
51 | 68 | <!-- 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> | |
66 | 88 | </target> |
67 | 89 | |
68 | 90 | <!-- Generate OpenAL [DEBUG] --> |
69 | 91 | <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 | **************************************************************************** --> | |
85 | 118 | |
86 | 119 | <!-- Generate OpenGL --> |
87 | 120 | <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> | |
102 | 140 | </target> |
103 | 141 | |
104 | 142 | <!-- 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> | |
121 | 164 | </target> |
122 | 165 | |
123 | 166 | <!-- Generate OpenGL references --> |
124 | 167 | <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> | |
135 | 182 | </target> |
136 | 183 | |
137 | 184 | <!-- Generate OpenGL context capabilities --> |
138 | 185 | <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> | |
150 | 201 | </target> |
151 | 202 | |
152 | 203 | <!-- 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 --> | |
169 | 322 | <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> | |
184 | 342 | </target> |
185 | 343 | |
186 | 344 | <!-- 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> | |
203 | 366 | </target> |
204 | 367 | |
205 | 368 | <!-- Generate OpenCL capabilities --> |
206 | 369 | <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> | |
218 | 385 | </target> |
219 | 386 | |
220 | 387 | <!-- 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> | |
234 | 405 | </target> |
235 | 406 | </project> |
2 | 2 | <property name="lwjgl.src.generated" location="${lwjgl.src}/generated" /> |
3 | 3 | <property name="lwjgl.maven" location="maven" /> |
4 | 4 | <property name="lwjgl.dstMaven" location="${lwjgl.temp}/maven" /> |
5 | ||
6 | 5 | <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 | ||
10 | 8 | <fileset id="lwjgl-sources.manual.fileset" dir="${lwjgl.src.java}"> |
11 | 9 | <patternset refid="lwjgl.package.pattern" /> |
10 | <patternset refid="lwjgl.package.dependencies.pattern"/> | |
12 | 11 | </fileset> |
13 | 12 | |
14 | 13 | <fileset id="lwjgl-sources.generated.fileset" dir="${lwjgl.src.generated}"> |
22 | 21 | <patternset refid="lwjgl_util.package.pattern" /> |
23 | 22 | </fileset> |
24 | 23 | |
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> | |
25 | 74 | |
26 | 75 | <target name="maven-full"> |
27 | 76 | <antcall target="clean-java" /> |
33 | 82 | <antcall target="maven"/> |
34 | 83 | </target> |
35 | 84 | |
36 | <target name="maven"> | |
85 | <target name="maven" depends="-fixmavenversion, -checkjinputversion"> <!-- Added as dependency because using antcall creates a new project scope --> | |
37 | 86 | <delete dir="${lwjgl.dstMaven}" quiet="true" failonerror="false" taskname="cleaning maven dist" /> |
38 | 87 | <mkdir dir="${lwjgl.dstMaven}" taskname="initialiazing temp maven folder" /> |
39 | 88 | <antcall target="-copylwjgljars" /> |
44 | 93 | <antcall target="-copymavendeploybuild"/> |
45 | 94 | <antcall target="-copymaventdist"/> |
46 | 95 | </target> |
96 | ||
97 | ||
98 | ||
99 | ||
100 | ||
101 | ||
47 | 102 | |
48 | 103 | |
49 | 104 | <target name="-copylwjgljars"> |
112 | 167 | </target> |
113 | 168 | |
114 | 169 | <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"> | |
116 | 171 | <fileset dir="${lwjgl.lib}/windows"> |
117 | 172 | <patternset refid="lwjgl-windows-lwjgl.fileset"/> |
118 | 173 | </fileset> |
122 | 177 | <patternset refid="lwjgl-linux-lwjgl.fileset"/> |
123 | 178 | </fileset> |
124 | 179 | </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"> | |
126 | 181 | <fileset dir="${lwjgl.lib}/macosx"> |
127 | 182 | <patternset refid="lwjgl-macosx-lwjgl.fileset"/> |
128 | 183 | </fileset> |
136 | 191 | </fileset> |
137 | 192 | <filterset> |
138 | 193 | <filter token="VERSION" value="${lwjgl-maven-version}"/> |
194 | <filter token="JINPUTVERSION" value="${jinput.version}"/> | |
139 | 195 | </filterset> |
140 | 196 | </copy> |
141 | 197 | </target> |
147 | 203 | </fileset> |
148 | 204 | </copy> |
149 | 205 | </target> |
150 | ||
206 | ||
151 | 207 | <target name="-copymaventdist"> |
152 | 208 | <zip destfile="${lwjgl.dist}/lwjgl-maven-${lwjgl.version}.zip" basedir="${lwjgl.temp}" includes="maven/**" /> |
153 | 209 | </target> |
3 | 3 | <property name="native" location="../../src/native"/> |
4 | 4 | <property name="libname32" value="liblwjgl.so"/> |
5 | 5 | <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" /> | |
7 | 7 | <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" /> |
8 | 8 | <property name="cflags32" value="-O2 -Wall -c -fPIC -std=c99 -Wunused"/> |
9 | 9 | |
20 | 20 | <exec executable="uname" outputproperty="hwplatform"> |
21 | 21 | <arg value="-m"/> |
22 | 22 | </exec> |
23 | <condition property="xf86vm_lib" value="-lXxf86vm" else="-Wl,-static,-lXxf86vm,-call_shared"> | |
24 | <os name="SunOS" /> | |
25 | </condition> | |
26 | 23 | <condition property="cflags_pthread" value="-pthreads" else="-pthread"> |
27 | 24 | <os name="SunOS" /> |
28 | 25 | </condition> |
38 | 35 | <os name="SunOS" /> |
39 | 36 | </condition> |
40 | 37 | |
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}"/> | |
43 | 40 | |
44 | 41 | <condition property="build.32bit.only"> |
45 | 42 | <not> |
64 | 61 | |
65 | 62 | <target name="compile32" unless="build.64bit.only"> |
66 | 63 | <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"> | |
68 | 65 | <arg line="${cflags32} ${cflags_pthread}"/> |
69 | 66 | <arg value="-I${java.home}/include"/> |
70 | 67 | <arg value="-I${java.home}/include/linux"/> |
72 | 69 | <arg value="-I${java.home}/../include/linux"/> |
73 | 70 | <arg value="-I${java.home}/../include/solaris"/> |
74 | 71 | <arg value="-I${native}/common"/> |
72 | <arg value="-I${native}/common/opengl"/> | |
75 | 73 | <arg value="-I${native}/linux"/> |
74 | <arg value="-I${native}/linux/opengl"/> | |
76 | 75 | <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> | |
81 | 84 | <apply dir="." parallel="true" executable="gcc" failonerror="true"> |
82 | 85 | <srcfile/> |
83 | 86 | <arg line="${linker_flags32}"/> |
90 | 93 | |
91 | 94 | <target name="compile64" unless="build.32bit.only"> |
92 | 95 | <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"> | |
94 | 97 | <arg line="${cflags64} ${cflags_pthread}"/> |
95 | 98 | <arg value="-I${java.home}/include"/> |
96 | 99 | <arg value="-I${java.home}/include/linux"/> |
98 | 101 | <arg value="-I${java.home}/../include/linux"/> |
99 | 102 | <arg value="-I${java.home}/../include/solaris"/> |
100 | 103 | <arg value="-I${native}/common"/> |
104 | <arg value="-I${native}/common/opengl"/> | |
101 | 105 | <arg value="-I${native}/linux"/> |
106 | <arg value="-I${native}/linux/opengl"/> | |
102 | 107 | <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> | |
107 | 116 | <apply dir="." parallel="true" executable="gcc" failonerror="true"> |
108 | 117 | <srcfile/> |
109 | 118 | <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>⏎ |
0 | 0 | #!/bin/sh |
1 | 1 | |
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 | ||
1 | 0 | <project name="OS X Native code" basedir="../../bin/lwjgl" default="nativelibrary"> |
2 | 1 | <property name="native" location="../../src/native"/> |
3 | 2 | |
4 | 3 | <target name="init"> |
5 | <mkdir dir="ppc"/> | |
6 | <mkdir dir="i386"/> | |
7 | 4 | <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 | ||
10 | 102 | <target name="clean"> |
11 | 103 | <delete failonerror="false"> |
12 | 104 | <fileset dir="i386"/> |
13 | 105 | <fileset dir="x86_64"/> |
14 | <fileset dir="ppc"/> | |
15 | <fileset dir="." includes="liblwjgl.jnilib"/> | |
106 | <fileset dir="." includes="liblwjgl.dylib"/> | |
16 | 107 | <fileset dir="." includes="lwjgl.symbols"/> |
17 | 108 | </delete> |
18 | 109 | </target> |
19 | 110 | |
20 | <target name="compile"> | |
111 | <target name="compile" depends="init"> | |
21 | 112 | <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"/> | |
23 | 114 | <!-- Map from *.m and *.c to .o --> |
24 | 115 | <mapper type="regexp" from="^(.*)\.(c|m)" to="\1.o"/> |
25 | 116 | <fileset dir="${native}/macosx" includes="*.m"/> |
26 | 117 | <fileset dir="${native}/macosx" includes="*.c"/> |
27 | 118 | <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"/> | |
35 | 136 | <fileset dir="${objdir}" includes="*.o"/> |
36 | 137 | </apply> |
37 | 138 | <apply dir="${objdir}" executable="strip" os="Mac OS X" failonerror="true"> |
39 | 140 | <fileset dir="." file="${libname}"/> |
40 | 141 | </apply> |
41 | 142 | </target> |
42 | ||
143 | ||
43 | 144 | <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}"/> | |
47 | 163 | <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> | |
55 | 164 | <antcall target="compile"> |
56 | 165 | <param name="dstdir" location="i386"/> |
57 | <param name="compiler" value="gcc-4.0"/> | |
58 | 166 | <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"/> | |
60 | 168 | </antcall> |
61 | 169 | <antcall target="compile"> |
62 | 170 | <param name="dstdir" location="x86_64"/> |
63 | <param name="compiler" value="gcc-4.0"/> | |
64 | 171 | <param name="sdkroot" location="${universal_sdkroot}"/> |
65 | 172 | <param name="cflags" value="-isysroot ${x86_64_sdkroot} -arch x86_64 -mmacosx-version-min=10.5"/> |
66 | 173 | </antcall> |
69 | 176 | <arg path="i386"/> |
70 | 177 | </exec> |
71 | 178 | <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"> | |
78 | 179 | <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"/> | |
82 | 182 | </antcall> |
83 | 183 | <antcall target="link"> |
84 | 184 | <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"/> | |
87 | 186 | <param name="linkerflags" value="-isysroot ${x86_64_sdkroot} -arch x86_64 -mmacosx-version-min=10.5"/> |
88 | 187 | </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"> | |
90 | 189 | <arg value="-create"/> |
91 | 190 | <srcfile/> |
92 | 191 | <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>⏎ |
21 | 21 | <srcfile/> |
22 | 22 | <fileset dir="${native}/windows" includes="*.c"/> |
23 | 23 | <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"/> | |
25 | 27 | <mapper type="glob" from="*.c" to="*.o"/> |
26 | 28 | </apply> |
27 | 29 | </target> |
52 | 54 | <fileset dir="." includes="*.dll"/> |
53 | 55 | </delete> |
54 | 56 | </target> |
55 | ||
57 | ||
56 | 58 | <target name="compile"> |
57 | 59 | <property name="libs" value="-lkernel32 -lole32 -lopengl32 -lversion -luser32 -lgdi32 -ladvapi32 -lwinmm"/> |
58 | 60 | <antcall target="compile_dir"/> |
5 | 5 | <property name="sdkhome" location="${env.MSSDK}"/> |
6 | 6 | |
7 | 7 | <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"/> | |
10 | 10 | <arg value="/I${sdkhome}\include"/> |
11 | 11 | <arg value="/I${java.home}\..\include"/> |
12 | 12 | <arg value="/I${java.home}\..\include\win32"/> |
13 | 13 | <arg value="/I${native}\common"/> |
14 | <arg value="/I${native}\common\opengl"/> | |
14 | 15 | <arg value="/I${native}\windows"/> |
16 | <arg value="/I${native}\windows\opengl"/> | |
15 | 17 | <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"/> | |
16 | 23 | <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"/> | |
19 | 25 | <mapper type="glob" from="*.c" to="*.obj"/> |
20 | 26 | </apply> |
21 | 27 | </target> |
42 | 48 | <fileset dir="." includes="*.lib"/> |
43 | 49 | </delete> |
44 | 50 | </target> |
45 | ||
51 | ||
46 | 52 | <target name="compile"> |
47 | 53 | <condition property="sdkhomelib" value="${sdkhome}\lib" else="${sdkhome}\lib\x64"> |
48 | 54 | <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 |
41 | 41 | * </p> |
42 | 42 | * @author cix_foo <cix_foo@users.sourceforge.net> |
43 | 43 | * @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$ | |
46 | 46 | */ |
47 | 47 | public class BufferChecks { |
48 | 48 | /** Static methods only! */ |
158 | 158 | * This is a separate call to help inline checkBufferSize. |
159 | 159 | */ |
160 | 160 | 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"); | |
162 | 162 | } |
163 | 163 | |
164 | 164 | private static void throwBufferSizeException(PointerBuffer buf, int size) { |
43 | 43 | /** |
44 | 44 | * Some often-used Buffer code for creating native buffers of the appropriate size. |
45 | 45 | * |
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$ | |
49 | 49 | */ |
50 | 50 | |
51 | 51 | public final class BufferUtils { |
191 | 191 | |
192 | 192 | /** Fill buffer with zeros from position to remaining */ |
193 | 193 | 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 | ||
194 | 204 | } |
34 | 34 | /** |
35 | 35 | * |
36 | 36 | * @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$ | |
39 | 39 | */ |
40 | 40 | abstract class DefaultSysImplementation implements SysImplementation { |
41 | 41 | public native int getJNIVersion(); |
36 | 36 | /** |
37 | 37 | * A SysImplementation which delegates as much as it can to J2SE. |
38 | 38 | * <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$ | |
42 | 42 | */ |
43 | 43 | abstract class J2SESysImplementation extends DefaultSysImplementation { |
44 | 44 |
37 | 37 | * </p> |
38 | 38 | * |
39 | 39 | * @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$ | |
42 | 42 | */ |
43 | 43 | public class LWJGLException extends Exception { |
44 | 44 |
47 | 47 | * </p> |
48 | 48 | * |
49 | 49 | * @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$ | |
52 | 52 | */ |
53 | 53 | public class LWJGLUtil { |
54 | 54 | public static final int PLATFORM_LINUX = 1; |
58 | 58 | public static final String PLATFORM_MACOSX_NAME = "macosx"; |
59 | 59 | public static final String PLATFORM_WINDOWS_NAME = "windows"; |
60 | 60 | |
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 | ||
61 | 257 | /** 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); | |
105 | 259 | |
106 | 260 | /** 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); | |
264 | 262 | |
265 | 263 | /** Debug flag. */ |
266 | 264 | public static final boolean DEBUG = getPrivilegedBoolean("org.lwjgl.util.Debug"); |
270 | 268 | private static final int PLATFORM; |
271 | 269 | |
272 | 270 | static { |
273 | LWJGLIcon16x16.flip(); | |
274 | LWJGLIcon32x32.flip(); | |
275 | ||
276 | 271 | final String osName = getPrivilegedProperty("os.name"); |
277 | 272 | if ( osName.startsWith("Windows") ) |
278 | 273 | 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") ) | |
280 | 275 | PLATFORM = PLATFORM_LINUX; |
281 | 276 | else if ( osName.startsWith("Mac OS X") || osName.startsWith("Darwin") ) |
282 | 277 | PLATFORM = PLATFORM_MACOSX; |
283 | 278 | else |
284 | 279 | 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(); | |
285 | 289 | } |
286 | 290 | |
287 | 291 | /** |
312 | 316 | default: |
313 | 317 | return "unknown"; |
314 | 318 | } |
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; | |
315 | 334 | } |
316 | 335 | |
317 | 336 | /** |
415 | 434 | * @return Absolute path to library if found, otherwise null |
416 | 435 | */ |
417 | 436 | private static String getPathFromClassLoader(final String libname, final ClassLoader classloader) { |
437 | Class<?> c = null; | |
438 | ||
418 | 439 | try { |
419 | 440 | log("getPathFromClassLoader: searching for: " + libname); |
420 | Class<?> c = classloader.getClass(); | |
441 | c = classloader.getClass(); | |
421 | 442 | while (c != null) { |
422 | 443 | final Class<?> clazz = c; |
423 | 444 | try { |
435 | 456 | } |
436 | 457 | } |
437 | 458 | } catch (Exception e) { |
438 | log("Failure locating " + e + " using classloader:" + e); | |
459 | log("Failure locating " + e + " using classloader:" + c); | |
439 | 460 | } |
440 | 461 | return null; |
441 | 462 | } |
443 | 464 | /** |
444 | 465 | * Gets a boolean property as a privileged action. |
445 | 466 | */ |
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>() { | |
448 | 469 | public Boolean run() { |
449 | 470 | return Boolean.getBoolean(property_name); |
450 | 471 | } |
451 | 472 | }); |
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 | }); | |
453 | 504 | } |
454 | 505 | |
455 | 506 | /** |
457 | 508 | * |
458 | 509 | * @param msg Message to print |
459 | 510 | */ |
460 | public static void log(String msg) { | |
511 | public static void log(CharSequence msg) { | |
461 | 512 | if (DEBUG) { |
462 | System.err.println(msg); | |
513 | System.err.println("[LWJGL] " + msg); | |
463 | 514 | } |
464 | 515 | } |
465 | 516 | |
568 | 619 | * @param field the Field to test |
569 | 620 | * @param value the integer value of the field |
570 | 621 | * |
571 | * @result true if the Field is accepted | |
622 | * @return true if the Field is accepted | |
572 | 623 | */ |
573 | 624 | boolean accept(Field field, int value); |
574 | 625 | |
575 | 626 | } |
576 | 627 | |
577 | }⏎ | |
628 | } |
30 | 30 | */ |
31 | 31 | package org.lwjgl; |
32 | 32 | |
33 | import java.security.AccessController; | |
34 | import java.security.PrivilegedAction; | |
35 | import java.security.PrivilegedExceptionAction; | |
36 | import java.lang.UnsatisfiedLinkError; | |
33 | 37 | |
34 | 38 | /** |
35 | 39 | * |
36 | 40 | * @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$ | |
39 | 43 | */ |
40 | 44 | final class LinuxSysImplementation extends J2SESysImplementation { |
41 | 45 | private static final int JNI_VERSION = 19; |
42 | 46 | |
43 | 47 | 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 | }); | |
45 | 63 | } |
46 | 64 | |
47 | 65 | public int getRequiredJNIVersion() { |
52 | 70 | // Linux may as well resort to pure Java hackery, as there's no Linux native way of doing it |
53 | 71 | // right anyway. |
54 | 72 | |
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"}; | |
56 | 74 | |
57 | 75 | for ( final String browser : browsers ) { |
58 | 76 | try { |
30 | 30 | */ |
31 | 31 | package org.lwjgl; |
32 | 32 | |
33 | import java.awt.Toolkit; | |
34 | ||
35 | 33 | 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; | |
36 | 38 | |
37 | 39 | /** |
38 | 40 | * |
39 | 41 | * @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$ | |
42 | 44 | */ |
43 | 45 | final class MacOSXSysImplementation extends J2SESysImplementation { |
44 | private static final int JNI_VERSION = 19; | |
46 | private static final int JNI_VERSION = 25; | |
45 | 47 | |
46 | 48 | 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(); | |
49 | 51 | } |
50 | ||
52 | ||
51 | 53 | public int getRequiredJNIVersion() { |
52 | 54 | return JNI_VERSION; |
53 | 55 | } |
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 |