You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(134) |
Sep
(52) |
Oct
(13) |
Nov
(342) |
Dec
(163) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(44) |
Feb
(62) |
Mar
(158) |
Apr
(38) |
May
(70) |
Jun
(58) |
Jul
(104) |
Aug
(207) |
Sep
(83) |
Oct
(122) |
Nov
(23) |
Dec
(49) |
| 2004 |
Jan
(119) |
Feb
(132) |
Mar
(192) |
Apr
(140) |
May
(77) |
Jun
(74) |
Jul
(201) |
Aug
(63) |
Sep
(102) |
Oct
(70) |
Nov
(173) |
Dec
(78) |
| 2005 |
Jan
(174) |
Feb
(197) |
Mar
(105) |
Apr
(59) |
May
(77) |
Jun
(43) |
Jul
(21) |
Aug
(18) |
Sep
(47) |
Oct
(37) |
Nov
(74) |
Dec
(50) |
| 2006 |
Jan
(44) |
Feb
(19) |
Mar
(32) |
Apr
(24) |
May
(31) |
Jun
(55) |
Jul
(138) |
Aug
(28) |
Sep
(12) |
Oct
(41) |
Nov
(58) |
Dec
(24) |
| 2007 |
Jan
(28) |
Feb
(14) |
Mar
(10) |
Apr
(68) |
May
(30) |
Jun
(26) |
Jul
(18) |
Aug
(63) |
Sep
(19) |
Oct
(29) |
Nov
(20) |
Dec
(10) |
| 2008 |
Jan
(38) |
Feb
(7) |
Mar
(37) |
Apr
(120) |
May
(41) |
Jun
(36) |
Jul
(39) |
Aug
(24) |
Sep
(28) |
Oct
(30) |
Nov
(36) |
Dec
(75) |
| 2009 |
Jan
(46) |
Feb
(22) |
Mar
(50) |
Apr
(70) |
May
(134) |
Jun
(105) |
Jul
(75) |
Aug
(34) |
Sep
(38) |
Oct
(34) |
Nov
(19) |
Dec
(20) |
| 2010 |
Jan
(11) |
Feb
(20) |
Mar
(65) |
Apr
(83) |
May
(104) |
Jun
(73) |
Jul
(78) |
Aug
(57) |
Sep
(43) |
Oct
(35) |
Nov
(9) |
Dec
(4) |
| 2011 |
Jan
(21) |
Feb
(11) |
Mar
(18) |
Apr
(10) |
May
(18) |
Jun
(15) |
Jul
(48) |
Aug
(25) |
Sep
(17) |
Oct
(45) |
Nov
(15) |
Dec
(12) |
| 2012 |
Jan
(21) |
Feb
(9) |
Mar
(12) |
Apr
(9) |
May
(9) |
Jun
(5) |
Jul
(1) |
Aug
(10) |
Sep
(12) |
Oct
(1) |
Nov
(28) |
Dec
(5) |
| 2013 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
| 2016 |
Jan
(2) |
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <ka...@us...> - 2008-04-22 20:49:33
|
Revision: 3041
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3041&view=rev
Author: kappa1
Date: 2008-04-22 13:32:32 -0700 (Tue, 22 Apr 2008)
Log Message:
-----------
added check to prevent multiple applet instances starting.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java
Modified: trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2008-04-22 19:59:47 UTC (rev 3040)
+++ trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2008-04-22 20:32:32 UTC (rev 3041)
@@ -273,22 +273,27 @@
* @see java.applet.Applet#start()
*/
public void start() {
- if(loaderThread == null && !fatalError) {
- loaderThread = new Thread(this);
- loaderThread.setName("AppletLoader.loaderThread");
- loaderThread.start();
-
- animationThread = new Thread() {
- public void run() {
- while(loaderThread != null) {
- repaint();
- AppletLoader.this.sleep(100);
+ if (lwjglApplet != null) {
+ lwjglApplet.start();
+ }
+ else {
+ if(loaderThread == null && !fatalError) {
+ loaderThread = new Thread(this);
+ loaderThread.setName("AppletLoader.loaderThread");
+ loaderThread.start();
+
+ animationThread = new Thread() {
+ public void run() {
+ while(loaderThread != null) {
+ repaint();
+ AppletLoader.this.sleep(100);
+ }
+ animationThread = null;
}
- animationThread = null;
- }
- };
- animationThread.setName("AppletLoader.animationthread");
- animationThread.start();
+ };
+ animationThread.setName("AppletLoader.animationthread");
+ animationThread.start();
+ }
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <eli...@us...> - 2008-04-22 19:59:53
|
Revision: 3040
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3040&view=rev
Author: elias_naur
Date: 2008-04-22 12:59:47 -0700 (Tue, 22 Apr 2008)
Log Message:
-----------
Mac OS X: Removed reflection from MacOSXSysImplementation
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/MacOSXSysImplementation.java
Modified: trunk/LWJGL/src/java/org/lwjgl/MacOSXSysImplementation.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/MacOSXSysImplementation.java 2008-04-22 18:09:45 UTC (rev 3039)
+++ trunk/LWJGL/src/java/org/lwjgl/MacOSXSysImplementation.java 2008-04-22 19:59:47 UTC (rev 3040)
@@ -36,6 +36,8 @@
import java.security.PrivilegedExceptionAction;
import java.awt.Toolkit;
+import com.apple.eio.FileManager;
+
/**
*
* @author elias_naur <eli...@us...>
@@ -50,18 +52,7 @@
public boolean openURL(String url) {
try {
- Method openURL_method = (Method)AccessController.doPrivileged(new PrivilegedExceptionAction() {
- public Object run() throws Exception {
- try {
- Class com_apple_eio_FileManager = Class.forName("com.apple.eio.FileManager");
- return com_apple_eio_FileManager.getMethod("openURL", new Class[]{String.class});
- } catch (Exception e) {
- LWJGLUtil.log("Exception occurred while trying to invoke browser: " + e);
- return null;
- }
- }
- });
- openURL_method.invoke(null, new Object[]{url});
+ FileManager.openURL(url);
return true;
} catch (Exception e) {
LWJGLUtil.log("Exception occurred while trying to invoke browser: " + e);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <eli...@us...> - 2008-04-22 18:09:48
|
Revision: 3039
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3039&view=rev
Author: elias_naur
Date: 2008-04-22 11:09:45 -0700 (Tue, 22 Apr 2008)
Log Message:
-----------
Added GearsApplet test
Modified Paths:
--------------
trunk/LWJGL/applet/appletloader.html
Added Paths:
-----------
trunk/LWJGL/src/java/org/lwjgl/test/applet/GearsApplet.java
Modified: trunk/LWJGL/applet/appletloader.html
===================================================================
--- trunk/LWJGL/applet/appletloader.html 2008-04-22 17:56:41 UTC (rev 3038)
+++ trunk/LWJGL/applet/appletloader.html 2008-04-22 18:09:45 UTC (rev 3039)
@@ -13,7 +13,7 @@
<param name="al_title" value="appletloadertest">
<!-- Main Applet Class -->
- <param name="al_main" value="org.lwjgl.test.applet.AppletLoaderTest">
+ <param name="al_main" value="org.lwjgl.test.applet.GearsApplet">
<!-- logo to paint while loading, will be centered -->
<param name="al_logo" value="appletlogo.png">
@@ -63,4 +63,4 @@
</p>
</body>
-</html>
\ No newline at end of file
+</html>
Added: trunk/LWJGL/src/java/org/lwjgl/test/applet/GearsApplet.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/test/applet/GearsApplet.java (rev 0)
+++ trunk/LWJGL/src/java/org/lwjgl/test/applet/GearsApplet.java 2008-04-22 18:09:45 UTC (rev 3039)
@@ -0,0 +1,340 @@
+package org.lwjgl.test.applet;
+
+import java.applet.Applet;
+import java.awt.BorderLayout;
+import java.awt.Canvas;
+import java.nio.FloatBuffer;
+import org.lwjgl.BufferUtils;
+import org.lwjgl.LWJGLException;
+import org.lwjgl.opengl.ARBTransposeMatrix;
+import org.lwjgl.opengl.Display;
+import org.lwjgl.input.Keyboard;
+import org.lwjgl.opengl.GL11;
+import org.lwjgl.opengl.GLContext;
+
+public class GearsApplet extends Applet {
+
+ Canvas display_parent;
+ Thread gameThread;
+
+ boolean running = false;
+
+ private float view_rotx = 20.0f;
+ private float view_roty = 30.0f;
+ private float view_rotz = 0.0f;
+ private int gear1;
+ private int gear2;
+ private int gear3;
+ private float angle = 0.0f;
+
+
+ boolean keyDown = false;
+
+ public void destroy() {
+ remove(display_parent);
+ super.destroy();
+ System.out.println("Clear up");
+ }
+
+ private void destroyLWJGL() {
+ stopApplet();
+ try {
+ gameThread.join();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * @see java.applet.Applet#start()
+ */
+ public void start() {
+ gameThread = new Thread() {
+ public void run() {
+ running = true;
+ try {
+ System.out.println("display_parent.isDisplayable() = " + display_parent.isDisplayable());
+ Display.setParent(display_parent);
+ //Display.setVSyncEnabled(true);
+ Display.create();
+ initGL();
+ } catch (LWJGLException e) {
+ e.printStackTrace();
+ }
+ gameLoop();
+ }
+ };
+ gameThread.start();
+ }
+
+ public void stop() {
+ }
+
+ public void stopApplet() {
+ running = false;
+ }
+
+ public void init() {
+ setLayout(new BorderLayout());
+ try {
+ display_parent = new Canvas() {
+ public final void removeNotify() {
+ destroyLWJGL();
+ super.removeNotify();
+ }
+ };
+ display_parent.setSize(getWidth(),getHeight());
+ add(display_parent);
+ display_parent.setFocusable(true);
+ display_parent.requestFocus();
+ display_parent.setIgnoreRepaint(true);
+ //setResizable(true);
+ setVisible(true);
+ } catch (Exception e) {
+ System.err.println(e);
+ throw new RuntimeException("Unable to create display");
+ }
+ }
+
+ public void gameLoop() {
+ long startTime = System.currentTimeMillis() + 5000;
+ long fps = 0;
+
+ while(running) {
+ angle += 2.0f;
+
+ // draw the gears
+ drawLoop();
+
+ Display.update();
+
+ if (startTime > System.currentTimeMillis()) {
+ fps++;
+ } else {
+ long timeUsed = 5000 + (startTime - System.currentTimeMillis());
+ startTime = System.currentTimeMillis() + 5000;
+/* System.out.println(fps + " frames 2 in " + (float) (timeUsed / 1000f) + " seconds = "
+ + (fps / (timeUsed / 1000f)));*/
+ fps = 0;
+ }
+
+ if (Keyboard.isKeyDown(Keyboard.KEY_LEFT))
+ view_roty += .1f;
+ else if (Keyboard.isKeyDown(Keyboard.KEY_RIGHT))
+ view_roty -= .1f;
+
+ if (Keyboard.isKeyDown(Keyboard.KEY_F)) {
+ keyDown = true;
+ }
+
+ // F Key Pressed (i.e. released)
+ if (keyDown && !Keyboard.isKeyDown(Keyboard.KEY_F)) {
+ keyDown = false;
+
+ try {
+ if (Display.isFullscreen()) {
+ Display.setFullscreen(false);
+ }
+ else {
+ Display.setFullscreen(true);
+ }
+ } catch (LWJGLException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ Display.destroy();
+ }
+
+ public void drawLoop() {
+ GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);
+ GL11.glPushMatrix();
+ GL11.glRotatef(view_rotx, 1.0f, 0.0f, 0.0f);
+ GL11.glRotatef(view_roty, 0.0f, 1.0f, 0.0f);
+ GL11.glRotatef(view_rotz, 0.0f, 0.0f, 1.0f);
+ GL11.glPushMatrix();
+ GL11.glTranslatef(-3.0f, -2.0f, 0.0f);
+ GL11.glRotatef(angle, 0.0f, 0.0f, 1.0f);
+ GL11.glCallList(gear1);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(3.1f, -2.0f, 0.0f);
+ GL11.glRotatef(-2.0f * angle - 9.0f, 0.0f, 0.0f, 1.0f);
+ GL11.glCallList(gear2);
+ GL11.glPopMatrix();
+ GL11.glPushMatrix();
+ GL11.glTranslatef(-3.1f, 4.2f, 0.0f);
+ GL11.glRotatef(-2.0f * angle - 25.0f, 0.0f, 0.0f, 1.0f);
+ GL11.glCallList(gear3);
+ GL11.glPopMatrix();
+ GL11.glPopMatrix();
+ }
+
+ protected void initGL() {
+ try {
+ // setup ogl
+ FloatBuffer pos = FloatBuffer.wrap(new float[] { 5.0f, 5.0f, 10.0f, 0.0f});
+ FloatBuffer red = FloatBuffer.wrap(new float[] { 0.8f, 0.1f, 0.0f, 1.0f});
+ FloatBuffer green = FloatBuffer.wrap(new float[] { 0.0f, 0.8f, 0.2f, 1.0f});
+ FloatBuffer blue = FloatBuffer.wrap(new float[] { 0.2f, 0.2f, 1.0f, 1.0f});
+ GL11.glLight(GL11.GL_LIGHT0, GL11.GL_POSITION, pos);
+ GL11.glEnable(GL11.GL_CULL_FACE);
+ GL11.glEnable(GL11.GL_LIGHTING);
+ GL11.glEnable(GL11.GL_LIGHT0);
+ GL11.glEnable(GL11.GL_DEPTH_TEST);
+
+ /* make the gears */
+ gear1 = GL11.glGenLists(1);
+ GL11.glNewList(gear1, GL11.GL_COMPILE);
+ GL11.glMaterial(GL11.GL_FRONT, GL11.GL_AMBIENT_AND_DIFFUSE, red);
+ gear(1.0f, 4.0f, 1.0f, 20, 0.7f);
+ GL11.glEndList();
+ gear2 = GL11.glGenLists(1);
+ GL11.glNewList(gear2, GL11.GL_COMPILE);
+ GL11.glMaterial(GL11.GL_FRONT, GL11.GL_AMBIENT_AND_DIFFUSE, green);
+ gear(0.5f, 2.0f, 2.0f, 10, 0.7f);
+ GL11.glEndList();
+ gear3 = GL11.glGenLists(1);
+ GL11.glNewList(gear3, GL11.GL_COMPILE);
+ GL11.glMaterial(GL11.GL_FRONT, GL11.GL_AMBIENT_AND_DIFFUSE, blue);
+ gear(1.3f, 2.0f, 0.5f, 10, 0.7f);
+ GL11.glEndList();
+ GL11.glEnable(GL11.GL_NORMALIZE);
+ GL11.glMatrixMode(GL11.GL_PROJECTION);
+/* System.err.println("GL_VENDOR: " + GL11.glGetString(GL11.GL_VENDOR));
+ System.err.println("GL_RENDERER: " + GL11.glGetString(GL11.GL_RENDERER));
+ System.err.println("GL_VERSION: " + GL11.glGetString(GL11.GL_VERSION));
+ System.err.println();
+ System.err.println("glLoadTransposeMatrixfARB() supported: " + GLContext.getCapabilities().GL_ARB_transpose_matrix);*/
+ if (!GLContext.getCapabilities().GL_ARB_transpose_matrix) {
+ // --- not using extensions
+ GL11.glLoadIdentity();
+ } else {
+ // --- using extensions
+ final FloatBuffer identityTranspose = BufferUtils.createFloatBuffer(16).put(
+ new float[] { 1, 0, 0, 0, 0, 1, 0, 0,
+ 0, 0, 1, 0, 0, 0, 0, 1});
+ identityTranspose.flip();
+ ARBTransposeMatrix.glLoadTransposeMatrixARB(identityTranspose);
+ }
+ float h = (float) 300 / (float) 300;
+ GL11.glFrustum(-1.0f, 1.0f, -h, h, 5.0f, 60.0f);
+ GL11.glMatrixMode(GL11.GL_MODELVIEW);
+ GL11.glLoadIdentity();
+ GL11.glTranslatef(0.0f, 0.0f, -40.0f);
+ } catch (Exception e) {
+ System.err.println(e);
+ stopApplet();
+ }
+ }
+
+ /**
+ * Draw a gear wheel. You'll probably want to call this function when
+ * building a display list since we do a lot of trig here.
+ *
+ * @param inner_radius radius of hole at center
+ * @param outer_radius radius at center of teeth
+ * @param width width of gear
+ * @param teeth number of teeth
+ * @param tooth_depth depth of tooth
+ */
+ private void gear(float inner_radius, float outer_radius, float width, int teeth, float tooth_depth) {
+ int i;
+ float r0, r1, r2;
+ float angle, da;
+ float u, v, len;
+
+ r0 = inner_radius;
+ r1 = outer_radius - tooth_depth / 2.0f;
+ r2 = outer_radius + tooth_depth / 2.0f;
+ da = 2.0f * (float) Math.PI / teeth / 4.0f;
+ GL11.glShadeModel(GL11.GL_FLAT);
+ GL11.glNormal3f(0.0f, 0.0f, 1.0f);
+ /* draw front face */
+ GL11.glBegin(GL11.GL_QUAD_STRIP);
+ for (i = 0; i <= teeth; i++) {
+ angle = i * 2.0f * (float) Math.PI / teeth;
+ GL11.glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), width * 0.5f);
+ GL11.glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), width * 0.5f);
+ if (i < teeth) {
+ GL11.glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), width * 0.5f);
+ GL11.glVertex3f(r1 * (float) Math.cos(angle + 3.0f * da), r1 * (float) Math.sin(angle + 3.0f * da),
+ width * 0.5f);
+ }
+ }
+ GL11.glEnd();
+
+ /* draw front sides of teeth */
+ GL11.glBegin(GL11.GL_QUADS);
+ for (i = 0; i < teeth; i++) {
+ angle = i * 2.0f * (float) Math.PI / teeth;
+ GL11.glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), width * 0.5f);
+ GL11.glVertex3f(r2 * (float) Math.cos(angle + da), r2 * (float) Math.sin(angle + da), width * 0.5f);
+ GL11.glVertex3f(r2 * (float) Math.cos(angle + 2.0f * da), r2 * (float) Math.sin(angle + 2.0f * da), width * 0.5f);
+ GL11.glVertex3f(r1 * (float) Math.cos(angle + 3.0f * da), r1 * (float) Math.sin(angle + 3.0f * da), width * 0.5f);
+ }
+ GL11.glEnd();
+
+ /* draw back face */
+ GL11.glBegin(GL11.GL_QUAD_STRIP);
+ for (i = 0; i <= teeth; i++) {
+ angle = i * 2.0f * (float) Math.PI / teeth;
+ GL11.glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), -width * 0.5f);
+ GL11.glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), -width * 0.5f);
+ GL11.glVertex3f(r1 * (float) Math.cos(angle + 3 * da), r1 * (float) Math.sin(angle + 3 * da), -width * 0.5f);
+ GL11.glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), -width * 0.5f);
+ }
+ GL11.glEnd();
+
+ /* draw back sides of teeth */
+ GL11.glBegin(GL11.GL_QUADS);
+ for (i = 0; i < teeth; i++) {
+ angle = i * 2.0f * (float) Math.PI / teeth;
+ GL11.glVertex3f(r1 * (float) Math.cos(angle + 3 * da), r1 * (float) Math.sin(angle + 3 * da), -width * 0.5f);
+ GL11.glVertex3f(r2 * (float) Math.cos(angle + 2 * da), r2 * (float) Math.sin(angle + 2 * da), -width * 0.5f);
+ GL11.glVertex3f(r2 * (float) Math.cos(angle + da), r2 * (float) Math.sin(angle + da), -width * 0.5f);
+ GL11.glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), -width * 0.5f);
+ }
+ GL11.glEnd();
+
+ /* draw outward faces of teeth */
+ GL11.glBegin(GL11.GL_QUAD_STRIP);
+ for (i = 0; i < teeth; i++) {
+ angle = i * 2.0f * (float) Math.PI / teeth;
+ GL11.glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), width * 0.5f);
+ GL11.glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), -width * 0.5f);
+ u = r2 * (float) Math.cos(angle + da) - r1 * (float) Math.cos(angle);
+ v = r2 * (float) Math.sin(angle + da) - r1 * (float) Math.sin(angle);
+ len = (float) Math.sqrt(u * u + v * v);
+ u /= len;
+ v /= len;
+ GL11.glNormal3f(v, -u, 0.0f);
+ GL11.glVertex3f(r2 * (float) Math.cos(angle + da), r2 * (float) Math.sin(angle + da), width * 0.5f);
+ GL11.glVertex3f(r2 * (float) Math.cos(angle + da), r2 * (float) Math.sin(angle + da), -width * 0.5f);
+ GL11.glNormal3f((float) Math.cos(angle), (float) Math.sin(angle), 0.0f);
+ GL11.glVertex3f(r2 * (float) Math.cos(angle + 2 * da), r2 * (float) Math.sin(angle + 2 * da), width * 0.5f);
+ GL11.glVertex3f(r2 * (float) Math.cos(angle + 2 * da), r2 * (float) Math.sin(angle + 2 * da), -width * 0.5f);
+ u = r1 * (float) Math.cos(angle + 3 * da) - r2 * (float) Math.cos(angle + 2 * da);
+ v = r1 * (float) Math.sin(angle + 3 * da) - r2 * (float) Math.sin(angle + 2 * da);
+ GL11.glNormal3f(v, -u, 0.0f);
+ GL11.glVertex3f(r1 * (float) Math.cos(angle + 3 * da), r1 * (float) Math.sin(angle + 3 * da), width * 0.5f);
+ GL11.glVertex3f(r1 * (float) Math.cos(angle + 3 * da), r1 * (float) Math.sin(angle + 3 * da), -width * 0.5f);
+ GL11.glNormal3f((float) Math.cos(angle), (float) Math.sin(angle), 0.0f);
+ }
+ GL11.glVertex3f(r1 * (float) Math.cos(0), r1 * (float) Math.sin(0), width * 0.5f);
+ GL11.glVertex3f(r1 * (float) Math.cos(0), r1 * (float) Math.sin(0), -width * 0.5f);
+ GL11.glEnd();
+
+ GL11.glShadeModel(GL11.GL_SMOOTH);
+ /* draw inside radius cylinder */
+ GL11.glBegin(GL11.GL_QUAD_STRIP);
+ for (i = 0; i <= teeth; i++) {
+ angle = i * 2.0f * (float) Math.PI / teeth;
+ GL11.glNormal3f(-(float) Math.cos(angle), -(float) Math.sin(angle), 0.0f);
+ GL11.glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), -width * 0.5f);
+ GL11.glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), width * 0.5f);
+ }
+ GL11.glEnd();
+ }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2008-04-22 17:56:51
|
Revision: 3038
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3038&view=rev
Author: spasi
Date: 2008-04-22 10:56:41 -0700 (Tue, 22 Apr 2008)
Log Message:
-----------
Added GL_LAYER_NV
Modified Paths:
--------------
trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_transform_feedback.java
Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_transform_feedback.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_transform_feedback.java 2008-04-22 16:52:16 UTC (rev 3037)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_transform_feedback.java 2008-04-22 17:56:41 UTC (rev 3038)
@@ -110,6 +110,7 @@
int GL_VERTEX_ID_NV = 0x8C7B;
int GL_PRIMITIVE_ID_NV = 0x8C7C;
int GL_GENERIC_ATTRIB_NV = 0x8C7D;
+ int GL_LAYER_NV = 0x8DAA;
void glBindBufferRangeNV(@GLenum int target, @GLuint int index, @GLuint int buffer, @GLintptr long offset, @GLsizeiptr long size);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <eli...@us...> - 2008-04-22 16:52:24
|
Revision: 3037
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3037&view=rev
Author: elias_naur
Date: 2008-04-22 09:52:16 -0700 (Tue, 22 Apr 2008)
Log Message:
-----------
Added ApplejavaExtensions.jar to be able to use apple extensions without reflection
Modified Paths:
--------------
trunk/LWJGL/build.xml
trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java
Added Paths:
-----------
trunk/LWJGL/libs/AppleJavaExtensions.jar
Modified: trunk/LWJGL/build.xml
===================================================================
--- trunk/LWJGL/build.xml 2008-04-21 20:53:18 UTC (rev 3036)
+++ trunk/LWJGL/build.xml 2008-04-22 16:52:16 UTC (rev 3037)
@@ -224,7 +224,7 @@
<!-- Compiles the Java source code -->
<target name="compile" description="Compiles the java source code" depends="-initialize">
- <javac debug="yes" destdir="${lwjgl.bin}" source="1.4" target="1.4" classpath="${lwjgl.lib}/jinput.jar" taskname="core">
+ <javac debug="yes" destdir="${lwjgl.bin}" source="1.4" target="1.4" classpath="${lwjgl.lib}/jinput.jar:${lwjgl.lib}/AppleJavaExtensions.jar" taskname="core">
<src path="${lwjgl.src}/java/"/>
<src path="${lwjgl.src}/generated/"/>
<include name="org/lwjgl/*.java"/>
Added: trunk/LWJGL/libs/AppleJavaExtensions.jar
===================================================================
(Binary files differ)
Property changes on: trunk/LWJGL/libs/AppleJavaExtensions.jar
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java 2008-04-21 20:53:18 UTC (rev 3036)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXDisplay.java 2008-04-22 16:52:16 UTC (rev 3037)
@@ -57,6 +57,8 @@
import org.lwjgl.LWJGLException;
import org.lwjgl.LWJGLUtil;
+import com.apple.eawt.*;
+
final class MacOSXDisplay implements DisplayImplementation {
private static final int PBUFFER_HANDLE_SIZE = 24;
private static final int GAMMA_LENGTH = 256;
@@ -73,7 +75,24 @@
private boolean close_requested;
MacOSXDisplay() {
- new MacOSXApplicationListener();
+ try {
+ AccessController.doPrivileged(new PrivilegedExceptionAction() {
+ public Object run() throws Exception {
+ Application.getApplication().addApplicationListener(new ApplicationAdapter() {
+ public final void handleQuit(ApplicationEvent event) {
+ doHandleQuit();
+ }
+ });
+ return null;
+ }
+ });
+ } catch (Throwable e) {
+ /**
+ * In an applet environment, referencing com.apple.eawt.Application can fail with
+ * a native exception. So log any exceptions instead of re-throwing.
+ */
+ LWJGLUtil.log("Failed to register quit handler: " + e.getMessage());
+ }
}
public void createWindow(DisplayMode mode, boolean fullscreen, Canvas parent, int x, int y) throws LWJGLException {
@@ -96,7 +115,7 @@
}
}
- private void handleQuit() {
+ private void doHandleQuit() {
synchronized (this) {
close_requested = true;
}
@@ -407,51 +426,6 @@
return 0;
}
- /**
- * This class captures com.apple.eawt.ApplicationEvents through reflection
- * to enable compilation on other platforms than Mac OS X
- */
- private class MacOSXApplicationListener implements InvocationHandler {
- private final Method handleQuit;
-
- public MacOSXApplicationListener() {
- Method m = null;
- try {
- m = (Method)AccessController.doPrivileged(new PrivilegedExceptionAction() {
- public Object run() throws Exception {
- /* Get the com.apple.eawt.Application class */
- Class com_apple_eawt_Application = Class.forName("com.apple.eawt.Application");
- /* Call the static Application.getApplication() method */
- Object application = com_apple_eawt_Application.getMethod("getApplication", null).invoke(null, null);
- /* Create a proxy implementing com.apple.eawt.ApplicationListener */
- Class com_apple_eawt_ApplicationListener = Class.forName("com.apple.eawt.ApplicationListener");
- Object listener_proxy = Proxy.newProxyInstance(getClass().getClassLoader(), new Class[] {com_apple_eawt_ApplicationListener}, MacOSXApplicationListener.this);
- /* Invoke the method application.addApplicationListener(proxy) */
- Method addApplicationListener = com_apple_eawt_Application.getMethod("addApplicationListener", new Class[]{com_apple_eawt_ApplicationListener});
- addApplicationListener.invoke(application, new Object[]{listener_proxy});
- /* Finally, get the handleQuit method we want to react to */
- Class com_apple_eawt_ApplicationEvent = Class.forName("com.apple.eawt.ApplicationEvent");
- return com_apple_eawt_ApplicationListener.getMethod("handleQuit", new Class[]{com_apple_eawt_ApplicationEvent});
- }
- });
- } catch (Throwable e) {
- /**
- * In an applet environment, referencing com.apple.eawt.Application can fail with
- * a native exception. So log any exceptions instead of re-throwing.
- */
- LWJGLUtil.log("Failed to register quit handler: " + e.getMessage());
-// throw new RuntimeException(e);
- }
- handleQuit = m;
- }
-
- public Object invoke(Object proxy, Method method, Object[] args) {
- if (method.equals(handleQuit))
- handleQuit();
- return null;
- }
- }
-
public boolean isBufferLost(PeerInfo handle) {
return false;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2008-04-21 20:53:30
|
Revision: 3036
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3036&view=rev
Author: matzon
Date: 2008-04-21 13:53:18 -0700 (Mon, 21 Apr 2008)
Log Message:
-----------
correct mac native
Modified Paths:
--------------
trunk/LWJGL/applet/appletloader.html
Modified: trunk/LWJGL/applet/appletloader.html
===================================================================
--- trunk/LWJGL/applet/appletloader.html 2008-04-21 20:51:23 UTC (rev 3035)
+++ trunk/LWJGL/applet/appletloader.html 2008-04-21 20:53:18 UTC (rev 3036)
@@ -31,7 +31,7 @@
<param name="al_linux" value="linux_natives.jar.lzma">
<!-- signed mac osx natives jar in a jar -->
- <param name="al_mac" value="jinput.jar.pack.lzma">
+ <param name="al_mac" value="macosx_natives.jar.lzma">
<!-- Tags under here are optional -->
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2008-04-21 20:51:33
|
Revision: 3035
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3035&view=rev
Author: matzon
Date: 2008-04-21 13:51:23 -0700 (Mon, 21 Apr 2008)
Log Message:
-----------
compiled using target 1.5
Modified Paths:
--------------
trunk/LWJGL/libs/lzma.jar
Modified: trunk/LWJGL/libs/lzma.jar
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: ertg <ert...@BE...> - 2008-04-21 13:46:06
|
Grab the discounted prices today while stocks last, all men want this. http://www.ultimeates.com/ |
|
From: <ma...@us...> - 2008-04-20 20:33:51
|
Revision: 3034
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3034&view=rev
Author: matzon
Date: 2008-04-20 13:33:49 -0700 (Sun, 20 Apr 2008)
Log Message:
-----------
tagging 2.0 beta 1
Added Paths:
-----------
tags/lwjgl2.0b1/
Copied: tags/lwjgl2.0b1 (from rev 3033, trunk)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2008-04-20 20:06:44
|
Revision: 3033
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3033&view=rev
Author: matzon
Date: 2008-04-20 13:06:42 -0700 (Sun, 20 Apr 2008)
Log Message:
-----------
update version string to 2.0 beta 1
Modified Paths:
--------------
trunk/LWJGL/platform_build/build-definitions.xml
trunk/LWJGL/src/java/org/lwjgl/Sys.java
Modified: trunk/LWJGL/platform_build/build-definitions.xml
===================================================================
--- trunk/LWJGL/platform_build/build-definitions.xml 2008-04-20 20:05:09 UTC (rev 3032)
+++ trunk/LWJGL/platform_build/build-definitions.xml 2008-04-20 20:06:42 UTC (rev 3033)
@@ -12,7 +12,7 @@
<property name="lwjgl.docs" location="doc" />
<property name="lwjgl.temp" location="temp" />
<property name="lwjgl.res" location="res" />
- <property name="lwjgl.version" value="2.0a4" />
+ <property name="lwjgl.version" value="2.0b1" />
<property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/HP*.java,org/lwjgl/opengl/IBM*.java,org/lwjgl/opengl/SUN*.java,org/lwjgl/opengl/SGIS*.java"/>
<!-- ================================================================== -->
Modified: trunk/LWJGL/src/java/org/lwjgl/Sys.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/Sys.java 2008-04-20 20:05:09 UTC (rev 3032)
+++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2008-04-20 20:06:42 UTC (rev 3033)
@@ -54,7 +54,7 @@
private static final String JNI_LIBRARY_NAME = "lwjgl";
/** Current version of library */
- private static final String VERSION = "2.0a4";
+ private static final String VERSION = "2.0b1";
/** Current version of the JNI library */
static final int JNI_VERSION = 16;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2008-04-20 20:05:12
|
Revision: 3032
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3032&view=rev
Author: matzon
Date: 2008-04-20 13:05:09 -0700 (Sun, 20 Apr 2008)
Log Message:
-----------
mention lzma
Modified Paths:
--------------
trunk/LWJGL/doc/CREDITS
Modified: trunk/LWJGL/doc/CREDITS
===================================================================
--- trunk/LWJGL/doc/CREDITS 2008-04-20 20:03:51 UTC (rev 3031)
+++ trunk/LWJGL/doc/CREDITS 2008-04-20 20:05:09 UTC (rev 3032)
@@ -25,6 +25,7 @@
- OpenGL, SGI - http://opengl.org/
- OpenAL, Creative Labs - http://openal.org/
- jinput, Sun - https://jinput.dev.java.net/
+ - lzma, p7zip - http://p7zip.sourceforge.net/
Please see the /doc/3rdparty/ directory for licenses.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2008-04-20 20:03:56
|
Revision: 3031
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3031&view=rev
Author: matzon
Date: 2008-04-20 13:03:51 -0700 (Sun, 20 Apr 2008)
Log Message:
-----------
use lzma and pack200 for applet example
Modified Paths:
--------------
trunk/LWJGL/applet/appletloader.html
Modified: trunk/LWJGL/applet/appletloader.html
===================================================================
--- trunk/LWJGL/applet/appletloader.html 2008-04-20 20:02:02 UTC (rev 3030)
+++ trunk/LWJGL/applet/appletloader.html 2008-04-20 20:03:51 UTC (rev 3031)
@@ -5,7 +5,7 @@
</head>
<body>
- <applet code="org.lwjgl.util.applet.AppletLoader" archive="lwjgl_util_applet.jar" codebase="." width="640" height="480">
+ <applet code="org.lwjgl.util.applet.AppletLoader" archive="lwjgl_util_applet.jar, lzma.jar" codebase="." width="640" height="480">
<!-- The following tags are mandatory -->
@@ -22,16 +22,16 @@
<param name="al_progressbar" value="appletprogress.gif">
<!-- List of Jars to add to classpath -->
- <param name="al_jars" value="lwjgl_applet.jar, lwjgl.jar, jinput.jar, lwjgl_util.jar, res.jar">
+ <param name="al_jars" value="lwjgl_applet.jar.pack.lzma, lwjgl.jar.pack.lzma, jinput.jar.pack.lzma, lwjgl_util.jar.pack.lzma, res.jar.lzma">
<!-- signed windows natives jar in a jar -->
- <param name="al_windows" value="windows_natives.jar">
+ <param name="al_windows" value="windows_natives.jar.lzma">
<!-- signed linux natives jar in a jar -->
- <param name="al_linux" value="linux_natives.jar">
+ <param name="al_linux" value="linux_natives.jar.lzma">
<!-- signed mac osx natives jar in a jar -->
- <param name="al_mac" value="macosx_natives.jar">
+ <param name="al_mac" value="jinput.jar.pack.lzma">
<!-- Tags under here are optional -->
@@ -48,7 +48,7 @@
<!-- <param name="al_errorcolor" value="ff0000"> -->
<!-- whether to run in debug mode -->
- <!-- <param name="al_debug" value="false"> -->
+ <!-- <param name="al_debug" value="true"> -->
<!-- whether to prepend host to cache path - defaults to true -->
<param name="al_prepend_host" value="false">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2008-04-20 20:02:06
|
Revision: 3030
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3030&view=rev
Author: matzon
Date: 2008-04-20 13:02:02 -0700 (Sun, 20 Apr 2008)
Log Message:
-----------
use lzma and pack200 compression for applet distribution
Modified Paths:
--------------
trunk/LWJGL/build.xml
trunk/LWJGL/platform_build/build-applet.xml
Added Paths:
-----------
trunk/LWJGL/platform_build/JLzma.jar
trunk/LWJGL/platform_build/Pack200Task.jar
Modified: trunk/LWJGL/build.xml
===================================================================
--- trunk/LWJGL/build.xml 2008-04-20 19:55:55 UTC (rev 3029)
+++ trunk/LWJGL/build.xml 2008-04-20 20:02:02 UTC (rev 3030)
@@ -293,8 +293,35 @@
<arg value="${input}"/>
<arg value="${output}"/>
</java>
- </target>
+ </target>
+ <target name="compress-sign-class">
+ <antcall target="repack200">
+ <param name="input" value="${dir}${jarfile}.jar"/>
+ <param name="output" value="${dir}${jarfile}-repack.jar"/>
+ </antcall>
+ <signjar jar="${dir}${jarfile}-repack.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
+ <antcall target="pack200">
+ <param name="input" value="${dir}${jarfile}-repack.jar"/>
+ <param name="output" value="${dir}${jarfile}.jar.pack"/>
+ </antcall>
+ <antcall target="lzma">
+ <param name="input" value="${dir}${jarfile}.jar.pack"/>
+ <param name="output" value="${dir}${jarfile}.jar.pack.lzma"/>
+ </antcall>
+ <delete file="${dir}${jarfile}-repack.jar"/>
+ <delete file="${dir}${jarfile}.jar.pack"/>
+ <delete file="${dir}${jarfile}.jar"/>
+ </target>
+
+ <target name="compress-resource">
+ <antcall target="lzma">
+ <param name="input" value="${input}"/>
+ <param name="output" value="${output}"/>
+ </antcall>
+ <delete file="${input}"/>
+ </target>
+
<target name="applettest" depends="applet">
<exec executable="appletviewer">
<arg value="-J-Djava.security.policy=applet/appletviewer.policy"/>
Added: trunk/LWJGL/platform_build/JLzma.jar
===================================================================
(Binary files differ)
Property changes on: trunk/LWJGL/platform_build/JLzma.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/LWJGL/platform_build/Pack200Task.jar
===================================================================
(Binary files differ)
Property changes on: trunk/LWJGL/platform_build/Pack200Task.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/LWJGL/platform_build/build-applet.xml
===================================================================
--- trunk/LWJGL/platform_build/build-applet.xml 2008-04-20 19:55:55 UTC (rev 3029)
+++ trunk/LWJGL/platform_build/build-applet.xml 2008-04-20 20:02:02 UTC (rev 3030)
@@ -50,9 +50,9 @@
</jar>
<signjar jar="applet/macosx_natives.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
- <jar destfile="${lwjgl.lib}/lwjgl_util_applet.jar" update="true">
- <fileset dir="${lwjgl.res}" includes="applet*"/>
- </jar>
+ <jar destfile="${lwjgl.lib}/lwjgl_util_applet.jar" update="true">
+ <fileset dir="${lwjgl.res}" includes="applet*"/>
+ </jar>
<copy file="${lwjgl.lib}/lwjgl.jar" todir="applet"/>
<copy file="${lwjgl.lib}/lwjgl_util_applet.jar" todir="applet"/>
@@ -62,33 +62,39 @@
<zip destfile="applet/res.jar">
<zipfileset dir="${lwjgl.res}" includes="Footsteps.wav, ILtest.tga, Missing_you.mod"/>
</zip>
+ <signjar jar="applet/lwjgl_util_applet.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
- <!--<antcall target="applet-compress">
+ <antcall target="compress-sign-class">
<param name="dir" value="applet/"/>
<param name="jarfile" value="lwjgl"/>
</antcall>
- <fail/>-->
- </target>
-
- <target name="applet-compress">
- <antcall target="repack">
- <param name="input" value="${dir}${jarfile}.jar"/>
- <param name="output" value="${dir}${jarfile}-repack.jar"/>
+ <antcall target="compress-sign-class">
+ <param name="dir" value="applet/"/>
+ <param name="jarfile" value="lwjgl_util"/>
</antcall>
- <signjar jar="${dir}${jarfile}.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
- <signjar jar="${dir}${jarfile}-repack.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
- <antcall target="pack">
- <param name="input" value="${dir}${jarfile}-repack.jar"/>
- <param name="output" value="${dir}${jarfile}.jar.pack"/>
+ <antcall target="compress-sign-class">
+ <param name="dir" value="applet/"/>
+ <param name="jarfile" value="jinput"/>
</antcall>
- <antcall target="lzma">
- <param name="input" value="${dir}${jarfile}.jar.pack"/>
- <param name="output" value="${dir}${jarfile}.jar.pack.lzma"/>
+ <antcall target="compress-sign-class">
+ <param name="dir" value="applet/"/>
+ <param name="jarfile" value="lwjgl_applet"/>
</antcall>
- <antcall target="lzma">
- <param name="input" value="${dir}${jarfile}.jar"/>
- <param name="output" value="${dir}${jarfile}.jar.lzma"/>
+ <antcall target="compress-resource">
+ <param name="input" value="applet/windows_natives.jar"/>
+ <param name="output" value="applet/windows_natives.jar.lzma"/>
</antcall>
- <delete file="${dir}${jarfile}-repack.jar"/>
+ <antcall target="compress-resource">
+ <param name="input" value="applet/macosx_natives.jar"/>
+ <param name="output" value="applet/macosx_natives.jar.lzma"/>
+ </antcall>
+ <antcall target="compress-resource">
+ <param name="input" value="applet/linux_natives.jar"/>
+ <param name="output" value="applet/linux_natives.jar.lzma"/>
+ </antcall>
+ <antcall target="compress-resource">
+ <param name="input" value="applet/res.jar"/>
+ <param name="output" value="applet/res.jar.lzma"/>
+ </antcall>
</target>
</project>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2008-04-20 19:55:57
|
Revision: 3029
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3029&view=rev
Author: matzon
Date: 2008-04-20 12:55:55 -0700 (Sun, 20 Apr 2008)
Log Message:
-----------
fixed percentage calculation error in extractJars
added subtask messages to extractJars
reworked debug/sleep
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java
Modified: trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2008-04-20 18:46:34 UTC (rev 3028)
+++ trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2008-04-20 19:55:55 UTC (rev 3029)
@@ -346,7 +346,7 @@
if(state == STATE_DONE) {
return;
}
-
+
// create offscreen if missing
if (offscreen == null) {
offscreen = createImage(getWidth(), getHeight());
@@ -524,10 +524,8 @@
percentage = 5;
- try {
- if(debugMode) {
- sleep(2000);
- }
+ try {
+ debug_sleep(2000);
// parse the urls for the jars into the url list
loadJarURLs();
@@ -575,9 +573,7 @@
if (latestVersion <= readVersionFile(dir)) {
cacheAvailable = true;
percentage = 90;
- if(debugMode) {
- sleep(2000);
- }
+ debug_sleep(2000);
}
}
}
@@ -672,9 +668,7 @@
method.invoke(getClass().getClassLoader(), new Object[] {u});
}
- if(debugMode) {
- sleep(2000);
- }
+ debug_sleep(2000);
// add natives files path to native class path
System.setProperty("org.lwjgl.librarypath", path + "natives");
@@ -692,9 +686,7 @@
state = STATE_SWITCHING_APPLET;
percentage = 100;
- if(debugMode) {
- sleep(2000);
- }
+ debug_sleep(2000);
Class appletClass = Class.forName(getParameter("al_main"));
lwjglApplet = (Applet) appletClass.newInstance();
@@ -742,9 +734,7 @@
// download each jar
byte buffer[] = new byte[65536];
for (int i = 0; i < urlList.length; i++) {
- if(debugMode) {
- sleep(2000);
- }
+ debug_sleep(2000);
urlconnection = urlList[i].openConnection();
@@ -755,9 +745,7 @@
int bufferSize;
while ((bufferSize = inputstream.read(buffer, 0, buffer.length)) != -1) {
- if(debugMode) {
- sleep(10);
- }
+ debug_sleep(10);
fos.write(buffer, 0, bufferSize);
currentSizeDownload += bufferSize;
percentage = initialPercentage + ((currentSizeDownload * 45) / totalSizeDownload);
@@ -855,10 +843,6 @@
// delete LZMA file, as it is no longer needed
f.delete();
-
- if(debugMode) {
- sleep(1000);
- }
}
/**
@@ -878,10 +862,6 @@
// delete pack file as its no longer needed
f.delete();
-
- if(debugMode) {
- sleep(1000);
- }
}
/**
@@ -896,21 +876,26 @@
float increment = (float) 10.0 / urlList.length;
// extract all lzma and pack.lzma files
for (int i = 0; i < urlList.length; i++) {
- percentage += (int) (increment * (i+1));
+ percentage = 55 + (int) (increment * (i+1));
String filename = getFileName(urlList[i]);
- if(debugMode) {
- sleep(1000);
- }
-
if (filename.endsWith(".pack.lzma")) {
+ subtaskMessage = "Extracting: " + filename + " to " + filename.replaceAll(".lzma", "");
+ debug_sleep(1000);
extractLZMA(path + filename, path + filename.replaceAll(".lzma", ""));
+
+ subtaskMessage = "Extracting: " + filename.replaceAll(".lzma", "") + " to " + filename.replaceAll(".pack.lzma", "");
+ debug_sleep(1000);
extractPack(path + filename.replaceAll(".lzma", ""), path + filename.replaceAll(".pack.lzma", ""));
}
else if (filename.endsWith(".pack")) {
+ subtaskMessage = "Extracting: " + filename + " to " + filename.replace(".pack", "");
+ debug_sleep(1000);
extractPack(path + filename, path + filename.replace(".pack", ""));
}
else if (filename.endsWith(".lzma")) {
+ subtaskMessage = "Extracting: " + filename + " to " + filename.replace(".lzma", "");
+ debug_sleep(1000);
extractLZMA(path + filename, path + filename.replace(".lzma", ""));
}
}
@@ -986,9 +971,7 @@
}
}
- if(debugMode) {
- sleep(1000);
- }
+ debug_sleep(1000);
InputStream in = jarFile.getInputStream(jarFile.getEntry(entry.getName()));
OutputStream out = new FileOutputStream(path + "natives" + File.separator + entry.getName());
@@ -997,9 +980,7 @@
byte buffer[] = new byte[65536];
while ((bufferSize = in.read(buffer, 0, buffer.length)) != -1) {
- if(debugMode) {
- sleep(10);
- }
+ debug_sleep(10);
out.write(buffer, 0, bufferSize);
currentSizeExtract += bufferSize;
@@ -1137,13 +1118,26 @@
/**
* Utility method for sleeping
+ * Will only really sleep if debug has been enabled
* @param ms milliseconds to sleep
*/
+ protected void debug_sleep(long ms) {
+ if(debugMode) {
+ sleep(ms);
+ }
+ }
+
+ /**
+ * Utility method for sleeping
+ * @param ms milliseconds to sleep
+ */
protected void sleep(long ms) {
try {
Thread.sleep(ms);
} catch (Exception e) {
/* ignored */
}
- }
+ }
+
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2008-04-20 18:46:39
|
Revision: 3028
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3028&view=rev
Author: matzon
Date: 2008-04-20 11:46:34 -0700 (Sun, 20 Apr 2008)
Log Message:
-----------
split build file into components
Modified Paths:
--------------
trunk/LWJGL/build.xml
Added Paths:
-----------
trunk/LWJGL/platform_build/build-applet.xml
trunk/LWJGL/platform_build/build-definitions.xml
trunk/LWJGL/platform_build/build-generator.xml
trunk/LWJGL/platform_build/build-webstart.xml
Modified: trunk/LWJGL/build.xml
===================================================================
--- trunk/LWJGL/build.xml 2008-04-20 16:59:57 UTC (rev 3027)
+++ trunk/LWJGL/build.xml 2008-04-20 18:46:34 UTC (rev 3028)
@@ -1,155 +1,11 @@
<project name="LWJGL" default="all" basedir=".">
- <!-- ================================================================== -->
- <!-- Global properties for build -->
- <!-- ================================================================== -->
- <property name="lwjgl.src" location="src" />
- <property name="lwjgl.src.native" location="${lwjgl.src}/native" />
- <property name="lwjgl.src.headers" location="${lwjgl.src.native}/common" />
- <property name="lwjgl.src.templates" location="${lwjgl.src}/templates" />
- <property name="lwjgl.bin" location="bin" />
- <property name="lwjgl.lib" location="libs" />
- <property name="lwjgl.dist" location="dist" />
- <property name="lwjgl.docs" location="doc" />
- <property name="lwjgl.temp" location="temp" />
- <property name="lwjgl.res" location="res" />
- <property name="lwjgl.version" value="2.0a4" />
+ <import file="platform_build/build-definitions.xml"/>
+ <import file="platform_build/build-generator.xml"/>
+ <import file="platform_build/build-applet.xml"/>
+ <import file="platform_build/build-webstart.xml"/>
- <property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/HP*.java,org/lwjgl/opengl/IBM*.java,org/lwjgl/opengl/SUN*.java,org/lwjgl/opengl/SGIS*.java"/>
<!-- ================================================================== -->
- <!-- Filesets used for targets -->
- <!-- ================================================================== -->
-
- <!-- Files to include in the lwjgl.jar file -->
- <fileset id="lwjgl.fileset" dir="${lwjgl.bin}">
- <include name="org/**/*" />
- <exclude name="org/lwjgl/d3d/**" />
- <exclude name="org/lwjgl/test/**" />
- <exclude name="org/lwjgl/util/**" />
- <exclude name="org/lwjgl/examples/**" />
- </fileset>
-
- <fileset id="lwjgl_util_applet.fileset" dir="${lwjgl.bin}">
- <exclude name="**.*"/>
- <include name="org/lwjgl/util/applet/**"/>
- </fileset>
-
- <!-- Files to include in the lwjgl_test.jar file -->
- <fileset id="lwjgl_test.fileset" dir="${lwjgl.bin}">
- <exclude name="**.*" />
- <include name="org/lwjgl/test/**" />
- <include name="org/lwjgl/examples/**" />
- </fileset>
-
- <!-- More files to include in the lwjgl_test.jar file -->
- <fileset id="lwjgl_test_extra.fileset" dir="${lwjgl.src}/java">
- <exclude name="**.*" />
- <include name="org/lwjgl/test/opengl/shaders/shaderFP.fp" />
- <include name="org/lwjgl/test/opengl/shaders/shaderFP.vp" />
- <include name="org/lwjgl/test/opengl/shaders/shaderFSH.fsh" />
- <include name="org/lwjgl/test/opengl/shaders/shaderFSH.vsh" />
- <include name="org/lwjgl/test/opengl/shaders/shaderVP.vp" />
- <include name="org/lwjgl/test/opengl/shaders/shaderVSH.vsh" />
- </fileset>
-
- <!-- Files to include in the lwjgl_util.jar file -->
- <fileset id="lwjgl_util.fileset" dir="${lwjgl.bin}">
- <exclude name="**.*" />
- <exclude name="org/lwjgl/util/generator/**" />
- <exclude name="org/lwjgl/util/applet/**" />
- <include name="org/lwjgl/util/**" />
- </fileset>
-
- <!-- Files to include in the lwjgl_applet.jar file -->
- <fileset id="lwjgl_applet.fileset" dir="${lwjgl.bin}">
- <exclude name="**.*"/>
- <include name="org/lwjgl/test/applet/**"/>
- <include name="org/lwjgl/test/opengl/awt/AWTGearsCanvas.class"/>
- </fileset>
-
- <!-- Files to make Javadoc from -->
- <fileset id="lwjgl.javadoc.fileset" dir="${lwjgl.src}">
- <include name="**/*.java" />
- <exclude name="native/**" />
- <exclude name="templates/**" />
- <exclude name="java/org/lwjgl/test/**" />
- <exclude name="java/org/lwjgl/examples/**" />
- <exclude name="java/org/lwjgl/util/generator/**" />
- </fileset>
-
- <!-- Files to include in doc package -->
- <patternset id="lwjgl-docs.fileset">
- <include name="CREDITS" />
- <include name="LICENSE" />
- <include name="README" />
- <include name="lwjgl_hidden_switches.text" />
- <include name="3rdparty/*" />
- </patternset>
-
- <!-- Files to include in win32 package -->
- <patternset id="lwjgl-win32.fileset">
- <include name="lwjgl.dll" />
- <include name="OpenAL32.dll" />
- <include name="jinput-dx8.dll" />
- <include name="jinput-raw.dll" />
- </patternset>
-
- <!-- Files to include in linux, glibc2.3 package -->
- <patternset id="lwjgl-linux.fileset">
- <include name="liblwjgl*.so" />
- <include name="libopenal.so" />
- <include name="libjinput-linux.so" />
- <include name="libjinput-linux64.so" />
- </patternset>
-
- <!-- Files to include in mac os x package -->
- <patternset id="lwjgl-macosx.fileset">
- <include name="liblwjgl.jnilib" />
- <include name="openal.dylib" />
- <include name="libjinput-osx.jnilib" />
- <include name="libjinput-osx-legacy.jnilib" />
- </patternset>
-
- <!-- Files to include in source distribution -->
- <fileset id="lwjgl.source.fileset" dir=".">
- <include name="build.xml" />
- <include name="src/**" />
- <include name="platform_build/**/*" />
- </fileset>
-
- <!-- files in the base package -->
- <patternset id="lwjgl_base">
- <include name="**" />
- <exclude name="res/ILtest.*" />
- <exclude name="res/Missing_you.mod" />
- <exclude name="res/phero*.*" />
- </patternset>
-
- <!-- files in the optional package -->
- <patternset id="lwjgl_optional">
- <include name="res/**" />
- <exclude name="res/logo/**" />
- <exclude name="res/spaceinvaders/**" />
- <exclude name="res/*.wav" />
- <exclude name="res/*.xpm" />
- <include name="doc/CREDITS" />
- <include name="doc/LICENSE" />
- <include name="doc/README" />
- </patternset>
-
- <!-- files in the lwjgl_applet package -->
- <patternset id="lwjgl_applet">
- <include name="applet/**" />
- <exclude name="applet/appletviewer.policy" />
- <exclude name="applet/lwjglkeystore" />
- </patternset>
-
- <uptodate property="lwjgl.main.built" targetfile="${lwjgl.lib}/win32/lwjgl.dll" >
- <srcfiles dir= "${lwjgl.src.native}/common" includes="*.c*"/>
- <srcfiles dir= "${lwjgl.src.native}/windows" includes="*.c"/>
- </uptodate>
-
- <!-- ================================================================== -->
<!-- Everything below this line is targets. -->
<!-- Do not modify, unless you know what you're doing -->
<!-- ================================================================== -->
@@ -158,28 +14,21 @@
<!-- Initialize build -->
<!-- ================================================================== -->
<target name="-initialize">
- <mkdir dir="${lwjgl.bin}" taskname="initialiazing bin folder" />
- <mkdir dir="${lwjgl.bin}/lwjgl" taskname="initialiazing bin folder" />
- <mkdir dir="${lwjgl.lib}" taskname="initialiazing lib folder" />
- <mkdir dir="${lwjgl.dist}" taskname="initialiazing dist folder" />
- <mkdir dir="${lwjgl.docs}/javadoc" taskname="initialiazing docs folder" />
- <mkdir dir="${lwjgl.res}" taskname="initialiazing res folder" />
- <mkdir dir="${lwjgl.temp}" taskname="initialiazing temp folder" />
- <mkdir dir="${lwjgl.temp}/jar" taskname="initialiazing temp/jar folder" />
- <mkdir dir="${lwjgl.temp}/doc" taskname="initialiazing temp/doc folder" />
- <mkdir dir="${lwjgl.temp}/res" taskname="initialiazing temp/res folder" />
- <mkdir dir="${lwjgl.temp}/native" taskname="initialiazing temp/native folder" />
- <mkdir dir="${lwjgl.temp}/native/win32" taskname="initialiazing temp/win32 folder" />
- <mkdir dir="${lwjgl.temp}/native/linux" taskname="initialiazing temp/linux folder" />
- <mkdir dir="${lwjgl.temp}/native/macosx" taskname="initialiazing temp/macosx folder" />
+ <mkdir dir="${lwjgl.bin}" taskname="initialiazing bin folder" />
+ <mkdir dir="${lwjgl.bin}/lwjgl" taskname="initialiazing bin folder" />
+ <mkdir dir="${lwjgl.lib}" taskname="initialiazing lib folder" />
+ <mkdir dir="${lwjgl.dist}" taskname="initialiazing dist folder" />
+ <mkdir dir="${lwjgl.docs}/javadoc" taskname="initialiazing docs folder" />
+ <mkdir dir="${lwjgl.res}" taskname="initialiazing res folder" />
+ <mkdir dir="${lwjgl.temp}" taskname="initialiazing temp folder" />
+ <mkdir dir="${lwjgl.temp}/jar" taskname="initialiazing temp/jar folder" />
+ <mkdir dir="${lwjgl.temp}/doc" taskname="initialiazing temp/doc folder" />
+ <mkdir dir="${lwjgl.temp}/res" taskname="initialiazing temp/res folder" />
+ <mkdir dir="${lwjgl.temp}/native" taskname="initialiazing temp/native folder" />
+ <mkdir dir="${lwjgl.temp}/native/win32" taskname="initialiazing temp/win32 folder" />
+ <mkdir dir="${lwjgl.temp}/native/linux" taskname="initialiazing temp/linux folder" />
+ <mkdir dir="${lwjgl.temp}/native/macosx" taskname="initialiazing temp/macosx folder" />
</target>
-
- <target name="clean-generated" description="Deletes the generated java and native source">
- <delete quiet="true" failonerror="false">
- <fileset dir="${lwjgl.src}/generated" includes="**"/>
- <fileset dir="${lwjgl.src.native}/generated" includes="**"/>
- </delete>
- </target>
<!-- Cleans up any files created during the execution of this script -->
<target name="clean" description="Cleans the diectories controlled by this ant script" depends="clean-generated">
@@ -208,11 +57,11 @@
<antcall target="-initialize" />
<!-- compile and create jars -->
- <antcall target="generate-all"/>
+ <antcall target="generate-all"/>
<antcall target="compile" />
- <antcall target="javadoc" />
+ <antcall target="javadoc" />
<antcall target="-createjars" />
- <antcall target="applet-release" />
+ <antcall target="applet-release" />
<!-- copy resources to res folder -->
<copy todir="${lwjgl.temp}/res">
@@ -274,97 +123,7 @@
<fileset refid="lwjgl_util.fileset" />
</jar>
</target>
-
- <target name="applettest" depends="applet">
- <exec executable="appletviewer">
- <arg value="-J-Djava.security.policy=applet/appletviewer.policy"/>
- <arg path="applet/applet.html"/>
- </exec>
- </target>
- <target name="runtest" depends="all">
- <fail message="test.mainclass is not set. Use 'ant -Dtest.mainclass=<main-class> runtest'" unless="test.mainclass"/>
- <condition property="native_path" value="libs/win32">
- <os family="windows" />
- </condition>
-
- <condition property="native_path" value="libs/linux">
- <os name="Linux" />
- </condition>
-
- <condition property="native_path" value="libs/macosx">
- <os name="Mac OS X" />
- </condition>
- <property name="native_path_expanded" location="${native_path}"/>
- <java classname="${test.mainclass}" classpath="res:${lwjgl.lib}/lwjgl.jar:${lwjgl.lib}/lwjgl_util.jar:${lwjgl.lib}/lwjgl_test.jar:${lwjgl.lib}/jinput.jar" fork="true">
- <sysproperty key="org.lwjgl.util.Debug" value="true"/>
- <sysproperty key="java.library.path" value="${native_path_expanded}"/>
- </java>
- </target>
-
- <target name="applet" depends="all">
- <antcall target="-applet">
- <param name="keystore" value="applet/lwjglkeystore"/>
- <param name="alias" value="lwjgl"/>
- <param name="password" value="123456"/>
- </antcall>
- </target>
-
- <target name="applet-release">
- <input message="Please type the password for the keystore" addproperty="sign.pwd"/>
-
- <antcall target="-applet">
- <param name="keystore" value="signing/matzon_java_code_signing.keystore"/>
- <param name="alias" value="oddlabs_java_code_signing"/>
- <param name="password" value="${sign.pwd}"/>
- </antcall>
- </target>
-
- <target name="-applet">
-
- <!-- Create lwjgl_applet.jar -->
- <jar destfile="applet/lwjgl_applet.jar" taskname="lwjgl_applet.jar">
- <fileset refid="lwjgl_applet.fileset" />
- </jar>
-
- <!-- create each of the native jars -->
- <jar destfile="applet/windows_natives.jar" taskname="windows_natives.jar">
- <fileset dir="${lwjgl.lib}/win32">
- <patternset refid="lwjgl-win32.fileset"/>
- </fileset>
- </jar>
- <signjar jar="applet/windows_natives.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
-
- <jar destfile="applet/linux_natives.jar" taskname="linux_natives.jar">
- <fileset dir="${lwjgl.lib}/linux">
- <patternset refid="lwjgl-linux.fileset"/>
- </fileset>
- </jar>
- <signjar jar="applet/linux_natives.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
-
- <jar destfile="applet/macosx_natives.jar" taskname="macosx_natives.jar">
- <fileset dir="${lwjgl.lib}/macosx">
- <patternset refid="lwjgl-macosx.fileset"/>
- </fileset>
- </jar>
- <signjar jar="applet/macosx_natives.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
-
- <jar destfile="${lwjgl.lib}/lwjgl_util_applet.jar" update="true">
- <fileset dir="${lwjgl.res}" includes="applet*"/>
- </jar>
-
- <copy file="${lwjgl.lib}/lwjgl.jar" todir="applet"/>
- <copy file="${lwjgl.lib}/lwjgl_util_applet.jar" todir="applet"/>
- <copy file="${lwjgl.lib}/lwjgl_util.jar" todir="applet"/>
- <copy file="${lwjgl.lib}/jinput.jar" todir="applet"/>
- <zip destfile="applet/res.jar">
- <zipfileset dir="${lwjgl.res}" includes="Footsteps.wav, ILtest.tga, Missing_you.mod"/>
- </zip>
- <signjar jar="applet/lwjgl.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
- <signjar jar="applet/jinput.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
- <signjar jar="applet/lwjgl_util_applet.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
- </target>
-
<!-- Distributes files -->
<target name="-distribute">
<delete>
@@ -413,27 +172,10 @@
<zip destfile="${lwjgl.dist}/lwjgl-source-${lwjgl.version}.zip">
<fileset refid="lwjgl.source.fileset" />
</zip>
- </target>
-
- <!-- Compiles the Java source code -->
- <target name="compile" description="Compiles the java source code" depends="-initialize">
- <javac debug="yes" destdir="${lwjgl.bin}" source="1.4" target="1.4" classpath="${lwjgl.lib}/jinput.jar" taskname="core">
- <src path="${lwjgl.src}/java/"/>
- <src path="${lwjgl.src}/generated/"/>
- <include name="org/lwjgl/*.java"/>
- <include name="org/lwjgl/input/**"/>
- <include name="org/lwjgl/opengl/**"/>
- <include name="org/lwjgl/openal/**"/>
- <include name="org/lwjgl/util/**"/>
- <exclude name="org/lwjgl/util/generator/**"/>
- </javac>
- <javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/test/**" source="1.4" target="1.4" taskname="test" />
- <javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/examples/**" source="1.4" target="1.4" taskname="examples" />
- </target>
+ </target>
<!-- Generates the native headers from source files -->
<target name="headers" description="invokes javah on java classes" depends="compile">
- <!-- platform specific classes -->
<javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/linux" force="yes">
<class name="org.lwjgl.opengl.LinuxEvent" />
<class name="org.lwjgl.opengl.LinuxMouse" />
@@ -448,7 +190,6 @@
</javah>
<javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/windows" force="yes">
- <!-- OpenGL -->
<class name="org.lwjgl.opengl.WindowsKeyboard" />
<class name="org.lwjgl.opengl.WindowsPbufferPeerInfo" />
<class name="org.lwjgl.opengl.WindowsDisplay" />
@@ -469,110 +210,35 @@
<class name="org.lwjgl.opengl.MacOSXContextImplementation" />
</javah>
- <!-- lwjgl -->
<javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.headers}" force="yes">
<class name="org.lwjgl.opengl.AWTSurfaceLock" />
<class name="org.lwjgl.DefaultSysImplementation" />
<class name="org.lwjgl.input.Cursor" />
<class name="org.lwjgl.input.Keyboard" />
<class name="org.lwjgl.input.Mouse" />
-
<class name="org.lwjgl.openal.AL" />
-
<class name="org.lwjgl.opengl.GLContext" />
<class name="org.lwjgl.opengl.Pbuffer" />
</javah>
- </target>
-
- <!-- Creates the Javadoc -->
- <target name="javadoc" description="Creates javadoc from java source code">
- <javadoc destdir="${lwjgl.docs}/javadoc" classpath="${lwjgl.lib}/jinput.jar" author="true" version="true" use="true" source="1.4" windowtitle="LWJGL API">
- <fileset refid="lwjgl.javadoc.fileset" />
- <doctitle><![CDATA[<h1>Lightweight Java Game Toolkit</h1>]]></doctitle>
- <bottom><![CDATA[<i>Copyright © 2002-2008 lwjgl.org. All Rights Reserved.</i>]]></bottom>
- </javadoc>
</target>
-
+
<!-- Compiles the Java source code -->
- <target name="generators" description="Compiles the native method generators">
- <javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/util/generator/**.java" source="1.5" target="1.5" taskname="generator">
- <compilerarg value="-Xlint:all"/>
+ <target name="compile" description="Compiles the java source code" depends="-initialize">
+ <javac debug="yes" destdir="${lwjgl.bin}" source="1.4" target="1.4" classpath="${lwjgl.lib}/jinput.jar" taskname="core">
+ <src path="${lwjgl.src}/java/"/>
+ <src path="${lwjgl.src}/generated/"/>
+ <include name="org/lwjgl/*.java"/>
+ <include name="org/lwjgl/input/**"/>
+ <include name="org/lwjgl/opengl/**"/>
+ <include name="org/lwjgl/openal/**"/>
+ <include name="org/lwjgl/util/**"/>
+ <exclude name="org/lwjgl/util/generator/**"/>
</javac>
- </target>
-
- <target name="generate-all" depends="generate-openal, generate-opengl, generate-opengl-capabilities, generate-opengl-references" description="Generates java and native source"/>
-
- <target name="generate-openal" depends="generators" description="Generates java and native source for AL">
- <!-- Generate OpenAL -->
- <apply executable="apt" parallel="true">
- <arg value="-nocompile"/>
- <arg value="-factory"/>
- <arg value="org.lwjgl.util.generator.GeneratorProcessorFactory"/>
- <arg value="-cp"/>
- <arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
- <arg value="-s"/>
- <arg path="${lwjgl.src}/generated"/>
- <arg value="-d"/>
- <arg path="${lwjgl.src.native}/generated"/>
- <arg value="-Atypemap=org.lwjgl.util.generator.ALTypeMap"/>
- <arg value="-Ageneratechecks"/>
- <fileset dir="${lwjgl.src.templates}" includes="org/lwjgl/openal/AL10.java, org/lwjgl/openal/AL11.java"/>
- </apply>
- </target>
-
- <target name="generate-opengl" depends="generators" description="Generates java and native source for GL">
- <!-- there's no apt task in ant yet, so we'll just invoke it manually for now -->
- <apply executable="apt" parallel="true">
- <arg value="-nocompile"/>
- <arg value="-factory"/>
- <arg value="org.lwjgl.util.generator.GeneratorProcessorFactory"/>
- <arg value="-cp"/>
- <arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
- <arg value="-s"/>
- <arg path="${lwjgl.src}/generated"/>
- <arg value="-d"/>
- <arg path="${lwjgl.src.native}/generated"/>
- <!-- <arg value="-Ageneratechecks"/>-->
- <arg value="-Acontextspecific"/>
- <arg value="-Atypemap=org.lwjgl.util.generator.GLTypeMap"/>
- <fileset dir="${lwjgl.src.templates}" includes="${opengl-template-pattern}"/>
- </apply>
- </target>
-
- <target name="generate-opengl-references" depends="generators" description="Generates java and native source for GL">
- <!-- Generate context capabilities -->
- <apply executable="apt" parallel="true">
- <arg value="-nocompile"/>
- <arg value="-factory"/>
- <arg value="org.lwjgl.util.generator.ReferencesGeneratorProcessorFactory"/>
- <arg value="-cp"/>
- <arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
- <arg value="-s"/>
- <arg path="${lwjgl.src}/generated"/>
- <fileset dir="${lwjgl.src.templates}" includes="${opengl-template-pattern}"/>
- </apply>
- </target>
+ <javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/test/**" source="1.4" target="1.4" taskname="test" />
+ <javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/examples/**" source="1.4" target="1.4" taskname="examples" />
+ </target>
- <target name="generate-opengl-capabilities" depends="generators" description="Generates java and native source for GL">
- <!-- Generate context capabilities -->
- <apply executable="apt" parallel="true">
- <arg value="-nocompile"/>
- <arg value="-factory"/>
- <arg value="org.lwjgl.util.generator.ContextGeneratorProcessorFactory"/>
- <arg value="-cp"/>
- <arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
- <arg value="-s"/>
- <arg path="${lwjgl.src}/generated"/>
- <arg value="-Acontextspecific"/>
- <fileset dir="${lwjgl.src.templates}" includes="${opengl-template-pattern}"/>
- </apply>
- </target>
-
- <target name="compile_native_all" depends="compile_native" description="Compiles the native files"/>
-
- <!-- Compiles the native files -->
<target name="compile_native" depends="headers" description="Compiles the native files">
- <!-- check each platform, and run their build target -->
<condition property="lwjgl.platform.windows">
<os family="windows" />
</condition>
@@ -603,75 +269,65 @@
</copy>
</target>
+ <!-- Compiles LWJGL on Mac platforms -->
<target name="-compile_native_macosx" if="lwjgl.platform.macosx">
<ant antfile="platform_build/macosx_ant/build.xml" inheritAll="false"/>
<copy file="${lwjgl.bin}/lwjgl/liblwjgl.jnilib" todir="${lwjgl.lib}/macosx"/>
</target>
+
+ <target name="repack200" description="Pack200-repack a jar file">
+ <pack200 src="${input}" destfile="${output}" repack="true"/>
+ </target>
- <target name="webstart_demo" depends="jars">
- <antcall target="-webstart_demo">
- <param name="keystore" value="applet/lwjglkeystore"/>
- <param name="alias" value="lwjgl"/>
- <param name="password" value="123456"/>
- </antcall>
+ <target name="pack200" description="Pack200 a jar file">
+ <pack200 src="${input}" destfile="${output}"/>
</target>
-
- <target name="webstart_demo-release" depends="jars">
- <input message="Please type the password for the keystore" addproperty="sign.pwd"/>
- <antcall target="-webstart_demo">
- <param name="keystore" value="signing/matzon_java_code_signing.keystore"/>
- <param name="alias" value="oddlabs_java_code_signing"/>
- <param name="password" value="${sign.pwd}"/>
- </antcall>
+ <target name="lzma" description="LZMA compress a file">
+ <java fork="true" classname="SevenZip.LzmaAlone">
+ <classpath>
+ <pathelement location="platform_build/JLzma.jar"/>
+ </classpath>
+ <jvmarg value="-Xmx512m"/>
+ <arg value="e"/>
+ <arg value="${input}"/>
+ <arg value="${output}"/>
+ </java>
</target>
- <!-- -->
- <target name="-webstart_demo" description="Using released files, creates the necessary files used for jnlp demos">
-
- <!-- delete existing temp -->
- <delete dir="${lwjgl.temp}"/>
-
- <!-- unzip common files -->
- <unzip src="${lwjgl.dist}/lwjgl-${lwjgl.version}.zip" dest="${lwjgl.temp}/jnlp/temp" overwrite="true"/>
-
- <!-- move files to unified structure -->
- <move todir="${lwjgl.temp}/jnlp/temp">
- <fileset dir="${lwjgl.temp}/jnlp/temp/lwjgl-${lwjgl.version}/">
- <include name="**"/>
- </fileset>
- </move>
-
- <!-- move relevant files to root -->
- <move todir="${lwjgl.temp}/jnlp/" flatten="true">
- <fileset dir="${lwjgl.temp}/jnlp/temp">
- <include name="**/**.jar"/>
- </fileset>
- </move>
-
- <!-- create native jars -->
- <jar destfile="${lwjgl.temp}/jnlp/native_win32.jar" basedir="${lwjgl.temp}/jnlp/temp/native/win32"/>
- <jar destfile="${lwjgl.temp}/jnlp/native_linux.jar" basedir="${lwjgl.temp}/jnlp/temp/native/linux"/>
- <jar destfile="${lwjgl.temp}/jnlp/native_macosx.jar" basedir="${lwjgl.temp}/jnlp/temp/native/macosx"/>
-
- <!-- create media jar -->
- <jar destfile="${lwjgl.temp}/jnlp/media.jar" basedir="${lwjgl.res}"/>
-
- <!-- sign 'em -->
- <signjar jar="${lwjgl.temp}/jnlp/lwjgl.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
- <signjar jar="${lwjgl.temp}/jnlp/lwjgl_util.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
- <signjar jar="${lwjgl.temp}/jnlp/native_linux.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
- <signjar jar="${lwjgl.temp}/jnlp/native_macosx.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
- <signjar jar="${lwjgl.temp}/jnlp/native_win32.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
- <signjar jar="${lwjgl.temp}/jnlp/jinput.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
+ <target name="applettest" depends="applet">
+ <exec executable="appletviewer">
+ <arg value="-J-Djava.security.policy=applet/appletviewer.policy"/>
+ <arg path="applet/applet.html"/>
+ </exec>
</target>
+
+ <target name="runtest" depends="all">
+ <fail message="test.mainclass is not set. Use 'ant -Dtest.mainclass=<main-class> runtest'" unless="test.mainclass"/>
+ <condition property="native_path" value="libs/win32">
+ <os family="windows" />
+ </condition>
+
+ <condition property="native_path" value="libs/linux">
+ <os name="Linux" />
+ </condition>
+
+ <condition property="native_path" value="libs/macosx">
+ <os name="Mac OS X" />
+ </condition>
+ <property name="native_path_expanded" location="${native_path}"/>
+ <java classname="${test.mainclass}" classpath="res:${lwjgl.lib}/lwjgl.jar:${lwjgl.lib}/lwjgl_util.jar:${lwjgl.lib}/lwjgl_test.jar:${lwjgl.lib}/jinput.jar" fork="true">
+ <sysproperty key="org.lwjgl.util.Debug" value="true"/>
+ <sysproperty key="java.library.path" value="${native_path_expanded}"/>
+ </java>
+ </target>
- <target name="changelog">
- <cvschangelog destfile="changelog.xml"/>
- <style in="changelog.xml" out="changelog.html" style="${ant.home}/etc/changelog.xsl">
- <param name="title" expression="LWJGL ChangeLog"/>
- <param name="module" expression="LWJGL"/>
- <param name="cvsweb" expression="http://cvs.sourceforge.net/viewcvs.py/java-game-lib/"/>
- </style>
- </target>
+ <!-- Creates the Javadoc -->
+ <target name="javadoc" description="Creates javadoc from java source code">
+ <javadoc destdir="${lwjgl.docs}/javadoc" classpath="${lwjgl.lib}/jinput.jar" author="true" version="true" use="true" source="1.4" windowtitle="LWJGL API">
+ <fileset refid="lwjgl.javadoc.fileset" />
+ <doctitle><![CDATA[<h1>Lightweight Java Game Toolkit</h1>]]></doctitle>
+ <bottom><![CDATA[<i>Copyright © 2002-2008 lwjgl.org. All Rights Reserved.</i>]]></bottom>
+ </javadoc>
+ </target>
</project>
Added: trunk/LWJGL/platform_build/build-applet.xml
===================================================================
--- trunk/LWJGL/platform_build/build-applet.xml (rev 0)
+++ trunk/LWJGL/platform_build/build-applet.xml 2008-04-20 18:46:34 UTC (rev 3028)
@@ -0,0 +1,94 @@
+<project name="applet">
+
+ <!-- Create our packer task -->
+ <taskdef name="pack200" classname="com.sun.tools.apache.ant.pack200.Pack200Task" classpath="platform_build/Pack200Task.jar"/>
+
+ <target name="applet" depends="all">
+ <antcall target="-applet">
+ <param name="keystore" value="applet/lwjglkeystore"/>
+ <param name="alias" value="lwjgl"/>
+ <param name="password" value="123456"/>
+ </antcall>
+ </target>
+
+ <target name="applet-release">
+ <input message="Please type the password for the keystore" addproperty="sign.pwd"/>
+
+ <antcall target="-applet">
+ <param name="keystore" value="signing/matzon_java_code_signing.keystore"/>
+ <param name="alias" value="oddlabs_java_code_signing"/>
+ <param name="password" value="${sign.pwd}"/>
+ </antcall>
+ </target>
+
+ <target name="-applet">
+
+ <!-- Create lwjgl_applet.jar -->
+ <jar destfile="applet/lwjgl_applet.jar" taskname="lwjgl_applet.jar">
+ <fileset refid="lwjgl_applet.fileset" />
+ </jar>
+
+ <!-- create each of the native jars -->
+ <jar destfile="applet/windows_natives.jar" taskname="windows_natives.jar">
+ <fileset dir="${lwjgl.lib}/win32">
+ <patternset refid="lwjgl-win32.fileset"/>
+ </fileset>
+ </jar>
+ <signjar jar="applet/windows_natives.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
+
+ <jar destfile="applet/linux_natives.jar" taskname="linux_natives.jar">
+ <fileset dir="${lwjgl.lib}/linux">
+ <patternset refid="lwjgl-linux.fileset"/>
+ </fileset>
+ </jar>
+ <signjar jar="applet/linux_natives.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
+
+ <jar destfile="applet/macosx_natives.jar" taskname="macosx_natives.jar">
+ <fileset dir="${lwjgl.lib}/macosx">
+ <patternset refid="lwjgl-macosx.fileset"/>
+ </fileset>
+ </jar>
+ <signjar jar="applet/macosx_natives.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
+
+ <jar destfile="${lwjgl.lib}/lwjgl_util_applet.jar" update="true">
+ <fileset dir="${lwjgl.res}" includes="applet*"/>
+ </jar>
+
+ <copy file="${lwjgl.lib}/lwjgl.jar" todir="applet"/>
+ <copy file="${lwjgl.lib}/lwjgl_util_applet.jar" todir="applet"/>
+ <copy file="${lwjgl.lib}/lwjgl_util.jar" todir="applet"/>
+ <copy file="${lwjgl.lib}/jinput.jar" todir="applet"/>
+ <copy file="${lwjgl.lib}/lzma.jar" todir="applet"/>
+ <zip destfile="applet/res.jar">
+ <zipfileset dir="${lwjgl.res}" includes="Footsteps.wav, ILtest.tga, Missing_you.mod"/>
+ </zip>
+
+ <!--<antcall target="applet-compress">
+ <param name="dir" value="applet/"/>
+ <param name="jarfile" value="lwjgl"/>
+ </antcall>
+ <fail/>-->
+ </target>
+
+ <target name="applet-compress">
+ <antcall target="repack">
+ <param name="input" value="${dir}${jarfile}.jar"/>
+ <param name="output" value="${dir}${jarfile}-repack.jar"/>
+ </antcall>
+ <signjar jar="${dir}${jarfile}.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
+ <signjar jar="${dir}${jarfile}-repack.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
+ <antcall target="pack">
+ <param name="input" value="${dir}${jarfile}-repack.jar"/>
+ <param name="output" value="${dir}${jarfile}.jar.pack"/>
+ </antcall>
+ <antcall target="lzma">
+ <param name="input" value="${dir}${jarfile}.jar.pack"/>
+ <param name="output" value="${dir}${jarfile}.jar.pack.lzma"/>
+ </antcall>
+ <antcall target="lzma">
+ <param name="input" value="${dir}${jarfile}.jar"/>
+ <param name="output" value="${dir}${jarfile}.jar.lzma"/>
+ </antcall>
+ <delete file="${dir}${jarfile}-repack.jar"/>
+ </target>
+</project>
\ No newline at end of file
Property changes on: trunk/LWJGL/platform_build/build-applet.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/LWJGL/platform_build/build-definitions.xml
===================================================================
--- trunk/LWJGL/platform_build/build-definitions.xml (rev 0)
+++ trunk/LWJGL/platform_build/build-definitions.xml 2008-04-20 18:46:34 UTC (rev 3028)
@@ -0,0 +1,150 @@
+<project name="definitions">
+ <!-- ================================================================== -->
+ <!-- Global properties for build -->
+ <!-- ================================================================== -->
+ <property name="lwjgl.src" location="src" />
+ <property name="lwjgl.src.native" location="${lwjgl.src}/native" />
+ <property name="lwjgl.src.headers" location="${lwjgl.src.native}/common" />
+ <property name="lwjgl.src.templates" location="${lwjgl.src}/templates" />
+ <property name="lwjgl.bin" location="bin" />
+ <property name="lwjgl.lib" location="libs" />
+ <property name="lwjgl.dist" location="dist" />
+ <property name="lwjgl.docs" location="doc" />
+ <property name="lwjgl.temp" location="temp" />
+ <property name="lwjgl.res" location="res" />
+ <property name="lwjgl.version" value="2.0a4" />
+
+ <property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/HP*.java,org/lwjgl/opengl/IBM*.java,org/lwjgl/opengl/SUN*.java,org/lwjgl/opengl/SGIS*.java"/>
+ <!-- ================================================================== -->
+ <!-- Filesets used for targets -->
+ <!-- ================================================================== -->
+
+ <!-- Files to include in the lwjgl.jar file -->
+ <fileset id="lwjgl.fileset" dir="${lwjgl.bin}">
+ <include name="org/**/*" />
+ <exclude name="org/lwjgl/d3d/**" />
+ <exclude name="org/lwjgl/test/**" />
+ <exclude name="org/lwjgl/util/**" />
+ <exclude name="org/lwjgl/examples/**" />
+ </fileset>
+
+ <fileset id="lwjgl_util_applet.fileset" dir="${lwjgl.bin}">
+ <exclude name="**.*"/>
+ <include name="org/lwjgl/util/applet/**"/>
+ </fileset>
+
+ <!-- Files to include in the lwjgl_test.jar file -->
+ <fileset id="lwjgl_test.fileset" dir="${lwjgl.bin}">
+ <exclude name="**.*" />
+ <include name="org/lwjgl/test/**" />
+ <include name="org/lwjgl/examples/**" />
+ </fileset>
+
+ <!-- More files to include in the lwjgl_test.jar file -->
+ <fileset id="lwjgl_test_extra.fileset" dir="${lwjgl.src}/java">
+ <exclude name="**.*" />
+ <include name="org/lwjgl/test/opengl/shaders/shaderFP.fp" />
+ <include name="org/lwjgl/test/opengl/shaders/shaderFP.vp" />
+ <include name="org/lwjgl/test/opengl/shaders/shaderFSH.fsh" />
+ <include name="org/lwjgl/test/opengl/shaders/shaderFSH.vsh" />
+ <include name="org/lwjgl/test/opengl/shaders/shaderVP.vp" />
+ <include name="org/lwjgl/test/opengl/shaders/shaderVSH.vsh" />
+ </fileset>
+
+ <!-- Files to include in the lwjgl_util.jar file -->
+ <fileset id="lwjgl_util.fileset" dir="${lwjgl.bin}">
+ <exclude name="**.*" />
+ <exclude name="org/lwjgl/util/generator/**" />
+ <exclude name="org/lwjgl/util/applet/**" />
+ <include name="org/lwjgl/util/**" />
+ </fileset>
+
+ <!-- Files to include in the lwjgl_applet.jar file -->
+ <fileset id="lwjgl_applet.fileset" dir="${lwjgl.bin}">
+ <exclude name="**.*"/>
+ <include name="org/lwjgl/test/applet/**"/>
+ <include name="org/lwjgl/test/opengl/awt/AWTGearsCanvas.class"/>
+ </fileset>
+
+ <!-- Files to make Javadoc from -->
+ <fileset id="lwjgl.javadoc.fileset" dir="${lwjgl.src}">
+ <include name="**/*.java" />
+ <exclude name="native/**" />
+ <exclude name="templates/**" />
+ <exclude name="java/org/lwjgl/test/**" />
+ <exclude name="java/org/lwjgl/examples/**" />
+ <exclude name="java/org/lwjgl/util/generator/**" />
+ </fileset>
+
+ <!-- Files to include in doc package -->
+ <patternset id="lwjgl-docs.fileset">
+ <include name="CREDITS" />
+ <include name="LICENSE" />
+ <include name="README" />
+ <include name="lwjgl_hidden_switches.text" />
+ <include name="3rdparty/*" />
+ </patternset>
+
+ <!-- Files to include in win32 package -->
+ <patternset id="lwjgl-win32.fileset">
+ <include name="lwjgl.dll" />
+ <include name="OpenAL32.dll" />
+ <include name="jinput-dx8.dll" />
+ <include name="jinput-raw.dll" />
+ </patternset>
+
+ <!-- Files to include in linux, glibc2.3 package -->
+ <patternset id="lwjgl-linux.fileset">
+ <include name="liblwjgl*.so" />
+ <include name="libopenal.so" />
+ <include name="libjinput-linux.so" />
+ <include name="libjinput-linux64.so" />
+ </patternset>
+
+ <!-- Files to include in mac os x package -->
+ <patternset id="lwjgl-macosx.fileset">
+ <include name="liblwjgl.jnilib" />
+ <include name="openal.dylib" />
+ <include name="libjinput-osx.jnilib" />
+ <include name="libjinput-osx-legacy.jnilib" />
+ </patternset>
+
+ <!-- Files to include in source distribution -->
+ <fileset id="lwjgl.source.fileset" dir=".">
+ <include name="build.xml" />
+ <include name="src/**" />
+ <include name="platform_build/**/*" />
+ </fileset>
+
+ <!-- files in the base package -->
+ <patternset id="lwjgl_base">
+ <include name="**" />
+ <exclude name="res/ILtest.*" />
+ <exclude name="res/Missing_you.mod" />
+ <exclude name="res/phero*.*" />
+ </patternset>
+
+ <!-- files in the optional package -->
+ <patternset id="lwjgl_optional">
+ <include name="res/**" />
+ <exclude name="res/logo/**" />
+ <exclude name="res/spaceinvaders/**" />
+ <exclude name="res/*.wav" />
+ <exclude name="res/*.xpm" />
+ <include name="doc/CREDITS" />
+ <include name="doc/LICENSE" />
+ <include name="doc/README" />
+ </patternset>
+
+ <!-- files in the lwjgl_applet package -->
+ <patternset id="lwjgl_applet">
+ <include name="applet/**" />
+ <exclude name="applet/appletviewer.policy" />
+ <exclude name="applet/lwjglkeystore" />
+ </patternset>
+
+ <uptodate property="lwjgl.main.built" targetfile="${lwjgl.lib}/win32/lwjgl.dll" >
+ <srcfiles dir= "${lwjgl.src.native}/common" includes="*.c*"/>
+ <srcfiles dir= "${lwjgl.src.native}/windows" includes="*.c"/>
+ </uptodate>
+</project>
\ No newline at end of file
Property changes on: trunk/LWJGL/platform_build/build-definitions.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/LWJGL/platform_build/build-generator.xml
===================================================================
--- trunk/LWJGL/platform_build/build-generator.xml (rev 0)
+++ trunk/LWJGL/platform_build/build-generator.xml 2008-04-20 18:46:34 UTC (rev 3028)
@@ -0,0 +1,86 @@
+<project name="generator">
+
+ <!-- clean the generated files -->
+ <target name="clean-generated" description="Deletes the generated java and native source">
+ <delete quiet="true" failonerror="false">
+ <fileset dir="${lwjgl.src}/generated" includes="**"/>
+ <fileset dir="${lwjgl.src.native}/generated" includes="**"/>
+ </delete>
+ </target>
+
+ <!-- Compiles the Java generator source code -->
+ <target name="generators" description="Compiles the native method generators">
+ <javac debug="yes" srcdir="${lwjgl.src}/java/" destdir="${lwjgl.bin}" includes="org/lwjgl/util/generator/**.java" source="1.5" target="1.5" taskname="generator">
+ <compilerarg value="-Xlint:all"/>
+ </javac>
+ </target>
+
+ <!-- Proxy target to generate it all -->
+ <target name="generate-all" depends="generate-openal, generate-opengl, generate-opengl-capabilities, generate-opengl-references" description="Generates java and native source"/>
+
+ <!-- Generate OpenAL -->
+ <target name="generate-openal" depends="generators" description="Generates java and native source for AL">
+ <apply executable="apt" parallel="true">
+ <arg value="-nocompile"/>
+ <arg value="-factory"/>
+ <arg value="org.lwjgl.util.generator.GeneratorProcessorFactory"/>
+ <arg value="-cp"/>
+ <arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
+ <arg value="-s"/>
+ <arg path="${lwjgl.src}/generated"/>
+ <arg value="-d"/>
+ <arg path="${lwjgl.src.native}/generated"/>
+ <arg value="-Atypemap=org.lwjgl.util.generator.ALTypeMap"/>
+ <arg value="-Ageneratechecks"/>
+ <fileset dir="${lwjgl.src.templates}" includes="org/lwjgl/openal/AL10.java, org/lwjgl/openal/AL11.java"/>
+ </apply>
+ </target>
+
+ <!-- Generate OpenGL -->
+ <target name="generate-opengl" depends="generators" description="Generates java and native source for GL">
+ <apply executable="apt" parallel="true">
+ <arg value="-nocompile"/>
+ <arg value="-factory"/>
+ <arg value="org.lwjgl.util.generator.GeneratorProcessorFactory"/>
+ <arg value="-cp"/>
+ <arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
+ <arg value="-s"/>
+ <arg path="${lwjgl.src}/generated"/>
+ <arg value="-d"/>
+ <arg path="${lwjgl.src.native}/generated"/>
+ <!-- <arg value="-Ageneratechecks"/>-->
+ <arg value="-Acontextspecific"/>
+ <arg value="-Atypemap=org.lwjgl.util.generator.GLTypeMap"/>
+ <fileset dir="${lwjgl.src.templates}" includes="${opengl-template-pattern}"/>
+ </apply>
+ </target>
+
+ <!-- Generate context capabilities -->
+ <target name="generate-opengl-references" depends="generators" description="Generates java and native source for GL">
+ <apply executable="apt" parallel="true">
+ <arg value="-nocompile"/>
+ <arg value="-factory"/>
+ <arg value="org.lwjgl.util.generator.ReferencesGeneratorProcessorFactory"/>
+ <arg value="-cp"/>
+ <arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
+ <arg value="-s"/>
+ <arg path="${lwjgl.src}/generated"/>
+ <fileset dir="${lwjgl.src.templates}" includes="${opengl-template-pattern}"/>
+ </apply>
+ </target>
+
+ <!-- Generate context capabilities -->
+ <target name="generate-opengl-capabilities" depends="generators" description="Generates java and native source for GL">
+ <apply executable="apt" parallel="true">
+ <arg value="-nocompile"/>
+ <arg value="-factory"/>
+ <arg value="org.lwjgl.util.generator.ContextGeneratorProcessorFactory"/>
+ <arg value="-cp"/>
+ <arg path="${lwjgl.src}/java:${lwjgl.src.templates}:${lwjgl.bin}:${java.class.path}"/>
+ <arg value="-s"/>
+ <arg path="${lwjgl.src}/generated"/>
+ <arg value="-Acontextspecific"/>
+ <fileset dir="${lwjgl.src.templates}" includes="${opengl-template-pattern}"/>
+ </apply>
+ </target>
+</project>
\ No newline at end of file
Property changes on: trunk/LWJGL/platform_build/build-generator.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/LWJGL/platform_build/build-webstart.xml
===================================================================
--- trunk/LWJGL/platform_build/build-webstart.xml (rev 0)
+++ trunk/LWJGL/platform_build/build-webstart.xml 2008-04-20 18:46:34 UTC (rev 3028)
@@ -0,0 +1,59 @@
+<project name="webstart">
+ <target name="webstart_demo" depends="jars">
+ <antcall target="-webstart_demo">
+ <param name="keystore" value="applet/lwjglkeystore"/>
+ <param name="alias" value="lwjgl"/>
+ <param name="password" value="123456"/>
+ </antcall>
+ </target>
+
+ <target name="webstart_demo-release" depends="jars">
+ <input message="Please type the password for the keystore" addproperty="sign.pwd"/>
+
+ <antcall target="-webstart_demo">
+ <param name="keystore" value="signing/matzon_java_code_signing.keystore"/>
+ <param name="alias" value="oddlabs_java_code_signing"/>
+ <param name="password" value="${sign.pwd}"/>
+ </antcall>
+ </target>
+
+ <!-- -->
+ <target name="-webstart_demo" description="Using released files, creates the necessary files used for jnlp demos">
+
+ <!-- delete existing temp -->
+ <delete dir="${lwjgl.temp}"/>
+
+ <!-- unzip common files -->
+ <unzip src="${lwjgl.dist}/lwjgl-${lwjgl.version}.zip" dest="${lwjgl.temp}/jnlp/temp" overwrite="true"/>
+
+ <!-- move files to unified structure -->
+ <move todir="${lwjgl.temp}/jnlp/temp">
+ <fileset dir="${lwjgl.temp}/jnlp/temp/lwjgl-${lwjgl.version}/">
+ <include name="**"/>
+ </fileset>
+ </move>
+
+ <!-- move relevant files to root -->
+ <move todir="${lwjgl.temp}/jnlp/" flatten="true">
+ <fileset dir="${lwjgl.temp}/jnlp/temp">
+ <include name="**/**.jar"/>
+ </fileset>
+ </move>
+
+ <!-- create native jars -->
+ <jar destfile="${lwjgl.temp}/jnlp/native_win32.jar" basedir="${lwjgl.temp}/jnlp/temp/native/win32"/>
+ <jar destfile="${lwjgl.temp}/jnlp/native_linux.jar" basedir="${lwjgl.temp}/jnlp/temp/native/linux"/>
+ <jar destfile="${lwjgl.temp}/jnlp/native_macosx.jar" basedir="${lwjgl.temp}/jnlp/temp/native/macosx"/>
+
+ <!-- create media jar -->
+ <jar destfile="${lwjgl.temp}/jnlp/media.jar" basedir="${lwjgl.res}"/>
+
+ <!-- sign 'em -->
+ <signjar jar="${lwjgl.temp}/jnlp/lwjgl.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
+ <signjar jar="${lwjgl.temp}/jnlp/lwjgl_util.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
+ <signjar jar="${lwjgl.temp}/jnlp/native_linux.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
+ <signjar jar="${lwjgl.temp}/jnlp/native_macosx.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
+ <signjar jar="${lwjgl.temp}/jnlp/native_win32.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
+ <signjar jar="${lwjgl.temp}/jnlp/jinput.jar" alias="${alias}" keystore="${keystore}" storepass="${password}"/>
+ </target>
+</project>
\ No newline at end of file
Property changes on: trunk/LWJGL/platform_build/build-webstart.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2008-04-20 17:00:00
|
Revision: 3027
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3027&view=rev
Author: matzon
Date: 2008-04-20 09:59:57 -0700 (Sun, 20 Apr 2008)
Log Message:
-----------
fix: native file name also has to be updated if they are using lzma or pack
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java
Modified: trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2008-04-20 15:53:11 UTC (rev 3026)
+++ trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2008-04-20 16:59:57 UTC (rev 3027)
@@ -659,27 +659,12 @@
percentage = 95;
- // update filenames to match extracted files
- for (int i = 0; i < urlList.length; i++) {
- String filename = getFileName(urlList[i]);
-
- if (filename.endsWith(".pack.lzma")) {
- urlList[i] = new URL("file://" + path + filename.replaceAll(".pack.lzma", ""));
- }
- else if (filename.endsWith(".pack")) {
- urlList[i] = new URL("file://" + path + filename.replaceAll(".pack", ""));
- }
- else if (filename.endsWith(".lzma")) {
- urlList[i] = new URL("file://" + path + filename.replaceAll(".lzma", ""));
- }
- }
-
Class[] parameters = new Class[] {URL.class};
// modify class path by adding downloaded jars to it
for (int i = 0; i < urlList.length-1; i++) {
// get location of jar as a url
- URL u = new URL("file:" + path + getFileName(urlList[i]));
+ URL u = new URL("file:" + path + getJarName(urlList[i]));
// add to class path
Method method = URLClassLoader.class.getDeclaredMethod("addURL", parameters);
@@ -946,7 +931,7 @@
int initialPercentage = percentage;
// get name of jar file with natives from urlList, it will be the last url
- String nativeJar = getFileName(urlList[urlList.length - 1]);
+ String nativeJar = getJarName(urlList[urlList.length - 1]);
// get the current certificate to compare against native files
Certificate[] certificate = AppletLoader.class.getProtectionDomain().getCodeSource().getCertificates();
@@ -1076,9 +1061,29 @@
}
return null;
}
-
+
/**
+ * Get jar name from URL.
+ *
+ * @param url Get jar file name from this url
+ * @return file name as string
+ */
+ protected String getJarName(URL url) {
+ String fileName = url.getFile();
+
+ if (fileName.endsWith(".pack.lzma")) {
+ fileName = fileName.replaceAll(".pack.lzma", "");
+ } else if (fileName.endsWith(".pack")) {
+ fileName = fileName.replaceAll(".pack", "");
+ } else if (fileName.endsWith(".lzma")) {
+ fileName = fileName.replaceAll(".lzma", "");
+ }
+
+ return fileName.substring(fileName.lastIndexOf('/') + 1);
+ }
+
+ /**
* Get file name portion of URL.
*
* @param url Get file name from this url
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2008-04-20 15:55:10
|
Revision: 3026
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3026&view=rev
Author: spasi
Date: 2008-04-20 08:53:11 -0700 (Sun, 20 Apr 2008)
Log Message:
-----------
Added NV_conditional_render extension.
Added Paths:
-----------
trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_conditional_render.java
Added: trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_conditional_render.java
===================================================================
--- trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_conditional_render.java (rev 0)
+++ trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_conditional_render.java 2008-04-20 15:53:11 UTC (rev 3026)
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2002-2008 LWJGL Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * * Neither the name of 'LWJGL' nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package org.lwjgl.opengl;
+
+import org.lwjgl.util.generator.GLenum;
+import org.lwjgl.util.generator.GLuint;
+
+public interface NV_conditional_render {
+
+ /**
+ * Accepted by the <mode> parameter of BeginConditionalRenderNV:
+ */
+ int GL_QUERY_WAIT_NV = 0x8E13;
+ int GL_QUERY_NO_WAIT_NV = 0x8E14;
+ int GL_QUERY_BY_REGION_WAIT_NV = 0x8E15;
+ int GL_QUERY_BY_REGION_NO_WAIT_NV = 0x8E16;
+
+ void glBeginConditionalRenderNV(@GLuint int id, @GLenum int mode);
+ void glEndConditionalRenderNV();
+
+}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2008-04-19 18:42:12
|
Revision: 3025
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3025&view=rev
Author: matzon
Date: 2008-04-19 11:42:02 -0700 (Sat, 19 Apr 2008)
Log Message:
-----------
fixed issue with filenames when cache is turned on
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java
Modified: trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2008-04-18 22:41:05 UTC (rev 3024)
+++ trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2008-04-19 18:42:02 UTC (rev 3025)
@@ -658,6 +658,21 @@
state = STATE_UPDATING_CLASSPATH;
percentage = 95;
+
+ // update filenames to match extracted files
+ for (int i = 0; i < urlList.length; i++) {
+ String filename = getFileName(urlList[i]);
+
+ if (filename.endsWith(".pack.lzma")) {
+ urlList[i] = new URL("file://" + path + filename.replaceAll(".pack.lzma", ""));
+ }
+ else if (filename.endsWith(".pack")) {
+ urlList[i] = new URL("file://" + path + filename.replaceAll(".pack", ""));
+ }
+ else if (filename.endsWith(".lzma")) {
+ urlList[i] = new URL("file://" + path + filename.replaceAll(".lzma", ""));
+ }
+ }
Class[] parameters = new Class[] {URL.class};
@@ -906,18 +921,12 @@
if (filename.endsWith(".pack.lzma")) {
extractLZMA(path + filename, path + filename.replaceAll(".lzma", ""));
extractPack(path + filename.replaceAll(".lzma", ""), path + filename.replaceAll(".pack.lzma", ""));
- // update list to contain .jar file
- urlList[i] = new URL("file://" + path + filename.replaceAll(".pack.lzma", ""));
}
else if (filename.endsWith(".pack")) {
extractPack(path + filename, path + filename.replace(".pack", ""));
- // update list to contain .jar file
- urlList[i] = new URL("file://" + path + filename.replaceAll(".pack", ""));
}
else if (filename.endsWith(".lzma")) {
extractLZMA(path + filename, path + filename.replace(".lzma", ""));
- // update list to contain .jar file
- urlList[i] = new URL("file://" + path + filename.replaceAll(".lzma", ""));
}
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2008-04-18 22:41:11
|
Revision: 3024
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3024&view=rev
Author: matzon
Date: 2008-04-18 15:41:05 -0700 (Fri, 18 Apr 2008)
Log Message:
-----------
lzma support for appletloader
Added Paths:
-----------
trunk/LWJGL/doc/3rdparty/lzma_license.txt
trunk/LWJGL/libs/lzma.jar
Added: trunk/LWJGL/doc/3rdparty/lzma_license.txt
===================================================================
--- trunk/LWJGL/doc/3rdparty/lzma_license.txt (rev 0)
+++ trunk/LWJGL/doc/3rdparty/lzma_license.txt 2008-04-18 22:41:05 UTC (rev 3024)
@@ -0,0 +1,15 @@
+LZMA# SDK is licensed under two licenses:
+
+1) GNU Lesser General Public License (GNU LGPL)
+2) Common Public License (CPL)
+
+It means that you can select one of these two licenses and
+follow rules of that license.
+
+SPECIAL EXCEPTION
+Igor Pavlov, as the author of this code, expressly permits you
+to statically or dynamically link your code (or bind by name)
+to the files from LZMA# SDK without subjecting your linked
+code to the terms of the CPL or GNU LGPL.
+Any modifications or additions to files from LZMA# SDK, however,
+are subject to the GNU LGPL or CPL terms.
\ No newline at end of file
Property changes on: trunk/LWJGL/doc/3rdparty/lzma_license.txt
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/LWJGL/libs/lzma.jar
===================================================================
(Binary files differ)
Property changes on: trunk/LWJGL/libs/lzma.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2008-04-18 22:34:17
|
Revision: 3023
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3023&view=rev
Author: matzon
Date: 2008-04-18 15:34:11 -0700 (Fri, 18 Apr 2008)
Log Message:
-----------
support for pack200 and lzma jars
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java
Modified: trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2008-04-13 19:12:51 UTC (rev 3022)
+++ trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2008-04-18 22:34:11 UTC (rev 3023)
@@ -47,6 +47,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
+import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.net.URL;
import java.net.URLClassLoader;
@@ -59,6 +60,8 @@
import java.util.StringTokenizer;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
+import java.util.jar.JarOutputStream;
+import java.util.jar.Pack200;
/**
* <p>
@@ -99,6 +102,7 @@
* $Id$
*/
public class AppletLoader extends Applet implements Runnable, AppletStub {
+
/** initializing */
public static final int STATE_INIT = 1;
@@ -192,6 +196,12 @@
/** state of applet loader */
protected int state = STATE_INIT;
+ /** whether lzma is supported */
+ protected boolean lzmaSupported = false;
+
+ /** whether pack200 is supported */
+ protected boolean pack200Supported = false;
+
/** generic error message to display on error */
protected String[] genericErrorMessage = { "An error occured while loading the applet.",
"Plese contact support to resolve this issue.",
@@ -209,7 +219,6 @@
* @see java.applet.Applet#init()
*/
public void init() {
-
state = STATE_INIT;
// sanity check
@@ -242,6 +251,22 @@
if(logo == null || progressbar == null) {
fatalErrorOccured("Unable to load logo and progressbar images");
}
+
+ // check for lzma support
+ try {
+ Class.forName("LZMA.LzmaInputStream");
+ lzmaSupported = true;
+ } catch (Throwable e) {
+ /* no lzma support */
+ }
+
+ // check pack200 support
+ try {
+ java.util.jar.Pack200.class.getSimpleName();
+ pack200Supported = true;
+ } catch (Throwable e) {
+ /* no pack200 support */
+ }
}
/*
@@ -419,6 +444,22 @@
return "unknown state";
}
}
+
+ /**
+ * Trims the passed file string based on the available capabilities
+ * @param file string of files to be trimmed
+ * @return trimmed string based on capabilities of client
+ */
+ protected String trimExtensionByCapabilities(String file) {
+ if (!pack200Supported) {
+ file = file.replaceAll(".pack", "");
+ }
+
+ if (!lzmaSupported) {
+ file = file.replaceAll(".lzma", "");
+ }
+ return file;
+ }
/**
* Reads list of jars to download and adds the urls to urlList
@@ -431,6 +472,8 @@
// jars to load
String jarList = getParameter("al_jars");
+ jarList = trimExtensionByCapabilities(jarList);
+
StringTokenizer jar = new StringTokenizer(jarList, ", ");
int jarCount = jar.countTokens() + 1;
@@ -461,6 +504,7 @@
if (nativeJar == null) {
fatalErrorOccured("no lwjgl natives files found");
} else {
+ nativeJar = trimExtensionByCapabilities(nativeJar);
urlList[jarCount - 1] = new URL(path, nativeJar);
}
}
@@ -476,7 +520,6 @@
*
*/
public void run() {
-
state = STATE_CHECKING_CACHE;
percentage = 5;
@@ -542,7 +585,10 @@
// if jars not available or need updating download them
if (!cacheAvailable) {
// downloads jars from the server
- downloadJars(path); // 10-65%
+ downloadJars(path); // 10-55%
+
+ // Extract Pack and LZMA files
+ extractJars(path); // 55-65%
// Extracts Native Files
extractNatives(path); // 65-85%
@@ -699,7 +745,7 @@
if(debugMode) {
sleep(2000);
}
-
+
urlconnection = urlList[i].openConnection();
String currentFile = getFileName(urlList[i]);
@@ -714,7 +760,7 @@
}
fos.write(buffer, 0, bufferSize);
currentSizeDownload += bufferSize;
- percentage = initialPercentage + ((currentSizeDownload * 55) / totalSizeDownload);
+ percentage = initialPercentage + ((currentSizeDownload * 45) / totalSizeDownload);
subtaskMessage = "Retrieving: " + currentFile + " " + ((currentSizeDownload * 100) / totalSizeDownload) + "%";
}
@@ -729,7 +775,7 @@
* @param urlconnection connection to get input stream from
* @return InputStream or null if not possible
*/
- private InputStream getJarInputStream(final String currentFile, final URLConnection urlconnection) throws Exception {
+ protected InputStream getJarInputStream(final String currentFile, final URLConnection urlconnection) throws Exception {
final InputStream[] is = new InputStream[1];
// try to get the input stream 3 times.
@@ -773,8 +819,110 @@
return is[0];
}
+
+ /**
+ * Extract LZMA File
+ * @param in Input path to pack file
+ * @param out output path to resulting file
+ * @throws exception if any errors occur
+ */
+ protected void extractLZMA(String in, String out) throws Exception {
+
+ File f = new File(in);
+ FileInputStream fileInputHandle = new FileInputStream(f);
+ // use reflection to avoid hard dependency
+ Class clazz = Class.forName( "LZMA.LzmaInputStream" );
+ Constructor constructor = clazz.getDeclaredConstructor( new Class[] {InputStream.class} );
+ InputStream inputHandle = (InputStream) constructor.newInstance( new Object[] {fileInputHandle} );
+
+ OutputStream outputHandle;
+ outputHandle = new FileOutputStream(out);
+
+ byte [] buffer = new byte [1<<14];
+
+ int ret = inputHandle.read(buffer);
+ while (ret >= 1) {
+ outputHandle.write(buffer,0,ret);
+ ret = inputHandle.read(buffer);
+ }
+
+ inputHandle.close();
+ outputHandle.close();
+
+ outputHandle = null;
+ inputHandle = null;
+
+ // delete LZMA file, as it is no longer needed
+ f.delete();
+
+ if(debugMode) {
+ sleep(1000);
+ }
+ }
+
/**
+ * Extract Pack File
+ * @param in Input path to pack file
+ * @param out output path to resulting file
+ * @throws exception if any errors occur
+ */
+ protected void extractPack(String in, String out) throws Exception {
+ File f = new File(in);
+ FileOutputStream fostream = new FileOutputStream(out);
+ JarOutputStream jostream = new JarOutputStream(fostream);
+
+ Pack200.Unpacker unpacker = Pack200.newUnpacker();
+ unpacker.unpack(f, jostream);
+ jostream.close();
+
+ // delete pack file as its no longer needed
+ f.delete();
+
+ if(debugMode) {
+ sleep(1000);
+ }
+ }
+
+ /**
+ * Extract all jars from any lzma/pack files
+ *
+ * @param path output path
+ * @throws exception if any errors occur
+ */
+ protected void extractJars(String path) throws Exception {
+ state = STATE_EXTRACTING_PACKAGES;
+
+ float increment = (float) 10.0 / urlList.length;
+ // extract all lzma and pack.lzma files
+ for (int i = 0; i < urlList.length; i++) {
+ percentage += (int) (increment * (i+1));
+ String filename = getFileName(urlList[i]);
+
+ if(debugMode) {
+ sleep(1000);
+ }
+
+ if (filename.endsWith(".pack.lzma")) {
+ extractLZMA(path + filename, path + filename.replaceAll(".lzma", ""));
+ extractPack(path + filename.replaceAll(".lzma", ""), path + filename.replaceAll(".pack.lzma", ""));
+ // update list to contain .jar file
+ urlList[i] = new URL("file://" + path + filename.replaceAll(".pack.lzma", ""));
+ }
+ else if (filename.endsWith(".pack")) {
+ extractPack(path + filename, path + filename.replace(".pack", ""));
+ // update list to contain .jar file
+ urlList[i] = new URL("file://" + path + filename.replaceAll(".pack", ""));
+ }
+ else if (filename.endsWith(".lzma")) {
+ extractLZMA(path + filename, path + filename.replace(".lzma", ""));
+ // update list to contain .jar file
+ urlList[i] = new URL("file://" + path + filename.replaceAll(".lzma", ""));
+ }
+ }
+ }
+
+ /**
* This method will extract all file from the native jar and extract them
* to the subdirectory called "natives" in the local path, will also check
* to see if the native jar files is signed properly
@@ -783,7 +931,7 @@
* @throws Exception if it fails to extract files
*/
protected void extractNatives(String path) throws Exception {
-
+
state = STATE_EXTRACTING_PACKAGES;
int initialPercentage = percentage;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: McCormack <rrb...@GN...> - 2008-04-15 11:53:49
|
The hottest blondes on the block party all night long http://www.Bunnael.com/ |
|
From: Clotfelter <mat...@Ci...> - 2008-04-14 07:32:29
|
Want a love hickie? Get 9 more by giving her a power packed great time. http://www.qubehanf.com/ |
|
From: <eli...@us...> - 2008-04-13 19:12:53
|
Revision: 3022
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3022&view=rev
Author: elias_naur
Date: 2008-04-13 12:12:51 -0700 (Sun, 13 Apr 2008)
Log Message:
-----------
Linux: Another applet focus tweak
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2008-04-13 18:46:25 UTC (rev 3021)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2008-04-13 19:12:51 UTC (rev 3022)
@@ -860,8 +860,10 @@
return;
if (focused) {
if (xembedded && !parent_focused && parent_focus_window_valid) {
- setInputFocusUnsafe(parent_focus_window);
- parent_focus_changed = false;
+ if (nGetInputFocus(getDisplay()) == current_window) {
+ setInputFocusUnsafe(parent_focus_window);
+ parent_focus_changed = false;
+ }
}
} else {
if (parent_focused) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <eli...@us...> - 2008-04-13 18:46:29
|
Revision: 3021
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3021&view=rev
Author: elias_naur
Date: 2008-04-13 11:46:25 -0700 (Sun, 13 Apr 2008)
Log Message:
-----------
Linux: Another focus fix
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2008-04-13 18:43:27 UTC (rev 3020)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2008-04-13 18:46:25 UTC (rev 3021)
@@ -427,7 +427,7 @@
current_window_mode = getWindowMode(fullscreen);
boolean undecorated = Display.getPrivilegedBoolean("org.lwjgl.opengl.Window.undecorated") || current_window_mode != WINDOWED;
this.parent = parent;
- long parent_window = parent != null ? getHandle(parent) : getRootWindow(getDisplay(), getDefaultScreen());
+ parent_window = parent != null ? getHandle(parent) : getRootWindow(getDisplay(), getDefaultScreen());
current_window = nCreateWindow(getDisplay(), getDefaultScreen(), handle, mode, current_window_mode, x, y, undecorated, parent_window);
mapRaised(getDisplay(), current_window);
xembedded = parent != null && isAncestorXEmbedded(parent_window);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <eli...@us...> - 2008-04-13 18:43:30
|
Revision: 3020
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3020&view=rev
Author: elias_naur
Date: 2008-04-13 11:43:27 -0700 (Sun, 13 Apr 2008)
Log Message:
-----------
Applet focus fixes
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
trunk/LWJGL/src/native/linux/org_lwjgl_opengl_Display.c
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2008-04-13 18:26:22 UTC (rev 3019)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2008-04-13 18:43:27 UTC (rev 3020)
@@ -468,7 +468,7 @@
private boolean isAncestorXEmbedded(long window) throws LWJGLException {
long xembed_atom = internAtom("_XEMBED_INFO", true);
if (xembed_atom != None) {
- long w = parent_window;
+ long w = window;
while (w != None) {
if (hasProperty(getDisplay(), w, xembed_atom))
return true;
Modified: trunk/LWJGL/src/native/linux/org_lwjgl_opengl_Display.c
===================================================================
--- trunk/LWJGL/src/native/linux/org_lwjgl_opengl_Display.c 2008-04-13 18:26:22 UTC (rev 3019)
+++ trunk/LWJGL/src/native/linux/org_lwjgl_opengl_Display.c 2008-04-13 18:43:27 UTC (rev 3020)
@@ -85,8 +85,11 @@
JNIEnv *env = getThreadEnv();
if (env != NULL) {
jclass org_lwjgl_LinuxDisplay_class = (*env)->FindClass(env, "org/lwjgl/opengl/LinuxDisplay");
- if (org_lwjgl_LinuxDisplay_class == NULL)
+ if (org_lwjgl_LinuxDisplay_class == NULL) {
+ // Don't propagate error
+ (*env)->ExceptionClear(env);
return 0;
+ }
jmethodID handler_method = (*env)->GetStaticMethodID(env, org_lwjgl_LinuxDisplay_class, "globalErrorHandler", "(JJJJJJJ)I");
if (handler_method == NULL)
return 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|