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: <jpi...@us...> - 2011-12-21 14:34:50
|
Revision: 3716 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3716&view=rev Author: jpilgrim Date: 2011-12-21 14:34:39 +0000 (Wed, 21 Dec 2011) Log Message: ----------- Fixed a problem with categories. Categories are now extracted from site.xml. A default category is created if no site.xml is found or if some features are not mapped to any other category. Modified Paths: -------------- trunk/LWJGL/eclipse-update/org.lwjgl.build/anttasks.jar trunk/LWJGL/eclipse-update/org.lwjgl.build/src/java/org/lwjgl/ant/StandalonePublisher.java Modified: trunk/LWJGL/eclipse-update/org.lwjgl.build/anttasks.jar =================================================================== (Binary files differ) Modified: trunk/LWJGL/eclipse-update/org.lwjgl.build/src/java/org/lwjgl/ant/StandalonePublisher.java =================================================================== --- trunk/LWJGL/eclipse-update/org.lwjgl.build/src/java/org/lwjgl/ant/StandalonePublisher.java 2011-12-20 19:06:52 UTC (rev 3715) +++ trunk/LWJGL/eclipse-update/org.lwjgl.build/src/java/org/lwjgl/ant/StandalonePublisher.java 2011-12-21 14:34:39 UTC (rev 3716) @@ -17,13 +17,19 @@ import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; +import java.io.InputStream; import java.io.StringWriter; import java.math.BigInteger; import java.security.MessageDigest; +import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Arrays; +import java.util.Collection; import java.util.Collections; +import java.util.Date; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Properties; import java.util.jar.JarEntry; import java.util.jar.JarInputStream; @@ -94,26 +100,11 @@ protected final XPath xpath = XPathFactory.newInstance().newXPath(); - public class FeatureInfo { - - public String getClassifier() { - return "org.eclipse.update.feature"; - } - - public String getContentType() { - return "application/zip"; - } - - public String getRootElementName() { - return "feature"; - } - + public abstract class XMLBasedInfo { public Document doc; - public int size; + abstract public String getRootElementName(); - public File jarFile; - public String xpath(String path) { if (path.startsWith("/")) return StandalonePublisher.this.xpath(doc, path); @@ -139,7 +130,77 @@ return Collections.emptyList(); } } + } + public class SiteInfo extends XMLBasedInfo { + /** + * {@inheritDoc} + * @see org.lwjgl.ant.StandalonePublisher.XMLBasedInfo#getRootElementName() + */ + @Override + public String getRootElementName() { + return "site"; + } + } + + public static class CategoryInfo { + String id; + + String name; + + String label; + + String description = ""; + + List<FeatureInfo> required = new ArrayList<StandalonePublisher.FeatureInfo>( + 5); + + public String getVersion() { + String version = "0.0.0"; + for (FeatureInfo featureInfo : required) { + String v = featureInfo.getVersion(); + if (version.compareTo(v) < 0) { + version = v; // quick hack, not really correct + } + } + return version; + + } + + String getID() { + if (id == null) { + String timeStamp = new SimpleDateFormat("yyyyMMddHHmm") + .format(new Date()); + id = timeStamp + "." + name; + } + return id; + } + + public String getLabel() { + if (label==null || label.isEmpty()) return name; + return label; + } + + } + + public class FeatureInfo extends XMLBasedInfo { + + public String getClassifier() { + return "org.eclipse.update.feature"; + } + + public String getContentType() { + return "application/zip"; + } + + public String getRootElementName() { + return "feature"; + } + + public int size; + + public File jarFile; + /** * @return */ @@ -366,7 +427,89 @@ } + protected Collection<CategoryInfo> readSite( + DocumentBuilder documentBuilder, FeatureInfo[] featureInfos) + throws Exception { + + File f = new File(updateSiteFolder + File.separator + "site.xml"); + if (!f.exists()) { + f = new File(updateSiteFolder + File.separator + "category.xml"); + } + + Map<String, FeatureInfo> featuresById = new HashMap<String, StandalonePublisher.FeatureInfo>(); + for (FeatureInfo featureInfo : featureInfos) { + featuresById.put(featureInfo.getID(), featureInfo); + } + + Map<String, CategoryInfo> categoryInfos = new HashMap<String, CategoryInfo>(); + Map<String, String> featureToGroup = new HashMap<String, String>(); + + if (f.exists()) { + SiteInfo site = new SiteInfo(); + site.doc = readXML(documentBuilder, new FileInputStream(f)); + + List<Node> categories = site.xpathNods("//site//category-def"); + for (Node category : categories) { + CategoryInfo categoryInfo = new CategoryInfo(); + categoryInfo.name = xpath(category, "@name"); + categoryInfo.label = xpath(category, "@label"); + categoryInfo.description = xpath(category, "description/text()"); + categoryInfos.put(categoryInfo.name, categoryInfo); + } + + List<Node> features = site.xpathNods("//site//feature"); + for (Node feature : features) { + featureToGroup.put(xpath(feature, "@id"), + xpath(feature, "category/@name")); + } + + } + + // sort features to their category: + List<String> sortedFeatures = new ArrayList<String>(); + for (String id : featuresById.keySet()) { + String categoryName = featureToGroup.get(id); + if (categoryName != null) { + CategoryInfo categoryInfo = categoryInfos.get(categoryName); + categoryInfo.required.add(featuresById.get(id)); + sortedFeatures.add(id); + } + } + for (String id : sortedFeatures) { + featuresById.remove(id); + } + + if (!featuresById.isEmpty()) { + CategoryInfo categoryInfo = categoryInfos.get(this.repositoryName); + if (categoryInfo == null) { + categoryInfo = new CategoryInfo(); + categoryInfo.name = this.repositoryName; + categoryInfo.label = this.repositoryName; + categoryInfo.description = ""; + categoryInfos.put(categoryInfo.name, categoryInfo); + } + + for (FeatureInfo featureInfo : featuresById.values()) { + categoryInfo.required.add(featureInfo); + } + + } + + return categoryInfos.values(); + } + /** + * @param i_documentBuilder + * @param i_fileInputStream + * @return + */ + protected Document readXML(DocumentBuilder docBuilder, InputStream is) + throws Exception { + Document doc = docBuilder.parse(is); + return doc; + } + + /** * @param docBuilder * @param jis * @param jarEntry @@ -445,7 +588,12 @@ bundleInfos[i] = readBundle(locations[i]); } - writeContent(featureInfos, bundleInfos); + DocumentBuilder docBuilder = DocumentBuilderFactory.newInstance() + .newDocumentBuilder(); + Collection<CategoryInfo> categoryInfos = readSite(docBuilder, + featureInfos); + + writeContent(featureInfos, bundleInfos, categoryInfos); writeArtifacts(featureInfos, bundleInfos); } @@ -453,10 +601,12 @@ /** * @param i_featureInfos * @param i_bundleInfos + * @param i_categoryInfos * @throws Exception */ protected void writeContent(FeatureInfo[] i_featureInfos, - BundleInfo[] i_bundleInfos) throws Exception { + BundleInfo[] i_bundleInfos, Collection<CategoryInfo> i_categoryInfos) + throws Exception { DocumentBuilder docBuilder = DocumentBuilderFactory.newInstance() .newDocumentBuilder(); @@ -499,6 +649,11 @@ for (BundleInfo bundleInfo : i_bundleInfos) { units.add(createUnitForBundle(bundleInfo)); } + + + for (CategoryInfo categoryInfo : i_categoryInfos) { + units.add(createUnitForCategory(categoryInfo)); + } addList(repository, "units", units); //dump(content); @@ -632,17 +787,18 @@ String jarFileNameString = targetFile; int pos = jarFileNameString.lastIndexOf('.'); if (pos > 0) { - jarFileNameString = jarFileNameString.substring(0, pos) + ".jar"; + jarFileNameString = jarFileNameString.substring(0, pos) + + ".jar"; } else { jarFileNameString += ".jar"; } - + JarOutputStream target = new JarOutputStream(new FileOutputStream( jarFileNameString)); - + pos = targetFile.lastIndexOf(File.separatorChar); - if (pos>0) { - targetFile = targetFile.substring(pos+1); + if (pos > 0) { + targetFile = targetFile.substring(pos + 1); } JarEntry entry = new JarEntry(targetFile); @@ -798,6 +954,78 @@ } /** + * @param i_categoryInfo + * @return + */ + private Element createUnitForCategory(CategoryInfo info) { + String version = info.getVersion(); + String id = info.getID(); + /* + <unit id="201112211149.GEF3D" version="1.0.0.08-77cLX4vE7UEMMMUUMMMlL"> + */ + Element unit = createElement("unit", // + "id", id, // + "version", version); + /* + <properties size="3"> + <property name="org.eclipse.equinox.p2.name" value="GEF3D"/> + <property name="org.eclipse.equinox.p2.description" value="GEF3D"/> + <property name="org.eclipse.equinox.p2.type.category" value="true"/> + </properties> + */ + addList(unit, + "properties", + createElement("property", "name", + "org.eclipse.equinox.p2.name", "value", + info.getLabel()), + createElement("property", "name", + "org.eclipse.equinox.p2.description", "value", + info.description), + createElement("property", "name", + "org.eclipse.equinox.p2.type.category", "value", + "true")); + /* + <provides size="1"> + <provided namespace="org.eclipse.equinox.p2.iu" name="201112211149.GEF3D" version="1.0.0.08-77cLX4vE7UEMMMUUMMMlL"/> + </provides> + */ + addList(unit, "provides", + createElement("provided", + "namespace", "org.eclipse.equinox.p2.iu", + "name", id, + "version", version)); + + /* + <requires size="4"> + <required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.gef3d.sdk.feature.group" range="[0.8.1.201112211149,0.8.1.201112211149]"/> + <required namespace="org.eclipse.equinox.p2.iu" name="org.eclipse.gef3d.feature.group" range="[0.8.1.201112211149,0.8.1.201112211149]"/> + ... + </requires> + */ + List<Element> requires = new ArrayList<Element>(); + for (FeatureInfo featureInfo: info.required) { + String featureVersion = featureInfo.xpath("@version"); + String featureName = featureInfo.xpath("@id") + ".feature.group"; + Element required = createElement("required", + "namespace", "org.eclipse.equinox.p2.iu", // + "name", featureName, // + "range", "[" + featureVersion +"," + featureVersion + "]" + ); + requires.add(required); + } + addList(unit, "requires", requires); + + /* + <touchpoint id="null" version="0.0.0"/> + </unit> + */ + addElement(unit, "touchpoint", "id", "null", "version", "0.0.0"); + + return unit; + + } + + /** * @param i_bundleInfo * @return * @throws Exception @@ -1212,7 +1440,8 @@ // publisher.repositoryURI = "http://lwjgl.org/update"; try { publisher.execute(); - System.out.println("Successfull created p2 metadata in " + publisher.updateSiteFolder); + System.out.println("Successfull created p2 metadata in " + + publisher.updateSiteFolder); } catch (Exception ex) { System.err.println("Error creating p2 metadata: "); System.err.println(ex); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sp...@us...> - 2011-12-20 19:06:58
|
Revision: 3715 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3715&view=rev Author: spasi Date: 2011-12-20 19:06:52 +0000 (Tue, 20 Dec 2011) Log Message: ----------- Added @Optional on clSetPrintfCallback for the AMD CL 1.2 preview driver. Modified Paths: -------------- trunk/LWJGL/src/templates/org/lwjgl/opencl/CL12.java Modified: trunk/LWJGL/src/templates/org/lwjgl/opencl/CL12.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opencl/CL12.java 2011-12-20 17:16:23 UTC (rev 3714) +++ trunk/LWJGL/src/templates/org/lwjgl/opencl/CL12.java 2011-12-20 19:06:52 UTC (rev 3715) @@ -419,6 +419,7 @@ @Check(canBeNull = true) @Const @NativeType("cl_event") PointerBuffer event_wait_list, @OutParameter @Check(value = "1", canBeNull = true) @NativeType("cl_event") PointerBuffer event); + @Optional(reason = "Missing from AMD CL 1.2 preview drivers.") @Code( tryBlock = true, // Create a GlobalRef to the callback object. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sp...@us...> - 2011-12-20 17:16:30
|
Revision: 3714 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3714&view=rev Author: spasi Date: 2011-12-20 17:16:23 +0000 (Tue, 20 Dec 2011) Log Message: ----------- Updated AMD_pinned_memory based on official spec. Modified Paths: -------------- trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_pinned_memory.java Modified: trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_pinned_memory.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_pinned_memory.java 2011-12-20 11:04:49 UTC (rev 3713) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/AMD_pinned_memory.java 2011-12-20 17:16:23 UTC (rev 3714) @@ -34,22 +34,10 @@ public interface AMD_pinned_memory { /** - * <strong>Official spec not released yet. Info from AMD developer forums:</strong><br/> - * Create a buffer object, bind it to the GL_EXTERNAL_VIRTUAL_MEMORY_AMD target and call glBufferData to 'allocate' space. - * When the driver sees you do this, it will use the pointer you supply directly rather than copying the data (that is, the - * GPU will access your application's memory). You can then use the buffer for other purposes such as a UBO, TBO or VBO by - * binding it to the appropriate targets. Synchronization is left to the application - make use of glFenceSync and glWaitSync. - * To release the memory, simply call glBufferData again on the buffer object on a different target, or delete the buffer - * object. Don't free the memory in the application until you've detached it from the buffer object or bad stuff will happen. - * <p/> - * Keep in mind that any memory you access will go over the PCIe bus which will be limited to 3-4 GB/s. This will work much - * better on Fusion systems (APUs). Theoretically, there isn't a limit to the amount of memory that can be pinned. However, - * when the OS pins memory, it removes it from the regular pagable pool and cannot swap it to disk (this is what pinning - * means). If you ask for too much, the OS will refuse to do it and the call will fail (the GL driver will return generate - * a GL_OUT_OF_MEMORY error). It is very likely that you'll hit this limit long before you run out of address space on the - * GPU, although in practice we do impose a moderate limit on the amount of pinned memory so as to not impact system stability - * and performance. + * Accepted by the <target> parameters of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, + * GetBufferParameteriv, GetBufferPointerv, MapBufferRange: */ - int GL_EXTERNAL_VIRTUAL_MEMORY_AMD = 0x9160; + int GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD = 0x9160; } \ 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: <jpi...@us...> - 2011-12-20 11:05:00
|
Revision: 3713 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3713&view=rev Author: jpilgrim Date: 2011-12-20 11:04:49 +0000 (Tue, 20 Dec 2011) Log Message: ----------- StandalonePublisher directly creates jars, no need for additional "jarring". - added main method to StandalonePublisher creating artifact.xml/jar and content.xml/jar from given (old) Eclise update site. - when compressed is set to true, artifact.jar and content.jar are created directly. Removed jar task in build script, as these are no longer necessary Modified Paths: -------------- trunk/LWJGL/eclipse-update/org.lwjgl.build/anttasks.jar trunk/LWJGL/eclipse-update/org.lwjgl.build/build-updatesite.xml trunk/LWJGL/eclipse-update/org.lwjgl.build/src/java/org/lwjgl/ant/StandalonePublisher.java Modified: trunk/LWJGL/eclipse-update/org.lwjgl.build/anttasks.jar =================================================================== (Binary files differ) Modified: trunk/LWJGL/eclipse-update/org.lwjgl.build/build-updatesite.xml =================================================================== --- trunk/LWJGL/eclipse-update/org.lwjgl.build/build-updatesite.xml 2011-12-15 19:00:59 UTC (rev 3712) +++ trunk/LWJGL/eclipse-update/org.lwjgl.build/build-updatesite.xml 2011-12-20 11:04:49 UTC (rev 3713) @@ -482,18 +482,7 @@ updatesitefolder="${eclipse.build.plugins}/org.lwjgl.updatesite" repositoryname="lwjgl.org" repositoryuri="${eclipse.updatesite}" /> - <jar destfile="${eclipse.build.plugins}/org.lwjgl.updatesite/content.jar"> - <fileset file="${eclipse.build.plugins}/org.lwjgl.updatesite/content.xml" /> - </jar> - <jar destfile="${eclipse.build.plugins}/org.lwjgl.updatesite/artifacts.jar"> - <fileset file="${eclipse.build.plugins}/org.lwjgl.updatesite/artifacts.xml" /> - </jar> - <delete> - <fileset file="${eclipse.build.plugins}/org.lwjgl.updatesite/content.xml" /> - <fileset file="${eclipse.build.plugins}/org.lwjgl.updatesite/artifacts.xml" /> - </delete> - - + <echo>Created Eclipse update site: ${eclipse.build.plugins}/org.lwjgl.updatesite</echo> </target> Modified: trunk/LWJGL/eclipse-update/org.lwjgl.build/src/java/org/lwjgl/ant/StandalonePublisher.java =================================================================== --- trunk/LWJGL/eclipse-update/org.lwjgl.build/src/java/org/lwjgl/ant/StandalonePublisher.java 2011-12-15 19:00:59 UTC (rev 3712) +++ trunk/LWJGL/eclipse-update/org.lwjgl.build/src/java/org/lwjgl/ant/StandalonePublisher.java 2011-12-20 11:04:49 UTC (rev 3713) @@ -11,15 +11,14 @@ package org.lwjgl.ant; -import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileFilter; import java.io.FileInputStream; +import java.io.FileOutputStream; import java.io.IOException; import java.io.StringWriter; import java.math.BigInteger; -import java.nio.ByteBuffer; import java.security.MessageDigest; import java.util.ArrayList; import java.util.Arrays; @@ -28,6 +27,7 @@ import java.util.Properties; import java.util.jar.JarEntry; import java.util.jar.JarInputStream; +import java.util.jar.JarOutputStream; import java.util.jar.Manifest; import javax.xml.parsers.DocumentBuilder; @@ -626,9 +626,48 @@ * @throws TransformerException */ protected void writeDocument(Document content, String targetFile) + throws Exception { + + if (compressed) { + String jarFileNameString = targetFile; + int pos = jarFileNameString.lastIndexOf('.'); + if (pos > 0) { + jarFileNameString = jarFileNameString.substring(0, pos) + ".jar"; + } else { + jarFileNameString += ".jar"; + } + + JarOutputStream target = new JarOutputStream(new FileOutputStream( + jarFileNameString)); + + pos = targetFile.lastIndexOf(File.separatorChar); + if (pos>0) { + targetFile = targetFile.substring(pos+1); + } + + JarEntry entry = new JarEntry(targetFile); + target.putNextEntry(entry); + + StreamResult sr = new StreamResult(target); + doWriteDocument(content, sr); + target.closeEntry(); + target.close(); + } else { + StreamResult sr = new StreamResult(new File(targetFile)); + doWriteDocument(content, sr); + } + } + + /** + * @param content + * @param sr + * @throws TransformerFactoryConfigurationError + * @throws TransformerConfigurationException + * @throws TransformerException + */ + private void doWriteDocument(Document content, StreamResult sr) throws TransformerFactoryConfigurationError, TransformerConfigurationException, TransformerException { - StreamResult sr = new StreamResult(new File(targetFile)); TransformerFactory tf = TransformerFactory.newInstance(); Transformer t = tf.newTransformer(); Properties oprops = new Properties(); @@ -1164,12 +1203,83 @@ */ public static void main(String[] args) throws Exception { StandalonePublisher publisher = new StandalonePublisher(); - publisher.updateSiteFolder = "build/plugins/org.lwjgl.updatesite"; - publisher.repositoryName = "org.lwjgl"; - publisher.repositoryURI = "http://lwjgl.org/update"; - publisher.execute(); + + if (!publisher.parseArgs(args)) { + help(); + } else { + // publisher.updateSiteFolder = "build/plugins/org.lwjgl.updatesite"; + // publisher.repositoryName = "org.lwjgl"; + // publisher.repositoryURI = "http://lwjgl.org/update"; + try { + publisher.execute(); + System.out.println("Successfull created p2 metadata in " + publisher.updateSiteFolder); + } catch (Exception ex) { + System.err.println("Error creating p2 metadata: "); + System.err.println(ex); + ex.printStackTrace(); + } + } } + /** + * + */ + static void help() { + System.out + .println("StandalonePublisher, (C) Jens von Pilgrim 2011 (EPL and BSD license)"); + System.out + .println("Ant task generating p2 metadata for old style Eclipse update site."); + System.out + .println("Limited support: only bundles and featues are supported, functionality only"); + System.out.println(" tested for LWJGL update site"); + System.out + .println("If run as command line tool, specify update site folder, repository name"); + System.out.println(" and URI as follows:"); + System.out + .println(" >java org.ljgl.ant.StandalonePublisher FOLDER NAME URI"); + System.out + .println("Example (supposed tool is called from updatesite folder):"); + System.out + .println(" >java org.lwjgl.ant.StandalonePublisher . org.lwjgl http://lwjgl.org/update"); + System.out + .println("If content.xml and artfact.xml should be compressed, add 'compress'"); + } + + /** + * @param i_args + * @return + */ + boolean parseArgs(String[] i_args) { + if (i_args == null || i_args.length < 3) { + return false; + } + updateSiteFolder = i_args[0]; + repositoryName = i_args[1]; + repositoryURI = i_args[2]; + + if (updateSiteFolder.isEmpty() || repositoryName.isEmpty() + || repositoryURI.isEmpty()) { + return false; + } + + File f = new File(updateSiteFolder); + if (!f.exists()) { + System.err.println("Update site folder does not exist."); + return false; + } + if (!(repositoryURI.startsWith("http") || repositoryURI + .startsWith("file"))) { + System.out + .println("Warning: Repository URI should start with protocol, e.g., http: or file:"); + } + + if (i_args.length == 4 && "compress".equalsIgnoreCase(i_args[3])) { + compressed = true; + } + + return true; + } + /** * {@inheritDoc} * @see org.apache.tools.ant.Task#execute() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpi...@us...> - 2011-12-15 19:01:05
|
Revision: 3712 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3712&view=rev Author: jpilgrim Date: 2011-12-15 19:00:59 +0000 (Thu, 15 Dec 2011) Log Message: ----------- Fixed problems in update site build. Update site is now build including Eclipse p2 metadata (content.jar and artifact.jar). These files are required by some tools, such as Tycho (a maven plugin making p2 update sites available as maven repositories, see http://eclipse.org/tycho). Modified Paths: -------------- trunk/LWJGL/eclipse-update/org.lwjgl.build/READ.ME trunk/LWJGL/eclipse-update/org.lwjgl.build/anttasks.jar trunk/LWJGL/eclipse-update/org.lwjgl.build/build-updatesite.xml trunk/LWJGL/eclipse-update/org.lwjgl.build/src/java/org/lwjgl/ant/StandalonePublisher.java Modified: trunk/LWJGL/eclipse-update/org.lwjgl.build/READ.ME =================================================================== --- trunk/LWJGL/eclipse-update/org.lwjgl.build/READ.ME 2011-12-15 17:40:06 UTC (rev 3711) +++ trunk/LWJGL/eclipse-update/org.lwjgl.build/READ.ME 2011-12-15 19:00:59 UTC (rev 3712) @@ -1,5 +1,6 @@ How to build the Eclipse update site ------------------------------------ +Author: Jens von Pilgrim <dev...@je...> Building the Eclipse update site is fully integrated into the main LWJGL build script. Here is how to build the update site: @@ -92,4 +93,6 @@ a plugin does not remove the plugins from the Eclipse installation. When the very same version is re-installed, instead of loading new files from the update site these pre-installed versions are reused! Since the date and time - is added to the plugin version number, this should cause no problems. \ No newline at end of file + is added to the plugin version number, this should cause no problems. +- default values for keystore, alias and passphrase are the same as in + lwjgl-applet Modified: trunk/LWJGL/eclipse-update/org.lwjgl.build/anttasks.jar =================================================================== (Binary files differ) Modified: trunk/LWJGL/eclipse-update/org.lwjgl.build/build-updatesite.xml =================================================================== --- trunk/LWJGL/eclipse-update/org.lwjgl.build/build-updatesite.xml 2011-12-15 17:40:06 UTC (rev 3711) +++ trunk/LWJGL/eclipse-update/org.lwjgl.build/build-updatesite.xml 2011-12-15 19:00:59 UTC (rev 3712) @@ -14,9 +14,9 @@ <dirname property="eclipse.antscript.basedir" file="${ant.file.eclipse.antscript}" /> - <property name="keystore" value="teststore" /> - <property name="alias" value="tester" /> - <property name="password" value="tester" /> + <property name="keystore" value="applet/lwjglkeystore" /> + <property name="alias" value="lwjgl" /> + <property name="password" value="123456" /> <property name="eclipse.updatesite" value="http://www.lwjgl.org/update/" /> <property name="eclipse.bundle.vendor" value="lwjgl.org" /> @@ -505,6 +505,7 @@ <echo>This plugin is to be called from main LWJGL build.xml file.</echo> <echo>It creates the update site, the result will be found in</echo> <echo>${eclipse.build.plugins}/org.lwjgl.updatesite</echo> + <echo>For more information, read READ.ME</echo> </target> </project> \ No newline at end of file Modified: trunk/LWJGL/eclipse-update/org.lwjgl.build/src/java/org/lwjgl/ant/StandalonePublisher.java =================================================================== --- trunk/LWJGL/eclipse-update/org.lwjgl.build/src/java/org/lwjgl/ant/StandalonePublisher.java 2011-12-15 17:40:06 UTC (rev 3711) +++ trunk/LWJGL/eclipse-update/org.lwjgl.build/src/java/org/lwjgl/ant/StandalonePublisher.java 2011-12-15 19:00:59 UTC (rev 3712) @@ -19,6 +19,7 @@ import java.io.IOException; import java.io.StringWriter; import java.math.BigInteger; +import java.nio.ByteBuffer; import java.security.MessageDigest; import java.util.ArrayList; import java.util.Arrays; @@ -308,7 +309,6 @@ Document doc = readXMLinJar(docBuilder, jis, jarEntry); info.doc = doc; - jis.closeEntry(); break; } } @@ -346,7 +346,6 @@ Document doc = readXMLinJar(docBuilder, jis, jarEntry); info.doc = doc; - jis.closeEntry(); break; } @@ -378,17 +377,13 @@ protected Document readXMLinJar(DocumentBuilder docBuilder, JarInputStream jis, JarEntry jarEntry) throws IOException, SAXException { - byte[] buffer = new byte[(int) jarEntry.getSize()]; - int count; - int pos = 0; - byte data[] = new byte[BUFFERSIZE]; - while ((count = jis.read(data, 0, BUFFERSIZE)) != -1) { - System.arraycopy(data, 0, buffer, pos, count); - pos += count; + try { + Document doc = docBuilder.parse(jis); + return doc; + } catch (IOException ex) { + System.err.println("Error reading jar entry " + jarEntry + ": ex"); + throw ex; } - ByteArrayInputStream bis = new ByteArrayInputStream(buffer); - Document doc = docBuilder.parse(bis); - return doc; } protected static void dump(Node doc) { @@ -1105,8 +1100,6 @@ } return element; } - - /** * @return the updateSiteFolder @@ -1176,20 +1169,20 @@ publisher.repositoryURI = "http://lwjgl.org/update"; publisher.execute(); } - + /** * {@inheritDoc} * @see org.apache.tools.ant.Task#execute() */ @Override public void execute() throws BuildException { - if (updateSiteFolder==null) { + if (updateSiteFolder == null) { throw new BuildException("attribute updateSiteFolder missing"); } - if (repositoryName==null) { + if (repositoryName == null) { throw new BuildException("attribute repositoryName missing"); } - if (repositoryURI==null) { + if (repositoryURI == null) { throw new BuildException("attribute repositoryURI missing"); } try { @@ -1197,9 +1190,7 @@ } catch (Exception ex) { throw new BuildException(ex); } - + } - - } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpi...@us...> - 2011-12-15 17:40:12
|
Revision: 3711 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3711&view=rev Author: jpilgrim Date: 2011-12-15 17:40:06 +0000 (Thu, 15 Dec 2011) Log Message: ----------- fixed typo in update site build script, added publisher task Modified Paths: -------------- trunk/LWJGL/eclipse-update/org.lwjgl.build/build-updatesite.xml Modified: trunk/LWJGL/eclipse-update/org.lwjgl.build/build-updatesite.xml =================================================================== --- trunk/LWJGL/eclipse-update/org.lwjgl.build/build-updatesite.xml 2011-12-15 17:32:08 UTC (rev 3710) +++ trunk/LWJGL/eclipse-update/org.lwjgl.build/build-updatesite.xml 2011-12-15 17:40:06 UTC (rev 3711) @@ -23,14 +23,19 @@ <taskdef name="packagelist" classname="org.lwjgl.ant.PackageList"> <classpath> - <pathelement location="eclipse-update/org.lwjgl.build/anttasks.jar" /> + <pathelement location="${eclipse.antscript.basedir}/anttasks.jar" /> </classpath> </taskdef> <taskdef name="normalizeversion" classname="org.lwjgl.ant.NormalizeVersion"> <classpath> - <pathelement location="eclipse-update/org.lwjgl.build/anttasks.jar" /> + <pathelement location="${eclipse.antscript.basedir}/anttasks.jar" /> </classpath> </taskdef> + <taskdef name="publishBundlesAndFeatures" classname="org.lwjgl.ant.StandalonePublisher"> + <classpath> + <pathelement location="${eclipse.antscript.basedir}/anttasks.jar" /> + </classpath> + </taskdef> <!-- properties imported from build-definitions.xml: <property name="lwjgl.temp" location="temp" /> @@ -61,7 +66,7 @@ <target name="eclipse-updatesite"> <mkdir dir="${lwjgl.temp}"/> <unzip dest="${lwjgl.temp}/eclipse" src="${lwjgl.dist}/lwjgl-${lwjgl.version}.zip" /> - <antcall target="eclipse-updatesite-simple"> + <antcall target="eclipse-updatesite-simple" /> </target> @@ -466,6 +471,29 @@ <signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl.info_${eclipse.normversion}.jar" keystore="${keystore}" alias="${alias}" storepass="${password}" /> <signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl.tools_${eclipse.normversion}.jar" keystore="${keystore}" alias="${alias}" storepass="${password}" /> + <!-- ******************************************************************* + * + * Publish plugins and feature + * content.xml/jar and artifacts.xml/jar, required for some newer featues + * and tools such as Eclipse Tycho. + * + ******************************************************************** --> + <publishBundlesAndFeatures compressed="true" + updatesitefolder="${eclipse.build.plugins}/org.lwjgl.updatesite" + repositoryname="lwjgl.org" + repositoryuri="${eclipse.updatesite}" /> + <jar destfile="${eclipse.build.plugins}/org.lwjgl.updatesite/content.jar"> + <fileset file="${eclipse.build.plugins}/org.lwjgl.updatesite/content.xml" /> + </jar> + <jar destfile="${eclipse.build.plugins}/org.lwjgl.updatesite/artifacts.jar"> + <fileset file="${eclipse.build.plugins}/org.lwjgl.updatesite/artifacts.xml" /> + </jar> + <delete> + <fileset file="${eclipse.build.plugins}/org.lwjgl.updatesite/content.xml" /> + <fileset file="${eclipse.build.plugins}/org.lwjgl.updatesite/artifacts.xml" /> + </delete> + + <echo>Created Eclipse update site: ${eclipse.build.plugins}/org.lwjgl.updatesite</echo> </target> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpi...@us...> - 2011-12-15 17:32:18
|
Revision: 3710 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3710&view=rev Author: jpilgrim Date: 2011-12-15 17:32:08 +0000 (Thu, 15 Dec 2011) Log Message: ----------- Added new ant task creating p2 metadata file for update site. Modified Paths: -------------- trunk/LWJGL/eclipse-update/org.lwjgl.build/anttasks.jar Added Paths: ----------- trunk/LWJGL/eclipse-update/org.lwjgl.build/src/java/org/lwjgl/ant/StandalonePublisher.java Modified: trunk/LWJGL/eclipse-update/org.lwjgl.build/anttasks.jar =================================================================== (Binary files differ) Added: trunk/LWJGL/eclipse-update/org.lwjgl.build/src/java/org/lwjgl/ant/StandalonePublisher.java =================================================================== --- trunk/LWJGL/eclipse-update/org.lwjgl.build/src/java/org/lwjgl/ant/StandalonePublisher.java (rev 0) +++ trunk/LWJGL/eclipse-update/org.lwjgl.build/src/java/org/lwjgl/ant/StandalonePublisher.java 2011-12-15 17:32:08 UTC (rev 3710) @@ -0,0 +1,1205 @@ +/******************************************************************************* + * Copyright (c) 2011 Jens von Pilgrim and others + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Jens von Pilgrim - initial implementation + ******************************************************************************/ + +package org.lwjgl.ant; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileFilter; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.StringWriter; +import java.math.BigInteger; +import java.security.MessageDigest; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Properties; +import java.util.jar.JarEntry; +import java.util.jar.JarInputStream; +import java.util.jar.Manifest; + +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.transform.OutputKeys; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerConfigurationException; +import javax.xml.transform.TransformerException; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.TransformerFactoryConfigurationError; +import javax.xml.transform.dom.DOMSource; +import javax.xml.transform.stream.StreamResult; +import javax.xml.xpath.XPath; +import javax.xml.xpath.XPathConstants; +import javax.xml.xpath.XPathExpression; +import javax.xml.xpath.XPathFactory; + +import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.Task; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.xml.sax.SAXException; + +/** + * Ant task creating p2 metadata files "content.xml" and "artifact.xml" based + * on existent plugins and features within an update site. + * <p> + * This task is a lighweight (and quick and dirty) version of the ant task + * "p2.publish.featuresAndBundles" + * provided by the Eclipse p2 plugin. However, it does not depend on any + * Eclipse related classes! + * </p> + * <p><b>Warning: </b>This task is only tested with the LWJGL update site, + * if you have a different update site, you better test it by comparing its + * output with the files created by the original p2 tools.</p> + * + * @author Jens von Pilgrim (dev...@je...) + * @since Dec 9, 2011 + * @see org.eclipse.equinox.p2.publisher.Publisher + */ +public class StandalonePublisher extends Task { + + public final static int BUFFERSIZE = 2048; + + public final static FileFilter JAR_FILTER = new FileFilter() { + + public boolean accept(File i_pathname) { + return i_pathname.isFile() && i_pathname.getName().endsWith(".jar"); + } + }; + + protected String updateSiteFolder; + + protected String repositoryName; + + protected String repositoryURI; + + protected Document currentDoc; + + protected boolean compressed = false; + + protected final XPath xpath = XPathFactory.newInstance().newXPath(); + + public class FeatureInfo { + + public String getClassifier() { + return "org.eclipse.update.feature"; + } + + public String getContentType() { + return "application/zip"; + } + + public String getRootElementName() { + return "feature"; + } + + public Document doc; + + public int size; + + public File jarFile; + + public String xpath(String path) { + if (path.startsWith("/")) + return StandalonePublisher.this.xpath(doc, path); + else + return StandalonePublisher.this.xpath(doc, "//" + + getRootElementName() + "/" + path); + } + + public List<Node> xpathNods(String path) { + try { + XPathExpression expression = xpath.compile(path); + NodeList nodes = (NodeList) expression.evaluate(doc, + XPathConstants.NODESET); + + List<Node> list = new ArrayList<Node>(nodes.getLength()); + for (int i = 0; i < nodes.getLength(); i++) { + list.add(nodes.item(i)); + } + + return list; + } catch (Exception ex) { + System.err.println(ex); + return Collections.emptyList(); + } + } + + /** + * @return + */ + public String getID() { + return xpath("@id"); + } + + /** + * @return + */ + public String getVersion() { + return xpath("@version"); + } + } + + public class BundleInfo extends FeatureInfo { + + @Override + public String getID() { + return mfval("Bundle-SymbolicName"); + } + + @Override + public String getVersion() { + return mfval("Bundle-Version"); + } + + @Override + public String getClassifier() { + return "osgi.bundle"; + }; + + @Override + public String getContentType() { + return null; + } + + @Override + public String getRootElementName() { + return "plugin"; + } + + public Manifest manifest; + + public String mf(String attrib) { + return manifest.getMainAttributes().getValue(attrib); + } + + public String mfval(String attrib) { + return mfval(attrib, ""); + } + + /** + * @param i_value + * @param i_string + * @return + */ + public String mfval(String attrib, String key) { + String value = manifest.getMainAttributes().getValue(attrib); + if (value == null || value.isEmpty()) + return ""; + for (String s : value.split(";")) { + + if ("".equals(key)) + return s; + int l = 2; + int p = s.indexOf(":="); + if (p < 0) { + p = s.indexOf("="); + l = 1; + } + if (p > 0) { + String k = s.substring(0, p); + String v = s.substring(p + l); + if (key.equals(k)) { + v = v.trim(); + v = v.replaceAll("^\"([^\"]*)\"$", "\\1"); + return v; + } + } + + } + + return ""; + } + + public String valIndex(String[] attribValues, int index, String key) { + + if (attribValues.length <= index) + return ""; + String value = attribValues[index]; + for (String s : value.split(";")) { + + if ("".equals(key)) + return s; + int l = 2; + int p = s.indexOf(":="); + if (p < 0) { + p = s.indexOf("="); + l = 1; + } + if (p > 0) { + String k = s.substring(0, p); + String v = s.substring(p + l); + if (key.equals(k)) { + v = v.trim(); + v = v.replaceAll("^\"\\s*", ""); + v = v.replaceAll("\\s*\"$", ""); + return v; + } + } + + } + + return ""; + } + + public String mfval(String attrib, String key, String def) { + String v = mfval(attrib, key); + if (v == null || v.isEmpty()) + return def; + return v; + } + + public String valIndex(String[] attribValues, int index, String key, + String def) { + String v = valIndex(attribValues, index, key); + if (v == null || v.isEmpty()) + return def; + return v; + } + } + + protected String xpath(Node node, String path) { + try { + XPathExpression expression = xpath.compile(path); + NodeList nodes = (NodeList) expression.evaluate(node, + XPathConstants.NODESET); + String s = nodes.item(0).getNodeValue(); + s = s.replaceAll("^\\s+", ""); + s = s.replaceAll("\\s+$", ""); + return s; + } catch (Exception ex) { + System.err.println(ex); + return null; + } + } + + protected FeatureInfo readFeature(File featureArchive) + throws ParserConfigurationException { + + FeatureInfo info = new FeatureInfo(); + info.jarFile = featureArchive; + info.size = (int) featureArchive.length(); + + DocumentBuilder docBuilder = DocumentBuilderFactory.newInstance() + .newDocumentBuilder(); + + JarInputStream jis = null; + try { + jis = new JarInputStream(new FileInputStream(featureArchive)); + + JarEntry jarEntry; + while ((jarEntry = jis.getNextJarEntry()) != null) { + if (!jarEntry.isDirectory() + && "feature.xml".equals(jarEntry.getName())) { + + Document doc = readXMLinJar(docBuilder, jis, jarEntry); + info.doc = doc; + jis.closeEntry(); + break; + } + } + + } catch (Exception ex) { + ex.printStackTrace(); + } finally { + if (jis != null) + try { + jis.close(); + } catch (IOException ex) { + ex.printStackTrace(); + } + } + return info; + + } + + protected BundleInfo readBundle(File location) + throws ParserConfigurationException { + BundleInfo info = new BundleInfo(); + info.jarFile = location; + info.size = (int) location.length(); + DocumentBuilder docBuilder = DocumentBuilderFactory.newInstance() + .newDocumentBuilder(); + JarInputStream jis = null; + try { + jis = new JarInputStream(new FileInputStream(location)); + info.manifest = jis.getManifest(); + + JarEntry jarEntry; + while ((jarEntry = jis.getNextJarEntry()) != null) { + if (!jarEntry.isDirectory() + && "plugin.xml".equals(jarEntry.getName())) { + + Document doc = readXMLinJar(docBuilder, jis, jarEntry); + info.doc = doc; + jis.closeEntry(); + break; + } + + } + + } catch (Exception ex) { + ex.printStackTrace(); + } finally { + if (jis != null) + try { + jis.close(); + } catch (IOException ex) { + ex.printStackTrace(); + } + } + + return info; + + } + + /** + * @param docBuilder + * @param jis + * @param jarEntry + * @return + * @throws IOException + * @throws SAXException + */ + protected Document readXMLinJar(DocumentBuilder docBuilder, + JarInputStream jis, JarEntry jarEntry) throws IOException, + SAXException { + byte[] buffer = new byte[(int) jarEntry.getSize()]; + int count; + int pos = 0; + byte data[] = new byte[BUFFERSIZE]; + while ((count = jis.read(data, 0, BUFFERSIZE)) != -1) { + System.arraycopy(data, 0, buffer, pos, count); + pos += count; + } + ByteArrayInputStream bis = new ByteArrayInputStream(buffer); + Document doc = docBuilder.parse(bis); + return doc; + } + + protected static void dump(Node doc) { + System.out.println(doDump(doc)); + } + + protected static String doDump(Node doc) { + StringWriter stringWriter = new StringWriter(); + StreamResult sr = new StreamResult(stringWriter); + TransformerFactory tf = TransformerFactory.newInstance(); + Transformer t = null; + Properties oprops = new Properties(); + oprops.put(OutputKeys.METHOD, "xml"); + oprops.put(OutputKeys.STANDALONE, "yes"); + oprops.put(OutputKeys.INDENT, "yes"); + try { + t = tf.newTransformer(); + t.setOutputProperties(oprops); + t.transform(new DOMSource(doc), sr); + } catch (Exception e) { + } + return stringWriter.toString(); + + } + + protected static void dump(Manifest manifest) { + System.out.println(doDump(manifest)); + } + + protected static String doDump(Manifest manifest) { + ByteArrayOutputStream os = new ByteArrayOutputStream(); + try { + manifest.write(os); + return os.toString(); + } catch (IOException ex) { + ex.printStackTrace(); + return ""; + } + } + + protected static String escapeToXMLAttrib(String s) { + return s.replaceAll("\r", "").replaceAll("\n\\s+", ""); + //.replaceAll("\"", """); + } + + public void doExecute() throws Exception { + File f = new File(updateSiteFolder + File.separator + "features"); + + File[] locations = f.listFiles(JAR_FILTER); + FeatureInfo[] featureInfos = new FeatureInfo[locations.length]; + for (int i = 0; i < locations.length; i++) { + featureInfos[i] = readFeature(locations[i]); + } + + f = new File(updateSiteFolder + File.separator + "plugins"); + locations = f.listFiles(JAR_FILTER); + BundleInfo[] bundleInfos = new BundleInfo[locations.length]; + for (int i = 0; i < locations.length; i++) { + bundleInfos[i] = readBundle(locations[i]); + } + + writeContent(featureInfos, bundleInfos); + writeArtifacts(featureInfos, bundleInfos); + + } + + /** + * @param i_featureInfos + * @param i_bundleInfos + * @throws Exception + */ + protected void writeContent(FeatureInfo[] i_featureInfos, + BundleInfo[] i_bundleInfos) throws Exception { + + DocumentBuilder docBuilder = DocumentBuilderFactory.newInstance() + .newDocumentBuilder(); + // <?xml version='1.0' encoding='UTF-8'?> + Document content = docBuilder.newDocument(); + content.setXmlStandalone(false); + content.setTextContent(repositoryName); + currentDoc = content; + // <?metadataRepository version='1.1.0'?> + + content.appendChild(content.createProcessingInstruction( + "metadataRepository", "version='1.1.0'")); + Element repository = addElement( + content, + "repository", // + "name", + repositoryName, // + "type", + "org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository", // + "version", "1"); + + addList(repository, + "properties", + createElement("property", "name", "p2.timestamp", "value", + String.valueOf(System.currentTimeMillis())), + createElement("property", "name", "p2.compressed", "value", + String.valueOf(compressed))); + + addList(repository, + "references", + createElement("repository", "uri", repositoryURI, "type", "0", + "options", "0")); + + List<Element> units = new ArrayList<Element>(); + + for (FeatureInfo featureInfo : i_featureInfos) { + units.add(createUnitForFeature(featureInfo)); + units.add(createUnitForFeatureGroups(featureInfo)); + } + for (BundleInfo bundleInfo : i_bundleInfos) { + units.add(createUnitForBundle(bundleInfo)); + } + addList(repository, "units", units); + + //dump(content); + + writeDocument(content, updateSiteFolder + File.separator + + "content.xml"); + + currentDoc = null; + } + + /** + * @param i_featureInfos + * @param i_bundleInfos + * @throws Exception + */ + protected void writeArtifacts(FeatureInfo[] i_featureInfos, + BundleInfo[] i_bundleInfos) throws Exception { + DocumentBuilder docBuilder = DocumentBuilderFactory.newInstance() + .newDocumentBuilder(); + // <?xml version='1.0' encoding='UTF-8'?> + Document artifact = docBuilder.newDocument(); + artifact.setXmlStandalone(false); + currentDoc = artifact; + + // <?metadataRepository version='1.1.0'?> + + artifact.appendChild(artifact.createProcessingInstruction( + "artifactRepository", "version='1.1.0'")); + Element repository = addElement(artifact, + "repository", // + "name", + repositoryName + " - artifacts", // + "type", + "org.eclipse.equinox.p2.artifact.repository.simpleRepository", // + "version", "1"); + + addList(repository, + "properties", + createElement("property", "name", "p2.timestamp", "value", + String.valueOf(System.currentTimeMillis())), + createElement("property", "name", "p2.compressed", "value", + String.valueOf(compressed))); + addList(repository, + "mappings", + createElement("rule", "filter", "(& (classifier=osgi.bundle))", + "output", "${repoUrl}/plugins/${id}_${version}.jar"), + createElement("rule", "filter", "(& (classifier=binary))", + "output", "${repoUrl}/binary/${id}_${version}"), + createElement("rule", "filter", + "(& (classifier=org.eclipse.update.feature))", + "output", "${repoUrl}/features/${id}_${version}.jar")); + + List<Element> artifacts = new ArrayList<Element>(); + + for (BundleInfo bundleInfo : i_bundleInfos) { + artifacts.add(createArtifact(bundleInfo)); + } + for (FeatureInfo featureInfo : i_featureInfos) { + artifacts.add(createArtifact(featureInfo)); + } + addList(repository, "artifacts", artifacts); + + //dump(artifact); + + writeDocument(artifact, updateSiteFolder + File.separator + + "artifacts.xml"); + + currentDoc = null; + + } + + /** + * @param i_featureInfo + * @return + * @throws Exception + */ + protected Element createArtifact(FeatureInfo info) throws Exception { + Element artifact = createElement("artifact", "classifier", + info.getClassifier(), "id", info.getID(), "version", + info.getVersion()); + + List<Element> properties = new ArrayList<Element>(); + properties.add(createElement("property", "name", "artifact.size", + "value", String.valueOf(info.jarFile.length()))); + properties.add(createElement("property", "name", "download.size", + "value", String.valueOf(info.jarFile.length()))); + properties.add(createElement("property", "name", "download.md5", + "value", String.valueOf(md5(info.jarFile)))); + String contentType = info.getContentType(); + if (contentType != null && !contentType.isEmpty()) { + properties.add(createElement("property", "name", + "download.contentType", "value", contentType)); + } + addList(artifact, "properties", properties); + + return artifact; + } + + /** + * @param i_jarFile + * @return + * @throws Exception + */ + protected String md5(File file) throws Exception { + + MessageDigest md = MessageDigest.getInstance("MD5"); + FileInputStream fis = new FileInputStream(file); + byte data[] = new byte[BUFFERSIZE]; + int count; + while ((count = fis.read(data, 0, BUFFERSIZE)) != -1) { + md.update(data, 0, count); + } + byte[] digest = md.digest(); + BigInteger bigInt = new BigInteger(1, digest); + String hashtext = bigInt.toString(16); + + return hashtext; + + } + + /** + * @param content + * @throws TransformerFactoryConfigurationError + * @throws TransformerConfigurationException + * @throws TransformerException + */ + protected void writeDocument(Document content, String targetFile) + throws TransformerFactoryConfigurationError, + TransformerConfigurationException, TransformerException { + StreamResult sr = new StreamResult(new File(targetFile)); + TransformerFactory tf = TransformerFactory.newInstance(); + Transformer t = tf.newTransformer(); + Properties oprops = new Properties(); + oprops.put(OutputKeys.METHOD, "xml"); + oprops.put(OutputKeys.INDENT, "yes"); + t.setOutputProperties(oprops); + t.transform(new DOMSource(content), sr); + } + + /** + * @param i_site + * @return + */ + protected Element createUnitForFeatureGroups(FeatureInfo info) { + String version = info.xpath("@version"); + // <unit id='org.lwjgl.sdk.feature.group' version='2.8.2.v20111128-1752' singleton='false'> + Element unit = createElement("unit", // + "id", info.xpath("@id") + ".feature.group", // + "version", version, "singleton", "false"); + + // <update id='org.lwjgl.sdk.feature.group' range='[0.0.0,2.8.2.v20111128-1752)' severity='0'/> + addElement(unit, "update", "id", info.xpath("@id") + ".feature.group", + "range", "[0.0.0," + version + ")", "severity", "0"); + + /* <properties size='5'> + <property name='org.eclipse.equinox.p2.name' value='Lightweight Java Game Library (LWJGL) SDK'/> + <property name='org.eclipse.equinox.p2.description' value='This feature provides easy access to the
Lightweight Java Game Library (LWJGL) SDK
for Eclipse plugin developers. It includes
- source code
- javadoc
- info plugin (Test and Info View)
- library tool (Library configuration for plain Java development)'/> + <property name='org.eclipse.equinox.p2.description.url' value='http://lwjgl.org'/> + <property name='org.eclipse.equinox.p2.provider' value='Lightweight Java Game Library Project'/> + <property name='org.eclipse.equinox.p2.type.group' value='true'/> + </properties> + */ + addList(unit, + "properties", + createElement("property", "name", + "org.eclipse.equinox.p2.name", "value", + info.xpath("@label")), + createElement("property", "name", + "org.eclipse.equinox.p2.description", "value", + info.xpath("description/text()")), + createElement("property", "name", + "org.eclipse.equinox.p2.description.url", "value", + info.xpath("description/@url")), + createElement("property", "name", + "org.eclipse.equinox.p2.provider", "value", + info.xpath("@provider-name")), + createElement("property", "name", + "org.eclipse.equinox.p2.type.group", "value", "true")); + + /* + <provides size='1'> + <provided namespace='org.eclipse.equinox.p2.iu' name='org.lwjgl.sdk.feature.group' version='2.8.2.v20111128-1752'/> + </provides> + */ + addList(unit, + "provides", + createElement("provided", "namespace", + "org.eclipse.equinox.p2.iu", "name", info.xpath("@id") + + ".feature.group", "version", version)); + /* + <requires size='6'> + <required namespace='org.eclipse.equinox.p2.iu' name='org.lwjgl.feature.group' range='0.0.0'/> + */ + List<Element> requires = new ArrayList<Element>(); + for (Node n : info.xpathNods("//feature//import")) { + requires.add(createElement("required", "namespace", + "org.eclipse.equinox.p2.iu", "name", xpath(n, "@feature") + + ".feature.group", "range", + "[" + xpath(n, "@version") + "," + xpath(n, "@version") + + "]")); + } + // <required namespace='org.eclipse.equinox.p2.iu' name='org.lwjgl.doc' range='[2.8.2.v20111128-1752,2.8.2.v20111128-1752]'/> + for (Node n : info.xpathNods("//feature//plugin")) { + requires.add(createElement("required", "namespace", + "org.eclipse.equinox.p2.iu", "name", xpath(n, "@id"), + "range", + "[" + xpath(n, "@version") + "," + xpath(n, "@version") + + "]")); + } + /* + <required namespace='org.eclipse.equinox.p2.iu' name='org.lwjgl.sdk.feature.jar' range='[2.8.2.v20111128-1752,2.8.2.v20111128-1752]'> + <filter> + (org.eclipse.update.install.features=true) + </filter> + </required> + */ + Element reqFeature = createElement("required", "namespace", + "org.eclipse.equinox.p2.iu", "name", info.xpath("@id") + + ".feature.jar", "range", "[" + version + "," + + version + "]"); + addElement(reqFeature, "filter").setTextContent( + "(org.eclipse.update.install.features=true)"); + requires.add(reqFeature); + addList(unit, "requires", requires); + + // <touchpoint id='null' version='0.0.0'/> + addElement(unit, "touchpoint", "id", "null", "version", "0.0.0"); + + /* + <licenses size='1'> + <license uri='http://lwjgl.org/license.php' url='http://lwjgl.org/license.php'> + Copyright (c) 2002-2011 Lightweight Java Game Library 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 'Light Weight Java Game Library' 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. + </license> + </licenses> + */ + List<Element> list = new ArrayList<Element>(); + for (Node n : info.xpathNods("//feature//license")) { + Element l = createElement("license", "uri", xpath(n, "@url"), + "url", xpath(n, "@url")); + l.setTextContent(escapeToXMLAttrib(xpath(n, "text()"))); + list.add(l); + } + addList(unit, "licenses", list); + + /* + <copyright uri='http://lwjgl.org/credits.php' url='http://lwjgl.org/credits.php'> + Copyright (c) 2002-2011 Lightweight Java Game Library Project
All rights reserved.

LWJGL is available under a BSD license, which means it's open
source and freely available at no charge.

Eclipse feature and plugins, plugin specific code made available under a 
BSD license and Eclipse Public License (EPL). + </copyright> + </unit> + */ + Element l = createElement("copyright", "uri", + info.xpath("copyright/@url"), "url", + info.xpath("copyright/@url")); + l.setTextContent(escapeToXMLAttrib(info.xpath("copyright/text()"))); + unit.appendChild(l); + + return unit; + } + + /** + * @param i_bundleInfo + * @return + * @throws Exception + */ + protected Element createUnitForFeature(FeatureInfo info) throws Exception { + + String version = info.xpath("@version"); + + // <unit id='org.lwjgl.sdk.feature.jar' version='2.8.2.v20111128-1752'> + Element unit = createElement("unit", // + "id", info.xpath("@id") + ".feature.jar", // + "version", version); + + /* <properties size='4'> + <property name='org.eclipse.equinox.p2.name' value='Lightweight Java Game Library (LWJGL) SDK'/> + <property name='org.eclipse.equinox.p2.description' value='This feature provides easy access to the
Lightweight Java Game Library (LWJGL) SDK
for Eclipse plugin developers. It includes
- source code
- javadoc
- info plugin (Test and Info View)
- library tool (Library configuration for plain Java development)'/> + <property name='org.eclipse.equinox.p2.description.url' value='http://lwjgl.org'/> + <property name='org.eclipse.equinox.p2.provider' value='Lightweight Java Game Library Project'/> + </properties> + */ + addList(unit, + "properties", + createElement("property", "name", + "org.eclipse.equinox.p2.name", "value", + info.xpath("@label")), + createElement("property", "name", + "org.eclipse.equinox.p2.description", "value", + info.xpath("description/text()")), + createElement("property", "name", + "org.eclipse.equinox.p2.description.url", "value", + info.xpath("description/@url")), + createElement("property", "name", + "org.eclipse.equinox.p2.provider", "value", + info.xpath("@provider-name"))); + /* + <provides size='3'> + <provided namespace='org.eclipse.equinox.p2.iu' name='org.lwjgl.sdk.feature.jar' version='2.8.2.v20111128-1752'/> + <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='feature' version='1.0.0'/> + <provided namespace='org.eclipse.update.feature' name='org.lwjgl.sdk' version='2.8.2.v20111128-1752'/> + </provides> + */ + addList(unit, + "provides", + createElement("provided", "namespace", + "org.eclipse.equinox.p2.iu", "name", info.xpath("@id") + + ".feature.jar", "version", version), + createElement("provided", "namespace", + "org.eclipse.equinox.p2.eclipse.type", "name", + "feature", "version", "1.0.0"), + createElement("provided", "namespace", + "org.eclipse.update.feature", "name", + info.xpath("@id"), "version", version)); + /* + <filter> + (org.eclipse.update.install.features=true) + </filter> + */ + addElement(unit, "filter").setTextContent( + "(org.eclipse.update.install.features=true)"); + + /* + <artifacts size='1'> + <artifact classifier='org.eclipse.update.feature' id='org.lwjgl.sdk' version='2.8.2.v20111128-1752'/> + </artifacts> + */ + addList(unit, + "artifacts", + createElement("artifact", "classifier", + "org.eclipse.update.feature", "id", info.xpath("@id"), + "version", version)); + + // <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/> + addElement(unit, "touchpoint", "id", "org.eclipse.equinox.p2.osgi", + "version", "1.0.0"); + + /* + <touchpointData size='1'> + <instructions size='1'> + <instruction key='zipped'> + true + </instruction> + </instructions> + </touchpointData> + */ + Element valueZipped = createElement("instruction", "key", "zipped"); + valueZipped.setTextContent("true"); + addList(unit, "touchpointData", createList("instructions", valueZipped)); + + /* + <licenses size='1'> + <license uri='http://lwjgl.org/license.php' url='http://lwjgl.org/license.php'> + Copyright (c) 2002-2011 Lightweight Java Game Library 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 'Light Weight Java Game Library' 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. + </license> + </licenses> + */ + List<Element> list = new ArrayList<Element>(); + for (Node n : info.xpathNods("//feature//license")) { + Element l = createElement("license", "uri", xpath(n, "@url"), + "url", xpath(n, "@url")); + l.setTextContent(escapeToXMLAttrib(xpath(n, "text()"))); + list.add(l); + } + addList(unit, "licenses", list); + + /* + <copyright uri='http://lwjgl.org/credits.php' url='http://lwjgl.org/credits.php'> + Copyright (c) 2002-2011 Lightweight Java Game Library Project
All rights reserved.

LWJGL is available under a BSD license, which means it's open
source and freely available at no charge.

Eclipse feature and plugins, plugin specific code made available under a 
BSD license and Eclipse Public License (EPL). + </copyright> + </unit> + */ + Element l = createElement("copyright", "uri", + info.xpath("copyright/@url"), "url", + info.xpath("copyright/@url")); + l.setTextContent(escapeToXMLAttrib(info.xpath("copyright/text()"))); + unit.appendChild(l); + + return unit; + } + + /** + * @param i_bundleInfo + * @return + */ + protected Element createUnitForBundle(BundleInfo info) { + + String version = info.mfval("Bundle-Version"); + /* + <unit id='org.lwjgl' version='2.8.2.v20111128-1752' singleton='false'> + */ + Element unit = createElement("unit", "id", + info.mfval("Bundle-SymbolicName"), "version", version, + "singleton", + info.mfval("Bundle-SymbolicName", "singleton", "false")); + + // <update id='org.lwjgl' range='[0.0.0,2.8.2.v20111128-1752)' severity='0'/> + addElement(unit, "update", "id", info.mfval("Bundle-SymbolicName"), + "range", "[0.0.0," + version + ")", "severity", "0"); + + /* + <properties size='2'> + <property name='org.eclipse.equinox.p2.name' value='LWJGL Lightweight Java Game Library'/> + <property name='org.eclipse.equinox.p2.provider' value='lwjgl.org'/> + </properties> + */ + List<Element> properties = new ArrayList<Element>(); + mf2properties(info, properties, "Bundle-Name", + "org.eclipse.equinox.p2.name", "Bundle-Vendor", + "org.eclipse.equinox.p2.provider", "Bundle-Localization", + "org.eclipse.equinox.p2.bundle.localization"); + addList(unit, "properties", properties); + + /* + <provides size='32'> + <provided namespace='org.eclipse.equinox.p2.iu' name='org.lwjgl' version='2.8.2.v20111128-1752'/> + <provided namespace='osgi.bundle' name='org.lwjgl' version='2.8.2.v20111128-1752'/> + <provided namespace='org.eclipse.equinox.p2.eclipse.type' name='bundle' version='1.0.0'/> + + <provided namespace='java.package' name='org.lwjgl.eclipse' version='0.0.0'/> + ... + + </provides> + */ + + List<Element> elements = new ArrayList<Element>(); + elements.add(createElement("provided", "namespace", + "org.eclipse.equinox.p2.iu", "name", + info.mfval("Bundle-SymbolicName"), "version", version)); + elements.add(createElement("provided", "namespace", "osgi.bundle", + "name", info.mfval("Bundle-SymbolicName"), "version", version)); + elements.add(createElement("provided", "namespace", + "org.eclipse.equinox.p2.eclipse.type", "name", "bundle", + "version", "1.0.0")); + + String expPackages = info.mf("Export-Package"); + if (expPackages != null) { + String[] ps = expPackages.split("\\s*,\\s*"); + for (int i = 0; i < ps.length; i++) { + String name = info.valIndex(ps, i, ""); + elements.add(createElement("provided", "namespace", + "java.package", "name", name, "version", "0.0.0")); + } + } + addList(unit, "provides", elements); + + /* + <requires size='2'> + <required namespace='osgi.bundle' name='org.eclipse.ui' range='0.0.0'/> + <required namespace='osgi.bundle' name='org.eclipse.core.runtime' range='0.0.0'/> + </requires> + */ + /* + Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.core.resources;bundle-version="3.4.0", + org.eclipse.jdt.core;bundle-version="3.4.0", + org.eclipse.jdt.ui;bundle-version="3.4.0", + org.eclipse.jdt.launching;bundle-version="3.4.0", + org.lwjgl;bundle-version="2.0.0" + */ + String reqBundles = info.mf("Require-Bundle"); + if (reqBundles != null) { + elements = new ArrayList<Element>(); + String[] ps = reqBundles.split("\\s*,\\s*"); + for (int i = 0; i < ps.length; i++) { + String name = info.valIndex(ps, i, ""); + String range = info.valIndex(ps, i, "bundle-version"); + if (range == null || range.isEmpty()) + range = "0.0.0"; + elements.add(createElement("required", "namespace", + "osgi.bundle", "name", name, "range", range)); + } + addList(unit, "requires", elements); + } + + /* + <artifacts size='1'> + <artifact classifier='osgi.bundle' id='org.lwjgl' version='2.8.2.v20111128-1752'/> + </artifacts> + */ + addList(unit, + "artifacts", + createElement("artifact", "classifier", "osgi.bundle", "id", + info.mfval("Bundle-SymbolicName"), "version", version)); + + /* + <touchpoint id='org.eclipse.equinox.p2.osgi' version='1.0.0'/> + */ + addElement(unit, "touchpoint", "id", "org.eclipse.equinox.p2.osgi", + "version", "1.0.0"); + + /* + <touchpointData size='1'> + <instructions size='2'> + <instruction key='manifest'> + Bundle-Name: LWJGL Lightweight Java Game Library
Bundle-ClassPath: .,AppleJavaExtensions.jar,asm-debug-all.jar,jinput.jar,lwjgl.jar,lwjgl_util.jar,lwjgl_util_applet.jar,lzma.jar
Bundle-Version: 2.8.2.v20111128-1752
Bundle-Activator: org.lwjgl.Activator
Created-By: 20.1-b02-384 (Apple Inc.)
Bundle-Vendor: lwjgl.org
Require-Bundle: org.eclipse.ui,org.eclipse.core.runtime
Export-Package: org.lwjgl.eclipse,LZMA,com.apple.eawt,com.apple.eio,net.java.games.input,net.java.games.util,net.java.games.util.plugins,org.lwjgl,org.lwjgl.input,org.lwjgl.openal,org.lwjgl.opencl,org.lwjgl.opencl.api,org.lwjgl.opengl,org.lwjgl.opengles,org.lwjgl.util,org.lwjgl.util.applet,org.lwjgl.util.glu,org.lwjgl.util.glu.tessellation,org.lwjgl.util.input,org.lwjgl.util.jinput,org.lwjgl.util.mapped,org.lwjgl.util.vector,org.objectweb.asm,org.objectweb.asm.commons,org.objectweb.asm.signature,org.objectweb.asm.tree,org.objectweb.asm.tree.analysis,org.objectweb.asm.util,org.objectweb.asm.xml
Bundle-SymbolicName: org.lwjgl
Ant-Version: Apache Ant 1.7.1
Manifest-Version: 1.0
Bundle-ActivationPolicy: lazy
Bundle-ManifestVersion: 2
Bundle-RequiredExecutionEnvironment: J2SE-1.5
 + </instruction> + <instruction key='zipped'> + true + </instruction> + </instructions> + </touchpointData> + */ + /* + <touchpointData size='1'> + <instructions size='1'> + <instruction key='zipped'> + true + </instruction> + </instructions> + </touchpointData> + */ + Element valueZipped = createElement("instruction", "key", "zipped"); + valueZipped.setTextContent("true"); + Element manifest = createElement("instruction", "key", "manifest"); + manifest.setTextContent(escapeToXMLAttrib(doDump(info.manifest))); + addList(unit, "touchpointData", + createList("instructions", manifest, valueZipped)); + + return unit; + } + + /** + * + */ + protected void mf2properties(BundleInfo info, List<Element> o_properties, + String... propName) { + for (int i = 0; i < propName.length; i += 2) { + String value = info.mfval(propName[i]); + if (value != null && !value.isEmpty()) { + o_properties.add(createElement("property", "name", + propName[i + 1], "value", value)); + } + } + } + + /** + * @param i_content + * @param i_string + * @param i_createElement + * @param i_createElement2 + */ + protected Element addList(Element parent, String listName, + Element... content) { + return addList(parent, listName, Arrays.asList(content)); + } + + /** + * @param i_content + * @param i_string + * @param i_createElement + * @param i_createElement2 + */ + protected Element addList(Element parent, String listName, + List<Element> content) { + Element list = createList(listName, content); + parent.appendChild(list); + return list; + } + + protected Element createList(String listName, Element... content) { + return createList(listName, Arrays.asList(content)); + } + + /** + * @param listName + * @param content + * @return + */ + protected Element createList(String listName, List<Element> content) { + Element list = createElement(listName, "size", + String.valueOf(content.size())); + for (Element e : content) { + list.appendChild(e); + } + return list; + } + + /** + * @param i_content + * @param i_repository + * @return + */ + protected Element addElement(Node parent, String name, + String... propName_Values) { + + Element child = createElement(name, propName_Values); + parent.appendChild(child); + return child; + } + + protected Element createElement(String name, String... propName_Values) { + if (propName_Values.length % 2 != 0) { + throw new IllegalArgumentException("expected key values pairs"); + } + Element element = currentDoc.createElement(name); + for (int i = 0; i < propName_Values.length; i += 2) { + if (propName_Values[i + 1] != null) + element.setAttribute(propName_Values[i], propName_Values[i + 1]); + } + return element; + } + + + + /** + * @return the updateSiteFolder + */ + public String getUpdateSiteFolder() { + return updateSiteFolder; + } + + /** + * @param i_updateSiteFolder the updateSiteFolder to set + */ + public void setUpdateSiteFolder(String i_updateSiteFolder) { + updateSiteFolder = i_updateSiteFolder; + } + + /** + * @return the repositoryName + */ + public String getRepositoryName() { + return repositoryName; + } + + /** + * @param i_repositoryName the repositoryName to set + */ + public void setRepositoryName(String i_repositoryName) { + repositoryName = i_repositoryName; + } + + /** + * @return the repositoryURI + */ + public String getRepositoryURI() { + return repositoryURI; + } + + /** + * @param i_repositoryURI the repositoryURI to set + */ + public void setRepositoryURI(String i_repositoryURI) { + repositoryURI = i_repositoryURI; + } + + /** + * @return the compressed + */ + public boolean isCompressed() { + return compressed; + } + + /** + * @param i_compressed the compressed to set + */ + public void setCompressed(boolean i_compressed) { + compressed = i_compressed; + } + + /** + * Basically for testing. + * @param args + * @throws Exception + */ + public static void main(String[] args) throws Exception { + StandalonePublisher publisher = new StandalonePublisher(); + publisher.updateSiteFolder = "build/plugins/org.lwjgl.updatesite"; + publisher.repositoryName = "org.lwjgl"; + publisher.repositoryURI = "http://lwjgl.org/update"; + publisher.execute(); + } + + /** + * {@inheritDoc} + * @see org.apache.tools.ant.Task#execute() + */ + @Override + public void execute() throws BuildException { + if (updateSiteFolder==null) { + throw new BuildException("attribute updateSiteFolder missing"); + } + if (repositoryName==null) { + throw new BuildException("attribute repositoryName missing"); + } + if (repositoryURI==null) { + throw new BuildException("attribute repositoryURI missing"); + } + try { + doExecute(); + } catch (Exception ex) { + throw new BuildException(ex); + } + + } + + + +} Property changes on: trunk/LWJGL/eclipse-update/org.lwjgl.build/src/java/org/lwjgl/ant/StandalonePublisher.java ___________________________________________________________________ Added: svn:keywords + Date Revision Author HeadURL Id This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2011-12-06 22:46:34
|
Revision: 3709 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3709&view=rev Author: matzon Date: 2011-12-06 22:46:27 +0000 (Tue, 06 Dec 2011) Log Message: ----------- updating update site build script to use pre-packaged zip file in dist, updating signjar to not use keypass Modified Paths: -------------- trunk/LWJGL/eclipse-update/org.lwjgl.build/build-updatesite.xml Modified: trunk/LWJGL/eclipse-update/org.lwjgl.build/build-updatesite.xml =================================================================== --- trunk/LWJGL/eclipse-update/org.lwjgl.build/build-updatesite.xml 2011-12-06 22:42:23 UTC (rev 3708) +++ trunk/LWJGL/eclipse-update/org.lwjgl.build/build-updatesite.xml 2011-12-06 22:46:27 UTC (rev 3709) @@ -17,7 +17,6 @@ <property name="keystore" value="teststore" /> <property name="alias" value="tester" /> <property name="password" value="tester" /> - <property name="keypass" value="${password}" /> <property name="eclipse.updatesite" value="http://www.lwjgl.org/update/" /> <property name="eclipse.bundle.vendor" value="lwjgl.org" /> @@ -59,8 +58,10 @@ <property name="NL" value=" " /> - <target name="eclipse-updatesite" depends="release"> - <antcall target="eclipse-updatesite-simple" /> + <target name="eclipse-updatesite"> + <mkdir dir="${lwjgl.temp}"/> + <unzip dest="${lwjgl.temp}/eclipse" src="${lwjgl.dist}/lwjgl-${lwjgl.version}.zip" /> + <antcall target="eclipse-updatesite-simple"> </target> @@ -97,7 +98,7 @@ </copy> <!-- Copy LWJGL native files and classes --> <copy todir="${eclipse.build.plugins}/org.lwjgl"> - <fileset dir="${lwjgl.temp}"> + <fileset dir="${lwjgl.temp}/eclipse/lwjgl-${lwjgl.version}/"> <patternset refid="lwjgl_base"/> </fileset> </copy> @@ -247,7 +248,7 @@ <!-- Calculate package export and bundle class paths --> <packagelist property="eclipse.bundle.export-package" pathsep=",${NL} "> - <fileset dir="${lwjgl.temp}/jar"> + <fileset dir="${lwjgl.temp}/eclipse/lwjgl-${lwjgl.version}/jar"> <exclude name="**/lwjgl-debug.jar" /> </fileset> <patternset> @@ -256,8 +257,8 @@ </patternset> </packagelist> <pathconvert property="eclipse.bundle.classpath.jars" pathsep=",${NL} "> - <map from="${lwjgl.temp}/jar/" to="" /> - <fileset dir="${lwjgl.temp}/jar"> + <map from="${lwjgl.temp}/eclipse/lwjgl-${lwjgl.version}/jar/" to="" /> + <fileset dir="${lwjgl.temp}/eclipse/lwjgl-${lwjgl.version}/jar"> <exclude name="**/lwjgl-debug.jar" /> <exclude name="**/lwjgl_test.jar" /> </fileset> @@ -457,19 +458,14 @@ * ******************************************************************** --> - <input message="Please enter the keystore" addproperty="keystore.location" defaultvalue="applet/lwjglkeystore"/> - <input message="Please enter the keystore alias" addproperty="keystore.alias" defaultvalue="lwjgl"/> - <input message="Please type the password for the keystore" addproperty="sign.pwd" defaultvalue="123456"/> + <signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/features/org.lwjgl_${eclipse.normversion}.jar" keystore="${keystore}" alias="${alias}" storepass="${password}" /> + <signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/features/org.lwjgl.sdk_${eclipse.normversion}.jar" keystore="${keystore}" alias="${alias}" storepass="${password}" /> + <signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl_${eclipse.normversion}.jar" keystore="${keystore}" alias="${alias}" storepass="${password}" /> + <signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl.doc_${eclipse.normversion}.jar" keystore="${keystore}" alias="${alias}" storepass="${password}" /> + <signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl.source_${eclipse.normversion}.jar" keystore="${keystore}" alias="${alias}" storepass="${password}" /> + <signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl.info_${eclipse.normversion}.jar" keystore="${keystore}" alias="${alias}" storepass="${password}" /> + <signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl.tools_${eclipse.normversion}.jar" keystore="${keystore}" alias="${alias}" storepass="${password}" /> - <signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/features/org.lwjgl_${eclipse.normversion}.jar" keystore="${keystore.location}" alias="${keystore.alias}" storepass="${sign.pwd}" /> - <signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/features/org.lwjgl.sdk_${eclipse.normversion}.jar" keystore="${keystore.location}" alias="${keystore.alias}" storepass="${sign.pwd}" /> - <signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl_${eclipse.normversion}.jar" keystore="${keystore.location}" alias="${keystore.alias}" storepass="${sign.pwd}" /> - <signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl.doc_${eclipse.normversion}.jar" keystore="${keystore.location}" alias="${keystore.alias}" storepass="${sign.pwd}" /> - <signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl.source_${eclipse.normversion}.jar" keystore="${keystore.location}" alias="${keystore.alias}" storepass="${sign.pwd}" /> - <signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl.info_${eclipse.normversion}.jar" keystore="${keystore.location}" alias="${keystore.alias}" storepass="${sign.pwd}" /> - <signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl.tools_${eclipse.normversion}.jar" keystore="${keystore.location}" alias="${keystore.alias}" storepass="${sign.pwd}" /> - - <echo>Created Eclipse update site: ${eclipse.build.plugins}/org.lwjgl.updatesite</echo> </target> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2011-12-06 22:42:29
|
Revision: 3708 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3708&view=rev Author: matzon Date: 2011-12-06 22:42:23 +0000 (Tue, 06 Dec 2011) Log Message: ----------- adding eclipse update site to main build file Modified Paths: -------------- trunk/LWJGL/build.xml Modified: trunk/LWJGL/build.xml =================================================================== --- trunk/LWJGL/build.xml 2011-12-05 21:49:02 UTC (rev 3707) +++ trunk/LWJGL/build.xml 2011-12-06 22:42:23 UTC (rev 3708) @@ -7,6 +7,7 @@ <import file="platform_build/build-applet.xml"/> <import file="platform_build/build-webstart.xml"/> <import file="platform_build/build-maven.xml"/> + <import file="eclipse-update/org.lwjgl.build/build-updatesite.xml"/> <!-- ================================================================== --> <!-- Everything below this line is targets. --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpi...@us...> - 2011-12-05 21:49:09
|
Revision: 3707 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3707&view=rev Author: jpilgrim Date: 2011-12-05 21:49:02 +0000 (Mon, 05 Dec 2011) Log Message: ----------- signing information are interactively retrieved similar to applet build Modified Paths: -------------- trunk/LWJGL/eclipse-update/org.lwjgl.build/build-updatesite.xml Modified: trunk/LWJGL/eclipse-update/org.lwjgl.build/build-updatesite.xml =================================================================== --- trunk/LWJGL/eclipse-update/org.lwjgl.build/build-updatesite.xml 2011-12-05 12:41:45 UTC (rev 3706) +++ trunk/LWJGL/eclipse-update/org.lwjgl.build/build-updatesite.xml 2011-12-05 21:49:02 UTC (rev 3707) @@ -457,15 +457,19 @@ * ******************************************************************** --> - <signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/features/org.lwjgl_${eclipse.normversion}.jar" keystore="${keystore}" alias="${alias}" storepass="${password}" keypass="${keypass}" /> - <signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/features/org.lwjgl.sdk_${eclipse.normversion}.jar" keystore="${keystore}" alias="${alias}" storepass="${password}" keypass="${keypass}" /> - <signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl_${eclipse.normversion}.jar" keystore="${keystore}" alias="${alias}" storepass="${password}" keypass="${keypass}" /> - <signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl.doc_${eclipse.normversion}.jar" keystore="${keystore}" alias="${alias}" storepass="${password}" keypass="${keypass}" /> - <signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl.source_${eclipse.normversion}.jar" keystore="${keystore}" alias="${alias}" storepass="${password}" keypass="${keypass}" /> - <signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl.info_${eclipse.normversion}.jar" keystore="${keystore}" alias="${alias}" storepass="${password}" keypass="${keypass}" /> - <signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl.tools_${eclipse.normversion}.jar" keystore="${keystore}" alias="${alias}" storepass="${password}" keypass="${keypass}" /> + <input message="Please enter the keystore" addproperty="keystore.location" defaultvalue="applet/lwjglkeystore"/> + <input message="Please enter the keystore alias" addproperty="keystore.alias" defaultvalue="lwjgl"/> + <input message="Please type the password for the keystore" addproperty="sign.pwd" defaultvalue="123456"/> + <signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/features/org.lwjgl_${eclipse.normversion}.jar" keystore="${keystore.location}" alias="${keystore.alias}" storepass="${sign.pwd}" /> + <signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/features/org.lwjgl.sdk_${eclipse.normversion}.jar" keystore="${keystore.location}" alias="${keystore.alias}" storepass="${sign.pwd}" /> + <signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl_${eclipse.normversion}.jar" keystore="${keystore.location}" alias="${keystore.alias}" storepass="${sign.pwd}" /> + <signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl.doc_${eclipse.normversion}.jar" keystore="${keystore.location}" alias="${keystore.alias}" storepass="${sign.pwd}" /> + <signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl.source_${eclipse.normversion}.jar" keystore="${keystore.location}" alias="${keystore.alias}" storepass="${sign.pwd}" /> + <signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl.info_${eclipse.normversion}.jar" keystore="${keystore.location}" alias="${keystore.alias}" storepass="${sign.pwd}" /> + <signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl.tools_${eclipse.normversion}.jar" keystore="${keystore.location}" alias="${keystore.alias}" storepass="${sign.pwd}" /> + <echo>Created Eclipse update site: ${eclipse.build.plugins}/org.lwjgl.updatesite</echo> </target> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpi...@us...> - 2011-12-05 12:41:53
|
Revision: 3706 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3706&view=rev Author: jpilgrim Date: 2011-12-05 12:41:45 +0000 (Mon, 05 Dec 2011) Log Message: ----------- Added new Eclipse update site build script to be imported from main LWJGL build script. See org.lwjgl.build/README for details. Removed old build script depending on pre-build LWJGL archives. Modified Paths: -------------- trunk/LWJGL/eclipse-update/org.lwjgl.build/READ.ME Added Paths: ----------- trunk/LWJGL/eclipse-update/org.lwjgl.build/anttasks.jar trunk/LWJGL/eclipse-update/org.lwjgl.build/build-updatesite.xml trunk/LWJGL/eclipse-update/org.lwjgl.build/buildEclipseClasses.xml trunk/LWJGL/eclipse-update/org.lwjgl.build/plugin-classes/ trunk/LWJGL/eclipse-update/org.lwjgl.build/plugin-classes/org.lwjgl.info.zip trunk/LWJGL/eclipse-update/org.lwjgl.build/plugin-classes/org.lwjgl.tools.zip trunk/LWJGL/eclipse-update/org.lwjgl.build/plugin-classes/org.lwjgl.zip Removed Paths: ------------- trunk/LWJGL/eclipse-update/org.lwjgl.build/build.xml trunk/LWJGL/eclipse-update/org.lwjgl.build/lwjgl-archives/ Modified: trunk/LWJGL/eclipse-update/org.lwjgl.build/READ.ME =================================================================== --- trunk/LWJGL/eclipse-update/org.lwjgl.build/READ.ME 2011-12-03 11:10:44 UTC (rev 3705) +++ trunk/LWJGL/eclipse-update/org.lwjgl.build/READ.ME 2011-12-05 12:41:45 UTC (rev 3706) @@ -1,3 +1,33 @@ +How to build the Eclipse update site +------------------------------------ + +Building the Eclipse update site is fully integrated into the main LWJGL build script. +Here is how to build the update site: + +Run main lwjgl ant script (LWJGL/build.xml) with target "eclipse-updatesite" + +You will find the updatesite in + LWJGL/eclipse-update/org.lwjgl.build/build/plugins/org.lwjgl.updatesite + +Note that there are two targets: eclipse-updatesite and +eclipse-updatesite-simple. The first one depends from the target "release", +defined in the main build file. However, if you are sure the relase target has +been called before, you may want to only create the update site without +building the release target again. In that case, you can all +eclipse-update-simple. + +The update site build requires some Java classes to be precompiled. These classes +can be found in some zip archives in folder plugin-classes and anttasks.jar. +Building these classes requires Eclipse dependencies (in case of the +plugin-classes) or they define anttasks required to be present when running ant. +In order to build these classes, open all projects found in subfolder +LWJGL/eclipse-update in Eclipse: this way, all Eclipse classes will get +automatically compiled. Then run the ant script buildEclipseClasses.xml from +within Eclipse. Actually, this is rarely necessary as the archives are all +committed to the LWJGL SVN and will be present if you check out everything. You +only need to run that build if the Eclise plugin classes (or the anttasks) were +changed. + The build plugin is part of the LWJGL Eclipse plugins. The following plugins are required: @@ -46,35 +76,11 @@ This is the build script project. Although it is an Eclipse project, you can simply run the build script with ant from command line. See later on. -Everything is created in org.lwjgl.build/build. -Here is how to build the update site: +Everything is created in LWJGL/eclipse-update/org.lwjgl.build/build. -1) Create a new folder in org.lwjgl.build/lwjgl-archives , use the version - number as folder name. E.g., for version 2.6 create a folder "2.6", - for version 2.6.1 "2.6.1" and so on. -2) Copy the lwjgl, lwjgl-docs and lwjgl-source zips into that folder. E.g., - for version 2.6, this folder must contain the following files: - org.lwjgl.build/lwjgl-archives - + 2.6 - - lwjgl-2.6.zip - - lwjgl-docs-2.6.zip - - lwjgl-source-2.6.zip -3) In order to run the build script, change to folder org.lwjgl.build and run - ant with a parameter indicating the appropriate LWJGL version, e.g. - ant -Dversion=2.6 dist - -You will find the updatesite in - org.lwjgl.build/build/plugins/org.lwjgl.updatesite - -You may note that the jars are all signed. I have added a temporary keystore -with a dummy alias. In order to use your key, simply edit the properties -(line 11-14) in the build script. If you do not want to store the password in -the build script, simply define it via "-Dstorepass=****" in the command line. - Some additional remarks: - The version number is automatically "normalized" to Eclipse standards, - that is 2.6 will become 2.6.0. You do not have to rename the initial archives, - you can use 2.6. Or 2.6.1 ;-) + that is 2.6 will become 2.6.0 with the current date and time added. - The lwjgl-debug.jar is not added to the org.lwjgl plugin, as I do not know how to select one or the other. But I have not further investigated in that direction. @@ -85,4 +91,5 @@ to the Eclipse P2 system, which caches a lot of things. Simply uninstalling a plugin does not remove the plugins from the Eclipse installation. When the very same version is re-installed, instead of loading new files from the - update site these pre-installed versions are reused! \ No newline at end of file + update site these pre-installed versions are reused! Since the date and time + is added to the plugin version number, this should cause no problems. \ No newline at end of file Added: trunk/LWJGL/eclipse-update/org.lwjgl.build/anttasks.jar =================================================================== (Binary files differ) Property changes on: trunk/LWJGL/eclipse-update/org.lwjgl.build/anttasks.jar ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/LWJGL/eclipse-update/org.lwjgl.build/build-updatesite.xml =================================================================== --- trunk/LWJGL/eclipse-update/org.lwjgl.build/build-updatesite.xml (rev 0) +++ trunk/LWJGL/eclipse-update/org.lwjgl.build/build-updatesite.xml 2011-12-05 12:41:45 UTC (rev 3706) @@ -0,0 +1,482 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- +Called from main build script. +Expects + lwjgl.version +to be set. + +(C) 2011 LWJGL-Project +Author: Jens von Pilgrim, dev...@je... +--> + +<project default="eclipse-updatesite" basedir="." name="eclipse.antscript" xmlns:ant4eclipse="antlib:org.ant4eclipse" xmlns:antcontrib="antlib:net.sf.antcontrib"> + + <dirname property="eclipse.antscript.basedir" file="${ant.file.eclipse.antscript}" /> + + <property name="keystore" value="teststore" /> + <property name="alias" value="tester" /> + <property name="password" value="tester" /> + <property name="keypass" value="${password}" /> + + <property name="eclipse.updatesite" value="http://www.lwjgl.org/update/" /> + <property name="eclipse.bundle.vendor" value="lwjgl.org" /> + + <taskdef name="packagelist" classname="org.lwjgl.ant.PackageList"> + <classpath> + <pathelement location="eclipse-update/org.lwjgl.build/anttasks.jar" /> + </classpath> + </taskdef> + <taskdef name="normalizeversion" classname="org.lwjgl.ant.NormalizeVersion"> + <classpath> + <pathelement location="eclipse-update/org.lwjgl.build/anttasks.jar" /> + </classpath> + </taskdef> + + <!-- properties imported from build-definitions.xml: + <property name="lwjgl.temp" location="temp" /> + <property name="lwjgl.src" location="src" /> + <property name="lwjgl.version" value="2.8.3" /> + --> + + <!-- where to build the update site and temporary build files --> + <property name="eclipse.build.path" value="${eclipse.antscript.basedir}/build" /> + <property name="eclipse.build.temp" value="${eclipse.build.path}/temp" /> + <property name="eclipse.build.plugins" value="${eclipse.build.path}/plugins" /> + <property name="eclipse.prebuild-plugin-classes" value="${eclipse.antscript.basedir}/plugin-classes" /> + + + <!-- from where to retrieve LWJGL files --> + <property name="eclipse.skeletons.dir" value="${eclipse.antscript.basedir}/.." /> + + <!-- base: ${lwjgl.temp} : <patternset refid="lwjgl_applet"/> + doc: basedir="${lwjgl.docs}" includes="javadoc/**" + source: refid="lwjgl.source.fileset" + + --> + + + <property name="NL" value=" " /> + + + <target name="eclipse-updatesite" depends="release"> + <antcall target="eclipse-updatesite-simple" /> + </target> + + + <target name="eclipse-updatesite-simple"> + <normalizeversion version="${lwjgl.version}" property="eclipse.normversion" addDateQualifier="yes" /> + <echo>Building plugins for version ${lwjgl.version}, normalized version ${eclipse.normversion}</echo> + + <mkdir dir="${eclipse.build.temp}" /> + + + <!-- ******************************************************************* + * + * Assemble plugins + * + ******************************************************************** --> + + <!-- Main plugin: lwjgl.org --> + <!-- Copy plugin skeletons --> + <mkdir dir="${eclipse.build.plugins}" /> + <copy todir="${eclipse.build.plugins}/org.lwjgl"> + <fileset dir="${eclipse.skeletons.dir}/org.lwjgl" casesensitive="yes"> + <exclude name="**/src/**" /> + <exclude name="**/*.jar" /> + <!-- do not copy jars used for development --> + <exclude name="**/build/**" /> + <exclude name="**/build.properties" /> + <!-- do not copy development settings --> + <exclude name="**/.settings/**" /> + <exclude name="**/.classpath" /> + <exclude name="**/.project" /> + <!-- do not copy native libraries --> + <exclude name="**/native/**" /> + </fileset> + </copy> + <!-- Copy LWJGL native files and classes --> + <copy todir="${eclipse.build.plugins}/org.lwjgl"> + <fileset dir="${lwjgl.temp}"> + <patternset refid="lwjgl_base"/> + </fileset> + </copy> + <move todir="${eclipse.build.plugins}/org.lwjgl"> + <fileset dir="${eclipse.build.plugins}/org.lwjgl/jar"> + <include name="**" /> + <exclude name="lwjgl-debug.jar" /> + </fileset> + </move> + <delete dir="${eclipse.build.plugins}/org.lwjgl/jar" /> + <!-- unzip Eclipse dependent classes, + have to be previously built by buildEclipseClasses.xml, but + are also contained in SVN + --> + <unzip dest="${eclipse.build.plugins}/org.lwjgl" src="${eclipse.prebuild-plugin-classes}/org.lwjgl.zip" /> + + + <!-- Sources plugin: lwjgl.org.source --> + <!-- Copy plugin skeletons --> + <copy todir="${eclipse.build.plugins}/org.lwjgl.source"> + <fileset dir="${eclipse.skeletons.dir}/org.lwjgl.source" casesensitive="yes"> + <exclude name="**/build.properties" /> + <exclude name="**/.settings/**" /> + <exclude name="**/.classpath" /> + <exclude name="**/.project" /> + </fileset> + </copy> + <!-- Create zip files containing the source --> + <property name="eclipse.org.lwjgl.src.dir" value="${eclipse.build.plugins}/org.lwjgl.source/src/org.lwjgl_${eclipse.normversion}" /> + <mkdir dir="${eclipse.org.lwjgl.src.dir}" /> + <!-- Build src zips for plugin org.lwjgl --> + <!-- lwjgl sources (only Java sources) --> + <zip destfile="${eclipse.org.lwjgl.src.dir}/lwjglsrc.zip"> + <fileset dir="${lwjgl.src}/generated" /> + <fileset dir="${lwjgl.src}/java"> + <exclude name="org/lwjgl/util/**" /> + </fileset> + </zip> + <zip destfile="${eclipse.org.lwjgl.src.dir}/lwjgl_utilsrc.zip"> + <fileset dir="${lwjgl.src}/java"> + <include name="org/lwjgl/util/**" /> + <exclude name="org/lwjgl/util/applet/**" /> + </fileset> + </zip> + <zip destfile="${eclipse.org.lwjgl.src.dir}/lwjgl_util_applet.zip"> + <fileset dir="${lwjgl.src}/java"> + <include name="org/lwjgl/util/applet/**" /> + </fileset> + </zip> + <!-- and the Eclipse related sources --> + <zip destfile="${eclipse.org.lwjgl.src.dir}/lwjgl_eclipse.zip"> + <fileset dir="${eclipse.skeletons.dir}/org.lwjgl/src/java" casesensitive="yes"> + <include name="org/lwjgl/**" /> + </fileset> + </zip> + <zip destfile="${eclipse.org.lwjgl.src.dir}/lwjgl_tools.zip"> + <fileset dir="${eclipse.skeletons.dir}/org.lwjgl.tools/src/java" casesensitive="yes"> + <include name="org/lwjgl/**" /> + </fileset> + </zip> + <zip destfile="${eclipse.org.lwjgl.src.dir}/lwjgl_info.zip"> + <fileset dir="${eclipse.skeletons.dir}/org.lwjgl.info/src/java" casesensitive="yes"> + <include name="org/lwjgl/**" /> + </fileset> + </zip> + + <!-- Documentation plugin: lwjgl.org.doc --> + <!-- Copy plugin skeletons including Eclipse documentation--> + <copy todir="${eclipse.build.plugins}/org.lwjgl.doc"> + <fileset dir="${eclipse.skeletons.dir}/org.lwjgl.doc" casesensitive="yes"> + <exclude name="**/build.properties" /> + <exclude name="**/.settings/**" /> + <exclude name="**/.classpath" /> + <exclude name="**/.project" /> + </fileset> + </copy> + <copy todir="${eclipse.build.plugins}/org.lwjgl.doc"> + <fileset dir="${lwjgl.docs}"> + <exclude name="javadoc/**" /> + </fileset> + </copy> + <!-- create JavaDoc archive --> + <zip destfile="${eclipse.build.plugins}/org.lwjgl.doc/doc.zip" basedir="${lwjgl.docs}" includes="javadoc/**" /> + + + <!-- Information view plugin: org.lwjgl.info --> + <copy todir="${eclipse.build.plugins}/org.lwjgl.info"> + <fileset dir="${eclipse.skeletons.dir}/org.lwjgl.info" casesensitive="yes"> + <exclude name="**/src/**" /> + <exclude name="**/build/**" /> + <exclude name="**/build.properties" /> + <exclude name="**/.settings/**" /> + <exclude name="**/.classpath" /> + <exclude name="**/.project" /> + </fileset> + </copy> + <!-- unzip Eclipse dependent classes, + have to be previously built by buildEclipseClasses.xml, but + are also contained in SVN + --> + <unzip dest="${eclipse.build.plugins}/org.lwjgl.info" src="${eclipse.prebuild-plugin-classes}/org.lwjgl.info.zip" /> + + <!-- Tools plugin: org.lwjgl.tools --> + <copy todir="${eclipse.build.plugins}/org.lwjgl.tools"> + <fileset dir="${eclipse.skeletons.dir}/org.lwjgl.tools" casesensitive="yes"> + <exclude name="**/src/**" /> + <exclude name="**/build/**" /> + <exclude name="**/build.properties" /> + <exclude name="**/.settings/**" /> + <exclude name="**/.classpath" /> + <exclude name="**/.project" /> + </fileset> + </copy> + <!-- unzip Eclipse dependent classes, + have to be previously built by buildEclipseClasses.xml, but + are also contained in SVN +--> + <unzip dest="${eclipse.build.plugins}/org.lwjgl.tools" src="${eclipse.prebuild-plugin-classes}/org.lwjgl.tools.zip" /> + + <!-- Feature --> + <copy todir="${eclipse.build.plugins}/org.lwjgl.feature"> + <fileset dir="${eclipse.skeletons.dir}/org.lwjgl.feature" casesensitive="yes"> + <exclude name="**/build.properties" /> + <exclude name="**/.settings/**" /> + <exclude name="**/.classpath" /> + <exclude name="**/.project" /> + <exclude name="**/*.template" /> + </fileset> + </copy> + + <!-- Update Site --> + <copy todir="${eclipse.build.plugins}/org.lwjgl.updatesite"> + <fileset dir="${eclipse.skeletons.dir}/org.lwjgl.updatesite" casesensitive="yes"> + <exclude name="**/.settings/**" /> + <exclude name="**/.classpath" /> + <exclude name="**/.project" /> + <exclude name="**/*.template" /> + </fileset> + </copy> + + + <!-- ******************************************************************* + * + * Build manifest files + * + ******************************************************************** --> + + <!-- Calculate package export and bundle class paths --> + <packagelist property="eclipse.bundle.export-package" pathsep=",${NL} "> + <fileset dir="${lwjgl.temp}/jar"> + <exclude name="**/lwjgl-debug.jar" /> + </fileset> + <patternset> + <exclude name="**/test/**" /> + <exclude name="**/examples/**" /> + </patternset> + </packagelist> + <pathconvert property="eclipse.bundle.classpath.jars" pathsep=",${NL} "> + <map from="${lwjgl.temp}/jar/" to="" /> + <fileset dir="${lwjgl.temp}/jar"> + <exclude name="**/lwjgl-debug.jar" /> + <exclude name="**/lwjgl_test.jar" /> + </fileset> + </pathconvert> + + + + + <!-- ******************************************************************* + * + * org.lwjgl + * + * Build manifest files, not using manifest task, since manifest wraps + * at the wrong positions (at least ant 1.7) + * + ******************************************************************** --> + <echo file="${eclipse.build.plugins}/org.lwjgl/META-INF/MANIFEST.MF" encoding="UTF-8">Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: LWJGL Lightweight Java Game Library +Bundle-SymbolicName: org.lwjgl +Bundle-Version: ${eclipse.normversion} +Bundle-Vendor: ${eclipse.bundle.vendor} +Bundle-Activator: org.lwjgl.Activator +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime +Bundle-ActivationPolicy: lazy +Export-Package: org.lwjgl.eclipse,${NL} ${eclipse.bundle.export-package} +Bundle-RequiredExecutionEnvironment: J2SE-1.5 +Bundle-ClassPath: .,${NL} ${eclipse.bundle.classpath.jars} +</echo> + + <!-- ******************************************************************* + * + * org.lwjgl.doc + * + * Build manifest files, not using manifest task, since manifest wraps + * at the wrong positions (at least ant 1.7) + * + ******************************************************************** --> + + <echo file="${eclipse.build.plugins}/org.lwjgl.doc/META-INF/MANIFEST.MF" encoding="UTF-8">Manifest-Version: 1.0 +Bundle-Vendor: ${eclipse.bundle.vendor} +Bundle-Version: ${eclipse.normversion} +Bundle-SymbolicName: org.lwjgl.doc;singleton:=true +Bundle-Localization: plugin +Require-Bundle: org.eclipse.help;bundle-version="3.2.0" +Eclipse-LazyStart: true +</echo> + + + <!-- ******************************************************************* + * + * org.lwjgl.source + * + * Build manifest files, not using manifest task, since manifest wraps + * at the wrong positions (at least ant 1.7) + * + ******************************************************************** --> + + <!-- Build manfest --> + <!-- not using manifest task, since manifest wraps at the wrong positions --> + <echo file="${eclipse.build.plugins}/org.lwjgl.source/META-INF/MANIFEST.MF" encoding="UTF-8">Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: LWJGL Sources +Bundle-Vendor: ${eclipse.bundle.vendor} +Bundle-Version: ${eclipse.normversion} +Bundle-SymbolicName: org.lwjgl.source;singleton:=true +Bundle-Localization: plugin +</echo> + + <!-- ******************************************************************* + * + * org.lwjgl.info + * + * Build manifest files, not using manifest task, since manifest wraps + * at the wrong positions (at least ant 1.7) + * + ******************************************************************** --> + <echo file="${eclipse.build.plugins}/org.lwjgl.info/META-INF/MANIFEST.MF" encoding="UTF-8">Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: LWJGL Test and Info View +Bundle-Vendor: ${eclipse.bundle.vendor} +Bundle-Version: ${eclipse.normversion} +Bundle-SymbolicName: org.lwjgl.info;singleton:=true +Bundle-Localization: plugin +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.ui.views, + org.eclipse.core.resources, + org.lwjgl +Bundle-RequiredExecutionEnvironment: J2SE-1.5 +</echo> + <!-- Files are already in place --> + + <!-- ******************************************************************* + * + * org.lwjgl.tools + * + * Build manifest files, not using manifest task, since manifest wraps + * at the wrong positions (at least ant 1.7) + * + ******************************************************************** --> + <!-- Build plugin org.lwjgl.tools --> + <echo file="${eclipse.build.plugins}/org.lwjgl.tools/META-INF/MANIFEST.MF" encoding="UTF-8">Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: LWJGL Tools Plug-in +Bundle-SymbolicName: org.lwjgl.tools;singleton:=true +Bundle-Version: ${eclipse.normversion} +Bundle-Vendor: ${eclipse.bundle.vendor} +Bundle-Activator: org.lwjgl.tools.Activator +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.core.resources;bundle-version="3.4.0", + org.eclipse.jdt.core;bundle-version="3.4.0", + org.eclipse.jdt.ui;bundle-version="3.4.0", + org.lwjgl;bundle-version="${eclipse.normversion}", + org.eclipse.jdt.launching;bundle-version="3.4.0" +Bundle-ActivationPolicy: lazy +Bundle-RequiredExecutionEnvironment: J2SE-1.5 +</echo> + <!-- Files are already in place --> + + + <!-- Create features --> + + <!-- ******************************************************************* + * + * org.lwjgl.feature + * + ******************************************************************** --> + <!-- Build org.lwjgl.feature --> + <copy file="${eclipse.skeletons.dir}/org.lwjgl.feature/feature.xml.template" tofile="${eclipse.build.plugins}/org.lwjgl.feature/feature.xml" encoding="UTF-8" overwrite="true"> + <filterset> + <filter token="VERSION" value="${eclipse.normversion}" /> + <filter token="PROVIDERNAME" value="${eclipse.bundle.vendor}" /> + <filter token="UPDATEURL" value="${eclipse.updatesite}" /> + </filterset> + </copy> + + + <!-- ******************************************************************* + * + * org.lwjgl.feature.sdk + * + ******************************************************************** --> + <!-- Build org.lwjgl.feature --> + <copy file="${eclipse.skeletons.dir}/org.lwjgl.feature.sdk/feature.xml.template" tofile="${eclipse.build.plugins}/org.lwjgl.feature.sdk/feature.xml" encoding="UTF-8" overwrite="true"> + <filterset> + <filter token="VERSION" value="${eclipse.normversion}" /> + <filter token="PROVIDERNAME" value="${eclipse.bundle.vendor}" /> + <filter token="UPDATEURL" value="${eclipse.updatesite}" /> + </filterset> + </copy> + + + <!-- ******************************************************************* + * + * Build update site, i.e. zip all plugins and feature with version + * number to appropriate place + * + ******************************************************************** --> + <!-- Build update site --> + <copy file="${eclipse.skeletons.dir}/org.lwjgl.updatesite/site.xml.template" tofile="${eclipse.build.plugins}/org.lwjgl.updatesite/site.xml" encoding="UTF-8" overwrite="true"> + <filterset> + <filter token="VERSION" value="${eclipse.normversion}" /> + <filter token="PROVIDERNAME" value="${eclipse.bundle.vendor}" /> + <filter token="UPDATEURL" value="${eclipse.updatesite}" /> + </filterset> + </copy> + <mkdir dir="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins" /> + <mkdir dir="${eclipse.build.plugins}/org.lwjgl.updatesite/features" /> + <jar destfile="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl_${eclipse.normversion}.jar" manifest="${eclipse.build.plugins}/org.lwjgl/META-INF/MANIFEST.MF"> + <fileset dir="${eclipse.build.plugins}/org.lwjgl" casesensitive="yes" /> + </jar> + <jar destfile="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl.doc_${eclipse.normversion}.jar" manifest="${eclipse.build.plugins}/org.lwjgl.doc/META-INF/MANIFEST.MF"> + <fileset dir="${eclipse.build.plugins}/org.lwjgl.doc" casesensitive="yes" /> + </jar> + <jar destfile="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl.source_${eclipse.normversion}.jar" manifest="${eclipse.build.plugins}/org.lwjgl.source/META-INF/MANIFEST.MF"> + <fileset dir="${eclipse.build.plugins}/org.lwjgl.source" casesensitive="yes" /> + </jar> + <jar destfile="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl.info_${eclipse.normversion}.jar" manifest="${eclipse.build.plugins}/org.lwjgl.info/META-INF/MANIFEST.MF"> + <fileset dir="${eclipse.build.plugins}/org.lwjgl.info" casesensitive="yes" /> + </jar> + <jar destfile="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl.tools_${eclipse.normversion}.jar" manifest="${eclipse.build.plugins}/org.lwjgl.tools/META-INF/MANIFEST.MF"> + <fileset dir="${eclipse.build.plugins}/org.lwjgl.tools" casesensitive="yes" /> + </jar> + <jar destfile="${eclipse.build.plugins}/org.lwjgl.updatesite/features/org.lwjgl_${eclipse.normversion}.jar"> + <fileset dir="${eclipse.build.plugins}/org.lwjgl.feature" casesensitive="yes" /> + </jar> + <jar destfile="${eclipse.build.plugins}/org.lwjgl.updatesite/features/org.lwjgl.sdk_${eclipse.normversion}.jar"> + <fileset dir="${eclipse.build.plugins}/org.lwjgl.feature.sdk" casesensitive="yes" /> + </jar> + + <!-- ******************************************************************* + * + * Sign plugins and feature + * + ******************************************************************** --> + + <signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/features/org.lwjgl_${eclipse.normversion}.jar" keystore="${keystore}" alias="${alias}" storepass="${password}" keypass="${keypass}" /> + <signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/features/org.lwjgl.sdk_${eclipse.normversion}.jar" keystore="${keystore}" alias="${alias}" storepass="${password}" keypass="${keypass}" /> + <signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl_${eclipse.normversion}.jar" keystore="${keystore}" alias="${alias}" storepass="${password}" keypass="${keypass}" /> + <signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl.doc_${eclipse.normversion}.jar" keystore="${keystore}" alias="${alias}" storepass="${password}" keypass="${keypass}" /> + <signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl.source_${eclipse.normversion}.jar" keystore="${keystore}" alias="${alias}" storepass="${password}" keypass="${keypass}" /> + <signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl.info_${eclipse.normversion}.jar" keystore="${keystore}" alias="${alias}" storepass="${password}" keypass="${keypass}" /> + <signjar jar="${eclipse.build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl.tools_${eclipse.normversion}.jar" keystore="${keystore}" alias="${alias}" storepass="${password}" keypass="${keypass}" /> + + + <echo>Created Eclipse update site: ${eclipse.build.plugins}/org.lwjgl.updatesite</echo> + </target> + + <target name="eclipse-clean"> + <delete dir="${eclipse.build.path}" /> + </target> + + <target name="eclipse-help"> + <echo>This plugin is to be called from main LWJGL build.xml file.</echo> + <echo>It creates the update site, the result will be found in</echo> + <echo>${eclipse.build.plugins}/org.lwjgl.updatesite</echo> + </target> + +</project> \ No newline at end of file Deleted: trunk/LWJGL/eclipse-update/org.lwjgl.build/build.xml =================================================================== --- trunk/LWJGL/eclipse-update/org.lwjgl.build/build.xml 2011-12-03 11:10:44 UTC (rev 3705) +++ trunk/LWJGL/eclipse-update/org.lwjgl.build/build.xml 2011-12-05 12:41:45 UTC (rev 3706) @@ -1,446 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<!-- -Call with - ant -Dversion=1.9.1 dist -(C) 2011 LWJGL-Project -Author: Jens von Pilgrim, dev...@je... ---> - -<project default="help" basedir="." name="" xmlns:ant4eclipse="antlib:org.ant4eclipse" xmlns:antcontrib="antlib:net.sf.antcontrib"> - - <property name="keystore" value="teststore" /> - <property name="alias" value="tester" /> - <property name="storepass" value="tester" /> - <property name="keypass" value="${storepass}" /> - - <property name="eclipse.updatesite" value="http://www.lwjgl.org/update/" /> - <property name="bundle.vendor" value="lwjgl.org" /> - - <taskdef name="packagelist" classname="org.lwjgl.ant.PackageList"> - <classpath> - <pathelement location="./anttasks" /> - </classpath> - </taskdef> - <taskdef name="normalizeversion" classname="org.lwjgl.ant.NormalizeVersion"> - <classpath> - <pathelement location="./anttasks" /> - </classpath> - </taskdef> - - <property name="version" value="unknown" /> - <property name="archives.dir" value="lwjgl-archives/${version}" /> - <property name="skeletons.dir" value=".." /> - - <property name="build.path" value="build" /> - <property name="build.temp" value="${build.path}/temp" /> - <property name="build.plugins" value="${build.path}/plugins" /> - - <property name="lwjgl.zip" value="lwjgl-${version}.zip" /> - <property name="lwjgl_docs.zip" value="lwjgl-docs-${version}.zip" /> - <property name="lwjgl_source.zip" value="lwjgl-source-${version}.zip" /> - - <property name="lwjgl.dir" value="${build.temp}/lwjgl-${version}" /> - <property name="lwjgl_docs.dir" value="${build.temp}/javadoc" /> - <property name="lwjgl_source.dir" value="${build.temp}/src" /> - - <property name="NL" value=" " /> - - - - <!-- -<property name="" value="" /> ---> - - - <target name="init"> - <normalizeversion version="${version}" property="normversion" addDateQualifier="yes" /> - <echo>Building plugins for version ${version}, normalized version ${normversion}</echo> - </target> - - - <target name="dist" depends="init"> - <mkdir dir="${build.temp}" /> - - - <!-- ******************************************************************* - * - * Copy original plugins to build folder. Copy source to source plugin - * only, move classes into place. - * - ******************************************************************** --> - <mkdir dir="${build.plugins}" /> - <copy todir="${build.plugins}/org.lwjgl"> - <fileset dir="${skeletons.dir}/org.lwjgl" casesensitive="yes"> - <exclude name="**/src/**" /> - <exclude name="**/*.jar" /> - <!-- do not copy jars used for development --> - <exclude name="**/build/**" /> - <exclude name="**/build.properties" /> - <!-- do not copy development settings --> - <exclude name="**/.settings/**" /> - <exclude name="**/.classpath" /> - <exclude name="**/.project" /> - <!-- do not copy native libraries --> - <exclude name="**/native/**" /> - </fileset> - </copy> - <copy todir="${build.plugins}/org.lwjgl"> - <fileset dir="${skeletons.dir}/org.lwjgl/build/classes" casesensitive="yes"> - </fileset> - </copy> - - <copy todir="${build.plugins}/org.lwjgl.source"> - <fileset dir="${skeletons.dir}/org.lwjgl.source" casesensitive="yes"> - <exclude name="**/build.properties" /> - <exclude name="**/.settings/**" /> - <exclude name="**/.classpath" /> - <exclude name="**/.project" /> - </fileset> - </copy> - <copy todir="${build.plugins}/org.lwjgl.doc"> - <fileset dir="${skeletons.dir}/org.lwjgl.doc" casesensitive="yes"> - <exclude name="**/build.properties" /> - <exclude name="**/.settings/**" /> - <exclude name="**/.classpath" /> - <exclude name="**/.project" /> - </fileset> - </copy> - - <copy todir="${build.plugins}/org.lwjgl.info"> - <fileset dir="${skeletons.dir}/org.lwjgl.info" casesensitive="yes"> - <exclude name="**/src/**" /> - <exclude name="**/build/**" /> - <exclude name="**/build.properties" /> - <exclude name="**/.settings/**" /> - <exclude name="**/.classpath" /> - <exclude name="**/.project" /> - </fileset> - </copy> - <copy todir="${build.plugins}/org.lwjgl.info"> - <fileset dir="${skeletons.dir}/org.lwjgl.info/build/classes" casesensitive="yes"> - </fileset> - </copy> - - <copy todir="${build.plugins}/org.lwjgl.tools"> - <fileset dir="${skeletons.dir}/org.lwjgl.tools" casesensitive="yes"> - <exclude name="**/src/**" /> - <exclude name="**/build/**" /> - <exclude name="**/build.properties" /> - <exclude name="**/.settings/**" /> - <exclude name="**/.classpath" /> - <exclude name="**/.project" /> - </fileset> - </copy> - <copy todir="${build.plugins}/org.lwjgl.tools"> - <fileset dir="${skeletons.dir}/org.lwjgl.tools/build/classes" casesensitive="yes"> - </fileset> - </copy> - - <copy todir="${build.plugins}/org.lwjgl.feature"> - <fileset dir="${skeletons.dir}/org.lwjgl.feature" casesensitive="yes"> - <exclude name="**/build.properties" /> - <exclude name="**/.settings/**" /> - <exclude name="**/.classpath" /> - <exclude name="**/.project" /> - <exclude name="**/*.template" /> - </fileset> - </copy> - <copy todir="${build.plugins}/org.lwjgl.updatesite"> - <fileset dir="${skeletons.dir}/org.lwjgl.updatesite" casesensitive="yes"> - <exclude name="**/.settings/**" /> - <exclude name="**/.classpath" /> - <exclude name="**/.project" /> - <exclude name="**/*.template" /> - </fileset> - </copy> - - - <!-- ******************************************************************* - * - * Unzip archives and move content into approriate plugins - * - ******************************************************************** --> - <unzip src="${archives.dir}/${lwjgl.zip}" dest="${build.temp}" /> - <copy todir="${build.plugins}/org.lwjgl/native"> - <fileset dir="${lwjgl.dir}/native" /> - </copy> - <copy todir="${build.plugins}/org.lwjgl/"> - <fileset dir="${lwjgl.dir}/jar"> - <exclude name="**/lwjgl-debug.jar" /> - </fileset> - </copy> - <copy todir="${build.plugins}/org.lwjgl/doc"> - <fileset dir="${lwjgl.dir}/doc" /> - </copy> - <packagelist property="bundle.export-package" pathsep=",${NL} "> - <fileset dir="${lwjgl.dir}/jar"> - <exclude name="**/lwjgl-debug.jar" /> - </fileset> - <patternset> - <exclude name="**/test/**" /> - <exclude name="**/examples/**" /> - </patternset> - </packagelist> - <pathconvert property="bundle.classpath.jars" pathsep=",${NL} "> - <map from="${basedir}/${lwjgl.dir}/jar/" to="" /> - <fileset dir="${lwjgl.dir}/jar"> - <exclude name="**/lwjgl-debug.jar" /> - <exclude name="**/lwjgl_test.jar" /> - </fileset> - </pathconvert> - - - <!-- ******************************************************************* - * - * Build plugins - * - ******************************************************************** --> - - <!-- ******************************************************************* - * - * org.lwjgl - * - * Build manifest files, not using manifest task, since manifest wraps - * at the wrong positions (at least ant 1.7) - * - ******************************************************************** --> - <echo file="${build.plugins}/org.lwjgl/META-INF/MANIFEST.MF" encoding="UTF-8">Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: LWJGL Lightweight Java Game Library -Bundle-SymbolicName: org.lwjgl -Bundle-Version: ${normversion} -Bundle-Vendor: ${bundle.vendor} -Bundle-Activator: org.lwjgl.Activator -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime -Bundle-ActivationPolicy: lazy -Export-Package: org.lwjgl.eclipse,${NL} ${bundle.export-package} -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Bundle-ClassPath: .,${NL} ${bundle.classpath.jars} -</echo> - - <!-- ******************************************************************* - * - * org.lwjgl.doc - * - * Build manifest files, not using manifest task, since manifest wraps - * at the wrong positions (at least ant 1.7) - * - ******************************************************************** --> - <copy file="${archives.dir}/${lwjgl_docs.zip}" tofile="${build.plugins}/org.lwjgl.doc/doc.zip" /> - <echo file="${build.plugins}/org.lwjgl.doc/META-INF/MANIFEST.MF" encoding="UTF-8">Manifest-Version: 1.0 -Bundle-Vendor: ${bundle.vendor} -Bundle-Version: ${normversion} -Bundle-SymbolicName: org.lwjgl.doc;singleton:=true -Bundle-Localization: plugin -Require-Bundle: org.eclipse.help;bundle-version="3.2.0" -Eclipse-LazyStart: true -</echo> - - - <!-- ******************************************************************* - * - * org.lwjgl.source - * - * Build manifest files, not using manifest task, since manifest wraps - * at the wrong positions (at least ant 1.7) - * - ******************************************************************** --> - <unzip src="${archives.dir}/${lwjgl_source.zip}" dest="${build.temp}" /> - <!-- Build src zips for plugin org.lwjgl --> - <property name="org.lwjgl.src.dir" value="${build.plugins}/org.lwjgl.source/src/org.lwjgl_${normversion}" /> - <mkdir dir="${org.lwjgl.src.dir}" /> - <zip destfile="${org.lwjgl.src.dir}/lwjglsrc.zip"> - <fileset dir="${lwjgl_source.dir}/generated" /> - <fileset dir="${lwjgl_source.dir}/java"> - <exclude name="org/lwjgl/util/**" /> - </fileset> - </zip> - <zip destfile="${org.lwjgl.src.dir}/lwjgl_utilsrc.zip"> - <fileset dir="${lwjgl_source.dir}/java"> - <include name="org/lwjgl/util/**" /> - <exclude name="org/lwjgl/util/applet/**" /> - </fileset> - </zip> - <!-- - <zip destfile="${org.lwjgl.src.dir}/lwjgl_util_applet.zip"> - <fileset dir="${lwjgl_source.dir}/java"> - <include name="org/lwjgl/util/applet/**" /> - </fileset> - </zip> - --> - <zip destfile="${org.lwjgl.src.dir}/lwjgl_eclipse.zip"> - <fileset dir="${skeletons.dir}/org.lwjgl/src/java" casesensitive="yes"> - <include name="org/lwjgl/**" /> - </fileset> - </zip> - <zip destfile="${org.lwjgl.src.dir}/lwjgl_tools.zip"> - <fileset dir="${skeletons.dir}/org.lwjgl.tools/src/java" casesensitive="yes"> - <include name="org/lwjgl/**" /> - </fileset> - </zip> - <zip destfile="${org.lwjgl.src.dir}/lwjgl_info.zip"> - <fileset dir="${skeletons.dir}/org.lwjgl.info/src/java" casesensitive="yes"> - <include name="org/lwjgl/**" /> - </fileset> - </zip> - - <!-- Build manfest --> - <!-- not using manifest task, since manifest wraps at the wrong positions --> - <echo file="${build.plugins}/org.lwjgl.source/META-INF/MANIFEST.MF" encoding="UTF-8">Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: LWJGL Sources -Bundle-Vendor: ${bundle.vendor} -Bundle-Version: ${normversion} -Bundle-SymbolicName: org.lwjgl.source;singleton:=true -Bundle-Localization: plugin -</echo> - - <!-- ******************************************************************* - * - * org.lwjgl.info - * - * Build manifest files, not using manifest task, since manifest wraps - * at the wrong positions (at least ant 1.7) - * - ******************************************************************** --> - <echo file="${build.plugins}/org.lwjgl.info/META-INF/MANIFEST.MF" encoding="UTF-8">Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: LWJGL Test and Info View -Bundle-Vendor: ${bundle.vendor} -Bundle-Version: ${normversion} -Bundle-SymbolicName: org.lwjgl.info;singleton:=true -Bundle-Localization: plugin -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime, - org.eclipse.ui.views, - org.eclipse.core.resources, - org.lwjgl -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -</echo> - <!-- Files are already in place --> - - <!-- ******************************************************************* - * - * org.lwjgl.tools - * - * Build manifest files, not using manifest task, since manifest wraps - * at the wrong positions (at least ant 1.7) - * - ******************************************************************** --> - <!-- Build plugin org.lwjgl.tools --> - <echo file="${build.plugins}/org.lwjgl.tools/META-INF/MANIFEST.MF" encoding="UTF-8">Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: LWJGL Tools Plug-in -Bundle-SymbolicName: org.lwjgl.tools;singleton:=true -Bundle-Version: ${normversion} -Bundle-Vendor: ${bundle.vendor} -Bundle-Activator: org.lwjgl.tools.Activator -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime, - org.eclipse.core.resources;bundle-version="3.4.0", - org.eclipse.jdt.core;bundle-version="3.4.0", - org.eclipse.jdt.ui;bundle-version="3.4.0", - org.lwjgl;bundle-version="${normversion}", - org.eclipse.jdt.launching;bundle-version="3.4.0" -Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -</echo> - <!-- Files are already in place --> - - <!-- ******************************************************************* - * - * org.lwjgl.feature - * - ******************************************************************** --> - <!-- Build org.lwjgl.feature --> - <copy file="${skeletons.dir}/org.lwjgl.feature/feature.xml.template" tofile="${build.plugins}/org.lwjgl.feature/feature.xml" encoding="UTF-8" overwrite="true"> - <filterset> - <filter token="VERSION" value="${normversion}" /> - <filter token="PROVIDERNAME" value="${bundle.vendor}" /> - <filter token="UPDATEURL" value="${eclipse.updatesite}" /> - </filterset> - </copy> - - - - <!-- ******************************************************************* - * - * org.lwjgl.feature.sdk - * - * - ******************************************************************** --> - <!-- Build org.lwjgl.feature --> - <copy file="${skeletons.dir}/org.lwjgl.feature.sdk/feature.xml.template" tofile="${build.plugins}/org.lwjgl.feature.sdk/feature.xml" encoding="UTF-8" overwrite="true"> - <filterset> - <filter token="VERSION" value="${normversion}" /> - <filter token="PROVIDERNAME" value="${bundle.vendor}" /> - <filter token="UPDATEURL" value="${eclipse.updatesite}" /> - </filterset> - </copy> - - <!-- ******************************************************************* - * - * Build update site, i.e. zip all plugins and feature with version - * number to appropriate place - * - ******************************************************************** --> - <!-- Build update site --> - <copy file="${skeletons.dir}/org.lwjgl.updatesite/site.xml.template" tofile="${build.plugins}/org.lwjgl.updatesite/site.xml" encoding="UTF-8" overwrite="true"> - <filterset> - <filter token="VERSION" value="${normversion}" /> - <filter token="PROVIDERNAME" value="${bundle.vendor}" /> - <filter token="UPDATEURL" value="${eclipse.updatesite}" /> - </filterset> - </copy> - <mkdir dir="${build.plugins}/org.lwjgl.updatesite/plugins" /> - <mkdir dir="${build.plugins}/org.lwjgl.updatesite/features" /> - <jar destfile="${build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl_${normversion}.jar" manifest="${build.plugins}/org.lwjgl/META-INF/MANIFEST.MF"> - <fileset dir="${build.plugins}/org.lwjgl" casesensitive="yes" /> - </jar> - <jar destfile="${build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl.doc_${normversion}.jar" manifest="${build.plugins}/org.lwjgl.doc/META-INF/MANIFEST.MF"> - <fileset dir="${build.plugins}/org.lwjgl.doc" casesensitive="yes" /> - </jar> - <jar destfile="${build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl.source_${normversion}.jar" manifest="${build.plugins}/org.lwjgl.source/META-INF/MANIFEST.MF"> - <fileset dir="${build.plugins}/org.lwjgl.source" casesensitive="yes" /> - </jar> - <jar destfile="${build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl.info_${normversion}.jar" manifest="${build.plugins}/org.lwjgl.info/META-INF/MANIFEST.MF"> - <fileset dir="${build.plugins}/org.lwjgl.info" casesensitive="yes" /> - </jar> - <jar destfile="${build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl.tools_${normversion}.jar" manifest="${build.plugins}/org.lwjgl.tools/META-INF/MANIFEST.MF"> - <fileset dir="${build.plugins}/org.lwjgl.tools" casesensitive="yes" /> - </jar> - <jar destfile="${build.plugins}/org.lwjgl.updatesite/features/org.lwjgl_${normversion}.jar"> - <fileset dir="${build.plugins}/org.lwjgl.feature" casesensitive="yes" /> - </jar> - <jar destfile="${build.plugins}/org.lwjgl.updatesite/features/org.lwjgl.sdk_${normversion}.jar"> - <fileset dir="${build.plugins}/org.lwjgl.feature.sdk" casesensitive="yes" /> - </jar> - - <!-- ******************************************************************* - * - * Sign plugins and feature - * - ******************************************************************** --> - - <signjar jar="${build.plugins}/org.lwjgl.updatesite/features/org.lwjgl_${normversion}.jar" keystore="${keystore}" alias="${alias}" storepass="${storepass}" keypass="${keypass}" /> - <signjar jar="${build.plugins}/org.lwjgl.updatesite/features/org.lwjgl.sdk_${normversion}.jar" keystore="${keystore}" alias="${alias}" storepass="${storepass}" keypass="${keypass}" /> - <signjar jar="${build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl_${normversion}.jar" keystore="${keystore}" alias="${alias}" storepass="${storepass}" keypass="${keypass}" /> - <signjar jar="${build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl.doc_${normversion}.jar" keystore="${keystore}" alias="${alias}" storepass="${storepass}" keypass="${keypass}" /> - <signjar jar="${build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl.source_${normversion}.jar" keystore="${keystore}" alias="${alias}" storepass="${storepass}" keypass="${keypass}" /> - <signjar jar="${build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl.info_${normversion}.jar" keystore="${keystore}" alias="${alias}" storepass="${storepass}" keypass="${keypass}" /> - <signjar jar="${build.plugins}/org.lwjgl.updatesite/plugins/org.lwjgl.tools_${normversion}.jar" keystore="${keystore}" alias="${alias}" storepass="${storepass}" keypass="${keypass}" /> - - </target> - - <target name="clean"> - <delete dir="${build.path}" /> - </target> - - <target name="help"> - <echo>Call this build with version number and target dist, e.g.</echo> - <echo> ant -Dversion=1.1.2 dist</echo> - </target> - -</project> \ No newline at end of file Added: trunk/LWJGL/eclipse-update/org.lwjgl.build/buildEclipseClasses.xml =================================================================== --- trunk/LWJGL/eclipse-update/org.lwjgl.build/buildEclipseClasses.xml (rev 0) +++ trunk/LWJGL/eclipse-update/org.lwjgl.build/buildEclipseClasses.xml 2011-12-05 12:41:45 UTC (rev 3706) @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- + ant +(C) 2011 LWJGL-Project +Author: Jens von Pilgrim, dev...@je... +--> + +<project default="buildClasses" basedir="." name="Build Eclipse classes" xmlns:ant4eclipse="antlib:org.ant4eclipse" xmlns:antcontrib="antlib:net.sf.antcontrib"> + + <property name="plugin.lwjgl.org" value="org.lwjgl" /> + <property name="plugin.lwjgl.org.info" value="org.lwjgl.info" /> + <property name="plugin.lwjgl.org.tools" value="org.lwjgl.tools" /> + <property name="classes.folder" value="build/classes" /> + + <property name="plugin.build.folder" value="plugin-classes" /> + + + + <!-- +<property name="" value="" /> +--> + + + <target name="init"> + <echo></echo> + </target> + + <target name="buildClasses" depends="init"> + <mkdir dir="${plugin.build.folder}" /> + <zip basedir="../${plugin.lwjgl.org}/${classes.folder}" destfile="${plugin.build.folder}/${plugin.lwjgl.org}.zip" /> + <zip basedir="../${plugin.lwjgl.org.info}/${classes.folder}" destfile="${plugin.build.folder}/${plugin.lwjgl.org.info}.zip" /> + <zip basedir="../${plugin.lwjgl.org.tools}/${classes.folder}" destfile="${plugin.build.folder}/${plugin.lwjgl.org.tools}.zip" /> + + <jar basedir="anttasks" destfile="anttasks.jar" /> + </target> + + + <target name="clean"> + <delete dir="${plugin.build.folder}" /> + </target> + + <target name="help"> + <echo>Call this ant script in order to create archives containing the classes of all</echo> + <echo>Eclipes plugin related classes, such as Activors.</echo> + <echo>This build file removes the burden of building Eclipse dependent classes from</echo> + <echo>within the main build script</echo> + </target> + +</project> \ No newline at end of file Added: trunk/LWJGL/eclipse-update/org.lwjgl.build/plugin-classes/org.lwjgl.info.zip =================================================================== (Binary files differ) Property changes on: trunk/LWJGL/eclipse-update/org.lwjgl.build/plugin-classes/org.lwjgl.info.zip ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/LWJGL/eclipse-update/org.lwjgl.build/plugin-classes/org.lwjgl.tools.zip =================================================================== (Binary files differ) Property changes on: trunk/LWJGL/eclipse-update/org.lwjgl.build/plugin-classes/org.lwjgl.tools.zip ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/LWJGL/eclipse-update/org.lwjgl.build/plugin-classes/org.lwjgl.zip =================================================================== (Binary files differ) Property changes on: trunk/LWJGL/eclipse-update/org.lwjgl.build/plugin-classes/org.lwjgl.zip ___________________________________________________________________ Added: 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: <sp...@us...> - 2011-12-03 11:10:51
|
Revision: 3705 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3705&view=rev Author: spasi Date: 2011-12-03 11:10:44 +0000 (Sat, 03 Dec 2011) Log Message: ----------- Fixed glTransformFeedbackAttribsNV count argument. 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 2011-11-28 16:40:42 UTC (rev 3704) +++ trunk/LWJGL/src/templates/org/lwjgl/opengl/NV_transform_feedback.java 2011-12-03 11:10:44 UTC (rev 3705) @@ -120,7 +120,7 @@ void glBindBufferBaseNV(@GLenum int target, @GLuint int index, @GLuint int buffer); - void glTransformFeedbackAttribsNV(@AutoSize("attribs") @GLsizei int count, @Const IntBuffer attribs, @GLenum int bufferMode); + void glTransformFeedbackAttribsNV(@Constant("attribs.remaining() / 3") @GLsizei int count, @Check("3") @Const IntBuffer attribs, @GLenum int bufferMode); void glTransformFeedbackVaryingsNV(@GLuint int program, @AutoSize("locations") @GLsizei int count, @Const IntBuffer locations, @GLenum int bufferMode); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpi...@us...> - 2011-11-28 16:40:48
|
Revision: 3704 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3704&view=rev Author: jpilgrim Date: 2011-11-28 16:40:42 +0000 (Mon, 28 Nov 2011) Log Message: ----------- bug fix in Eclipes update site build: native libraries are not copied from skeleton (where they are required for development purposes) anymore Modified Paths: -------------- trunk/LWJGL/eclipse-update/org.lwjgl.build/build.xml Modified: trunk/LWJGL/eclipse-update/org.lwjgl.build/build.xml =================================================================== --- trunk/LWJGL/eclipse-update/org.lwjgl.build/build.xml 2011-11-28 16:23:20 UTC (rev 3703) +++ trunk/LWJGL/eclipse-update/org.lwjgl.build/build.xml 2011-11-28 16:40:42 UTC (rev 3704) @@ -81,6 +81,8 @@ <exclude name="**/.settings/**" /> <exclude name="**/.classpath" /> <exclude name="**/.project" /> + <!-- do not copy native libraries --> + <exclude name="**/native/**" /> </fileset> </copy> <copy todir="${build.plugins}/org.lwjgl"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jpi...@us...> - 2011-11-28 16:23:30
|
Revision: 3703 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3703&view=rev Author: jpilgrim Date: 2011-11-28 16:23:20 +0000 (Mon, 28 Nov 2011) Log Message: ----------- Fixed a bug in the update site build script. Wrong class name of LWJGL plugin activator was specified (org.lwjgl.eclipse.Activator, but correct is org.lwjgl.Activator). Now, the current date/time string is added as a qualifier to the LWJGL version, e.g., org.lwjgl_2.8.2.v20111128-1653 instead of org.lwjgl_2.8.2. This simplifies testing and discouples LWJGL versions from plugin versions. Modified Paths: -------------- trunk/LWJGL/eclipse-update/org.lwjgl.build/.classpath trunk/LWJGL/eclipse-update/org.lwjgl.build/META-INF/MANIFEST.MF trunk/LWJGL/eclipse-update/org.lwjgl.build/build.xml trunk/LWJGL/eclipse-update/org.lwjgl.build/src/java/org/lwjgl/ant/NormalizeVersion.java trunk/LWJGL/eclipse-update/org.lwjgl.build/test/java/org/lwjgl/ant/NormalizeVersionTest.java Modified: trunk/LWJGL/eclipse-update/org.lwjgl.build/.classpath =================================================================== --- trunk/LWJGL/eclipse-update/org.lwjgl.build/.classpath 2011-11-17 21:41:24 UTC (rev 3702) +++ trunk/LWJGL/eclipse-update/org.lwjgl.build/.classpath 2011-11-28 16:23:20 UTC (rev 3703) @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="src" path="src/java"/> <classpathentry kind="src" path="test/java"/> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> - <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="output" path="anttasks"/> </classpath> Modified: trunk/LWJGL/eclipse-update/org.lwjgl.build/META-INF/MANIFEST.MF =================================================================== --- trunk/LWJGL/eclipse-update/org.lwjgl.build/META-INF/MANIFEST.MF 2011-11-17 21:41:24 UTC (rev 3702) +++ trunk/LWJGL/eclipse-update/org.lwjgl.build/META-INF/MANIFEST.MF 2011-11-28 16:23:20 UTC (rev 3703) @@ -9,5 +9,6 @@ org.apache.tools.ant.types, org.apache.tools.ant.types.selectors, org.apache.tools.ant.util, - org.junit;version="4.8.1" + org.junit;version="4" Bundle-Vendor: Lightweight Java Game Library Project +Require-Bundle: org.junit;bundle-version="4.8.1" Modified: trunk/LWJGL/eclipse-update/org.lwjgl.build/build.xml =================================================================== --- trunk/LWJGL/eclipse-update/org.lwjgl.build/build.xml 2011-11-17 21:41:24 UTC (rev 3702) +++ trunk/LWJGL/eclipse-update/org.lwjgl.build/build.xml 2011-11-28 16:23:20 UTC (rev 3703) @@ -54,7 +54,7 @@ <target name="init"> - <normalizeversion version="${version}" property="normversion" /> + <normalizeversion version="${version}" property="normversion" addDateQualifier="yes" /> <echo>Building plugins for version ${version}, normalized version ${normversion}</echo> </target> @@ -209,7 +209,7 @@ Bundle-SymbolicName: org.lwjgl Bundle-Version: ${normversion} Bundle-Vendor: ${bundle.vendor} -Bundle-Activator: org.lwjgl.eclipse.Activator +Bundle-Activator: org.lwjgl.Activator Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime Bundle-ActivationPolicy: lazy Modified: trunk/LWJGL/eclipse-update/org.lwjgl.build/src/java/org/lwjgl/ant/NormalizeVersion.java =================================================================== --- trunk/LWJGL/eclipse-update/org.lwjgl.build/src/java/org/lwjgl/ant/NormalizeVersion.java 2011-11-17 21:41:24 UTC (rev 3702) +++ trunk/LWJGL/eclipse-update/org.lwjgl.build/src/java/org/lwjgl/ant/NormalizeVersion.java 2011-11-28 16:23:20 UTC (rev 3703) @@ -11,6 +11,9 @@ ******************************************************************************/ package org.lwjgl.ant; +import java.text.SimpleDateFormat; +import java.util.Date; + import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Task; @@ -24,7 +27,11 @@ */ public class NormalizeVersion extends Task { - + public final static String SEGMENTS[] = { "major", "minor", "service", + "qualifier" }; + + public final static String VERSION_QUALIFIER_PATTERN = "yyyyMMdd-HHmm"; + /** * name of the property to set */ @@ -32,7 +39,23 @@ protected String version; + protected boolean addDateQualifier = false; + /** + * @return the addQualifier + */ + public boolean isAddDateQualifier() { + return addDateQualifier; + } + + /** + * @param i_addQualifier the addQualifier to set + */ + public void setAddDateQualifier(boolean i_addDateQualifier) { + addDateQualifier = i_addDateQualifier; + } + + /** * @return the property */ public String getProperty() { @@ -57,7 +80,7 @@ * @param i_versionNumber the versionNumber to set */ public void setVersion(String version) { - this.version =version; + this.version = version; } /** @@ -72,6 +95,30 @@ if (version == null) { throw new BuildException("attribute version missing"); } + String s = getVersion().trim(); + int sn = 0; + boolean qualifier = false; + for (int i = 0; i < s.length(); i++) { + if (s.charAt(i) == '.') { + sn++; + } else { + + qualifier = !Character.isDigit(s.charAt(i)); + if (sn < 1 && !Character.isDigit(s.charAt(i))) { + + throw new BuildException( + "Wrong version format, must contain only digits in the " + + SEGMENTS[sn] + " segment, was " + + s.substring(0, i) + ">>" + s.charAt(i) + + "<<" + s.substring(i + 1)); + + } + } + } + if ((sn > 2 || qualifier) && isAddDateQualifier()) { + throw new BuildException( + "Cannot add date qualifier, qualifier already specified"); + } } /** @@ -147,11 +194,11 @@ } n.append(c); } - } + if (!qualifier) { - if (digits.length()>0) { + if (digits.length() > 0) { if (snIndex > 0) n.append('.'); n.append(digits); @@ -166,8 +213,25 @@ case 2: // e.g. "1.2.beta n.append(".0"); } + if (isAddDateQualifier()) + n.append(createDateQualifier()); + } else { + if (isAddDateQualifier()) { + throw new BuildException( + "Cannot add date qualifier, qualifier already specified"); + } } + return n.toString(); } + /** + * @return + */ + private String createDateQualifier() { + return ".v" + + new SimpleDateFormat(VERSION_QUALIFIER_PATTERN) + .format(new Date()); + } + } Modified: trunk/LWJGL/eclipse-update/org.lwjgl.build/test/java/org/lwjgl/ant/NormalizeVersionTest.java =================================================================== --- trunk/LWJGL/eclipse-update/org.lwjgl.build/test/java/org/lwjgl/ant/NormalizeVersionTest.java 2011-11-17 21:41:24 UTC (rev 3702) +++ trunk/LWJGL/eclipse-update/org.lwjgl.build/test/java/org/lwjgl/ant/NormalizeVersionTest.java 2011-11-28 16:23:20 UTC (rev 3703) @@ -67,5 +67,42 @@ } + @Test + public void testQualifier() { + NormalizeVersion t = new NormalizeVersion(); + t.setProperty("normalized"); + t.setAddDateQualifier(true); + + t.setVersion("1"); + String s = t.doExecute(); + Assert.assertEquals(20, s.length()); + Assert.assertTrue(s.startsWith("1.0.0")); + + t.setVersion("1.2"); + s = t.doExecute(); + Assert.assertEquals(20, s.length()); + Assert.assertTrue(s.startsWith("1.2.0")); + + t.setVersion("1.2.3"); + s = t.doExecute(); + Assert.assertEquals(20, s.length()); + Assert.assertTrue(s.startsWith("1.2.3")); + + t.setVersion("2.8.2"); + s = t.doExecute(); + Assert.assertEquals(20, s.length()); + Assert.assertTrue(s.startsWith("2.8.2")); + } + + @Test(expected= BuildException.class) public void dateQualifierWithQualifier() { + NormalizeVersion t = new NormalizeVersion(); + t.setProperty("normalized"); + t.setAddDateQualifier(true); + t.setVersion("1.2.beta"); + t.doExecute(); + } + + + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ka...@us...> - 2011-11-17 21:41:31
|
Revision: 3702 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3702&view=rev Author: kappa1 Date: 2011-11-17 21:41:24 +0000 (Thu, 17 Nov 2011) Log Message: ----------- AppletLoader: fix uncaught null pointer exception 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-11-16 14:36:28 UTC (rev 3701) +++ trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2011-11-17 21:41:24 UTC (rev 3702) @@ -1128,13 +1128,10 @@ return object; } catch (Exception e) { // failed to read file - e.printStackTrace(); + throw e; } finally { fis.close(); } - - // return null if failed to read file - return null; } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sp...@us...> - 2011-11-16 14:36:41
|
Revision: 3701 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3701&view=rev Author: spasi Date: 2011-11-16 14:36:28 +0000 (Wed, 16 Nov 2011) Log Message: ----------- Added support for OpenCL 1.2 [UNTESTED] Modified Paths: -------------- trunk/LWJGL/platform_build/build-generator.xml trunk/LWJGL/src/java/org/lwjgl/opencl/CLBuildProgramCallback.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLChecks.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLContext.java trunk/LWJGL/src/java/org/lwjgl/opencl/CallbackUtil.java trunk/LWJGL/src/java/org/lwjgl/opencl/InfoUtilFactory.java trunk/LWJGL/src/java/org/lwjgl/util/generator/Utils.java trunk/LWJGL/src/java/org/lwjgl/util/generator/opencl/CLPDCapabilitiesGenerator.java trunk/LWJGL/src/native/common/extcl.h trunk/LWJGL/src/native/common/extcl_types.h trunk/LWJGL/src/native/common/org_lwjgl_opencl_CallbackUtil.c trunk/LWJGL/src/templates/org/lwjgl/opencl/CL10.java trunk/LWJGL/src/templates/org/lwjgl/opencl/CL11.java trunk/LWJGL/src/templates/org/lwjgl/opencl/EXT_device_fission.java trunk/LWJGL/src/templates/org/lwjgl/opengl/ARB_separate_shader_objects.java trunk/LWJGL/src/templates/org/lwjgl/opengl/GL41.java Added Paths: ----------- trunk/LWJGL/src/java/org/lwjgl/opencl/CLCompileProgramCallback.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLLinkProgramCallback.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLPrintfCallback.java trunk/LWJGL/src/java/org/lwjgl/opencl/CLProgramCallback.java trunk/LWJGL/src/templates/org/lwjgl/opencl/CL12.java trunk/LWJGL/src/templates/org/lwjgl/opencl/CL12GL.java Modified: trunk/LWJGL/platform_build/build-generator.xml =================================================================== --- trunk/LWJGL/platform_build/build-generator.xml 2011-11-13 21:21:52 UTC (rev 3700) +++ trunk/LWJGL/platform_build/build-generator.xml 2011-11-16 14:36:28 UTC (rev 3701) @@ -36,13 +36,10 @@ <include name="org/lwjgl/opencl/CLPlatform.java"/> <include name="org/lwjgl/opencl/CLDevice.java"/> <include name="org/lwjgl/opencl/CLContext.java"/> - <include name="org/lwjgl/opencl/CLContextCallback.java"/> <include name="org/lwjgl/opencl/CLCommandQueue.java"/> <include name="org/lwjgl/opencl/CLMem.java"/> - <include name="org/lwjgl/opencl/CLMemObjectDestructorCallback.java"/> - <include name="org/lwjgl/opencl/CLBuildProgramCallback.java"/> + <include name="org/lwjgl/opencl/CL*Callback.java"/> <include name="org/lwjgl/opencl/CLNativeKernel.java"/> - <include name="org/lwjgl/opencl/CLEventCallback.java"/> <include name="org/lwjgl/opencl/CLFunctionAddress.java"/> </javac> </target> Modified: trunk/LWJGL/src/java/org/lwjgl/opencl/CLBuildProgramCallback.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opencl/CLBuildProgramCallback.java 2011-11-13 21:21:52 UTC (rev 3700) +++ trunk/LWJGL/src/java/org/lwjgl/opencl/CLBuildProgramCallback.java 2011-11-16 14:36:28 UTC (rev 3701) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2010 LWJGL Project + * Copyright (c) 2002-2011 LWJGL Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,8 +31,6 @@ */ package org.lwjgl.opencl; -import org.lwjgl.PointerWrapperAbstract; - /** * Instances of this class can be used to receive OpenCL program build notifications. * A single CLBuildProgramCallback instance should only be used with programs created @@ -40,37 +38,6 @@ * * @author Spasi */ -public abstract class CLBuildProgramCallback extends PointerWrapperAbstract { +public abstract class CLBuildProgramCallback extends CLProgramCallback { - private CLContext context; - - protected CLBuildProgramCallback() { - super(CallbackUtil.getBuildProgramCallback()); - } - - /** - * Sets the context that contains the CLPrograms to which we're registered. - * - * @param context the CLContext object - */ - void setContext(final CLContext context) { - this.context = context; - } - - /** - * Called from native code. - * - * @param program_address the CLProgram object pointer - */ - private void handleMessage(long program_address) { - handleMessage(context.getCLProgram(program_address)); - } - - /** - * The callback method. - * - * @param program the CLProgram object that was built - */ - protected abstract void handleMessage(CLProgram program); - } \ No newline at end of file Modified: trunk/LWJGL/src/java/org/lwjgl/opencl/CLChecks.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opencl/CLChecks.java 2011-11-13 21:21:52 UTC (rev 3700) +++ trunk/LWJGL/src/java/org/lwjgl/opencl/CLChecks.java 2011-11-16 14:36:28 UTC (rev 3701) @@ -53,23 +53,23 @@ /** * Calculates the number of bytes in the specified cl_mem buffer rectangle region. * - * @param origin the host origin + * @param offset the host offset * @param region the rectangle region * @param row_pitch the host row pitch * @param slice_pitch the host slice pitch * * @return the region size in bytes */ - static int calculateBufferRectSize(final PointerBuffer origin, final PointerBuffer region, long row_pitch, long slice_pitch) { + static int calculateBufferRectSize(final PointerBuffer offset, final PointerBuffer region, long row_pitch, long slice_pitch) { if ( !LWJGLUtil.CHECKS ) return 0; - final long x = origin.get(0); - final long y = origin.get(1); - final long z = origin.get(2); + final long x = offset.get(0); + final long y = offset.get(1); + final long z = offset.get(2); if ( LWJGLUtil.DEBUG && (x < 0 || y < 0 || z < 0) ) - throw new IllegalArgumentException("Invalid cl_mem host origin: " + x + ", " + y + ", " + z); + throw new IllegalArgumentException("Invalid cl_mem host offset: " + x + ", " + y + ", " + z); final long w = region.get(0); final long h = region.get(1); Added: trunk/LWJGL/src/java/org/lwjgl/opencl/CLCompileProgramCallback.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opencl/CLCompileProgramCallback.java (rev 0) +++ trunk/LWJGL/src/java/org/lwjgl/opencl/CLCompileProgramCallback.java 2011-11-16 14:36:28 UTC (rev 3701) @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2002-2011 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.opencl; + +/** + * Instances of this class can be used to receive OpenCL program compilation notifications. + * A single CLCompileProgramCallback instance should only be used with programs created + * in the same CLContext. + * + * @author Spasi + */ +public abstract class CLCompileProgramCallback extends CLProgramCallback { + +} \ No newline at end of file Modified: trunk/LWJGL/src/java/org/lwjgl/opencl/CLContext.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opencl/CLContext.java 2011-11-13 21:21:52 UTC (rev 3700) +++ trunk/LWJGL/src/java/org/lwjgl/opencl/CLContext.java 2011-11-16 14:36:28 UTC (rev 3701) @@ -49,11 +49,15 @@ private static final CLContextUtil util = (CLContextUtil)CLPlatform.getInfoUtilInstance(CLContext.class, "CL_CONTEXT_UTIL"); private final CLObjectRegistry<CLCommandQueue> clCommandQueues; - private final CLObjectRegistry<CLMem> clMems; - private final CLObjectRegistry<CLSampler> clSamplers; - private final CLObjectRegistry<CLProgram> clPrograms; - private final CLObjectRegistry<CLEvent> clEvents; + private final CLObjectRegistry<CLMem> clMems; + private final CLObjectRegistry<CLSampler> clSamplers; + private final CLObjectRegistry<CLProgram> clPrograms; + private final CLObjectRegistry<CLEvent> clEvents; + private long + contextCallback, + printfCallback; + CLContext(final long pointer, final CLPlatform platform) { super(pointer, platform); @@ -269,4 +273,50 @@ CLObjectRegistry<CLEvent> getCLEventRegistry() { return clEvents; } + private boolean checkCallback(final long callback, final int result) { + if ( result == 0 && (callback == 0 || isValid()) ) + return true; + + if ( callback != 0 ) + CallbackUtil.deleteGlobalRef(callback); + return false; + } + + /** + * Associates this context with the specified context callback reference. If the context + * is invalid, the callback reference is deleted. NO-OP if user_data is 0. + * + * @param callback the context callback pointer + */ + void setContextCallback(final long callback) { + if ( checkCallback(callback, 0) ) + this.contextCallback = callback; + } + + /** + * Associates this context with the specified printf callback reference. If the context + * is invalid, the callback reference is deleted. NO-OP if user_data is 0. + * + * @param callback the printf callback pointer + */ + void setPrintfCallback(final long callback, final int result) { + if ( checkCallback(callback, result) ) + this.printfCallback = callback; + } + + /** + * Decrements the context's reference count. If the reference + * count hits zero, it also deletes + * any callback objects associated with it. + */ + void releaseImpl() { + if ( release() > 0 ) + return; + + if ( contextCallback != 0 ) + CallbackUtil.deleteGlobalRef(contextCallback); + if ( printfCallback != 0 ) + CallbackUtil.deleteGlobalRef(printfCallback); + } + } \ No newline at end of file Added: trunk/LWJGL/src/java/org/lwjgl/opencl/CLLinkProgramCallback.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opencl/CLLinkProgramCallback.java (rev 0) +++ trunk/LWJGL/src/java/org/lwjgl/opencl/CLLinkProgramCallback.java 2011-11-16 14:36:28 UTC (rev 3701) @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2002-2011 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.opencl; + +/** + * Instances of this class can be used to receive OpenCL program linkage notifications. + * A single CLLinkProgramCallback instance should only be used with programs created + * in the same CLContext. + * + * @author Spasi + */ +public abstract class CLLinkProgramCallback extends CLProgramCallback { + +} \ No newline at end of file Added: trunk/LWJGL/src/java/org/lwjgl/opencl/CLPrintfCallback.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opencl/CLPrintfCallback.java (rev 0) +++ trunk/LWJGL/src/java/org/lwjgl/opencl/CLPrintfCallback.java 2011-11-16 14:36:28 UTC (rev 3701) @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2002-2011 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.opencl; + +import org.lwjgl.PointerWrapperAbstract; + +/** + * Instances of this class can be used to receive OpenCL printf messages. + * Different CLContexts should use different CLPrintfCallback instances. + * + * @author Spasi + */ +public abstract class CLPrintfCallback extends PointerWrapperAbstract { + + protected CLPrintfCallback() { + super(CallbackUtil.getPrintfCallback()); + } + + /** The callback method. */ + protected abstract void handleMessage(String data); + +} \ No newline at end of file Added: trunk/LWJGL/src/java/org/lwjgl/opencl/CLProgramCallback.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opencl/CLProgramCallback.java (rev 0) +++ trunk/LWJGL/src/java/org/lwjgl/opencl/CLProgramCallback.java 2011-11-16 14:36:28 UTC (rev 3701) @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2002-2011 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.opencl; + +import org.lwjgl.PointerWrapperAbstract; + +/** + * Base class for OpenCL program action notifications. + * + * @author Spasi + */ +abstract class CLProgramCallback extends PointerWrapperAbstract { + + private CLContext context; + + protected CLProgramCallback() { + super(CallbackUtil.getProgramCallback()); + } + + /** + * Sets the context that contains the CLPrograms to which we're registered. + * + * @param context the CLContext object + */ + final void setContext(final CLContext context) { + this.context = context; + } + + /** + * Called from native code. + * + * @param program_address the CLProgram object pointer + */ + private void handleMessage(long program_address) { + handleMessage(context.getCLProgram(program_address)); + } + + /** + * The callback method. + * + * @param program the CLProgram object affected + */ + protected abstract void handleMessage(CLProgram program); + +} \ No newline at end of file Modified: trunk/LWJGL/src/java/org/lwjgl/opencl/CallbackUtil.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opencl/CallbackUtil.java 2011-11-13 21:21:52 UTC (rev 3700) +++ trunk/LWJGL/src/java/org/lwjgl/opencl/CallbackUtil.java 2011-11-16 14:36:28 UTC (rev 3701) @@ -70,7 +70,7 @@ * * @param ref the GlobalRef memory address. */ - private static native void deleteGlobalRef(long ref); + static native void deleteGlobalRef(long ref); /** * Deletes the global reference represented by user_data if an OpenCL error occured. @@ -99,40 +99,6 @@ */ static native long getContextCallback(); - /** - * Associates the specified CLContext with the specified global reference. If the context - * is invalid, the global reference is deleted. NO-OP if user_data is 0. - * - * @param context the CLContext to register - * @param user_data the global reference pointer - */ - static void registerCallback(final CLContext context, final long user_data) { - if ( user_data == 0 ) - return; - - if ( context.isValid() ) - contextUserData.put(context, user_data); - else - deleteGlobalRef(user_data); - } - - /** - * Decrements the specified context's reference count, clears its association - * with a CLContextCallback object if it exists and deletes the corresponding - * global reference. - * - * @param context the CLContext to unregister - */ - static void unregisterCallback(final CLContext context) { - if ( context.release() > 0 ) - return; - - final Long user_data = contextUserData.remove(context); - - if ( user_data != null ) - deleteGlobalRef(user_data); - } - /* [ Other callback functionality ] The other callbacks are simpler. We create the GlobalRef before passing the callback, we delete it when we receive the callback call. @@ -150,7 +116,7 @@ * * @return the callback function address */ - static native long getBuildProgramCallback(); + static native long getProgramCallback(); /** * Returns the memory address of the native function we pass to clEnqueueNativeKernel. @@ -167,6 +133,13 @@ static native long getEventCallback(); /** + * Returns the memory address of the native function we pass to clSetPrintfCallback. + * + * @return the callback function address + */ + static native long getPrintfCallback(); + + /** * Returns the memory address of the native function we pass to clCreateContext(FromType), * when <code>APPLEContextLoggingUtil.SYSTEM_LOG_CALLBACK</code> is used. * Modified: trunk/LWJGL/src/java/org/lwjgl/opencl/InfoUtilFactory.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opencl/InfoUtilFactory.java 2011-11-13 21:21:52 UTC (rev 3700) +++ trunk/LWJGL/src/java/org/lwjgl/opencl/InfoUtilFactory.java 2011-11-16 14:36:28 UTC (rev 3701) @@ -123,7 +123,7 @@ Util.checkCLError(errcode_ret.get(0)); return __result; } finally { - CallbackUtil.registerCallback(__result, user_data); + if ( __result != null ) __result.setContextCallback(user_data); } } Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/Utils.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/Utils.java 2011-11-13 21:21:52 UTC (rev 3700) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/Utils.java 2011-11-16 14:36:28 UTC (rev 3701) @@ -373,20 +373,22 @@ if ( param != null && p.getSimpleName().equals(param.getSimpleName()) ) break; + if ( p.getAnnotation(NullTerminated.class) != null ) + continue; + final Class type = Utils.getJavaType(p.getType()); if ( type.equals(CharSequence.class) ) { if ( offset == null ) offset = p.getSimpleName() + ".length()"; else offset += " + " + p.getSimpleName() + ".length()"; - if ( p.getAnnotation(NullTerminated.class) != null ) offset += " + 1"; - + //if ( p.getAnnotation(NullTerminated.class) != null ) offset += " + 1"; } else if ( type.equals(CharSequence[].class) ) { if ( offset == null ) offset = "APIUtil.getTotalLength(" + p.getSimpleName() + ")"; else offset += " + APIUtil.getTotalLength(" + p.getSimpleName() + ")"; - if ( p.getAnnotation(NullTerminated.class) != null ) offset += " + " + p.getSimpleName() + ".length"; + //if ( p.getAnnotation(NullTerminated.class) != null ) offset += " + " + p.getSimpleName() + ".length"; } } Modified: trunk/LWJGL/src/java/org/lwjgl/util/generator/opencl/CLPDCapabilitiesGenerator.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/util/generator/opencl/CLPDCapabilitiesGenerator.java 2011-11-13 21:21:52 UTC (rev 3700) +++ trunk/LWJGL/src/java/org/lwjgl/util/generator/opencl/CLPDCapabilitiesGenerator.java 2011-11-16 14:36:28 UTC (rev 3701) @@ -51,7 +51,7 @@ // TODO: Add future versions here private static final int[][] CL_VERSIONS = { - { 1 }, // OpenCL 1 + { 1, 2 }, // OpenCL 1 }; static void generateClassPrologue(final PrintWriter writer, final String name) { Modified: trunk/LWJGL/src/native/common/extcl.h =================================================================== --- trunk/LWJGL/src/native/common/extcl.h 2011-11-13 21:21:52 UTC (rev 3700) +++ trunk/LWJGL/src/native/common/extcl.h 2011-11-16 14:36:28 UTC (rev 3701) @@ -61,9 +61,10 @@ typedef void (CL_CALLBACK * cl_create_context_callback)(const char *errinfo, const void *private_info, size_t cb, void *user_data); typedef void (CL_CALLBACK * cl_mem_object_destructor_callback)(cl_mem memobj, void *user_data); -typedef void (CL_CALLBACK * cl_build_program_callback)(cl_program program, void *user_data); +typedef void (CL_CALLBACK * cl_program_callback)(cl_program program, void *user_data); typedef void (CL_CALLBACK * cl_event_callback)(cl_event event, cl_int event_command_exec_status, void *user_data); typedef void (CL_CALLBACK * cl_native_kernel_func)(void *args); +typedef void (CL_CALLBACK * cl_printf_callback)(cl_context context, cl_uint printf_data_len, char *printf_data_ptr, void *user_data); // -----------------[ Cross-platform functions ]----------------- Modified: trunk/LWJGL/src/native/common/extcl_types.h =================================================================== --- trunk/LWJGL/src/native/common/extcl_types.h 2011-11-13 21:21:52 UTC (rev 3700) +++ trunk/LWJGL/src/native/common/extcl_types.h 2011-11-16 14:36:28 UTC (rev 3701) @@ -20,8 +20,10 @@ typedef cl_uint cl_device_local_mem_type; typedef cl_bitfield cl_device_exec_capabilities; typedef cl_bitfield cl_command_queue_properties; +typedef intptr_t cl_device_partition_property; +typedef cl_bitfield cl_device_affinity_domain; -typedef intptr_t cl_context_properties; +typedef intptr_t cl_context_properties; typedef cl_uint cl_context_info; typedef cl_uint cl_command_queue_info; typedef cl_uint cl_channel_order; @@ -29,6 +31,7 @@ typedef cl_bitfield cl_mem_flags; typedef cl_uint cl_mem_object_type; typedef cl_uint cl_mem_info; +typedef cl_bitfield cl_mem_migration_flags; typedef cl_uint cl_image_info; typedef cl_uint cl_buffer_create_type; typedef cl_uint cl_addressing_mode; @@ -37,8 +40,12 @@ typedef cl_bitfield cl_map_flags; typedef cl_uint cl_program_info; typedef cl_uint cl_program_build_info; +typedef cl_uint cl_program_binary_type; typedef cl_int cl_build_status; typedef cl_uint cl_kernel_info; +typedef cl_uint cl_kernel_arg_info; +typedef cl_uint cl_kernel_arg_address_qualifier; +typedef cl_uint cl_kernel_arg_access_qualifier; typedef cl_uint cl_kernel_work_group_info; typedef cl_uint cl_event_info; typedef cl_uint cl_command_type; @@ -49,6 +56,19 @@ cl_channel_type image_channel_data_type; } cl_image_format; +typedef struct _cl_image_desc { + cl_mem_object_type image_type; + size_t image_width; + size_t image_height; + size_t image_depth; + size_t image_array_size; + size_t image_row_pitch; + size_t image_slice_pitch; + cl_uint num_mip_levels; + cl_uint num_samples; + cl_mem buffer; +} cl_image_desc; + typedef struct _cl_buffer_region { size_t origin; size_t size; @@ -63,7 +83,7 @@ // -----------------[ Extension typedefs ]----------------- // EXT_device_fission -typedef cl_bitfield cl_device_partition_property_ext; +typedef cl_ulong cl_device_partition_property_ext; // EXT_migrate_memobject typedef cl_bitfield cl_mem_migration_flags_ext; Modified: trunk/LWJGL/src/native/common/org_lwjgl_opencl_CallbackUtil.c =================================================================== --- trunk/LWJGL/src/native/common/org_lwjgl_opencl_CallbackUtil.c 2011-11-13 21:21:52 UTC (rev 3700) +++ trunk/LWJGL/src/native/common/org_lwjgl_opencl_CallbackUtil.c 2011-11-16 14:36:28 UTC (rev 3701) @@ -43,9 +43,10 @@ static jmethodID contextCallbackJ; static jmethodID memObjectDestructorCallbackJ; -static jmethodID buildProgramCallbackJ; +static jmethodID programCallbackJ; static jmethodID nativeKernelCallbackJ; static jmethodID eventCallbackJ; +static jmethodID printfCallbackJ; JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CallbackUtil_ncreateGlobalRef(JNIEnv *env, jclass clazz, jobject obj) { return (intptr_t)(*env)->NewGlobalRef(env, obj); @@ -113,13 +114,13 @@ return (jlong)(intptr_t)&memObjectDestructorCallback; } -// ----------------- [ MEM OBJECT DESTRUCTOR CALLBACK ] ----------------- +// ----------------- [ PROGRAM CALLBACK ] ----------------- -static void CL_CALLBACK buildProgramCallback(cl_program program, void *user_data) { +static void CL_CALLBACK programCallback(cl_program program, void *user_data) { JNIEnv *env = attachCurrentThread(); - if ( env != NULL && !(*env)->ExceptionOccurred(env) && buildProgramCallbackJ != NULL ) { - (*env)->CallVoidMethod(env, (jobject)user_data, buildProgramCallbackJ, + if ( env != NULL && !(*env)->ExceptionOccurred(env) && programCallbackJ != NULL ) { + (*env)->CallVoidMethod(env, (jobject)user_data, programCallbackJ, (jlong)(intptr_t)program ); (*env)->DeleteGlobalRef(env, (jobject)user_data); @@ -128,16 +129,16 @@ detachCurrentThread(); } -JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CallbackUtil_getBuildProgramCallback(JNIEnv *env, jclass clazz) { +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CallbackUtil_getProgramCallback(JNIEnv *env, jclass clazz) { // Cache the callback methodID jclass callbackClass; - if ( buildProgramCallbackJ == NULL ) { - callbackClass = (*env)->FindClass(env, "org/lwjgl/opencl/CLBuildProgramCallback"); + if ( programCallbackJ == NULL ) { + callbackClass = (*env)->FindClass(env, "org/lwjgl/opencl/CLProgramCallback"); if ( callbackClass != NULL ) - buildProgramCallbackJ = (*env)->GetMethodID(env, callbackClass, "handleMessage", "(J)V"); + programCallbackJ = (*env)->GetMethodID(env, callbackClass, "handleMessage", "(J)V"); } - return (jlong)(intptr_t)&buildProgramCallback; + return (jlong)(intptr_t)&programCallback; } // ----------------- [ NATIVE KERNEL CALLBACK ] ----------------- @@ -214,6 +215,32 @@ return (jlong)(intptr_t)&eventCallback; } +// ----------------- [ PRINTF CALLBACK ] ----------------- + +static void CL_CALLBACK printfCallback(cl_context context, cl_uint printf_data_len, char *printf_data_ptr, void *user_data) { + JNIEnv *env = attachCurrentThread(); + + if ( env != NULL && !(*env)->ExceptionOccurred(env) && printfCallbackJ != NULL ) { + (*env)->CallVoidMethod(env, (jobject)user_data, printfCallbackJ, + NewStringNativeWithLength(env, printf_data_ptr, printf_data_len) + ); + } + + detachCurrentThread(); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CallbackUtil_getPrintfCallback(JNIEnv *env, jclass clazz) { + // Cache the callback methodID + jclass callbackClass; + if ( printfCallbackJ == NULL ) { + callbackClass = (*env)->FindClass(env, "org/lwjgl/opencl/CLPrintfCallback"); + if ( callbackClass != NULL ) + printfCallbackJ = (*env)->GetMethodID(env, callbackClass, "handleMessage", "(Ljava/lang/String;)V"); + } + + return (jlong)(intptr_t)&printfCallback; +} + // ----------------- [ APPLE_ContextLoggingFunctions CALLBACKS ] ----------------- JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CallbackUtil_getLogMessageToSystemLogAPPLE(JNIEnv *env, jclass clazz) { Modified: trunk/LWJGL/src/templates/org/lwjgl/opencl/CL10.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opencl/CL10.java 2011-11-13 21:21:52 UTC (rev 3700) +++ trunk/LWJGL/src/templates/org/lwjgl/opencl/CL10.java 2011-11-16 14:36:28 UTC (rev 3701) @@ -399,7 +399,7 @@ // Create a GlobalRef to the callback object. javaBeforeNative = "\t\tlong user_data = pfn_notify == null || pfn_notify.isCustom() ? 0 : CallbackUtil.createGlobalRef(pfn_notify);", // Associate context with the GlobalRef, so we can delete it later. - javaFinally = "\t\t\tCallbackUtil.registerCallback(__result, user_data);" + javaFinally = "\t\t\tif ( __result != null ) __result.setContextCallback(user_data);" ) @Check(value = "errcode_ret", canBeNull = true) @PointerWrapper(value = "cl_context", params = "APIUtil.getCLPlatform(properties)") @@ -417,7 +417,7 @@ // Create a GlobalRef to the callback object. javaBeforeNative = "\t\tlong user_data = pfn_notify == null || pfn_notify.isCustom() ? 0 : CallbackUtil.createGlobalRef(pfn_notify);", // Associate context with the GlobalRef, so we can delete it later. - javaFinally = "\t\t\tCallbackUtil.registerCallback(__result, user_data);" + javaFinally = "\t\t\tif ( __result != null ) __result.setContextCallback(user_data);" ) @Check(value = "errcode_ret", canBeNull = true) @PointerWrapper(value = "cl_context", params = "APIUtil.getCLPlatform(properties)") @@ -434,7 +434,7 @@ // Create a GlobalRef to the callback object. javaBeforeNative = "\t\tlong user_data = pfn_notify == null || pfn_notify.isCustom() ? 0 : CallbackUtil.createGlobalRef(pfn_notify);", // Associate context with the GlobalRef, so we can delete it later. - javaFinally = "\t\t\tCallbackUtil.registerCallback(__result, user_data);" + javaFinally = "\t\t\tif ( __result != null ) __result.setContextCallback(user_data);" ) @Check(value = "errcode_ret", canBeNull = true) @PointerWrapper(value = "cl_context", params = "APIUtil.getCLPlatform(properties)") @@ -450,7 +450,7 @@ @Code( javaBeforeNative = "\t\tAPIUtil.releaseObjects(context);", - javaAfterNative = "\t\tif ( __result == CL_SUCCESS ) CallbackUtil.unregisterCallback(context);" + javaAfterNative = "\t\tif ( __result == CL_SUCCESS ) context.releaseImpl();" ) @cl_int int clReleaseContext(@PointerWrapper("cl_context") CLContext context); @@ -511,7 +511,7 @@ @PointerWrapper("cl_mem") CLMem buffer, @cl_bool int blocking_read, @size_t long offset, - @AutoSize("ptr") @size_t long cb, + @AutoSize("ptr") @size_t long size, @OutParameter @cl_byte @cl_short @@ -529,7 +529,7 @@ @PointerWrapper("cl_mem") CLMem buffer, @cl_bool int blocking_write, @size_t long offset, - @AutoSize("ptr") @size_t long cb, + @AutoSize("ptr") @size_t long size, @Const @cl_byte @cl_short @@ -548,7 +548,7 @@ @PointerWrapper("cl_mem") CLMem dst_buffer, @size_t long src_offset, @size_t long dst_offset, - @size_t long cb, + @size_t long size, @AutoSize(value = "event_wait_list", canBeNull = true) @cl_uint int num_events_in_wait_list, @Check(canBeNull = true) @Const @NativeType("cl_event") PointerBuffer event_wait_list, @OutParameter @Check(value = "1", canBeNull = true) @NativeType("cl_event") PointerBuffer event); @@ -556,13 +556,13 @@ @Code(javaAfterNative = "\t\tif ( __result != null ) command_queue.registerCLEvent(event);") @Check(value = "errcode_ret", canBeNull = true) @cl_void - @AutoSize("cb") + @AutoSize("size") ByteBuffer clEnqueueMapBuffer(@PointerWrapper("cl_command_queue") CLCommandQueue command_queue, @PointerWrapper("cl_mem") CLMem buffer, @cl_bool int blocking_map, @NativeType("cl_map_flags") long map_flags, @size_t long offset, - @size_t long cb, + @size_t long size, @AutoSize(value = "event_wait_list", canBeNull = true) @cl_uint int num_events_in_wait_list, @Check(canBeNull = true) @Const @NativeType("cl_event") PointerBuffer event_wait_list, @OutParameter @Check(value = "1", canBeNull = true) @NativeType("cl_event") PointerBuffer event, @@ -855,7 +855,7 @@ @AutoSize(value = "device_list", canBeNull = true) @cl_uint int num_devices, @Check(canBeNull = true) @Const @NativeType("cl_device_id") PointerBuffer device_list, @Check @NullTerminated @Const @cl_char ByteBuffer options, - @PointerWrapper(value = "cl_build_program_callback", canBeNull = true) CLBuildProgramCallback pfn_notify, + @PointerWrapper(value = "cl_program_callback", canBeNull = true) CLBuildProgramCallback pfn_notify, @Constant("user_data") @PointerWrapper("void *") long user_data); @Alternate("clBuildProgram") @@ -872,7 +872,7 @@ @AutoSize(value = "device_list", canBeNull = true) @cl_uint int num_devices, @Check(canBeNull = true) @Const @NativeType("cl_device_id") PointerBuffer device_list, @NullTerminated @Const CharSequence options, - @PointerWrapper(value = "cl_build_program_callback", canBeNull = true) CLBuildProgramCallback pfn_notify, + @PointerWrapper(value = "cl_program_callback", canBeNull = true) CLBuildProgramCallback pfn_notify, @Constant("user_data") @PointerWrapper("void *") long user_data); @Alternate("clBuildProgram") @@ -889,7 +889,7 @@ @Constant("1") @cl_uint int num_devices, @Constant(value = "APIUtil.getPointer(device)", keepParam = true) CLDevice device, @NullTerminated @Const CharSequence options, - @PointerWrapper(value = "cl_build_program_callback", canBeNull = true) CLBuildProgramCallback pfn_notify, + @PointerWrapper(value = "cl_program_callback", canBeNull = true) CLBuildProgramCallback pfn_notify, @Constant("user_data") @PointerWrapper("void *") long user_data); @cl_int Modified: trunk/LWJGL/src/templates/org/lwjgl/opencl/CL11.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opencl/CL11.java 2011-11-13 21:21:52 UTC (rev 3700) +++ trunk/LWJGL/src/templates/org/lwjgl/opencl/CL11.java 2011-11-16 14:36:28 UTC (rev 3701) @@ -121,14 +121,14 @@ int clEnqueueReadBufferRect(@PointerWrapper("cl_command_queue") CLCommandQueue command_queue, @PointerWrapper("cl_mem") CLMem buffer, @cl_bool int blocking_read, - @Const @Check("3") @NativeType("size_t") PointerBuffer buffer_origin, - @Const @Check("3") @NativeType("size_t") PointerBuffer host_origin, + @Const @Check("3") @NativeType("size_t") PointerBuffer buffer_offset, + @Const @Check("3") @NativeType("size_t") PointerBuffer host_offset, @Const @Check("3") @NativeType("size_t") PointerBuffer region, @size_t long buffer_row_pitch, @size_t long buffer_slice_pitch, @size_t long host_row_pitch, @size_t long host_slice_pitch, - @OutParameter @Check("CLChecks.calculateBufferRectSize(host_origin, region, host_row_pitch, host_slice_pitch)") + @OutParameter @Check("CLChecks.calculateBufferRectSize(host_offset, region, host_row_pitch, host_slice_pitch)") @cl_byte @cl_short @cl_int @@ -144,14 +144,14 @@ int clEnqueueWriteBufferRect(@PointerWrapper("cl_command_queue") CLCommandQueue command_queue, @PointerWrapper("cl_mem") CLMem buffer, @cl_bool int blocking_write, - @Const @Check("3") @NativeType("size_t") PointerBuffer buffer_origin, - @Const @Check("3") @NativeType("size_t") PointerBuffer host_origin, + @Const @Check("3") @NativeType("size_t") PointerBuffer buffer_offset, + @Const @Check("3") @NativeType("size_t") PointerBuffer host_offset, @Const @Check("3") @NativeType("size_t") PointerBuffer region, @size_t long buffer_row_pitch, @size_t long buffer_slice_pitch, @size_t long host_row_pitch, @size_t long host_slice_pitch, - @Const @Check("CLChecks.calculateBufferRectSize(host_origin, region, host_row_pitch, host_slice_pitch)") + @Const @Check("CLChecks.calculateBufferRectSize(host_offset, region, host_row_pitch, host_slice_pitch)") @cl_byte @cl_short @cl_int Added: trunk/LWJGL/src/templates/org/lwjgl/opencl/CL12.java =================================================================== --- trunk/LWJGL/src/templates/org/lwjgl/opencl/CL12.java (rev 0) +++ trunk/LWJGL/src/templates/org/lwjgl/opencl/CL12.java 2011-11-16 14:36:28 UTC (rev 3701) @@ -0,0 +1,445 @@ +/* + * 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.opencl; + +import org.lwjgl.PointerBuffer; +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opencl.*; + +import java.nio.Buffer; +import java.nio.ByteBuffer; +import java.nio.IntBuffer; +import java.nio.LongBuffer; + +/** The core OpenCL 1.1 API */ +public interface CL12 { + + /** Error Codes */ + int CL_COMPILE_PROGRAM_FAILURE = -15, + CL_LINKER_NOT_AVAILABLE = -16, + CL_LINK_PROGRAM_FAILURE = -17, + CL_DEVICE_PARTITION_FAILED = -18, + CL_KERNEL_ARG_INFO_NOT_AVAILABLE = -19, + CL_INVALID_IMAGE_DESCRIPTOR = -65, + CL_INVALID_COMPILER_OPTIONS = -66, + CL_INVALID_LINKER_OPTIONS = -67, + CL_INVALID_DEVICE_PARTITION_COUNT = -68; + + /** OpenCL Version */ + int CL_VERSION_1_2 = 1; + + /** cl_bool */ + int CL_BLOCKING = CL10.CL_TRUE, + CL_NON_BLOCKING = CL10.CL_FALSE; + + /** cl_device_type - bitfield */ + int CL_DEVICE_TYPE_CUSTOM = (1 << 4); + + /* cl_device_info */ + int CL_DEVICE_DOUBLE_FP_CONFIG = 0x1032, + CL_DEVICE_LINKER_AVAILABLE = 0x103E, + CL_DEVICE_BUILT_IN_KERNELS = 0x103F, + CL_DEVICE_IMAGE_MAX_BUFFER_SIZE = 0x1040, + CL_DEVICE_IMAGE_MAX_ARRAY_SIZE = 0x1041, + CL_DEVICE_PARENT_DEVICE = 0x1042, + CL_DEVICE_PARTITION_MAX_SUB_DEVICES = 0x1043, + CL_DEVICE_PARTITION_PROPERTIES = 0x1044, + CL_DEVICE_PARTITION_AFFINITY_DOMAIN = 0x1045, + CL_DEVICE_PARTITION_TYPE = 0x1046, + CL_DEVICE_REFERENCE_COUNT = 0x1047, + CL_DEVICE_PREFERRED_INTEROP_USER_SYNC = 0x1048, + CL_DEVICE_PRINTF_BUFFER_SIZE = 0x1049; + + /* cl_device_fp_config - bitfield */ + int CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT = (1 << 7); + + /* cl_context_properties */ + int CL_CONTEXT_INTEROP_USER_SYNC = 0x1085; + + /* cl_device_partition_property */ + int CL_DEVICE_PARTITION_EQUALLY = 0x1086, + CL_DEVICE_PARTITION_BY_COUNTS = 0x1087, + CL_DEVICE_PARTITION_BY_COUNTS_LIST_END = 0x0, + CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN = 0x1088; + + /* cl_device_affinity_domain */ + int CL_DEVICE_AFFINITY_DOMAIN_NUMA = (1 << 0), + CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE = (1 << 1), + CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE = (1 << 2), + CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE = (1 << 3), + CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE = (1 << 4), + CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE = (1 << 5); + + /* cl_mem_flags - bitfield */ + int CL_MEM_HOST_WRITE_ONLY = (1 << 7), + CL_MEM_HOST_READ_ONLY = (1 << 8), + CL_MEM_HOST_NO_ACCESS = (1 << 9); + + /* cl_mem_migration_flags - bitfield */ + int CL_MIGRATE_MEM_OBJECT_HOST = (1 << 0), + CL_MIGRATE_MEM_OBJECT_CONTENT_UNDEFINED = (1 << 1); + + /* cl_mem_object_type */ + int CL_MEM_OBJECT_IMAGE2D_ARRAY = 0x10F3, + CL_MEM_OBJECT_IMAGE1D = 0x10F4, + CL_MEM_OBJECT_IMAGE1D_ARRAY = 0x10F5, + CL_MEM_OBJECT_IMAGE1D_BUFFER = 0x10F6; + + /* cl_image_info */ + int CL_IMAGE_ARRAY_SIZE = 0x1117, + CL_IMAGE_BUFFER = 0x1118, + CL_IMAGE_NUM_MIP_LEVELS = 0x1119, + CL_IMAGE_NUM_SAMPLES = 0x111A; + + /* cl_map_flags - bitfield */ + int CL_MAP_WRITE_INVALIDATE_REGION = (1 << 2); + + /* cl_program_info */ + int CL_PROGRAM_NUM_KERNELS = 0x1167, + CL_PROGRAM_KERNEL_NAMES = 0x1168; + + /* cl_program_build_info */ + int CL_PROGRAM_BINARY_TYPE = 0x1184; + + /* cl_program_binary_type */ + int CL_PROGRAM_BINARY_TYPE_NONE = 0x0, + CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT = 0x1, + CL_PROGRAM_BINARY_TYPE_LIBRARY = 0x2, + CL_PROGRAM_BINARY_TYPE_EXECUTABLE = 0x4; + + /* cl_kernel_info */ + int CL_KERNEL_ATTRIBUTES = 0x1195; + + /* cl_kernel_arg_info */ + int CL_KERNEL_ARG_ADDRESS_QUALIFIER = 0x1196, + CL_KERNEL_ARG_ACCESS_QUALIFIER = 0x1197, + CL_KERNEL_ARG_TYPE_NAME = 0x1198, + CL_KERNEL_ARG_NAME = 0x1199; + + /* cl_kernel_arg_address_qualifier */ + int CL_KERNEL_ARG_ADDRESS_GLOBAL = 0x119A, + CL_KERNEL_ARG_ADDRESS_LOCAL = 0x119B, + CL_KERNEL_ARG_ADDRESS_CONSTANT = 0x119C, + CL_KERNEL_ARG_ADDRESS_PRIVATE = 0x119D; + + /* cl_kernel_arg_access_qualifier */ + int CL_KERNEL_ARG_ACCESS_READ_ONLY = 0x11A0, + CL_KERNEL_ARG_ACCESS_WRITE_ONLY = 0x11A1, + CL_KERNEL_ARG_ACCESS_READ_WRITE = 0x11A2, + CL_KERNEL_ARG_ACCESS_NONE = 0x11A3; + + /* cl_kernel_work_group_info */ + int CL_KERNEL_GLOBAL_WORK_SIZE = 0x11B5; + + /* cl_command_type */ + int CL_COMMAND_BARRIER = 0x1205, + CL_COMMAND_MIGRATE_MEM_OBJECTS = 0x1206, + CL_COMMAND_FILL_BUFFER = 0x1207, + CL_COMMAND_FILL_IMAGE = 0x1208; + + @Code(javaAfterNative = "\t\tif ( __result == CL10.CL_SUCCESS ) device.retain();") + @cl_int + int clRetainDevice(@PointerWrapper("cl_device_id") CLDevice device); + + /** + * Warning: LWJGL will not automatically release any objects associated with sub-devices. + * The user is responsible for tracking and releasing everything prior to calling this method. + * + * @param device the parent CLDevice + * + * @return the error code + */ + @Code( + javaBeforeNative = "\t\tAPIUtil.releaseObjects(device);", + javaAfterNative = "\t\tif ( __result == CL10.CL_SUCCESS ) device.release();" + ) + @cl_int + int clReleaseDevice(@PointerWrapper("cl_device_id") CLDevice device); + + @Code(javaAfterNative = "\t\tif ( __result == CL10.CL_SUCCESS && out_devices != null ) in_device.registerSubCLDevices(out_devices);") + @cl_int + int clCreateSubDevices( + @PointerWrapper("cl_device_id") CLDevice in_device, + @NullTerminated @Const @NativeType("cl_device_partition_property") LongBuffer properties, + @AutoSize(value = "out_devices", canBeNull = true) @cl_uint int num_devices, + @OutParameter @Check(canBeNull = true) @NativeType("cl_device_id") PointerBuffer out_devices, + @OutParameter @Check(value = "1", canBeNull = true) @cl_uint IntBuffer num_devices_ret); + + @Check(value = "errcode_ret", canBeNull = true) + @PointerWrapper(value = "cl_mem", params = "context") + CLMem clCreateImage(@PointerWrapper("cl_context") CLContext context, + @NativeType("cl_mem_flags") long flags, + @Check("2 * 4") @Const @NativeType("cl_image_format") ByteBuffer image_format, + @Check("3 * 4 + 7 * PointerBuffer.getPointerSize()") @Const @NativeType("cl_image_desc") ByteBuffer image_desc, + @Check + @cl_byte + @cl_short + @cl_int + @cl_float Buffer host_ptr, + @OutParameter @Check(value = "1", canBeNull = true) @cl_int IntBuffer errcode_ret); + + @Check(value = "errcode_ret", canBeNull = true) + @PointerWrapper(value = "cl_program", params = "context") + CLProgram clCreateProgramWithBuiltInKernels(@PointerWrapper("cl_context") CLContext context, + @AutoSize("device_list") @cl_uint int num_devices, + @Check("1") @Const @NativeType("cl_device_id") PointerBuffer device_list, + @Check @Const @cl_char ByteBuffer kernel_names, + @OutParameter @Check(value = "1", canBeNull = true) @cl_int IntBuffer errcode_ret); + + @Alternate("clCreateProgramWithBuiltInKernels") + @Check(value = "errcode_ret", canBeNull = true) + @PointerWrapper(value = "cl_program", params = "context") + CLProgram clCreateProgramWithBuiltInKernels(@PointerWrapper("cl_context") CLContext context, + @AutoSize("device_list") @cl_uint int num_devices, + @Check("1") @Const @NativeType("cl_device_id") PointerBuffer device_list, + CharSequence kernel_names, + @OutParameter @Check(value = "1", canBeNull = true) @cl_int IntBuffer errcode_ret); + + /** Single null-terminated header include name. */ + @Code( + tryBlock = true, + // Create a GlobalRef to the callback object. + javaBeforeNative = "\t\tlong user_data = CallbackUtil.createGlobalRef(pfn_notify);\n" + + "\t\tif ( pfn_notify != null ) pfn_notify.setContext(program.getParent());", + // Check if we need to delete the GlobalRef. + javaFinally = "\t\t\tCallbackUtil.checkCallback(__result, user_data);" + ) + @cl_int + int clCompileProgram(@PointerWrapper("cl_program") CLProgram program, + @AutoSize(value = "device_list", canBeNull = true) @cl_uint int num_devices, + @Check(canBeNull = true) @Const @NativeType("cl_device_id") PointerBuffer device_list, + @Check @NullTerminated @Const @cl_char ByteBuffer options, + @Constant("1") @cl_uint int num_input_headers, + @Check("1") @Const @NativeType("cl_program") PointerBuffer input_header, + @NullTerminated @Check @Const @cl_char @Indirect ByteBuffer header_include_name, + @PointerWrapper(value = "cl_program_callback", canBeNull = true) CLCompileProgramCallback pfn_notify, + @Constant("user_data") @PointerWrapper("void *") long user_data); + + /** Multiple null-terminated header include names, one after the other. */ + @Alternate(value = "clCompileProgram", nativeAlt = true, javaAlt = true) + @Code( + tryBlock = true, + // Create a GlobalRef to the callback object. + javaBeforeNative = "\t\tlong user_data = CallbackUtil.createGlobalRef(pfn_notify);\n" + + "\t\tif ( pfn_notify != null ) pfn_notify.setContext(program.getParent());", + // Check if we need to delete the GlobalRef. + javaFinally = "\t\t\tCallbackUtil.checkCallback(__result, user_data);" + ) + @cl_int + int clCompileProgramMulti(@PointerWrapper("cl_program") CLProgram program, + @AutoSize(value = "device_list", canBeNull = true) @cl_uint int num_devices, + @Check(canBeNull = true) @Const @NativeType("cl_device_id") PointerBuffer device_list, + @Check @NullTerminated @Const @cl_char ByteBuffer options, + @AutoSize("input_headers") @cl_uint int num_input_headers, + @Check("1") @Const @NativeType("cl_program") PointerBuffer input_headers, + @NullTerminated("input_headers.remaining()") @Check @Const @Indirect @cl_char @PointerArray("num_input_headers") ByteBuffer header_include_names, + @PointerWrapper(value = "cl_program_callback", canBeNull = true) CLCompileProgramCallback pfn_notify, + @Constant("user_data") @PointerWrapper("void *") long user_data); + + @Alternate(value = "clCompileProgram", nativeAlt = true) + @Code( + tryBlock = true, + // Create a GlobalRef to the callback object. + javaBeforeNative = "\t\tlong user_data = CallbackUtil.createGlobalRef(pfn_notify);\n" + + "\t\tif ( pfn_notify != null ) pfn_notify.setContext(program.getParent());", + // Check if we need to delete the GlobalRef. + javaFinally = "\t\t\tCallbackUtil.checkCallback(__result, user_data);" + ) + @cl_int + int clCompileProgram3(@PointerWrapper("cl_program") CLProgram program, + @AutoSize(value = "device_list", canBeNull = true) @cl_uint int num_devices, + @Check(canBeNull = true) @Const @NativeType("cl_device_id") PointerBuffer device_list, + @Check @NullTerminated @Const @cl_char ByteBuffer options, + @Constant("header_include_names.length") @cl_uint int num_input_headers, + @Check("header_include_names.length") @Const @NativeType("cl_program") PointerBuffer input_headers, + @NullTerminated @Check("1") @PointerArray(value = "num_input_headers") @Const @NativeType("cl_char") ByteBuffer[] header_include_names, + @PointerWrapper(value = "cl_program_callback", canBeNull = true) CLCompileProgramCallback pfn_notify, + @Constant("user_data") @PointerWrapper("void *") long user_data); + + @Alternate("clCompileProgram") + @Code( + tryBlock = true, + // Create a GlobalRef to the callback object. + javaBeforeNative = "\t\tlong user_data = CallbackUtil.createGlobalRef(pfn_notify);\n" + + "\t\tif ( pfn_notify != null ) pfn_notify.setContext(program.getParent());", + // Check if we need to delete the GlobalRef. + javaFinally = "\t\t\tCallbackUtil.checkCallback(__result, user_data);" + ) + @cl_int + int clCompileProgram(@PointerWrapper("cl_program") CLProgram program, + @AutoSize(value = "device_list", canBeNull = true) @cl_uint int num_devices, + @Check(canBeNull = true) @Const @NativeType("cl_device_id") PointerBuffer device_list, + @NullTerminated CharSequence options, + @Constant("1") @cl_uint int num_input_headers, + @Check("1") @Const @NativeType("cl_program") PointerBuffer input_header, + @NullTerminated @Const CharSequence header_include_name, + @PointerWrapper(value = "cl_program_callback", canBeNull = true) CLCompileProgramCallback pfn_notify, + @Constant("user_data") @PointerWrapper("void *") long user_data); + + @Alternate(value = "clCompileProgram", nativeAlt = true, skipNative = true) + @Code( + tryBlock = true, + // Create a GlobalRef to the callback object. + javaBeforeNative = "\t\tlong user_data = CallbackUtil.createGlobalRef(pfn_notify);\n" + + "\t\tif ( pfn_notify != null ) pfn_notify.setContext(program.getParent());", + // Check if we need to delete the GlobalRef. + javaFinally = "\t\t\tCallbackUtil.checkCallback(__result, user_data);" + ) + @cl_int + int clCompileProgramMulti(@PointerWrapper("cl_program") CLProgram program, + @AutoSize(value = "device_list", canBeNull = true) @cl_uint int num_devices, + @Check(canBeNull = true) @Const @NativeType("cl_device_id") PointerBuffer device_list, + @NullTerminated CharSequence options, + @AutoSize("input_header") @cl_uint int num_input_headers, + @Check("1") @Const @NativeType("cl_program") PointerBuffer input_header, + @NullTerminated @PointerArray(value = "num_input_headers") @Const CharSequence[] header_include_name, + @PointerWrapper(value = "cl_program_callback", canBeNull = true) CLCompileProgramCallback pfn_notify, + @Constant("user_data") @PointerWrapper("void *") long user_data); + + @Code( + tryBlock = true, + // Create a GlobalRef to the callback object. + javaBeforeNative = "\t\tlong user_data = CallbackUtil.createGlobalRef(pfn_notify);\n" + + "\t\tif ( pfn_notify != null ) pfn_notify.setContext(context);", + // Check if we need to delete the GlobalRef. + javaFinally = "\t\t\tCallbackUtil.checkCallback(errcode_ret.get(errcode_ret.position()), user_data);" + ) + @Check(value = "errcode_ret", canBeNull = true) + @PointerWrapper(value = "cl_program", params = "context") + CLProgram clLinkProgram(@PointerWrapper("cl_context") CLContext context, + @AutoSize(value = "device_list", canBeNull = true) @cl_uint int num_devices, + @Check(canBeNull = true) @Const @NativeType("cl_device_id") PointerBuffer device_list, + @NullTerminated @Check @Const @cl_char ByteBuffer options, + @AutoSize("input_programs") @cl_uint int num_input_programs, + @Check @Const @NativeType("cl_program") PointerBuffer input_programs, + @PointerWrapper(value = "cl_program_callback", canBeNull = true) CLLinkProgramCallback pfn_notify, + @Constant("user_data") @PointerWrapper("void *") long user_data, + @OutParameter @Check("1") @cl_int IntBuffer errcode_ret); + + @Alternate("clLinkProgram") + @Code( + tryBlock = true, + // Create a GlobalRef to the callback object. + javaBeforeNative = "\t\tlong user_data = CallbackUtil.createGlobalRef(pfn_notify);\n" + + "\t\tif ( pfn_notify != null ) pfn_notify.setContext(context);", + // Check if we need to delete the GlobalRef. + javaFinally = "\t\t\tCallbackUtil.checkCallback(errcode_ret.get(errcode_ret.position()), user_data);" + ) + @Check(value = "errcode_ret", canBeNull = true) + @PointerWrapper(value = "cl_program", params = "context") + CLProgram clLinkProgram(@PointerWrapper("cl_context") CLContext context, + @AutoSize(val... [truncated message content] |
From: <ma...@us...> - 2011-11-13 21:21:59
|
Revision: 3700 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3700&view=rev Author: matzon Date: 2011-11-13 21:21:52 +0000 (Sun, 13 Nov 2011) Log Message: ----------- adding changelogs Modified Paths: -------------- trunk/LWJGL/www/changelogs/full-changelog.txt Added Paths: ----------- trunk/LWJGL/www/changelogs/2.8.1-changelog.txt trunk/LWJGL/www/changelogs/2.8.2-changelog.txt Added: trunk/LWJGL/www/changelogs/2.8.1-changelog.txt =================================================================== --- trunk/LWJGL/www/changelogs/2.8.1-changelog.txt (rev 0) +++ trunk/LWJGL/www/changelogs/2.8.1-changelog.txt 2011-11-13 21:21:52 UTC (rev 3700) @@ -0,0 +1,142 @@ +2011-10-15 21:13 matzon + + * build.xml: add copy-nightly-binaries target to build file + +2011-10-15 20:25 matzon + + * doc: adding javadoc to ignore list + +2011-10-15 20:24 matzon + + * www/changelogs/2.7-changelog.txt, + www/changelogs/2.7.1-changelog.txt, + www/changelogs/2.8.0-changelog.txt, + www/changelogs/full-changelog.txt: syncing changelogs + +2011-10-15 20:22 matzon + + * libs/macosx, libs/windows: adding binaries to ignore list + +2011-10-15 20:18 matzon + + * maven/build.xml, maven/lwjgl-platform.pom: applying rubens latest + maven patches + +2011-10-14 15:00 spasi + + * src/templates/org/lwjgl/opengles/IMG_multisampled_render_to_texture.java, + src/templates/org/lwjgl/opengles/IMG_multisamples_render_to_texture.java, + src/templates/org/lwjgl/opengles/IMG_read_format.java, + src/templates/org/lwjgl/opengles/OES_EGL_sync.java: GLES + extension updates. + +2011-10-14 10:43 spasi + + * src/java/org/lwjgl/opengl/DrawableGLES.java, + src/java/org/lwjgl/opengles/EGLDisplay.java, + src/java/org/lwjgl/test/opengles/FullScreenWindowedTest.java: + Updated GLES FullScreenWindowedTest to destroy/create Display on + mode change. + +2011-10-13 22:05 matzon + + * src/native/linux/opengl/org_lwjgl_opengl_Display.c, + src/native/linux/opengles/org_lwjgl_opengl_Display.c: applied + patch by xranby to remove warnings + +2011-10-13 16:53 spasi + + * src/java/org/lwjgl/util/generator/JNITypeTranslator.java, + src/java/org/lwjgl/util/generator/RegisterStubsGenerator.java, + src/java/org/lwjgl/util/generator/SignatureTranslator.java: Fixed + signatures: CharSequence[] parameters and ByteBuffer returns. + +2011-10-12 22:31 kappa1 + + * src/java/org/lwjgl/util/applet/AppletLoader.java: AppletLoader: + create MediaTracker before requesting image in an attempt to fix + a logo loading issue. + +2011-10-12 22:15 kappa1 + + * src/java/org/lwjgl/util/applet/AppletLoader.java: AppletLoader: + provide a more meaningful error message when certificates do not + match. + +2011-10-12 22:07 kappa1 + + * src/java/org/lwjgl/util/applet/AppletLoader.java: AppletLoader: + don't output needless lzma.jar is missing message on console + unless a lzma file actually being loaded. + +2011-10-12 20:17 kappa1 + + * src/java/org/lwjgl/MacOSXSysImplementation.java: bump mac native + version due to recent changes to them + +2011-10-12 19:49 matzon + + * src/java/org/lwjgl/test/opengles/MappedIndexedVBOTest.java: + Updated test to be compatible with r3664 + +2011-10-12 18:54 spasi + + * platform_build/build-definitions.xml, + src/java/org/lwjgl/opengl/ContextType.java, + src/java/org/lwjgl/opengl/Display.java: Removed + org.lwjgl.opengles.PixelFormat dependency from Display. + +2011-10-12 18:05 spasi + + * src/templates/org/lwjgl/opengles/NV_platform_binary.java: Added + support for NV_platform_binary. + +2011-10-12 17:58 spasi + + * src/java/org/lwjgl/util/generator/RegisterStubsGenerator.java, + src/native/common/common_tools.c, + src/native/common/common_tools.h, + src/native/common/opengles/org_lwjgl_opengles_EGLKHRFenceSync.c, + src/native/common/opengles/org_lwjgl_opengles_EGLKHRReusableSync.c, + src/native/common/opengles/org_lwjgl_opengles_EGLNVSync.c, + src/native/common/org_lwjgl_openal_ALC10.c, + src/native/common/org_lwjgl_openal_ALC11.c: Added @Optional + support for AL and GLES. + +2011-10-11 22:39 kappa1 + + * src/java/org/lwjgl/opengl/AWTSurfaceLock.java, + src/java/org/lwjgl/opengl/MacOSXCanvasPeerInfo.java: minor tweak + to the order in which CALayer support is detected. + +2011-10-11 22:30 kappa1 + + * src/java/org/lwjgl/opengl/AWTSurfaceLock.java, + src/java/org/lwjgl/opengl/MacOSXCanvasPeerInfo.java, + src/native/common/org_lwjgl_opengl_AWTSurfaceLock.c, + src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m: Limit + the use to CALayer only to when using Display.setParent(), an + AWTGLCanvas in non fullscreen mode. + +2011-10-11 21:51 kappa1 + + * src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m: Remove + the use of Properties from Objective C code to allow binary + compatibility on OS X < 10.5 + +2011-10-11 19:24 matzon + + * src/java/org/lwjgl/opengl/Display.java: undoing r3539 to fix + issue with fullscreen + +2011-10-11 17:39 matzon + + * platform_build/build-definitions.xml, + src/java/org/lwjgl/Sys.java: bumping version to 2.8.1 + +2011-10-11 16:06 spasi + + * build.xml, platform_build/build-definitions.xml, + platform_build/build-maven.xml: Fixed build to include missing + OpenGL ES classes on which Display depends. + Excluded desktop OpenGL extensions from the OpenGL ES build. \ No newline at end of file Added: trunk/LWJGL/www/changelogs/2.8.2-changelog.txt =================================================================== --- trunk/LWJGL/www/changelogs/2.8.2-changelog.txt (rev 0) +++ trunk/LWJGL/www/changelogs/2.8.2-changelog.txt 2011-11-13 21:21:52 UTC (rev 3700) @@ -0,0 +1,94 @@ +2011-11-12 21:50 kappa1 + + * src/java/org/lwjgl/MacOSXSysImplementation.java: bump native + version number for OS X natives due to recent changes to them + +2011-11-12 21:31 kappa1 + + * src/java/org/lwjgl/util/applet/AppletLoader.java: AppletLoader: + minor tweak to show better update message when checking cache + files for changes + +2011-11-12 21:03 kappa1 + + * platform_build/macosx_ant/build.xml: Add the QuartzCore framework + to the list of frameworks available to the linker + +2011-11-12 20:45 kappa1 + + * src/java/org/lwjgl/opengl/AWTSurfaceLock.java, + src/java/org/lwjgl/opengl/MacOSXCanvasPeerInfo.java: MacOS: + further limit CALayer to only be used when running as an Applet + +2011-11-12 19:01 kappa1 + + * src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m: MacOS: + remove the use of 'Blocks' in the Cocoa native code by switching + to 'Selectors', should allow natives to be binary compatible with + OS X 10.5 now. + +2011-11-10 18:46 spasi + + * src/java/org/lwjgl/opengl/CallbackUtil.java, + src/java/org/lwjgl/opengl/Context.java, + src/java/org/lwjgl/opengl/GLContext.java: Changed CallbackUtil to + use ContextCapabilities instead of ContextGL. + +2011-10-30 14:44 kappa1 + + * src/java/org/lwjgl/opengl/LinuxDisplay.java, + src/native/linux/opengl/org_lwjgl_opengl_Display.c, + src/native/linux/opengles/org_lwjgl_opengl_Display.c: Fix + keyboard handling when running Display.setParent() as an + application on Linux. Thus allowing WM and system hot-keys to + function again when the LWJGL app has focus. + +2011-10-26 20:24 kappa1 + + * src/native/linux/opengl/org_lwjgl_opengl_Display.c, + src/native/linux/opengles/org_lwjgl_opengl_Display.c: Only set X + window hints on the Linux native display window when not using + Display.setParent() + +2011-10-25 17:42 spasi + + * src/java/org/lwjgl/openal/ALC11.java: Changed manual null check + to a MemoryUtil.getAddressSafe call. + +2011-10-25 17:14 matzon + + * libs/windows/OpenAL32.dll: upx compressed oal32 + +2011-10-25 17:13 matzon + + * libs/linux/libopenal.so, libs/linux/libopenal64.so, + libs/solaris/libopenal.so, libs/solaris/libopenal64.so, + libs/windows/OpenAL32.dll, libs/windows/OpenAL64.dll: Updating + OpenAL-Soft to latest (319f404) + +2011-10-21 22:50 kappa1 + + * src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m: Fix + crash on Mac OS X when using Display.setParent() and switching + from fullscreen to windowed mode. + +2011-10-20 10:36 kappa1 + + * src/java/org/lwjgl/util/applet/AppletLoader.java: AppletLoader: + minor change to provided more information for some error + messages. + +2011-10-20 07:57 matzon + + * src/java/org/lwjgl/openal/ALC11.java: fixed issue when NULL + (default) was passed in as a deviceName + +2011-10-18 17:23 matzon + + * src/java/org/lwjgl/opengl/Display.java: make Display.destroy a + NOP if it hasn't been created yet + +2011-10-17 07:45 matzon + + * platform_build/build-definitions.xml, + src/java/org/lwjgl/Sys.java: switching to 2.8.2 \ No newline at end of file Modified: trunk/LWJGL/www/changelogs/full-changelog.txt =================================================================== --- trunk/LWJGL/www/changelogs/full-changelog.txt 2011-11-13 21:20:42 UTC (rev 3699) +++ trunk/LWJGL/www/changelogs/full-changelog.txt 2011-11-13 21:21:52 UTC (rev 3700) @@ -1,8 +1,246 @@ +2011-11-12 21:50 kappa1 + + * src/java/org/lwjgl/MacOSXSysImplementation.java: bump native + version number for OS X natives due to recent changes to them + +2011-11-12 21:31 kappa1 + + * src/java/org/lwjgl/util/applet/AppletLoader.java: AppletLoader: + minor tweak to show better update message when checking cache + files for changes + +2011-11-12 21:03 kappa1 + + * platform_build/macosx_ant/build.xml: Add the QuartzCore framework + to the list of frameworks available to the linker + +2011-11-12 20:45 kappa1 + + * src/java/org/lwjgl/opengl/AWTSurfaceLock.java, + src/java/org/lwjgl/opengl/MacOSXCanvasPeerInfo.java: MacOS: + further limit CALayer to only be used when running as an Applet + +2011-11-12 19:01 kappa1 + + * src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m: MacOS: + remove the use of 'Blocks' in the Cocoa native code by switching + to 'Selectors', should allow natives to be binary compatible with + OS X 10.5 now. + +2011-11-10 18:46 spasi + + * src/java/org/lwjgl/opengl/CallbackUtil.java, + src/java/org/lwjgl/opengl/Context.java, + src/java/org/lwjgl/opengl/GLContext.java: Changed CallbackUtil to + use ContextCapabilities instead of ContextGL. + +2011-10-30 14:44 kappa1 + + * src/java/org/lwjgl/opengl/LinuxDisplay.java, + src/native/linux/opengl/org_lwjgl_opengl_Display.c, + src/native/linux/opengles/org_lwjgl_opengl_Display.c: Fix + keyboard handling when running Display.setParent() as an + application on Linux. Thus allowing WM and system hot-keys to + function again when the LWJGL app has focus. + +2011-10-26 20:24 kappa1 + + * src/native/linux/opengl/org_lwjgl_opengl_Display.c, + src/native/linux/opengles/org_lwjgl_opengl_Display.c: Only set X + window hints on the Linux native display window when not using + Display.setParent() + +2011-10-25 17:42 spasi + + * src/java/org/lwjgl/openal/ALC11.java: Changed manual null check + to a MemoryUtil.getAddressSafe call. + +2011-10-25 17:14 matzon + + * libs/windows/OpenAL32.dll: upx compressed oal32 + +2011-10-25 17:13 matzon + + * libs/linux/libopenal.so, libs/linux/libopenal64.so, + libs/solaris/libopenal.so, libs/solaris/libopenal64.so, + libs/windows/OpenAL32.dll, libs/windows/OpenAL64.dll: Updating + OpenAL-Soft to latest (319f404) + +2011-10-21 22:50 kappa1 + + * src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m: Fix + crash on Mac OS X when using Display.setParent() and switching + from fullscreen to windowed mode. + +2011-10-20 10:36 kappa1 + + * src/java/org/lwjgl/util/applet/AppletLoader.java: AppletLoader: + minor change to provided more information for some error + messages. + +2011-10-20 07:57 matzon + + * src/java/org/lwjgl/openal/ALC11.java: fixed issue when NULL + (default) was passed in as a deviceName + +2011-10-18 17:23 matzon + + * src/java/org/lwjgl/opengl/Display.java: make Display.destroy a + NOP if it hasn't been created yet + +2011-10-17 07:45 matzon + + * platform_build/build-definitions.xml, + src/java/org/lwjgl/Sys.java: switching to 2.8.2 + +2011-10-15 21:13 matzon + + * build.xml: add copy-nightly-binaries target to build file + +2011-10-15 20:25 matzon + + * doc: adding javadoc to ignore list + +2011-10-15 20:24 matzon + + * www/changelogs/2.7-changelog.txt, + www/changelogs/2.7.1-changelog.txt, + www/changelogs/2.8.0-changelog.txt, + www/changelogs/full-changelog.txt: syncing changelogs + +2011-10-15 20:22 matzon + + * libs/macosx, libs/windows: adding binaries to ignore list + +2011-10-15 20:18 matzon + + * maven/build.xml, maven/lwjgl-platform.pom: applying rubens latest + maven patches + +2011-10-14 15:00 spasi + + * src/templates/org/lwjgl/opengles/IMG_multisampled_render_to_texture.java, + src/templates/org/lwjgl/opengles/IMG_multisamples_render_to_texture.java, + src/templates/org/lwjgl/opengles/IMG_read_format.java, + src/templates/org/lwjgl/opengles/OES_EGL_sync.java: GLES + extension updates. + +2011-10-14 10:43 spasi + + * src/java/org/lwjgl/opengl/DrawableGLES.java, + src/java/org/lwjgl/opengles/EGLDisplay.java, + src/java/org/lwjgl/test/opengles/FullScreenWindowedTest.java: + Updated GLES FullScreenWindowedTest to destroy/create Display on + mode change. + +2011-10-13 22:05 matzon + + * src/native/linux/opengl/org_lwjgl_opengl_Display.c, + src/native/linux/opengles/org_lwjgl_opengl_Display.c: applied + patch by xranby to remove warnings + +2011-10-13 16:53 spasi + + * src/java/org/lwjgl/util/generator/JNITypeTranslator.java, + src/java/org/lwjgl/util/generator/RegisterStubsGenerator.java, + src/java/org/lwjgl/util/generator/SignatureTranslator.java: Fixed + signatures: CharSequence[] parameters and ByteBuffer returns. + +2011-10-12 22:31 kappa1 + + * src/java/org/lwjgl/util/applet/AppletLoader.java: AppletLoader: + create MediaTracker before requesting image in an attempt to fix + a logo loading issue. + +2011-10-12 22:15 kappa1 + + * src/java/org/lwjgl/util/applet/AppletLoader.java: AppletLoader: + provide a more meaningful error message when certificates do not + match. + +2011-10-12 22:07 kappa1 + + * src/java/org/lwjgl/util/applet/AppletLoader.java: AppletLoader: + don't output needless lzma.jar is missing message on console + unless a lzma file actually being loaded. + +2011-10-12 20:17 kappa1 + + * src/java/org/lwjgl/MacOSXSysImplementation.java: bump mac native + version due to recent changes to them + +2011-10-12 19:49 matzon + + * src/java/org/lwjgl/test/opengles/MappedIndexedVBOTest.java: + Updated test to be compatible with r3664 + +2011-10-12 18:54 spasi + + * platform_build/build-definitions.xml, + src/java/org/lwjgl/opengl/ContextType.java, + src/java/org/lwjgl/opengl/Display.java: Removed + org.lwjgl.opengles.PixelFormat dependency from Display. + +2011-10-12 18:05 spasi + + * src/templates/org/lwjgl/opengles/NV_platform_binary.java: Added + support for NV_platform_binary. + +2011-10-12 17:58 spasi + + * src/java/org/lwjgl/util/generator/RegisterStubsGenerator.java, + src/native/common/common_tools.c, + src/native/common/common_tools.h, + src/native/common/opengles/org_lwjgl_opengles_EGLKHRFenceSync.c, + src/native/common/opengles/org_lwjgl_opengles_EGLKHRReusableSync.c, + src/native/common/opengles/org_lwjgl_opengles_EGLNVSync.c, + src/native/common/org_lwjgl_openal_ALC10.c, + src/native/common/org_lwjgl_openal_ALC11.c: Added @Optional + support for AL and GLES. + +2011-10-11 22:39 kappa1 + + * src/java/org/lwjgl/opengl/AWTSurfaceLock.java, + src/java/org/lwjgl/opengl/MacOSXCanvasPeerInfo.java: minor tweak + to the order in which CALayer support is detected. + +2011-10-11 22:30 kappa1 + + * src/java/org/lwjgl/opengl/AWTSurfaceLock.java, + src/java/org/lwjgl/opengl/MacOSXCanvasPeerInfo.java, + src/native/common/org_lwjgl_opengl_AWTSurfaceLock.c, + src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m: Limit + the use to CALayer only to when using Display.setParent(), an + AWTGLCanvas in non fullscreen mode. + +2011-10-11 21:51 kappa1 + + * src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m: Remove + the use of Properties from Objective C code to allow binary + compatibility on OS X < 10.5 + +2011-10-11 19:24 matzon + + * src/java/org/lwjgl/opengl/Display.java: undoing r3539 to fix + issue with fullscreen + +2011-10-11 17:39 matzon + + * platform_build/build-definitions.xml, + src/java/org/lwjgl/Sys.java: bumping version to 2.8.1 + +2011-10-11 16:06 spasi + + * build.xml, platform_build/build-definitions.xml, + platform_build/build-maven.xml: Fixed build to include missing + OpenGL ES classes on which Display depends. + Excluded desktop OpenGL extensions from the OpenGL ES build. + 2011-10-08 20:33 kappa1 - * src/java/org/lwjgl/util/applet/AppletLoader.java: AppletLoader: - add missing JavaDoc for al_lookup_threads, clean up natives if - validation on them fails. + * src/java/org/lwjgl/util/applet/AppletLoader.java: AppletLoader: + add missing JavaDoc for al_lookup_threads, clean up natives if + validation on them fails. 2011-10-08 18:33 kappa1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2011-11-13 21:20:49
|
Revision: 3699 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3699&view=rev Author: matzon Date: 2011-11-13 21:20:42 +0000 (Sun, 13 Nov 2011) Log Message: ----------- bumping to 2.8.3 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 2011-11-13 20:50:34 UTC (rev 3698) +++ trunk/LWJGL/platform_build/build-definitions.xml 2011-11-13 21:20:42 UTC (rev 3699) @@ -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.8.2" /> + <property name="lwjgl.version" value="2.8.3" /> <property name="lwjgl.web" location="www" /> <property name="opengl-template-pattern" value="org/lwjgl/opengl/GL*.java,org/lwjgl/opengl/ARB*.java,org/lwjgl/opengl/AMD*.java,org/lwjgl/opengl/APPLE*.java,org/lwjgl/opengl/ATI*.java,org/lwjgl/opengl/EXT*.java,org/lwjgl/opengl/NV*.java,org/lwjgl/opengl/NVX*.java,org/lwjgl/opengl/HP*.java,org/lwjgl/opengl/IBM*.java,org/lwjgl/opengl/SUN*.java,org/lwjgl/opengl/SGIS*.java,org/lwjgl/opengl/GREMEDY*.java"/> Modified: trunk/LWJGL/src/java/org/lwjgl/Sys.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/Sys.java 2011-11-13 20:50:34 UTC (rev 3698) +++ trunk/LWJGL/src/java/org/lwjgl/Sys.java 2011-11-13 21:20:42 UTC (rev 3699) @@ -54,7 +54,7 @@ private static final String JNI_LIBRARY_NAME = "lwjgl"; /** Current version of library */ - private static final String VERSION = "2.8.2"; + private static final String VERSION = "2.8.3"; private static final String POSTFIX64BIT = "64"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2011-11-13 20:50:40
|
Revision: 3698 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3698&view=rev Author: matzon Date: 2011-11-13 20:50:34 +0000 (Sun, 13 Nov 2011) Log Message: ----------- tagging 2.8.2 Added Paths: ----------- tags/lwjgl2.8.2/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2011-11-13 20:50:15
|
Revision: 3697 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3697&view=rev Author: matzon Date: 2011-11-13 20:50:09 +0000 (Sun, 13 Nov 2011) Log Message: ----------- fixing tag Removed Paths: ------------- tags/lwjgl2.8.2/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2011-11-13 20:49:31
|
Revision: 3696 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3696&view=rev Author: matzon Date: 2011-11-13 20:49:25 +0000 (Sun, 13 Nov 2011) Log Message: ----------- tagging 2.8.2 Added Paths: ----------- tags/lwjgl2.8.2/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ka...@us...> - 2011-11-12 21:51:02
|
Revision: 3695 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3695&view=rev Author: kappa1 Date: 2011-11-12 21:50:55 +0000 (Sat, 12 Nov 2011) Log Message: ----------- bump native version number for OS X natives due to recent changes to them 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 2011-11-12 21:31:00 UTC (rev 3694) +++ trunk/LWJGL/src/java/org/lwjgl/MacOSXSysImplementation.java 2011-11-12 21:50:55 UTC (rev 3695) @@ -42,7 +42,7 @@ * $Id$ */ final class MacOSXSysImplementation extends J2SESysImplementation { - private static final int JNI_VERSION = 21; + private static final int JNI_VERSION = 22; static { // Make sure AWT is properly initialized. This avoids hangs on Mac OS X 10.3 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ka...@us...> - 2011-11-12 21:31:09
|
Revision: 3694 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3694&view=rev Author: kappa1 Date: 2011-11-12 21:31:00 +0000 (Sat, 12 Nov 2011) Log Message: ----------- AppletLoader: minor tweak to show better update message when checking cache files for changes 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-11-12 21:03:48 UTC (rev 3693) +++ trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2011-11-12 21:31:00 UTC (rev 3694) @@ -180,30 +180,33 @@ /** checking for already downloaded files */ public static final int STATE_CHECKING_CACHE = 4; + + /** checking if any updates are available for cache files */ + public static final int STATE_CHECKING_FOR_UPDATES = 5; /** downloading packages */ - public static final int STATE_DOWNLOADING = 5; + public static final int STATE_DOWNLOADING = 6; /** extracting packages */ - public static final int STATE_EXTRACTING_PACKAGES = 6; + public static final int STATE_EXTRACTING_PACKAGES = 7; /** validating packages */ - public static final int STATE_VALIDATING_PACKAGES = 7; + public static final int STATE_VALIDATING_PACKAGES = 8; /** updating the classpath */ - public static final int STATE_UPDATING_CLASSPATH = 8; + public static final int STATE_UPDATING_CLASSPATH = 9; /** switching to real applet */ - public static final int STATE_SWITCHING_APPLET = 9; + public static final int STATE_SWITCHING_APPLET = 10; /** initializing real applet */ - public static final int STATE_INITIALIZE_REAL_APPLET = 10; + public static final int STATE_INITIALIZE_REAL_APPLET = 11; /** stating real applet */ - public static final int STATE_START_REAL_APPLET = 11; + public static final int STATE_START_REAL_APPLET = 12; /** done */ - public static final int STATE_DONE = 12; + public static final int STATE_DONE = 13; /** used to calculate length of progress bar */ protected volatile int percentage; @@ -678,6 +681,8 @@ return "Determining packages to load"; case STATE_CHECKING_CACHE: return "Calculating download size"; + case STATE_CHECKING_FOR_UPDATES: + return "Checking for updates"; case STATE_DOWNLOADING: return "Downloading packages"; case STATE_EXTRACTING_PACKAGES: @@ -1343,6 +1348,7 @@ // if timestamps file exists, load it if (timestampsFile.exists()) { + setState(STATE_CHECKING_FOR_UPDATES); filesLastModified = readHashMapFile(timestampsFile); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ka...@us...> - 2011-11-12 21:03:55
|
Revision: 3693 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3693&view=rev Author: kappa1 Date: 2011-11-12 21:03:48 +0000 (Sat, 12 Nov 2011) Log Message: ----------- Add the QuartzCore framework to the list of frameworks available to the linker Modified Paths: -------------- trunk/LWJGL/platform_build/macosx_ant/build.xml Modified: trunk/LWJGL/platform_build/macosx_ant/build.xml =================================================================== --- trunk/LWJGL/platform_build/macosx_ant/build.xml 2011-11-12 20:45:35 UTC (rev 3692) +++ trunk/LWJGL/platform_build/macosx_ant/build.xml 2011-11-12 21:03:48 UTC (rev 3693) @@ -35,7 +35,7 @@ <target name="link"> <apply dir="${objdir}" parallel="true" executable="${linker}" os="Mac OS X" failonerror="true" skipemptyfilesets="true"> - <arg line="${linkerflags} -exported_symbols_list ../lwjgl.symbols -dynamiclib -o ${libname} -framework Foundation -framework AppKit -framework JavaVM -framework Carbon -framework OpenGL -framework JavaNativeFoundation -F/System/Library/Frameworks/JavaVM.framework/Frameworks"/> + <arg line="${linkerflags} -exported_symbols_list ../lwjgl.symbols -dynamiclib -o ${libname} -framework Foundation -framework AppKit -framework JavaVM -framework Carbon -framework OpenGL -framework QuartzCore -framework JavaNativeFoundation -F/System/Library/Frameworks/JavaVM.framework/Frameworks"/> <fileset dir="${objdir}" includes="*.o"/> </apply> <apply dir="${objdir}" executable="strip" os="Mac OS X" failonerror="true"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ka...@us...> - 2011-11-12 20:45:41
|
Revision: 3692 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3692&view=rev Author: kappa1 Date: 2011-11-12 20:45:35 +0000 (Sat, 12 Nov 2011) Log Message: ----------- MacOS: further limit CALayer to only be used when running as an Applet Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/opengl/AWTSurfaceLock.java trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXCanvasPeerInfo.java Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/AWTSurfaceLock.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/AWTSurfaceLock.java 2011-11-12 19:01:28 UTC (rev 3691) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/AWTSurfaceLock.java 2011-11-12 20:45:35 UTC (rev 3692) @@ -32,6 +32,8 @@ package org.lwjgl.opengl; import java.awt.Canvas; +import java.awt.Component; +import java.applet.Applet; import java.nio.ByteBuffer; import java.security.AccessController; import java.security.PrivilegedActionException; @@ -81,7 +83,7 @@ // due to performance.. // Allow the use of a Core Animation Layer only when using non fullscreen Display.setParent() or AWTGLCanvas - final boolean allowCALayer = (Display.getParent() != null && !Display.isFullscreen()) || component instanceof AWTGLCanvas; + final boolean allowCALayer = ((Display.getParent() != null && !Display.isFullscreen()) || component instanceof AWTGLCanvas) && isApplet(component); if (firstLockSucceeded) return lockAndInitHandle(lock_buffer, component, allowCALayer); @@ -105,4 +107,22 @@ } private static native void nUnlock(ByteBuffer lock_buffer) throws LWJGLException; + + /** + * This method will return true if the component is running in an applet + */ + public boolean isApplet(Canvas component) { + + Component parent = component.getParent(); + + while (parent != null) { + if (parent instanceof Applet) { + return true; + } + parent = parent.getParent(); + } + + // not an applet + return false; + } } Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXCanvasPeerInfo.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXCanvasPeerInfo.java 2011-11-12 19:01:28 UTC (rev 3691) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/MacOSXCanvasPeerInfo.java 2011-11-12 20:45:35 UTC (rev 3692) @@ -51,7 +51,7 @@ protected void initHandle(Canvas component) throws LWJGLException { // Allow the use of a Core Animation Layer only when using non fullscreen Display.setParent() or AWTGLCanvas - final boolean allowCALayer = (Display.getParent() != null && !Display.isFullscreen()) || component instanceof AWTGLCanvas; + final boolean allowCALayer = ((Display.getParent() != null && !Display.isFullscreen()) || component instanceof AWTGLCanvas) && awt_surface.isApplet(component); nInitHandle(awt_surface.lockAndGetHandle(component), getHandle(), allowCALayer); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |