DEADSOFTWARE

Generate JAD automatically
[cavecraft.git] / make.sh
diff --git a/make.sh b/make.sh
index db833cc..7236ef0 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -1,5 +1,11 @@
 #!/bin/sh
 
+NAM=CaveCraft
+VER=1.9.0
+VEN=DeaDSoftWare
+URL=https://deadsoftware.ru
+ICO=/title/icon.png
+
 # MPC="/home/deaddoomer/work/mp3CC-linux/mpc/mp3CC"
 # MPS="/home/deaddoomer/work/mp3CC-linux/mps/stubs"
 # MPL="/home/deaddoomer/work/mp3CC-linux/mpl"
@@ -41,10 +47,40 @@ do
        mp3cc "$I"
 done
 
+mkdir -p $OBJ/META-INF
+cat > $OBJ/META-INF/MANIFEST.MF <<!
+Manifest-Version: 1.0
+MIDlet-1: $NAM, $ICO, FW
+MIDlet-Name: $NAM
+MIDlet-Vendor: $VEN
+MIDlet-Version: $VER
+MicroEdition-Configuration: CLDC-1.0
+MicroEdition-Profile: MIDP-2.0
+MIDlet-Icon: $ICO
+Created-By: $VEN
+!
+
 echo "===> Package binary"
 
 jar cfM bin.jar \
     $(printJarClass $MPS) \
     $(printJarClass $OBJ) \
     $(printJarClass $LIB) \
+    -C $OBJ META-INF \
     -C $RES .
+
+# http://www.oracle.com/technetwork/systems/index-156899.html
+
+cat > bin.jad <<!
+Manifest-Version: 1.0
+MIDlet-1: $NAM, $ICO, FW
+MIDlet-Name: $NAM
+MIDlet-Vendor: $VEN
+MIDlet-Jar-URL: $URL
+MIDlet-Jar-Size: $(stat -c %s bin.jar)
+MIDlet-Version: $VER
+MicroEdition-Configuration: CLDC-1.0
+MicroEdition-Profile: MIDP-2.0
+MIDlet-Icon: $ICO
+Created-By: $VEN
+!