Release Mono RunTime


ptitSeb

Serial Porter
Joined
Aug 15, 2012
Messages
9,330
Age
52
Location
France, near Lyon
So Here is a Mono RunTime PND.

It's mainly disigned to be un runtime, so to be used (automaticaly) by other PND mainly developped in C# to run.

But embeded in the PND is also everything needed to develop in C# on the Pandora.

So beside the actual runtime (the command "mono" to launch exe files), is a Command Line Prompt with either the complete IDE MonoDevelop (just type monodevelop to launch it) or command lines tools (mainly the "xbuild" tools).

Also, MonoRT can be used combined with Codeblocks or Dev Tools. For that, launch the Mono Command Line, reduce the window, then, from the Command Line of codeblocks or DevTools, type


cd /mnt/utmp/monort
. monort

After that, you have useable Mono environement along with gcc & make support.

To automaticaly use MonoRT in your production, use this snippet (or do something else if you don't like this one) at the launch of your PND.

Code:
if [ -e /mnt/utmp/monort/build ];then
 allready=1
else
 # search and mount monort config...
 pnd_cb="monort-ptitseb"
 pnd_folder="monort"
 #check if it exist
 if [ ! -e /usr/share/applications/$pnd_cb*.desktop ];then
  zenity --error --title "Pinta" --text="Error, cannot find monort PND.
  You need to install the Mono RunTime PND first!"
  exit
 fi

 #grab where is the pnd
 pnd_path=$(sed -n 's/.*X-Pandora-Object-Path *= *\([^ ]*.*\)/\1/p' <  /usr/share/applications/$pnd_cb*.desktop)
 pnd_name=$(sed -n 's/.*X-Pandora-Object-Filename *= *\([^ ]*.*\)/\1/p' < /usr/share/applications/$pnd_cb*.desktop)
 path_to_pnd=$pnd_path/$pnd_name

 #automount it
 /usr/pandora/scripts/pnd_run.sh -p $path_to_pnd -b $pnd_folder -m
 allready=0
fi

#check version of PND
if [ -e /mnt/utmp/$pnd_folder/build ];then
 monort_build=`cat /mnt/utmp/monort/build`
else
 monort_build=0
fi

echo monort pnd build $monort_build

if [ $monort_build -lt 1 ];then
 zenity --error --title "Pinta" --text="Error, your Mono RunTime PND is too old.
Please update it!"
 if [ "$allready" = "0" ] ; then
 /usr/pandora/scripts/pnd_run.sh -p $path_to_pnd -b $pnd_folder -u &
 fi
 exit
fi

#ok, now run monort init script

#but first, preserve ol lc_all

if [ -z "$LC_ALL" ];then
 OLD_LC="en_US.UTF-8"
else
 OLD_LC="$LC_ALL"
fi

cd /mnt/utmp/$pnd_folder

. monort.sh

cd $pwd

export LC_ALL="$OLD_LC"
After having setup and launched your software (with "mono MySoftware"), don't forget to unmount:

Code:
if [ "$allready" = "0" ] ; then
/usr/pandora/scripts/pnd_run.sh -p $path_to_pnd -b $pnd_folder -u &
fi

First PND to use this runtime is "pinta" also, if you need some live example.

preview1.png
MonoGame is not included for now. I'm working on it but it's not a compile & forget thing I'm afraid...

History log
=========

Build 10
-----------

  • Update to Mono 5.12.0
Build 09
-----------

  • Changed the shell script in bin to use bash and not sh
Build 08
-----------

  • Updated Mono to 5.8.0
  • Update libgdi+, fixing GUI of many software
Build 07
-----------

  • Updated Mono to 5.3.0
  • Build for smaller memory footprint
Build 06
-----------

  • Updated Mono to 5.2.0
Build 05
-----------

  • Updated Mono to 4.5.02
  • Updated Monodevelop to 6.1
  • Updated all libs
Build 04
-----------

  • Hack on libs (X11, GTK, Pango) to make them PNDable
  • Updated GTK to 2.24 and Pango to 1.29.5
  • All characters can now be entered on Windows.Form.EditBox
Build 03
-----------

  • Fixed Windows.Form EditBox, so brackets and other caracters can be entered
  • Added mono-basic 2.10
  • Updated mono from 3.2.6 to 3.2.8
Build 02
-----------

  • Fixed compilation issue
Build 01
-----------

  • Initial build
  • Mono is v3.2.6
  • MonoDevelop is v4.3
Enjoy some C#
 
Last edited:
I loves me some c#... maybe I could build something like years from now with c# for the pandora/pyra :D

what is Mono-rt? im guessing mono runtime?
 
Last edited by a moderator:
I guess this is something I can cross of my list now :)
 
i started mono-rt and monodevelop, created a new gtk# 2.0 project, tried to compile it and get the error: can't open shared object file libiconv.so.2, anything else i forgot to do before i could compile it?
 
also: shouldn't you be able to see the filenames in the tabs in monodevelop, or might the font be simply to small?
 
also: shouldn't you be able to see the filenames in the tabs in monodevelop, or might the font be simply to small?
Not sure, I haven't used monodevelop much (neither on Pandora nor on fullsize Desktop PC). I have to check. I'll first try to first fix the compilation issue.
 
Ok, fixed. A new build is uploading.

I tested without codeblocks mounted (after a fresh reboot) and I can now start without error and compile a new empty GTK Project :)

post-5182-0-23243100-1393535700.png
 ​
Build 02 coming soon...

monodevelop.png
 
Build 02 on the repo. Now, you should be able to compile !

Build 02

----------

  • Fixed launch and compile ability of MonoDevelop

For the adventurous, if you find some Linux games using Mono, you can try to run them. Copy them and launch them from the MonoRT command line. Try to avoid the ones using OpenGL at first (and don't forget to put a copy of lunixbochs libGL in the game folder if you want to try).

Don't hesitate to post results here...
 
I've got a patch for serial communication around somewhere. Might it be possible to ask you to include it?
 
Am I reading into this correctly when I say we're making steps into being able to run MonoGame games on the Pandora, if we had access to the source?
 
C# compiles to bytecode, a little like Java does, so you don't actually need the source to run a C# program provided you've got a runtime to run it in.


However, C# programs can still link to external libraries which may need to be ported first. Not all C# games run in Mono on Linux x86 as is, for whatever reason, so those won't run on Pandora.
 
Back
Top