Skip to content

Commit

Permalink
Now using ant as the preferred build method
Browse files Browse the repository at this point in the history
  • Loading branch information
CapacitorSet committed Mar 26, 2015
1 parent 154d899 commit 937c90a
Show file tree
Hide file tree
Showing 97 changed files with 35 additions and 10 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
name = buzzr

all:
javac *.java
@echo "Makefile is outdated, please use ant if possible!"
javac src/*.java

jar: $(name).jar
@echo "Makefile is outdated, please use ant if possible!"
chmod +x $(name).jar

src:
cd .. && zip -r circuit-src.zip src/Makefile src/*.java src/*.txt src/circuits/

run: all
java Circuit

$(name).jar: all
@echo "Makefile is outdated, please use ant if possible!"
jar cfm $(name).jar Manifest.txt *.class *.txt circuits/

clean:
Expand Down
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,11 @@ This is an electronics tutorial based on Paul Falstad's circuit simulator (origi
Building
--------

If you have `make` installed, just `cd src`, `make`, and then `make jar`.
The preferred build process is using Apache Ant: use `ant compile` to build, then `ant run` to run the application.

If not, compile with `javac *.java` and build the jar file with `jar cfm buzzr.jar Manifest.txt *.class *.txt circuits/`
If you don't have `ant`, but have `make`, run `make jar` to compile, and then `make run` to run the application.

Running
-------

As an application: `java -jar buzzr.jar`
If you have neither, compile with `javac src/*.java`, build the jar file with `jar cfm buzzr.jar Manifest.txt *.class *.txt circuits/`, and run the application with `java -jar buzzr.jar`.

Terms and Conditions
--------------------
Expand Down
28 changes: 28 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<project>

<target name="clean">
<delete dir="build"/>
</target>

<target name="compile">
<mkdir dir="build/classes"/>
<javac srcdir="src" destdir="build/classes" includeantruntime="false">
</javac>

<mkdir dir="build/jar"/>
<jar destfile="buzzr.jar" basedir="build/classes">
<fileset dir=".">
<include name="circuits/**"/>
</fileset>
<fileset file="setuplist.txt" />
<manifest>
<attribute name="Main-Class" value="Buzzr"/>
</manifest>
</jar>
</target>

<target name="run">
<java jar="buzzr.jar" fork="true" />
</target>

</project>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 937c90a

Please sign in to comment.