forked from AXDOOMER/mochadoom
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update build scripts to use build folder
* Use the same folder hierarchy as Gradle * Fix manifest file
- Loading branch information
Showing
4 changed files
with
39 additions
and
13 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
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 |
---|---|---|
@@ -1,7 +1,19 @@ | ||
#!/bin/bash | ||
#!/bin/sh | ||
|
||
cd src | ||
find . -type f -name '*.class' -delete | ||
javac -cp . mochadoom/Engine.java | ||
java mochadoom/Engine $@ | ||
BUILD_DIR=build | ||
CLASSES_DIR=$BUILD_DIR/classes | ||
SOURCES_DIR=src | ||
|
||
# clean | ||
echo "Clean build directory: $BUILD_DIR..." | ||
rm -r $BUILD_DIR | ||
|
||
# compile | ||
echo "Compile files from: $SOURCES_DIR..." | ||
mkdir -p $CLASSES_DIR | ||
javac -d $CLASSES_DIR -cp $SOURCES_DIR $SOURCES_DIR/mochadoom/Engine.java | ||
|
||
# run | ||
echo "Run..." | ||
java -cp $CLASSES_DIR mochadoom.Engine "$@" | ||
|
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 |
---|---|---|
@@ -1,8 +1,22 @@ | ||
#!/bin/bash | ||
#!/bin/sh | ||
|
||
cd src | ||
find . -type f -name '*.class' -delete | ||
javac -cp . mochadoom/Engine.java | ||
jar cmf Manifest.txt mochadoom.jar . | ||
zip -d mochadoom.jar *.java README.md Manifest.txt | ||
BUILD_DIR=build | ||
CLASSES_DIR=$BUILD_DIR/classes | ||
LIBS_DIR=$BUILD_DIR/libs | ||
SOURCES_DIR=src | ||
JAR_NAME=mochadoom.jar | ||
|
||
# clean | ||
echo "Clean build directory: $BUILD_DIR..." | ||
rm -r $BUILD_DIR | ||
|
||
# compile | ||
echo "Compile files from: $SOURCES_DIR..." | ||
mkdir -p $CLASSES_DIR | ||
mkdir -p $LIBS_DIR | ||
javac -d $CLASSES_DIR -cp $SOURCES_DIR $SOURCES_DIR/mochadoom/Engine.java | ||
|
||
# jar | ||
echo "Create jar file: $LIBS_DIR/$JAR_NAME..." | ||
jar cmf $SOURCES_DIR/Manifest.txt $LIBS_DIR/$JAR_NAME -C $CLASSES_DIR . | ||
|
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 |
---|---|---|
@@ -1 +1 @@ | ||
Main-Class: mochadoom/Engine | ||
Main-Class: mochadoom.Engine |