forked from tms08012/2015MegaMek
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Moved some stuff around
- Loading branch information
Billy Gallagher
authored and
Billy Gallagher
committed
Feb 13, 2016
1 parent
be83a2b
commit cede2f4
Showing
47,475 changed files
with
2,638,010 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry kind="src" path="i18n"/> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> | ||
<classpathentry kind="lib" path="org.apache.servicemix.bundles.xstream-1.3_1.jar"/> | ||
<classpathentry kind="lib" path="lib/TinyXML.jar"/> | ||
<classpathentry kind="lib" path="lib/cglib-nodep-2.2.jar"/> | ||
<classpathentry kind="lib" path="lib/dom4j-1.6.1.jar"/> | ||
<classpathentry kind="lib" path="lib/jdom-1.1.3.jar"/> | ||
<classpathentry kind="lib" path="lib/jdom2-2.0.5.jar"/> | ||
<classpathentry kind="lib" path="lib/jettison-1.2.jar"/> | ||
<classpathentry kind="lib" path="lib/joda-time-1.6.jar"/> | ||
<classpathentry kind="lib" path="lib/json-20080701.jar"/> | ||
<classpathentry kind="lib" path="lib/kxml2-2.3.0.jar"/> | ||
<classpathentry kind="lib" path="lib/kxml2-min-2.3.0.jar"/> | ||
<classpathentry kind="lib" path="lib/stax-1.2.0.jar"/> | ||
<classpathentry kind="lib" path="lib/stax-api-1.0.1.jar"/> | ||
<classpathentry kind="lib" path="lib/tinyXML07-src.zip"/> | ||
<classpathentry kind="lib" path="lib/wstx-asl-3.2.7.jar"/> | ||
<classpathentry kind="lib" path="lib/xmlpull-1.1.3.1.jar"/> | ||
<classpathentry kind="lib" path="lib/xom-1.1.jar"/> | ||
<classpathentry kind="lib" path="lib/xpp3_min-1.1.4c.jar"/> | ||
<classpathentry kind="lib" path="lib/xstream-1.4.7.jar"/> | ||
<classpathentry kind="lib" path="lib/xstream-distribution-1.4.7-bin.zip"/> | ||
<classpathentry kind="output" path="bin"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/bin/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>MegaMek2015</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.sirius.nature.modelingproject</nature> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
</natures> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 | ||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve | ||
org.eclipse.jdt.core.compiler.compliance=1.7 | ||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate | ||
org.eclipse.jdt.core.compiler.debug.localVariable=generate | ||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate | ||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
org.eclipse.jdt.core.compiler.source=1.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
ATTENTION TO FREE/LIBRE/OPEN SOURCE SOFTWARE HACKERS | ||
|
||
This project started on a Windows system and as such, it has a few quirks that | ||
you may find disconcerting. The first is a complete lack of a Makefile; the | ||
primary means of building this project is Apache Ant. Also, there is an EXE | ||
(which calls a BAT file) to run the game on a Windows system; the corresponding | ||
shell script is called "startup.sh"). The release file is a ZIP file, and it | ||
does not place everything into a directory with a version number; many files | ||
are deposited directly into the directory that you unzip into. As is typical | ||
in a Windows-centric Java app, all third party libraries (i.e. JAR files) are | ||
supplied by the project itself. Finally, MegaMek is very particular about the | ||
contents of the directory in which it runs; the startup.sh script attempt to | ||
solve this problem, but let me know if it doesn't work in your setup. | ||
|
||
Someday, I intend to address every single issue listed above. For now, | ||
however, please accept the limitations and move on. | ||
|
||
MegaMek can be run on any Java v1.5 runtime, but we've gotten some | ||
problem reports from specific OS/JVM combinations. | ||
|
||
While there is no Makefile, it's very easy to build MegaMek with Jikes. My | ||
computer is running Debian Sarge with GCC installed. Therefore, I can build | ||
MegaMek with the following command; please modify the command to meet your | ||
environment (email me if you have any problems). | ||
|
||
jikes-gij -q -d classes -classpath classes -extdirs lib -sourcepath src `find src -name '*.java'` | ||
|
||
Once MegaMek is built, I can run it with GIJ with the following command. | ||
|
||
gij --classpath lib/Ostermiller.jar:lib/PngEncoder.jar:lib/TabPanel.jar:lib/TinyXML.jar:lib/collections.jar:l10n:classes megamek.MegaMek -log | tee MegaMek.log | ||
|
||
I can run it under Kaffe with a similar command. | ||
|
||
kaffe -classpath lib/Ostermiller.jar:lib/PngEncoder.jar:lib/TabPanel.jar:lib/TinyXML.jar:lib/collections.jar:l10n:classes megamek.MegaMek -log | tee MegaMek.log | ||
|
||
The following runtime flags are available: | ||
-testdice : Test the random number generator used by MegaMek, and exit. | ||
-dedicated [gamefile.sav] : Run MegaMek as a headless server; if the | ||
optional SAV file is supplied, that saved game will be loaded. | ||
-log [filename] : If no filename is given, run MegaMek without a log | ||
file. If a file is named, write the log to that file. If this | ||
flag is omitted, output is automatically sent to MegaMek.log. | ||
-testxml filename : Parse the named XML file, display its contents, and | ||
then exit. | ||
-gui swing : Start the swing GUI | ||
-eqdb filename : creates a list of all valid Equipment names for MTF | ||
files and saves it to the specified file | ||
-validate unitname : tests if the specified unit is a valid design | ||
E.g. to test the Stalker STK-4N, use -validate "Stalker STK-4N" | ||
|
||
TODO list: | ||
* The Splash Screen that is displayed first when MegaMek starts contains an | ||
image. This image should always be shown, but it flickers in and out | ||
of view under certain FLOSS Java runtimes. | ||
* The Splash Screen has a column of buttons to the right of the image. Under | ||
certain FLOSS runtimes, this column has a strange width, and it has a | ||
stranger resize behavior. | ||
* The Map Editor (launched from the button with the same name) has a strange | ||
layout in the runtimes that have trouble laying out the Splash Screen. | ||
* The Map Editor has image display problems in the runtimes that have problems | ||
showing the image on the Splash Screen. | ||
* The default random number generator that MegaMek uses is an instance of the | ||
java.security.SecureRandom class. Under certain runtimes, this RNG is | ||
very poorly implemented, as evidenced by the "-testdice" flag. | ||
|
||
James Damour | ||
suvarov454@users.sourceforge.net | ||
last updated 2008-01-25 |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication"> | ||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> | ||
<listEntry value="/MegaMek2015/src/megamek/MegaMek.java"/> | ||
</listAttribute> | ||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> | ||
<listEntry value="1"/> | ||
</listAttribute> | ||
<listAttribute key="org.eclipse.debug.ui.favoriteGroups"> | ||
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/> | ||
</listAttribute> | ||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="megamek.MegaMek"/> | ||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="MegaMek2015"/> | ||
</launchConfiguration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<unit> | ||
|
||
<entity chassis="Centaur" model="2" type="Biped" commander="false" deployment="0"> | ||
<pilot name="Angus Addems" nick="" gunnery="4" piloting="5" ejected="false"/> | ||
The first slot in a location is at index="1". | ||
<location index="1"> Torso | ||
<slot index="N/A" type="Clan Ammo SRM-2" shots="10" isDestroyed="false"/> | ||
</location> | ||
</entity> | ||
|
||
</unit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@if not exist classes mkdir classes | ||
javac -target 1.6 -source 1.6 -d classes -O -classpath src;lib/TinyXML.jar;lib/Ostermiller.jar;lib/PngEncoder.jar;lib/TabPanel.jar;lib/vecmath.jar;lib/j3dutils.jar;lib/j3dcore.jar src/megamek/*.java src/megamek/client/ui/AWT/*.java src/megamek/client/ui/swing/*.java src/megamek/client/ui/AWT/boardview3d/*.java | ||
jar cmf lib/manifest.txt MegaMek.jar -C classes . | ||
jar uf MegaMek.jar -C l10n . | ||
jar uf MegaMek.jar -C src megamek\MegaMek.properties |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,182 @@ | ||
<?xml version="1.0"?> | ||
<!-- This is an ant build file. See: "http://jakarta.apache.org/ant" --> | ||
<!-- To see userlevel commands and their descpription type 'ant -projecthelp' --> | ||
<!-- from a command prompt where this file is located --> | ||
|
||
<project default="all" name="MegaMek" basedir="."> | ||
<!-- Global properties for this build --> | ||
|
||
<property name="srcdir" value="src"/> | ||
<property name="propdir" value="i18n"/> | ||
<property name="confdir" value="mmconf"/> | ||
<property name="logdir" value="logs"/> | ||
<property name="builddir" value="classes"/> | ||
<property name="libdir" value="lib"/> | ||
<property name="libdir.test" value="lib-test"/> | ||
<property name="datadir" value="data"/> | ||
<property name="apidocdir" value="apidocs"/> | ||
<property name="docdir" value="docs"/> | ||
<property name="util" value="packaging_utils"/> | ||
<property name="dir.build.teststaging" location="${builddir}/teststaging"/> | ||
<property name="dir.build.testreport" location="${builddir}/testreport"/> | ||
<property name="dir.test.src" location="unittests"/> | ||
<property name="dir.build.test" location="${builddir}/unittests"/> | ||
|
||
<property name="timestampfile" value="${logdir}/timestamp"/> | ||
<property name="TinyXMLsrc" value="TinyXML07-src.zip"/> | ||
|
||
<!-- Name of the target jarfile and the class containing the main-Method --> | ||
<property name="jarfile" value="MegaMek.jar"/> | ||
<property name="jarmainclass" value="megamek.MegaMek"/> | ||
|
||
<!-- This is the relative path to the 'data' directory --> | ||
<property name="dataclasspath" value="."/> | ||
|
||
<path id="classpath"> | ||
<fileset dir="${libdir}" includes="*.jar"/> | ||
</path> | ||
|
||
<path id="classpath.compile-unittest"> | ||
<path refid="classpath"/> | ||
<pathelement location="${builddir}"/> | ||
<fileset dir="${libdir.test}"/> | ||
</path> | ||
|
||
<path id="classpath.run-unittest"> | ||
<path refid="classpath.compile-unittest"/> | ||
<pathelement location="${dir.build.test}"/> | ||
</path> | ||
|
||
<!-- Build the list of the lib/*.jar files to be included in the "Class-Path" attribute of the jar's manifest dynamically. --> | ||
<pathconvert pathsep=" " property="jarclasspath"> | ||
<path> | ||
<!-- We'll include the jars in the "lib" directory --> | ||
<fileset dir="lib/"> | ||
<include name="*.jar"/> | ||
</fileset> | ||
</path> | ||
<mapper> | ||
<chainedmapper> | ||
<flattenmapper/> | ||
<globmapper from="*" to="lib/*"/> | ||
</chainedmapper> | ||
</mapper> | ||
</pathconvert> | ||
|
||
<!-- initializes system before build --> | ||
<target name="init"> | ||
<!-- Create the time stamp --> | ||
<tstamp/> | ||
|
||
<!-- Ensure that the build directory exists. --> | ||
<mkdir dir="${builddir}"/> | ||
</target> | ||
|
||
<target name="compile" depends="init" description="Compile java sources into class files"> | ||
<!-- compile --> | ||
<javac debug="true" debuglevel="lines,source" target="1.7" source="1.7" destdir="${builddir}" srcdir="${srcdir}" memoryInitialSize="512m" memoryMaximumSize="512m" fork="true"> | ||
<classpath> | ||
<pathelement location="${basedir}" /> | ||
<fileset dir="${libdir}" includes="*.jar" /> | ||
</classpath> | ||
</javac> | ||
<!-- generate current equipment.txt --> | ||
<java classname="megamek.MegaMek" fork="true"> | ||
<arg line="-eqdb docs/equipment.txt" /> | ||
<classpath> | ||
<pathelement path="${builddir}" /> | ||
<fileset dir="${libdir}" includes="*.jar" /> | ||
</classpath> | ||
</java> | ||
<!-- Ensure that the log directory exists. --> | ||
<mkdir dir="${logdir}" /> | ||
<touch file="${timestampfile}" /> | ||
</target> | ||
|
||
<target name="jar" depends="unit.test" description="Generates JAR File from compiled sources"> | ||
<!-- collects all files from the ${builddir} (classes) and generates the jar file in ${basedir} --> | ||
<jar basedir="${builddir}" jarfile="${basedir}/${jarfile}"> | ||
<fileset dir="${propdir}" includes="**/*.properties"/> | ||
<fileset dir="${srcdir}" includes="**/*.properties"/> | ||
<manifest> | ||
<attribute name="Built-By" value="${user.name}"/> | ||
<attribute name="Class-Path" value=". ${jarclasspath}"/> | ||
<attribute name="Main-Class" value="${jarmainclass}"/> | ||
</manifest> | ||
</jar> | ||
</target> | ||
|
||
<target name="run" depends="compile" description="Runs Megamek"> | ||
<echo message="Running MegaMek from build directory: ${builddir}"/> | ||
<java classname="megamek.MegaMek" fork="true"> | ||
<classpath> | ||
<pathelement path="${basedir}"/> | ||
<pathelement path="${builddir}"/> | ||
<fileset dir="${libdir}" includes="*.jar"/> | ||
<pathelement path="${basedir}/src/"/> | ||
<pathelement path="${basedir}/l10n/"/> | ||
</classpath> | ||
</java> | ||
</target> | ||
|
||
<!-- generates MegaMek API Doc in ${apidocdir} --> | ||
<target name="apidoc" description="Generate javadocs for Megamek"> | ||
<mkdir dir="${apidocdir}"/> | ||
<javadoc classpath="${basedir}" destdir="${apidocdir}" package="yes" packagenames="megamek.*" | ||
sourcepath="${srcdir}" windowtitle="MegaMek API"/> | ||
</target> | ||
|
||
<target name="clean" description="Remove all compiled and generated files"> | ||
<!-- Delete the ${build} directory tree --> | ||
<delete dir="${builddir}"/> | ||
<delete dir="${apidocdir}"/> | ||
<delete file="${timestampfile}"/> | ||
<delete file="${jarfile}"/> | ||
<delete> | ||
<fileset dir="${basedir}"> | ||
<include name="**/megamek-*.zip"/> | ||
</fileset> | ||
</delete> | ||
<delete> | ||
<fileset dir="${datadir}/mechfiles"> | ||
<include name="units.cache"/> | ||
</fileset> | ||
</delete> | ||
</target> | ||
|
||
<target depends="clean, compile, jar" name="all" description="Clean, compile and build a jar"/> | ||
|
||
<target name="compileTests" depends="compile" unless="skip.tests" description="Compile unit tests"> | ||
<delete dir="${dir.build.test}"/> | ||
<mkdir dir="${dir.build.test}"/> | ||
<javac srcdir="${dir.test.src}" destdir="${dir.build.test}" includeantruntime="false" debug="true"> | ||
<classpath refid="classpath.compile-unittest"/> | ||
</javac> | ||
</target> | ||
|
||
<target depends="compileTests" name="unit.test" description="Execute unit tests"> | ||
<delete dir="${dir.build.teststaging}"/> | ||
<delete dir="${dir.build.testreport}"/> | ||
<mkdir dir="${dir.build.teststaging}"/> | ||
<mkdir dir="${dir.build.testreport}"/> | ||
|
||
<junit fork="true" maxmemory="256m" showoutput="true" printsummary="yes" forkmode="once" haltonfailure="true" | ||
haltonerror="true" failureproperty="tests.failed" dir="."> | ||
<classpath refid="classpath.run-unittest"/> | ||
<formatter type="xml" usefile="true"/> | ||
<batchtest fork="true" todir="${dir.build.teststaging}"> | ||
<fileset dir="${dir.build.test}"> | ||
<include name="**/*Test.class"/> | ||
<include name="**/*Tests.class"/> | ||
</fileset> | ||
</batchtest> | ||
</junit> | ||
|
||
<junitreport todir="${dir.build.testreport}"> | ||
<fileset dir="${dir.build.teststaging}"> | ||
<include name="TEST-*.xml"/> | ||
</fileset> | ||
</junitreport> | ||
</target> | ||
|
||
</project> |
Oops, something went wrong.