aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXerxes Rånby <[email protected]>2013-04-11 17:28:27 +0200
committerXerxes Rånby <[email protected]>2013-04-11 17:28:27 +0200
commitfc189df301eb90adf776602d63fe6d51a054a92b (patch)
tree6ba2464bceed243252712effbf0af3590d3819a0
parent67500d28f6e3507679a231e483fb369f29fb49e8 (diff)
parent9f42486dcf2896fc0b649f9fd915e26e3a8a5589 (diff)
Merge branch 'woody' of https://github.com/sixseve/jake2 into HEAD
-rw-r--r--.gitignore10
-rwxr-xr-x[-rw-r--r--]Jake2.sh6
-rw-r--r--pom.xml242
-rw-r--r--test/jake2/qcommon/Q2TestDataUtil.java51
-rw-r--r--test/jake2/render/DancingQueens.java4
-rw-r--r--test/jake2/render/TestMap.java4
-rw-r--r--test/jake2/render/TestRenderer.java4
7 files changed, 311 insertions, 10 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..c8513df
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,10 @@
+.idea/
+build/
+dist/
+target/
+Jake2-cvs-install.jar
+jake2-cvs.tar.gz
+jake2-cvs.zip
+jake2src-cvs.tar.gz
+jake2src-cvs.zip
+*.iml
diff --git a/Jake2.sh b/Jake2.sh
index aab71ff..4fa1dcb 100644..100755
--- a/Jake2.sh
+++ b/Jake2.sh
@@ -3,7 +3,11 @@
cd `dirname $0`
# for jogl and joal
-CP=lib/jogamp/gluegen-rt.jar:lib/jogamp/joal.jar:lib/jogamp/jogl-all.jar:dist/lib/jake2.jar
+if [ -f "target/jake2.jar" ] ; then
+ CP=target/jake2.jar
+else
+ CP=lib/jogamp/gluegen-rt.jar:lib/jogamp/joal.jar:lib/jogamp/jogl-all.jar:dist/lib/jake2.jar
+fi
#breaks VM's like avian
X_ARGS="-Xmx100M"
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..dd391f2
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,242 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.emergent.jake2</groupId>
+ <artifactId>jake2</artifactId>
+ <version>1.0-SNAPSHOT</version>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+ <jake.build.outputDirectory>${project.build.directory}/classes</jake.build.outputDirectory>
+ <jake.dist.lib.directory>${project.build.directory}</jake.dist.lib.directory>
+ <jake.dist.dep.prefix/>
+ <jake.test.skip>false</jake.test.skip>
+ <jake.javac.source>1.6</jake.javac.source>
+ <jake.javac.target>${jake.javac.source}</jake.javac.target>
+ <jogamp.version>2.0-rc11</jogamp.version>
+ <jogamp.natives.os>foo</jogamp.natives.os>
+ <jogamp.natives.arch>bar</jogamp.natives.arch>
+ <jogamp.natives.classifier>natives-${jogamp.natives.os}-${jogamp.natives.arch}</jogamp.natives.classifier>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jogamp.jogl</groupId>
+ <artifactId>jogl-all</artifactId>
+ <version>${jogamp.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jogamp.jogl</groupId>
+ <artifactId>jogl-all</artifactId>
+ <version>${jogamp.version}</version>
+ <classifier>${jogamp.natives.classifier}</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.jogamp.gluegen</groupId>
+ <artifactId>gluegen-rt</artifactId>
+ <version>${jogamp.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jogamp.gluegen</groupId>
+ <artifactId>gluegen-rt</artifactId>
+ <version>${jogamp.version}</version>
+ <classifier>${jogamp.natives.classifier}</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.jogamp.joal</groupId>
+ <artifactId>joal</artifactId>
+ <version>${jogamp.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jogamp.joal</groupId>
+ <artifactId>joal</artifactId>
+ <version>${jogamp.version}</version>
+ <classifier>${jogamp.natives.classifier}</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>6.3.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <outputDirectory>${jake.build.outputDirectory}</outputDirectory>
+ <sourceDirectory>src</sourceDirectory>
+ <resources>
+ <resource>
+ <directory>src</directory>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ </resource>
+ <resource>
+ <directory>resources</directory>
+ </resource>
+ </resources>
+ <testSourceDirectory>test</testSourceDirectory>
+ <testResources>
+ <testResource>
+ <directory>test</directory>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ </testResource>
+ </testResources>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.0</version>
+ <configuration>
+ <source>${jake.javac.source}</source>
+ <target>${jake.javac.target}</target>
+ <fork>true</fork>
+ <maxmem>512</maxmem>
+ <compilerArgument>-Xlint:all</compilerArgument>
+ <skip>${jake.test.skip}</skip>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.4</version>
+ <configuration>
+ <outputDirectory>${jake.dist.lib.directory}</outputDirectory>
+ <archive>
+ <manifest>
+ <mainClass>jake2.Jake2</mainClass>
+ <addClasspath>true</addClasspath>
+ <classpathPrefix>${jake.dist.dep.prefix}</classpathPrefix>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-clean-plugin</artifactId>
+ <version>2.5</version>
+ <configuration>
+ <filesets>
+ <fileset>
+ <directory>${project.basedir}</directory>
+ <followSymlinks>false</followSymlinks>
+ <includes>
+ <include>build/**</include>
+ <include>dist/**</include>
+ <include>Jake2-cvs-install.jar</include>
+ <include>jake2-cvs.*</include>
+ <include>jake2src-cvs.*</include>
+ </includes>
+ </fileset>
+ </filesets>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.6</version>
+ <executions>
+ <execution>
+ <id>copy-dependencies</id>
+ <phase>package</phase>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <configuration>
+ <includeScope>runtime</includeScope>
+ <outputDirectory>${jake.dist.lib.directory}/${jake.dist.dep.prefix}</outputDirectory>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>false</overWriteSnapshots>
+ <overWriteIfNewer>true</overWriteIfNewer>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.12.4</version>
+ <configuration>
+ <redirectTestOutputToFile>true</redirectTestOutputToFile>
+ </configuration>
+ </plugin>
+ </plugins>
+ <finalName>${project.artifactId}</finalName>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>antcompat</id>
+ <activation>
+ <property>
+ <name>jake.antcompat</name>
+ <value>true</value>
+ </property>
+ </activation>
+ <properties>
+ <jake.build.outputDirectory>build</jake.build.outputDirectory>
+ <jake.dist.lib.directory>dist/lib</jake.dist.lib.directory>
+ <jake.dist.dep.prefix>jogamp/</jake.dist.dep.prefix>
+ </properties>
+ </profile>
+ <profile>
+ <id>linux</id>
+ <activation>
+ <os>
+ <family>linux</family>
+ </os>
+ </activation>
+ <properties>
+ <jogamp.natives.os>linux</jogamp.natives.os>
+ </properties>
+ </profile>
+ <profile>
+ <id>windows</id>
+ <activation>
+ <os>
+ <family>windows</family>
+ </os>
+ </activation>
+ <properties>
+ <jogamp.natives.os>windows</jogamp.natives.os>
+ </properties>
+ </profile>
+ <profile>
+ <id>i586</id>
+ <activation>
+ <os>
+ <arch>i586</arch>
+ </os>
+ </activation>
+ <properties>
+ <jogamp.natives.arch>i586</jogamp.natives.arch>
+ </properties>
+ </profile>
+ <profile>
+ <id>amd64</id>
+ <activation>
+ <os>
+ <arch>amd64</arch>
+ </os>
+ </activation>
+ <properties>
+ <jogamp.natives.arch>amd64</jogamp.natives.arch>
+ </properties>
+ </profile>
+ <profile>
+ <id>macosx</id>
+ <activation>
+ <os>
+ <family>mac</family>
+ </os>
+ </activation>
+ <properties>
+ <jogamp.natives.os>macosx</jogamp.natives.os>
+ <jogamp.natives.arch>universal</jogamp.natives.arch>
+ </properties>
+ </profile>
+ </profiles>
+
+</project>
diff --git a/test/jake2/qcommon/Q2TestDataUtil.java b/test/jake2/qcommon/Q2TestDataUtil.java
new file mode 100644
index 0000000..e273215
--- /dev/null
+++ b/test/jake2/qcommon/Q2TestDataUtil.java
@@ -0,0 +1,51 @@
+package jake2.qcommon;
+
+import jake2.Jake2;
+
+import java.util.Locale;
+
+/** @author Patrick Woodworth */
+public class Q2TestDataUtil {
+
+ private static final boolean USE_DATA_DIALOG = Boolean.getBoolean("jake.data.dialog");
+
+ public static final void initQ2DataTool() {
+ if (USE_DATA_DIALOG) {
+ Q2DataDialogWrapper tmpq2DataTool = new Q2DataDialogWrapper();
+ Locale.setDefault(Locale.US);
+ tmpq2DataTool.setVisible(true);
+ Jake2.q2DataTool = tmpq2DataTool;
+ } else {
+ Jake2.q2DataTool = new Q2DataTool();
+ Locale.setDefault(Locale.US);
+ }
+ }
+
+ public static class Q2DataDialogWrapper extends Q2DataTool {
+
+ private final Q2DataDialog m_data = new Q2DataDialog();
+
+ public Q2DataDialogWrapper() {
+ super();
+ }
+
+ @Override
+ public void testQ2Data() {
+ m_data.testQ2Data();
+ }
+
+ @Override
+ void dispose() {
+ m_data.dispose();
+ }
+
+ @Override
+ void setStatus(String text) {
+ m_data.setStatus(text);
+ }
+
+ public void setVisible(boolean b) {
+ m_data.setVisible(b);
+ }
+ }
+}
diff --git a/test/jake2/render/DancingQueens.java b/test/jake2/render/DancingQueens.java
index 4097d21..1b98ea0 100644
--- a/test/jake2/render/DancingQueens.java
+++ b/test/jake2/render/DancingQueens.java
@@ -67,9 +67,7 @@ public class DancingQueens {
void init() {
Globals.dedicated = Cvar.Get("dedicated", "0", Qcommon.CVAR_NOSET);
- Jake2.Q2Dialog = new Q2DataDialog();
- Locale.setDefault(Locale.US);
- Jake2.Q2Dialog.setVisible(true);
+ Q2TestDataUtil.initQ2DataTool();
String DRIVER = "lwjgl";
diff --git a/test/jake2/render/TestMap.java b/test/jake2/render/TestMap.java
index 3dd89fd..10112d1 100644
--- a/test/jake2/render/TestMap.java
+++ b/test/jake2/render/TestMap.java
@@ -75,9 +75,7 @@ public class TestMap
// open the q2dialog, if we are not in dedicated mode.
if (Globals.dedicated.value != 1.0f)
{
- Jake2.Q2Dialog = new Q2DataDialog();
- Locale.setDefault(Locale.US);
- Jake2.Q2Dialog.setVisible(true);
+ Q2TestDataUtil.initQ2DataTool();
}
Qcommon.Init(new String[] { "TestMap" });
diff --git a/test/jake2/render/TestRenderer.java b/test/jake2/render/TestRenderer.java
index 3c0bb7f..f12edd6 100644
--- a/test/jake2/render/TestRenderer.java
+++ b/test/jake2/render/TestRenderer.java
@@ -72,9 +72,7 @@ public class TestRenderer {
void init() {
Globals.dedicated = Cvar.Get("dedicated", "0", Qcommon.CVAR_NOSET);
- Jake2.Q2Dialog = new Q2DataDialog();
- Locale.setDefault(Locale.US);
- Jake2.Q2Dialog.setVisible(true);
+ Q2TestDataUtil.initQ2DataTool();
String DRIVER = "joglgl2";