1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Dismiss Notice

Release Mono RunTime

Discussion in 'Software Releases' started by ptitSeb, Feb 27, 2014.

  1. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    8,008
    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.

    [​IMG]
    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: Jul 1, 2018
    Tags:
    TeDaDeS likes this.
  2. milkshake

    milkshake Advanced Member

    Joined:
    May 18, 2009
    Messages:
    3,727
    Location:
    Rotherham, UK
    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: Feb 27, 2014
  3. sebt3

    sebt3 homebrew player (P. & C.)

    Joined:
    Sep 9, 2008
    Messages:
    4,738
    Location:
    France
    mono-rt = RunTime :)
     
    Last edited by a moderator: Feb 27, 2014
  4. pmprog

    pmprog Advanced Member

    Joined:
    Apr 25, 2011
    Messages:
    3,558
    I guess this is something I can cross of my list now :)
     
  5. milkshake

    milkshake Advanced Member

    Joined:
    May 18, 2009
    Messages:
    3,727
    Location:
    Rotherham, UK
    cant wait for MonoGame
     
  6. Ellorion

    Ellorion Member

    Joined:
    Dec 1, 2012
    Messages:
    38
    wahoo  ^_^
     
  7. Ellorion

    Ellorion Member

    Joined:
    Dec 1, 2012
    Messages:
    38
    would be nice if you could open monodevelop from the development menu too
     
  8. Ellorion

    Ellorion Member

    Joined:
    Dec 1, 2012
    Messages:
    38
    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?
     
  9. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    8,008
    Location:
    France, near Lyon
    Oh? libiconv.so.2 ? Strange. I have to check because I am quite sure this one is in the PND.
     
  10. Pritchy

    Pritchy Member

    Joined:
    Aug 16, 2012
    Messages:
    127
    This is excellent. Hope Monogame works out.
     
  11. milkshake

    milkshake Advanced Member

    Joined:
    May 18, 2009
    Messages:
    3,727
    Location:
    Rotherham, UK
  12. Ellorion

    Ellorion Member

    Joined:
    Dec 1, 2012
    Messages:
    38
    also: shouldn't you be able to see the filenames in the tabs in monodevelop, or might the font be simply to small?
     
  13. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    8,008
    Location:
    France, near Lyon
    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.
     
  14. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    8,008
    Location:
    France, near Lyon
    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 :)

    [​IMG]
     ​
    Build 02 coming soon...

    monodevelop.png
     
  15. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    8,008
    Location:
    France, near Lyon
    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...
     
    Pritchy likes this.
  16. WizardStan

    WizardStan Mega GP Mania

    Joined:
    May 24, 2008
    Messages:
    16,539
    I've got a patch for serial communication around somewhere. Might it be possible to ask you to include it?
     
  17. ptitSeb

    ptitSeb Serial Porter

    Joined:
    Aug 15, 2012
    Messages:
    8,008
    Location:
    France, near Lyon
    Sure, no problem :)
     
  18. Pritchy

    Pritchy Member

    Joined:
    Aug 16, 2012
    Messages:
    127
    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?
     
  19. levi

    levi Still fresh, damnit!

    Joined:
    Oct 6, 2008
    Messages:
    9,349
    Location:
    Somewhere off the coast of the EU
    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.
     
    Pritchy likes this.
  20. ekianjo

    ekianjo Hardcore Member

    Joined:
    May 7, 2012
    Messages:
    8,261
    Location:
    神戸市、日本 (Japan)
    Certainly getting closer, yes, while there is still a lot of work needed to get there.  
     

Share This Page

Loading...