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
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
1
|
|
2
|
3
|
4
|
5
|
6
|
7
|
8
|
|
9
|
10
(1) |
11
(1) |
12
(3) |
13
(1) |
14
|
15
|
|
16
|
17
|
18
|
19
(3) |
20
|
21
|
22
(2) |
|
23
(1) |
24
(1) |
25
(2) |
26
|
27
(1) |
28
(5) |
29
|
|
30
|
31
|
|
|
|
|
|
|
From: <ka...@us...> - 2011-01-24 22:35:18
|
Revision: 3476
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3476&view=rev
Author: kappa1
Date: 2011-01-24 22:35:11 +0000 (Mon, 24 Jan 2011)
Log Message:
-----------
AppletLoader: add support for using multiple native 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 2011-01-23 07:48:50 UTC (rev 3475)
+++ trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2011-01-24 22:35:11 UTC (rev 3476)
@@ -223,6 +223,9 @@
/** Sizes of files to download */
protected int[] fileSizes;
+
+ /** Number of native jars */
+ protected int nativeJarCount;
/** whether to use caching system, only download files that have changed */
protected boolean cacheEnabled;
@@ -598,68 +601,73 @@
// jars to load
String jarList = getParameter("al_jars");
-
- jarList = trimExtensionByCapabilities(jarList);
-
- StringTokenizer jar = new StringTokenizer(jarList, ", ");
-
- int jarCount = jar.countTokens() + 1;
-
- urlList = new URL[jarCount];
-
- URL path = getCodeBase();
-
- // set jars urls
- for (int i = 0; i < jarCount - 1; i++) {
- urlList[i] = new URL(path, jar.nextToken());
- }
-
- // native jar url
- String osName = System.getProperty("os.name");
- String nativeJar = null;
-
+ String nativeJarList = null;
+
+ String osName = System.getProperty("os.name");
+
if (osName.startsWith("Win")) {
// check if arch specific natives have been specified
if (System.getProperty("os.arch").endsWith("64")) {
- nativeJar = getParameter("al_windows64");
+ nativeJarList = getParameter("al_windows64");
} else {
- nativeJar = getParameter("al_windows32");
+ nativeJarList = getParameter("al_windows32");
}
- if (nativeJar == null) {
- nativeJar = getParameter("al_windows");
+ if (nativeJarList == null) {
+ nativeJarList = getParameter("al_windows");
}
} else if (osName.startsWith("Linux")) {
// check if arch specific natives have been specified
if (System.getProperty("os.arch").endsWith("64")) {
- nativeJar = getParameter("al_linux64");
+ nativeJarList = getParameter("al_linux64");
} else {
- nativeJar = getParameter("al_linux32");
+ nativeJarList = getParameter("al_linux32");
}
- if (nativeJar == null) {
- nativeJar = getParameter("al_linux");
+ if (nativeJarList == null) {
+ nativeJarList = getParameter("al_linux");
}
} else if (osName.startsWith("Mac")) {
- nativeJar = getParameter("al_mac");
+ nativeJarList = getParameter("al_mac");
} else if (osName.startsWith("Solaris") || osName.startsWith("SunOS")) {
- nativeJar = getParameter("al_solaris");
+ nativeJarList = getParameter("al_solaris");
} else if (osName.startsWith("FreeBSD")) {
- nativeJar = getParameter("al_freebsd");
+ nativeJarList = getParameter("al_freebsd");
} else {
fatalErrorOccured("OS (" + osName + ") not supported", null);
+ return;
}
+
+ if (nativeJarList == null) {
+ fatalErrorOccured("no lwjgl natives files found", null);
+ return;
+ }
+
+ jarList = trimExtensionByCapabilities(jarList);
+ StringTokenizer jars = new StringTokenizer(jarList, ", ");
- if (nativeJar == null) {
- fatalErrorOccured("no lwjgl natives files found", null);
- } else {
- nativeJar = trimExtensionByCapabilities(nativeJar);
- urlList[jarCount - 1] = new URL(path, nativeJar);
+ nativeJarList = trimExtensionByCapabilities(nativeJarList);
+ StringTokenizer nativeJars = new StringTokenizer(nativeJarList, ", ");
+
+ int jarCount = jars.countTokens();
+ nativeJarCount = nativeJars.countTokens();
+
+ urlList = new URL[jarCount+nativeJarCount];
+
+ URL path = getCodeBase();
+
+ // set jars urls
+ for (int i = 0; i < jarCount; i++) {
+ urlList[i] = new URL(path, jars.nextToken());
}
+
+ for (int i = jarCount; i < jarCount+nativeJarCount; i++) {
+ urlList[i] = new URL(path, nativeJars.nextToken());
+ }
}
/**
@@ -1357,19 +1365,15 @@
* @throws Exception if it fails to extract files
*/
protected void extractNatives(String path) throws Exception {
+
+ setState(STATE_EXTRACTING_PACKAGES);
- // if no new native jar was downloaded, no extracting needed
- if (fileSizes[fileSizes.length-1] == -2) {
- return;
+ // create native folder
+ File nativeFolder = new File(path + "natives");
+ if (!nativeFolder.exists()) {
+ nativeFolder.mkdir();
}
-
- setState(STATE_EXTRACTING_PACKAGES);
-
- int initialPercentage = percentage;
-
- // get name of jar file with natives from urlList, it will be the last url
- String nativeJar = getJarName(urlList[urlList.length - 1]);
-
+
// get the current certificate to compare against native files
Certificate[] certificate = AppletLoader.class.getProtectionDomain().getCodeSource().getCertificates();
@@ -1382,88 +1386,96 @@
jurl.setDefaultUseCaches(true);
certificate = jurl.getCertificates();
}
-
- // create native folder
- File nativeFolder = new File(path + "natives");
- if (!nativeFolder.exists()) {
- nativeFolder.mkdir();
- }
-
- // open jar file
- JarFile jarFile = new JarFile(path + nativeJar, true);
-
- // get list of files in jar
- Enumeration entities = jarFile.entries();
-
- totalSizeExtract = 0;
-
- // calculate the size of the files to extract for progress bar
- while (entities.hasMoreElements()) {
- JarEntry entry = (JarEntry) entities.nextElement();
-
- // skip directories and anything in directories
- // conveniently ignores the manifest
- if (entry.isDirectory() || entry.getName().indexOf('/') != -1) {
+
+ for (int i = fileSizes.length - nativeJarCount; i < fileSizes.length; i++) {
+
+ int initialPercentage = percentage;
+
+ // if a new native jar was not downloaded, no extracting needed
+ if (fileSizes[i] == -2) {
continue;
}
- totalSizeExtract += entry.getSize();
- }
-
- currentSizeExtract = 0;
-
- // reset point to begining by getting list of file again
- entities = jarFile.entries();
-
- // extract all files from the jar
- while (entities.hasMoreElements()) {
- JarEntry entry = (JarEntry) entities.nextElement();
-
- // skip directories and anything in directories
- // conveniently ignores the manifest
- if (entry.isDirectory() || entry.getName().indexOf('/') != -1) {
- continue;
+
+ // get name of jar file with natives from urlList
+ String nativeJar = getJarName(urlList[i]);
+
+ // open jar file
+ JarFile jarFile = new JarFile(path + nativeJar, true);
+
+ // get list of files in jar
+ Enumeration entities = jarFile.entries();
+
+ totalSizeExtract = 0;
+
+ // calculate the size of the files to extract for progress bar
+ while (entities.hasMoreElements()) {
+ JarEntry entry = (JarEntry) entities.nextElement();
+
+ // skip directories and anything in directories
+ // conveniently ignores the manifest
+ if (entry.isDirectory() || entry.getName().indexOf('/') != -1) {
+ continue;
+ }
+ totalSizeExtract += entry.getSize();
}
-
- // check if native file already exists if so delete it to make room for new one
- // useful when using the reload button on the browser
- File f = new File(path + "natives" + File.separator + entry.getName());
- if (f.exists()) {
- if (!f.delete()) {
- continue; // unable to delete file, it is in use, skip extracting it
+
+ currentSizeExtract = 0;
+
+ // reset point to begining by getting list of file again
+ entities = jarFile.entries();
+
+ // extract all files from the jar
+ while (entities.hasMoreElements()) {
+ JarEntry entry = (JarEntry) entities.nextElement();
+
+ // skip directories and anything in directories
+ // conveniently ignores the manifest
+ if (entry.isDirectory() || entry.getName().indexOf('/') != -1) {
+ continue;
}
+
+ // check if native file already exists if so delete it to make room for new one
+ // useful when using the reload button on the browser
+ File f = new File(path + "natives" + File.separator + entry.getName());
+ if (f.exists()) {
+ if (!f.delete()) {
+ continue; // unable to delete file, it is in use, skip extracting it
+ }
+ }
+
+ debug_sleep(1000);
+
+ InputStream in = jarFile.getInputStream(jarFile.getEntry(entry.getName()));
+ OutputStream out = new FileOutputStream(path + "natives" + File.separator + entry.getName());
+
+ int bufferSize;
+ byte buffer[] = new byte[65536];
+
+ while ((bufferSize = in.read(buffer, 0, buffer.length)) != -1) {
+ debug_sleep(10);
+ out.write(buffer, 0, bufferSize);
+ currentSizeExtract += bufferSize;
+
+ // update progress bar
+ percentage = initialPercentage + ((currentSizeExtract * 20) / totalSizeExtract);
+ subtaskMessage = "Extracting: " + entry.getName() + " " + ((currentSizeExtract * 100) / totalSizeExtract) + "%";
+ }
+
+ // validate if the certificate for native file is correct
+ validateCertificateChain(certificate, entry.getCertificates());
+
+ in.close();
+ out.close();
}
-
- debug_sleep(1000);
-
- InputStream in = jarFile.getInputStream(jarFile.getEntry(entry.getName()));
- OutputStream out = new FileOutputStream(path + "natives" + File.separator + entry.getName());
-
- int bufferSize;
- byte buffer[] = new byte[65536];
-
- while ((bufferSize = in.read(buffer, 0, buffer.length)) != -1) {
- debug_sleep(10);
- out.write(buffer, 0, bufferSize);
- currentSizeExtract += bufferSize;
-
- // update progress bar
- percentage = initialPercentage + ((currentSizeExtract * 20) / totalSizeExtract);
- subtaskMessage = "Extracting: " + entry.getName() + " " + ((currentSizeExtract * 100) / totalSizeExtract) + "%";
- }
-
- // validate if the certificate for native file is correct
- validateCertificateChain(certificate, entry.getCertificates());
-
- in.close();
- out.close();
+ subtaskMessage = "";
+
+ jarFile.close();
+
+ // delete native jar as it is no longer needed
+ File f = new File(path + nativeJar);
+ f.delete();
+
}
- subtaskMessage = "";
-
- jarFile.close();
-
- // delete native jar as it is no longer needed
- File f = new File(path + nativeJar);
- f.delete();
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|