DEADSOFTWARE

Add script for build default stubs and libs
authorDeaDDooMER <deaddoomer@deadsoftware.ru>
Sat, 4 Mar 2017 09:56:59 +0000 (12:56 +0300)
committerDeaDDooMER <deaddoomer@deadsoftware.ru>
Sat, 4 Mar 2017 09:56:59 +0000 (12:56 +0300)
14 files changed:
mps/.gitignore [new file with mode: 0644]
mps/README.txt [deleted file]
mps/make.sh [new file with mode: 0755]
mps/src/F.java [moved from mps/F.java with 100% similarity]
mps/src/FS.java [moved from mps/FS.java with 100% similarity]
mps/src/FW.java [moved from mps/FW.java with 100% similarity]
mps/src/H.java [moved from mps/H.java with 100% similarity]
mps/src/M.java [new file with mode: 0644]
mps/src/P.java [moved from mps/P.java with 100% similarity]
mps/src/RS.java [moved from mps/RS.java with 100% similarity]
mps/src/Real.java [moved from mps/Real.java with 100% similarity]
mps/src/S.java [moved from mps/S.java with 100% similarity]
mps/src/SM.java [moved from mps/SM.java with 100% similarity]
mps/src/javax/microedition/lcdui/game/GameCanvas.java [new file with mode: 0644]

diff --git a/mps/.gitignore b/mps/.gitignore
new file mode 100644 (file)
index 0000000..6b468b6
--- /dev/null
@@ -0,0 +1 @@
+*.class
diff --git a/mps/README.txt b/mps/README.txt
deleted file mode 100644 (file)
index 83d9c74..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-For building this stubs, just call the java compiler and then the preverifier in the regular way.
-
-For example, assumbing you have both in the path, the WTK is in C:\WTK25, and that you have a subdirectory called "bin" to hold the preverified class output, for building the SM class you can do:
-
-javac -g:none -classpath c:\WTK25\lib\midpapi10.jar;c:\WTK25\lib\cldcapi10.jar;c:\WTK25\lib\wma11.jar -source 1.3 -target 1.1 SM.java
-preverify1.1 -nofp -nofinalize -nonative -classpath c:\WTK25\lib\midpapi10.jar;c:\WTK25\lib\cldcapi10.jar;c:\WTK25\lib\wma11.jar -d "bin" "SM"
-
-Enjoy,
-Javier Santo Domingo
diff --git a/mps/make.sh b/mps/make.sh
new file mode 100755 (executable)
index 0000000..3a65050
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+LIBDIR=/usr/share/java/microemulator/lib
+
+rm -rf classes stubs
+mkdir -p classes stubs
+javac -Xlint:-options -encoding ISO-8859-1 -g:none -d classes \
+      -classpath `find $LIBDIR -type f -name '*.jar' -printf '%p:'` \
+      -source 1.3 -target 1.1 `find src -type f -name '*.java'`
+rm -rf classes/javax
+proguard -injars classes -outjars stubs \
+         -libraryjars $LIBDIR/midpapi20.jar \
+         -libraryjars $LIBDIR/cldcapi11.jar \
+         -libraryjars $LIBDIR/microemu-jsr-120.jar \
+         -dontshrink -microedition -dontobfuscate \
+         -overloadaggressively -repackageclasses '' -allowaccessmodification \
+         -keep public class FW
+rm -rf classes stubs/M.class
similarity index 100%
rename from mps/F.java
rename to mps/src/F.java
similarity index 100%
rename from mps/FS.java
rename to mps/src/FS.java
similarity index 100%
rename from mps/FW.java
rename to mps/src/FW.java
similarity index 100%
rename from mps/H.java
rename to mps/src/H.java
diff --git a/mps/src/M.java b/mps/src/M.java
new file mode 100644 (file)
index 0000000..38e09a8
--- /dev/null
@@ -0,0 +1,23 @@
+/* Just a stub for stubs */
+
+import java.lang.*;
+import java.util.*;
+import javax.microedition.lcdui.*;
+import javax.microedition.lcdui.game.*;
+
+public class M extends GameCanvas implements Runnable {
+       public static Random RNG;
+       public static Image I;
+       public static M T;
+       public static Graphics G;
+       public static int KC;
+       public static int KP;
+       public static int[] IC;
+
+       public M() {}
+       public static void R() throws Exception {}
+       public void paint(Graphics g) {}
+       public void run() {}
+       public void keyPressed(int k) {}
+       public void keyReleased(int k) {}
+}
similarity index 100%
rename from mps/P.java
rename to mps/src/P.java
similarity index 100%
rename from mps/RS.java
rename to mps/src/RS.java
similarity index 100%
rename from mps/Real.java
rename to mps/src/Real.java
similarity index 100%
rename from mps/S.java
rename to mps/src/S.java
similarity index 100%
rename from mps/SM.java
rename to mps/src/SM.java
diff --git a/mps/src/javax/microedition/lcdui/game/GameCanvas.java b/mps/src/javax/microedition/lcdui/game/GameCanvas.java
new file mode 100644 (file)
index 0000000..10b188c
--- /dev/null
@@ -0,0 +1,7 @@
+/* Stub for stub for stubs O_o */
+
+package javax.microedition.lcdui.game;
+
+import javax.microedition.lcdui.*;
+
+public abstract class GameCanvas extends Canvas {}