![]() |
Re: HOWTO: C# compiling on the unit itself
Well i mentioned that i compiled mono xsp (lightweight asp.net server) and got it running.
I made a swf video of it here : http://wardenclyffetower.com/MaemoFi...s/monoasp.html Cool stuff :) Its important for me to mention that the pages load so fast because the server has already run them before. The first time the pages load they are very slow (like 15sec - 1+ mins). But i'm more focused on functionality and ease of use right now. If xsp servers aren't added to official 1.9 release then i will put a deb installer together for us maemo users (when 1.9 is officially released) |
Re: HOWTO: C# compiling on the unit itself
I've just installed the compiler that you provided and i would like to know ware can i get documentation on how to use this. Do you know ware i can obtain the documentation?
I've just started to lern how to compile with c++ and am looking forward to start using this.:D |
Re: HOWTO: C# compiling on the unit itself
Yes c# is similar to c++ but its not the same. It is much easier to learn and the libraries are easier simpler to use.
Currently though most documentation covers winforms which is the windows way of creating/layout of forms, which as of right now is not available on maemo (although maybe soon :) ). For now the compiler environment is to use gtk/glade to layout forms (this is more 'native-linux' way anyways). And then you code the handlers in c#. Things are changing right now with newer version of mono in test, but go ahead and try to compile the sample i have above and run it (install flite too). For now, i am using emelfm2 to launch compiler scripts, simple editing of source code, and launching the exe with mono runtime (i manually associated this so not in current download of emelfm2). Hopefully once this next version is released, i will have nicer debs and possibly emelfm2 helpers to coordinate, but for now i usually end up using openssh from desktop to edit source files and set up glade files (ubuntu synaptic package glade-2). Here is a good book for learning c# (in general), keep in mind some of it will be talking about winforms and it wont cover gtk/glade. http://books.google.com/books?hl=en&...Ut-eUg#PPP1,M1 For mono documentation you can look here : http://www.go-mono.com/docs/ http://www.mono-project.com/GtkSharp:_Hello_World So basically the user interface can be either : - console app - gtk (where you add the controls in code) - glade (best way to visually design forms to use with gtk/glade) - winforms (may soon be available for maemo as it already is for x86 mono) - webforms (where the program runs with a mini-webserver serving up webpages) I'd recommend starting to learn with console apps, gtk, or glade for now. |
Re: HOWTO: C# compiling on the unit itself
very thanks pipeline,
i can compile cs file sucessful in my n800. only a question, how can i add my exe file "ShortCut" in the Extras menu? i don't want to key "mono xxx.exe" every time. thanks. |
Re: HOWTO: C# compiling on the unit itself
Is it a console app? If so i dont think you can.
If you've actually compiled a gtk/glade app with a window then you can setup a desktop file for it. You should create a script like : Code:
#!/bin/sh chmod 755 mylaunchscript And point desktop to launch script If you dont know how to make a desktop file then you can use LinkMaker utility (it needs python) and you will have to run 'LinkMakerAllow' as root before it can create the links. |
Re: HOWTO: C# compiling on the unit itself
thank pipeline's reply.
i will try it later. now i have a question about compile, if my cs file only include "using Gtk;", so i can compile it sucess by "mcs hello.cs -pkg:gtk-sharp-2.0", but if cs file include" using Gtk;using Gdk;using Gnome;", how can i compile it by mcs? thanks. |
Re: HOWTO: C# compiling on the unit itself
Um never used gnome namespace... try just -pkg:gtk-sharp and it should suggest any packages that you didnt include... let me know their names.
I dont think its 1 namespace per package so its possible those (or one of those) dont need extra packages. |
Re: HOWTO: C# compiling on the unit itself
Does the program need too be in user or in root? Because when i use my notes application in planetext mode to create the program then transfer that planetext file to my ScITE programing editor put it in c# language then save the file under the mcs directory and open my emelFM2 file manager but my program witch i created had a owner as user not root. So when i tryed to compile it said compileation failed is the problem because the program is under user not root or could it be something else rong? I know that i rote the program correctly.
And one more question, how do i save the file as root in the first place? |
Re: HOWTO: C# compiling on the unit itself
For the -current- version of mono i think you should install the deb file i made for compilers here :
http://wardenclyffetower.com/MaemoFi...-1.9.0.all.deb This wont be necessary when 1.9 is officially released because they are making repo packages for compilers themselves :) With that installed you dont need mcs directory, set up your own source directory or directory tree without compilers in it. Then you can copy your source files to any directory you want and compile like : mcs hello.cs -pkg:gtk-sharp-2.0 Your source code files should be owned by user (or user should have write permission to them) so if user doesnt have permission, then sudo gainroot and run emelfm2 (as root from xterm) find the file, highlight it, hit menu key for context menu, choose actions submenu, change permissions, and click the 'write' checkbox for all three user groups... then exit emelfm2 and exit xterm |
Re: HOWTO: C# compiling on the unit itself
2 Attachment(s)
This is too cool... i wrote a simple windows forms app to refresh a couple webcams using Microsoft Visual Studio 2003 and the same exe file runs on both windows and maemo :) So windows forms/gdi will be in 1.9 and im running it... currently only works with 1.1 but hopefully 2.0 will be fixed. I have compiled several winforms apps on maemo so i expect the source will compile just as easily.
This will allow me to quickly generate alot of functional apps to fill void. |
All times are GMT. The time now is 05:38. |
vBulletin® Version 3.8.8