OSDN Git Service

updated IKVM to latest
authorbadlogic <badlogicgames@gmail.com>
Mon, 30 Sep 2013 17:48:09 +0000 (19:48 +0200)
committerbadlogic <badlogicgames@gmail.com>
Mon, 30 Sep 2013 17:48:09 +0000 (19:48 +0200)
18 files changed:
backends/gdx-backend-iosmonotouch/libs/ikvm/.Rhistory [new file with mode: 0644]
backends/gdx-backend-iosmonotouch/libs/ikvm/README.md [new file with mode: 0644]
backends/gdx-backend-iosmonotouch/libs/ikvm/bin/IKVM.OpenJDK.Beans.dll
backends/gdx-backend-iosmonotouch/libs/ikvm/bin/IKVM.OpenJDK.Charsets.dll
backends/gdx-backend-iosmonotouch/libs/ikvm/bin/IKVM.OpenJDK.Core.dll
backends/gdx-backend-iosmonotouch/libs/ikvm/bin/IKVM.OpenJDK.Misc.dll
backends/gdx-backend-iosmonotouch/libs/ikvm/bin/IKVM.OpenJDK.Text.dll
backends/gdx-backend-iosmonotouch/libs/ikvm/bin/IKVM.OpenJDK.Util.dll
backends/gdx-backend-iosmonotouch/libs/ikvm/bin/IKVM.Reflection.dll
backends/gdx-backend-iosmonotouch/libs/ikvm/bin/IKVM.Runtime.JNI.dll
backends/gdx-backend-iosmonotouch/libs/ikvm/bin/IKVM.Runtime.dll
backends/gdx-backend-iosmonotouch/libs/ikvm/bin/ikvm.exe
backends/gdx-backend-iosmonotouch/libs/ikvm/bin/ikvmc.exe
backends/gdx-backend-iosmonotouch/libs/ikvm/bin/ikvmstub.exe
backends/gdx-backend-iosmonotouch/libs/ikvm/bin/libikvm-natives.a
demos/invaders/gdx-invaders-ios/gdx-invaders-ios.userprefs
demos/invaders/gdx-invaders-ios/gdx-invaders-ios/gdx-invaders-ios.csproj
demos/superjumper/superjumper-ios/superjumper-ios.userprefs

diff --git a/backends/gdx-backend-iosmonotouch/libs/ikvm/.Rhistory b/backends/gdx-backend-iosmonotouch/libs/ikvm/.Rhistory
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/backends/gdx-backend-iosmonotouch/libs/ikvm/README.md b/backends/gdx-backend-iosmonotouch/libs/ikvm/README.md
new file mode 100644 (file)
index 0000000..0202aca
--- /dev/null
@@ -0,0 +1,87 @@
+IKVM MonoTouch
+==============
+
+This code is based on release 0.46.0.1 of [IKVM] and is modified to allow operation with
+[MonoTouch]. The two big challenges in supporting MonoTouch are:
+
+ * MonoTouch uses AOT compilation to deploy to iOS, and thus cannot support dynamic code
+   generation. IKVM uses dynamic code generation extensively to support fast reflection.
+
+ * MonoTouch only provides the Silverlight runtime profile, which lacks a substantial number of the
+   features of the desktop profile, on which IKVM relies.
+
+These challenges have largely been overcome:
+
+ * Reflection is supported through standard CLR reflection (which is slower than code generation,
+   but at least it works).
+
+ * The Silverlight profile is accommodated by aggressive pruning of the JDK with which IKVM
+   operates. This means that the vast majority of the "enterprisey" features of OpenJDK are not
+   available via IKVM MonoTouch.
+
+Building
+--------
+
+IKVM MonoTouch can (naturally) only be built on a Mac which has MonoTouch installed. You also need
+to install [NAnt](http://nant.sourceforge.net/) (as it's no longer bundled with MonoTouch). Once
+you've installed NAnt, you need to patch your `bin/NAnt.exe.config` file using the
+`NAnt.exe.config.patch` in the top-level directory of ikvm-monotouch.
+
+In addition to this project, you need to check out the [ikvm-openjdk] repository in the same
+directory that contains the `ikvm-monotouch` checkout. The IKVM build will use the Java source in
+the `ikvm-openjdk` directory during its build.
+
+Once you have created your symlink and checked out `ikvm-openjdk`, you can build everything using
+the `build.sh` script:
+
+    ./build.sh
+
+This will generate all of the IKVM dlls and exes in the `ikvm-monotouch/bin` directory. This
+version of IKVM can then be used in the normal manner to convert Java bytecode to a dll that can be
+included in a MonoTouch project.
+
+JNI is supported by including the bin/libikvm-natives.a file in your MonoTouch project. The file
+needs to be copied, not linked, otherwise MonoTouch does not pick it up. You have to add the 
+following arguments to IPhone Build -> Additional mtouch arguments:
+
+    -nosymbolstrip -nostrip -cxx -gcc_flags "-L${ProjectDir} -likvm-natives -force_load ${ProjectDir}/libikvm-natives.a"
+
+Your JNI code must use the jni.h file found in native/. Setup an XCode static library project, add
+your JNI files plus a reference to native/jni.h. Then add the static library just like you add the
+libikvm-native.a file (including the mtouch arguments to force link all symbols).
+
+It is not necessary to use this custom project to convert C# dlls to Java stub classes (via
+`ikvmstub.exe`), but you can use it, and save yourself the trouble of installing a standard IKVM
+distribution.
+
+Limitations
+-----------
+
+There are numerous limitations, too many to enumerate. However, this project is successfully
+enabling the [PlayN] game development library to convert Java game projects into iOS binaries.
+
+One known limitation that can probably be overcome is the lack of `java.net` support. The
+aggressive pruning of the OpenJDK to remove all of the enterprise functionality that could not be
+supported on Silverlight resulted in `java.net` being cut out due non-trivial internal dependencies
+on JNDI and from there into a bunch of enterprise crap.
+
+I strongly suspect that the JNDI and other enterprise crap can be surgically removed, leaving a
+functional `java.net` which supports basic DNS and TCP/UDP. However, that will take more time and
+effort than I have thus far been able to muster.
+
+Distribution
+------------
+
+See [LICENSE] for license information on IKVM.
+
+Contact
+-------
+
+Questions, comments, and suchlike can be directed to the
+[Three Rings Libraries](http://groups.google.com/group/ooo-libs) Google Group.
+
+[IKVM]: http://www.ikvm.net/
+[MonoTouch]: http://xamarin.com/monotouch/
+[ikvm-openjdk]: https://github.com/samskivert/ikvm-openjdk
+[PlayN]: http://code.google.com/p/playn/
+[LICENSE]: https://raw.github.com/samskivert/ikvm-monotouch/master/LICENSE
index 34b536d..0d51803 100755 (executable)
Binary files a/backends/gdx-backend-iosmonotouch/libs/ikvm/bin/IKVM.OpenJDK.Beans.dll and b/backends/gdx-backend-iosmonotouch/libs/ikvm/bin/IKVM.OpenJDK.Beans.dll differ
index f401ee3..dd565a6 100755 (executable)
Binary files a/backends/gdx-backend-iosmonotouch/libs/ikvm/bin/IKVM.OpenJDK.Charsets.dll and b/backends/gdx-backend-iosmonotouch/libs/ikvm/bin/IKVM.OpenJDK.Charsets.dll differ
index 4d07600..eefe6ac 100755 (executable)
Binary files a/backends/gdx-backend-iosmonotouch/libs/ikvm/bin/IKVM.OpenJDK.Core.dll and b/backends/gdx-backend-iosmonotouch/libs/ikvm/bin/IKVM.OpenJDK.Core.dll differ
index d52ac74..626aaec 100755 (executable)
Binary files a/backends/gdx-backend-iosmonotouch/libs/ikvm/bin/IKVM.OpenJDK.Misc.dll and b/backends/gdx-backend-iosmonotouch/libs/ikvm/bin/IKVM.OpenJDK.Misc.dll differ
index a749f25..e4c3bea 100755 (executable)
Binary files a/backends/gdx-backend-iosmonotouch/libs/ikvm/bin/IKVM.OpenJDK.Text.dll and b/backends/gdx-backend-iosmonotouch/libs/ikvm/bin/IKVM.OpenJDK.Text.dll differ
index f7fb356..a6d1d3e 100755 (executable)
Binary files a/backends/gdx-backend-iosmonotouch/libs/ikvm/bin/IKVM.OpenJDK.Util.dll and b/backends/gdx-backend-iosmonotouch/libs/ikvm/bin/IKVM.OpenJDK.Util.dll differ
index 3397a34..aacd0c5 100755 (executable)
Binary files a/backends/gdx-backend-iosmonotouch/libs/ikvm/bin/IKVM.Reflection.dll and b/backends/gdx-backend-iosmonotouch/libs/ikvm/bin/IKVM.Reflection.dll differ
index 8937ed2..128a8b2 100755 (executable)
Binary files a/backends/gdx-backend-iosmonotouch/libs/ikvm/bin/IKVM.Runtime.JNI.dll and b/backends/gdx-backend-iosmonotouch/libs/ikvm/bin/IKVM.Runtime.JNI.dll differ
index 14c5b9e..b3890a5 100755 (executable)
Binary files a/backends/gdx-backend-iosmonotouch/libs/ikvm/bin/IKVM.Runtime.dll and b/backends/gdx-backend-iosmonotouch/libs/ikvm/bin/IKVM.Runtime.dll differ
index 45fc27e..0e21947 100755 (executable)
Binary files a/backends/gdx-backend-iosmonotouch/libs/ikvm/bin/ikvm.exe and b/backends/gdx-backend-iosmonotouch/libs/ikvm/bin/ikvm.exe differ
index 5c87238..816236a 100755 (executable)
Binary files a/backends/gdx-backend-iosmonotouch/libs/ikvm/bin/ikvmc.exe and b/backends/gdx-backend-iosmonotouch/libs/ikvm/bin/ikvmc.exe differ
index 49f0823..4f57183 100755 (executable)
Binary files a/backends/gdx-backend-iosmonotouch/libs/ikvm/bin/ikvmstub.exe and b/backends/gdx-backend-iosmonotouch/libs/ikvm/bin/ikvmstub.exe differ
index fc6abdb..b84ea2c 100644 (file)
Binary files a/backends/gdx-backend-iosmonotouch/libs/ikvm/bin/libikvm-natives.a and b/backends/gdx-backend-iosmonotouch/libs/ikvm/bin/libikvm-natives.a differ
index d3d269c..9d43790 100644 (file)
@@ -1,19 +1,18 @@
 <Properties>
   <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhoneSimulator" PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneSimulatorTarget.IPhone.5.0" />
-  <MonoDevelop.Ide.Workbench ActiveDocument="../gdx-invaders/src/com/badlogic/gdxinvaders/Renderer.java">
+  <MonoDevelop.Ide.Workbench ActiveDocument="gdx-invaders-ios/Main.cs">
     <Files>
       <File FileName="gdx-invaders-ios/Main.cs" Line="24" Column="1" />
       <File FileName="../gdx-invaders/src/com/badlogic/gdxinvaders/screens/GameLoop.java" Line="84" Column="1" />
-      <File FileName="../gdx-invaders/src/com/badlogic/gdxinvaders/GdxInvaders.java" Line="40" Column="1" />
-      <File FileName="../gdx-invaders/src/com/badlogic/gdxinvaders/screens/InvadersScreen.java" Line="34" Column="1" />
-      <File FileName="../gdx-invaders/src/com/badlogic/gdxinvaders/Renderer.java" Line="126" Column="23" />
+      <File FileName="../gdx-invaders/src/com/badlogic/gdxinvaders/GdxInvaders.java" Line="1" Column="1" />
+      <File FileName="../gdx-invaders/src/com/badlogic/gdxinvaders/screens/InvadersScreen.java" Line="1" Column="1" />
+      <File FileName="../gdx-invaders/src/com/badlogic/gdxinvaders/Renderer.java" Line="1" Column="1" />
     </Files>
     <Pads>
       <Pad Id="ProjectPad">
         <State expanded="True">
-          <Node name="gdx-invaders-ios" expanded="True">
+          <Node name="gdx-invaders-ios" expanded="True" selected="True">
             <Node name="References" expanded="True" />
-            <Node name="Main.cs" selected="True" />
           </Node>
         </State>
       </Pad>
index a13eb47..ecb7903 100644 (file)
@@ -26,7 +26,7 @@
     <MtouchI18n>west</MtouchI18n>
     <CustomCommands>
       <CustomCommands>
-        <Command type="BeforeBuild" command="ant -f convert.xml compile convert -DSRC=&quot;../../gdx-invaders/src/&quot; -DCLASSPATH=&quot;../../../../gdx/bin/;../../../../backends/gdx-backend-lwjgl/bin&quot; -DIN=&quot;-r:../../../../backends/gdx-backend-iosmonotouch/libs/gdx.dll -recurse:target/*.class&quot;  -DOUT=&quot;invaders.dll&quot; -DEXCLUDE=&quot;**/GdxInvadersDesktop.java&quot; -v" workingdir="${ProjectDir}" />
+        <Command type="BeforeBuild" command="ant -f convert.xml" workingdir="${ProjectDir}" />
       </CustomCommands>
     </CustomCommands>
     <MtouchArch>ARMv7</MtouchArch>
@@ -64,7 +64,7 @@
     <MtouchDebug>True</MtouchDebug>
     <CustomCommands>
       <CustomCommands>
-        <Command type="BeforeBuild" command="ant -f convert.xml compile convert -DSRC=&quot;../../gdx-invaders/src/&quot; -DCLASSPATH=&quot;../../../../gdx/bin/;../../../../backends/gdx-backend-lwjgl/bin&quot; -DIN=&quot;-r:../../../../backends/gdx-backend-iosmonotouch/libs/gdx.dll -recurse:target/*.class&quot;  -DOUT=&quot;invaders.dll&quot; -DEXCLUDE=&quot;**/GdxInvadersDesktop.java&quot; -v" workingdir="${ProjectDir}" />
+        <Command type="BeforeBuild" command="ant -f convert.xml" workingdir="${ProjectDir}" />
       </CustomCommands>
     </CustomCommands>
     <MtouchExtraArgs>-nosymbolstrip -nostrip -cxx -gcc_flags "-L${ProjectDir} -likvm-natives -lgdx -force_load ${ProjectDir}/libgdx.a -force_load ${ProjectDir}/libikvm-natives.a"</MtouchExtraArgs>
@@ -84,7 +84,7 @@
     <MtouchI18n>west</MtouchI18n>
     <CustomCommands>
       <CustomCommands>
-        <Command type="BeforeBuild" command="ant -f convert.xml compile convert -DSRC=&quot;../../gdx-invaders/src/&quot; -DCLASSPATH=&quot;../../../../gdx/bin/;../../../../backends/gdx-backend-lwjgl/bin&quot; -DIN=&quot;-r:../../../../backends/gdx-backend-iosmonotouch/libs/gdx.dll -recurse:target/*.class&quot;  -DOUT=&quot;invaders.dll&quot; -DEXCLUDE=&quot;**/GdxInvadersDesktop.java&quot; -v" workingdir="${ProjectDir}" />
+        <Command type="BeforeBuild" command="ant -f convert.xml" workingdir="${ProjectDir}" />
       </CustomCommands>
     </CustomCommands>
     <MtouchExtraArgs>-nosymbolstrip -nostrip -cxx -gcc_flags "-L${ProjectDir} -likvm-natives -lgdx -force_load ${ProjectDir}/libgdx.a -force_load ${ProjectDir}/libikvm-natives.a"</MtouchExtraArgs>
index d2c635b..234ab20 100644 (file)
@@ -10,8 +10,7 @@
       <Pad Id="ProjectPad">
         <State expanded="True">
           <Node name="superjumper-ios" expanded="True">
-            <Node name="References" expanded="True" />
-            <Node name="Main.cs" selected="True" />
+            <Node name="References" expanded="True" selected="True" />
           </Node>
         </State>
       </Pad>