+++ /dev/null
-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
--- /dev/null
+#!/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
--- /dev/null
+/* 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) {}
+}
--- /dev/null
+/* Stub for stub for stubs O_o */
+
+package javax.microedition.lcdui.game;
+
+import javax.microedition.lcdui.*;
+
+public abstract class GameCanvas extends Canvas {}