-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Linus Lotz
committed
Mar 3, 2011
1 parent
0115ee8
commit 396867c
Showing
9 changed files
with
176 additions
and
0 deletions.
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,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" path=""/> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> | ||
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/NXJ_JARS"/> | ||
<classpathentry kind="output" path=""/> | ||
</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,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>SkyNet</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
</natures> | ||
</projectDescription> |
Binary file not shown.
Binary file not shown.
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,23 @@ | ||
import lejos.nxt.*; | ||
/** | ||
* @author Linus Lotz | ||
* | ||
*/ | ||
|
||
|
||
public class SkyNet | ||
{ | ||
|
||
|
||
public static void main (String[] aArg) | ||
throws Exception | ||
{ | ||
LCD.drawString("ALARM!!!!", 0, 0); | ||
while(true) | ||
{ | ||
Sound.setVolume(100); | ||
Sound.buzz(); | ||
Thread.sleep(100); | ||
} | ||
} | ||
} |
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,25 @@ | ||
<project name="Aufgabe1" default="uploadandrun"> | ||
<description> | ||
HelloWorld build file | ||
</description> | ||
|
||
<target name="clean" description="clean up all generated files" > | ||
<ant antfile="../samplebuild.xml" target="clean"/> | ||
</target> | ||
|
||
<target name="compile" description="compile the source" > | ||
<ant antfile="../samplebuild.xml" target="compile"/> | ||
</target> | ||
|
||
<target name="link" description="link the binary" > | ||
<ant antfile="../samplebuild.xml" target="link"/> | ||
</target> | ||
|
||
<target name="upload" description="upload the binary" > | ||
<ant antfile="../samplebuild.xml" target="upload"/> | ||
</target> | ||
|
||
<target name="uploadandrun" description="upload and run the binary" > | ||
<ant antfile="../samplebuild.xml" target="uploadandrun"/> | ||
</target> | ||
</project> |
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,90 @@ | ||
<project name="sample" default="uploadandrun"> | ||
<description> | ||
Sample build file | ||
</description> | ||
|
||
<!-- set properties for this build --> | ||
<property environment="env"/> | ||
<property file="../samples.properties"/> | ||
<property name="src" location="."/> | ||
<basename property="program" file="."/> | ||
<property name="binary" value="${program}.nxj" /> | ||
|
||
<!-- deletes class files --> | ||
<target name="clean" description="clean up all generated files"> | ||
<delete> | ||
<fileset dir="."> | ||
<include name="**/*.class"/> | ||
</fileset> | ||
</delete> | ||
</target> | ||
|
||
<target name="compile" depends="clean" | ||
description="compile the source" > | ||
<!-- Compile the java code from ${src} --> | ||
<javac srcdir="${src}" destdir="${src}"> | ||
<bootclasspath> | ||
<pathelement location="${nxj.classes.jar}"/> | ||
</bootclasspath> | ||
</javac> | ||
</target> | ||
|
||
<target name="link" depends="compile" | ||
description="link the binary" > | ||
<!-- Link the binary and create a signature file --> | ||
<java classname="js.tinyvm.TinyVM"> | ||
<arg value="--bootclasspath"/> | ||
<arg path="${nxj.classes.jar}" /> | ||
<arg value="--classpath"/> | ||
<arg path="." /> | ||
<arg value="--writeorder" /> | ||
<arg value="LE" /> | ||
<arg value="${program}"/> | ||
<arg value="-o"/> | ||
<arg value="${binary}"/> | ||
<arg value="-v"/> | ||
<classpath> | ||
<pathelement location="${nxj.jtools.jar}"/> | ||
<pathelement location="${nxj.commons.jar}"/> | ||
<pathelement location="${nxj.bcel.jar}"/> | ||
</classpath> | ||
</java> | ||
</target> | ||
|
||
<target name="upload" depends="link" | ||
description="upload the binary" > | ||
<java classname="lejos.pc.tools.NXJUpload" fork="true"> | ||
<jvmarg value="-Djava.library.path=${nxj.library.path}"/> | ||
<jvmarg value="-Dnxj.home=${nxj.home}"/> | ||
<arg value="${binary}"/> | ||
<classpath> | ||
<pathelement location="${nxj.jtools.jar}"/> | ||
<pathelement location="${nxj.pctools.jar}"/> | ||
<pathelement location="${nxj.pccomm.jar}"/> | ||
<pathelement location="${nxj.commons.jar}"/> | ||
<pathelement location="${nxj.bcel.jar}"/> | ||
<pathelement location="${nxj.bluecove.jar}"/> | ||
<pathelement location="${nxj.bluecove-gpl.jar}"/> | ||
</classpath> | ||
</java> | ||
</target> | ||
|
||
<target name="uploadandrun" depends="link" | ||
description="upload and run the binary" > | ||
<java classname="lejos.pc.tools.NXJUpload" fork="true"> | ||
<jvmarg value="-Djava.library.path=${nxj.library.path}"/> | ||
<jvmarg value="-Dnxj.home=${nxj.home}"/> | ||
<arg value="${binary}"/> | ||
<arg value="-r"/> | ||
<classpath> | ||
<pathelement location="${nxj.jtools.jar}"/> | ||
<pathelement location="${nxj.pctools.jar}"/> | ||
<pathelement location="${nxj.pccomm.jar}"/> | ||
<pathelement location="${nxj.commons.jar}"/> | ||
<pathelement location="${nxj.bcel.jar}"/> | ||
<pathelement location="${nxj.bluecove.jar}"/> | ||
<pathelement location="${nxj.bluecove-gpl.jar}"/> | ||
</classpath> | ||
</java> | ||
</target> | ||
</project> |
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 @@ | ||
nxj.home=${env.NXJ_HOME} | ||
nxj.classes.home=${nxj.home} | ||
nxj.jtools.home=${nxj.home} | ||
nxj.pctools.home=${nxj.home} | ||
nxj.pccomm.home=${nxj.home} | ||
nxj.library.path=${nxj.home}/bin | ||
nxj.classes.jar=${nxj.classes.home}/lib/classes.jar | ||
nxj.jtools.jar=${nxj.jtools.home}/lib/jtools.jar | ||
nxj.pctools.jar=${nxj.pctools.home}/lib/pctools.jar | ||
nxj.pccomm.jar=${nxj.pccomm.home}/lib/pccomm.jar | ||
nxj.commons.jar=${nxj.jtools.home}/3rdparty/lib/commons-cli.jar | ||
nxj.bcel.jar=${nxj.jtools.home}/3rdparty/lib/bcel.jar | ||
nxj.bluecove.jar=${nxj.pccomm.home}/3rdparty/lib/bluecove.jar | ||
nxj.bluecove-gpl.jar=${nxj.pccomm.home}/3rdparty/lib/bluecove-gpl.jar |