Skip to content

Commit

Permalink
Updated java build for platform compat
Browse files Browse the repository at this point in the history
  • Loading branch information
TwilCynder committed Dec 2, 2024
1 parent 2fb4a4f commit cbbb5d1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
13 changes: 5 additions & 8 deletions editor/javaEditor/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ SOURCES=$(shell find src -name "*.java")
dependant: $(SOURCES)
ifeq (, $(shell which ant 2> /dev/null))
-@mkdir classes 2> /dev/null
javac -d ./classes -cp "./src;./lib/*" ./src/main/Main.java
echo Main-Class: main.Main>manifest.mf
echo Class-Path: ./lib/*>>manifest.mf
./build/compile.sh
jar cvfm kuribrawl-editor.jar manifest.mf -C classes .
else
ant dist-zip
Expand All @@ -24,16 +22,15 @@ ifeq (, $(shell which unzip 2> /dev/null))
$(error Release mode build requires either Ant or unzip)
endif

-@mkdir classes 2> /dev/null
javac -d ./classes -cp "./src;./lib/*" ./src/main/Main.java
echo Main-Class: main.Main>manifest.mf
echo Class-Path: ./lib/*>>manifest.mf
./build/compile.sh

-@mkdir tmp
(cd tmp; unzip -uo ../lib/\*.jar)
-@rm -r tmp/META-INF
jar cvfm kuribrawl-editor.jar manifest.mf -C classes . -C tmp .
jar cvfm $(EXEC) manifest.mf -C classes . -C tmp .
-@rm -r tmp

chmod a+x $(EXEC)
else
ant build
endif
Expand Down
5 changes: 1 addition & 4 deletions editor/javaEditor/build.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ then
fi

else
mkdir -p classes
javac -d ./classes -cp "./src;./lib/*" ./src/main/Main.java
echo Main-Class: main.Main>manifest.mf
echo Class-Path: ./lib/*>>manifest.mf
./build/compile.sh
jar cvfm kuribrawl-editor.jar manifest.mf -C classes .
fi
7 changes: 7 additions & 0 deletions editor/javaEditor/build/compile.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#! /bin/bash -x

echo "Compiling ..."
mkdir -p classes
javac -d ./classes --source-path "./src/" -cp "./lib/*" ./src/main/Main.java
echo Main-Class: main.Main>manifest.mf
echo Class-Path: ./lib/*>>manifest.mf

0 comments on commit cbbb5d1

Please sign in to comment.