DEADSOFTWARE

Add development scripts
authorDeaDDooMER <deaddoomer@deadsoftware.ru>
Sun, 5 Mar 2017 10:19:11 +0000 (13:19 +0300)
committerDeaDDooMER <deaddoomer@deadsoftware.ru>
Sun, 5 Mar 2017 10:19:11 +0000 (13:19 +0300)
.gitignore [new file with mode: 0644]
make.sh [new file with mode: 0755]
run.sh [new file with mode: 0755]
run2.sh [new file with mode: 0755]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..86ac337
--- /dev/null
@@ -0,0 +1,5 @@
+fs/
+mp3CC
+*.jar
+*.class
+*.bsf
diff --git a/make.sh b/make.sh
new file mode 100755 (executable)
index 0000000..db833cc
--- /dev/null
+++ b/make.sh
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+# MPC="/home/deaddoomer/work/mp3CC-linux/mpc/mp3CC"
+# MPS="/home/deaddoomer/work/mp3CC-linux/mps/stubs"
+# MPL="/home/deaddoomer/work/mp3CC-linux/mpl"
+
+MPC=mp3CC
+MPS=/usr/share/midletpascal/stubs
+# MPL=/usr/share/midletpascal/libs
+MPL=libs
+
+OBJ=classes
+LIB=libs
+RES=res
+SRC=src
+
+SOURCES=`find $SRC -name '*.mpsrc' -or -name '*.pas'`
+
+mp3cc() {
+       $MPC -s "$1" -o "$OBJ" -l "$MPL" -p "$LIB" -m1 -c1 $2 | grep -v "@\|\^"
+}
+
+printJarClass() {
+       find "$1" -name '*.class' -printf " -C $1 %f"
+}
+
+rm -rf $OBJ
+mkdir -p $OBJ
+
+echo "===> Generate symbols"
+
+for I in $SOURCES
+do
+       mp3cc "$I" -d
+done
+
+echo "===> Compile sources"
+
+for I in $SOURCES
+do
+       mp3cc "$I"
+done
+
+echo "===> Package binary"
+
+jar cfM bin.jar \
+    $(printJarClass $MPS) \
+    $(printJarClass $OBJ) \
+    $(printJarClass $LIB) \
+    -C $RES .
diff --git a/run.sh b/run.sh
new file mode 100755 (executable)
index 0000000..3b37d4c
--- /dev/null
+++ b/run.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+F="c:;fs/c;e:;fs/e"
+
+mkdir -p fs/c fs/e
+exec java -Dfileconn.dir.memorycard="file:///c:/" -jar pstros.jar bin.jar -w176 -h208 -s2 -fc="$F"
+
diff --git a/run2.sh b/run2.sh
new file mode 100755 (executable)
index 0000000..c6547bf
--- /dev/null
+++ b/run2.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+L=/usr/share/java/microemulator/lib
+exec microemulator -cp $L/microemu-jsr-75.jar --impl org.microemu.cldc.file.FileSystem bin.jar