Mono / .net related stuff - Monodevelop.sfs

Under development: PCMCIA, wireless, etc.
Message
Author
User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

Mono / .net related stuff - Monodevelop.sfs

#1 Post by MU »

I think I should start a new thread here.

Complete Monodevelop ISO now available:
http://www.murga-linux.com/puppy/viewto ... 970#290970

SFS files for other puplets also available further down in this thread.

I finished my Java course last week.
Now I take a course in C# (C sharp) .NET.
It lasts 2 months again, and we develop on XP.
I also installed Puppy 4.12 in Virtualbox.
The computer still runs in school, as it compiles Mono 2.4.
So tomorrow I will try to compile Mono-develop.

I also had tried the mono sfs from here:
http://www.murga-linux.com/puppy/viewtopic.php?p=259146
But it seems to be too old or miss files for Mono-develop.
So I will try to create a sfs with the latest versions on my own.

On XP, we use the Visual Studio 2008.
It can be downloaded without paying, if you use the version for C# only.
So it will be interesting, to test the projects I create in it, in Mono-develop.
I also will try to create a small sfs with a Mono runtime only.
The one from polymath is 33 MB only, so somewhat comparable to a Java runtime.

At home, I use a different setup.
My main system is NYP02rc7, and XP runs in virtualbox here.
I will install here too the Visual studio, and try the Mono I compile at school.
Details concerning XP in virtualbox:
http://www.murga-linux.com/puppy/viewto ... 158#288158

I'm curious, if someone else here already has programmed in C#?
At first sight, it seems to be not very different from Vala or Java.
Has someone experience with C# applications on old computers?
I once ran one on a Pentium 700, and it started faster than Java.
But that was almost 3 years ago, Mono has grown since then.

Mark
Last edited by MU on Thu 02 Apr 2009, 15:43, edited 2 times in total.
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#2 Post by MU »

ok, mono compiled fine during the night in Puppy 4.12.
The resulting pet is 35 MB, it includes the mcs compiler.
I could compile and run a simple Windows.forms C# example from the book I have, it was written for .net 3.5.
The book has many examples for Visual Studio 2008 on CD, and so is great for tests.

I also compiled some more addons, and the Visual Basic compiler.
So if I put everything in a sfs finally, it should be 35-40 MB.

Mono-develop was more tricky.
It requires Gnome libs (**edit: only for compilation).
The single pets I had made a while ago, are too old (2.19.2).
I then had success using wows sfs (2.20.3).
I just had to recompile 3 packs, as the developer files were not included (libgnomecanvas, libgnomeprint, libgnomeprintui).
That sfs is 87 MB, so it might be worth a try, to recompile only what absolutely is needed. But that is very timeconsuming, so I am not certain, that I will do it.
The size of the monodevelop.pet itself is 7 MB.

Ufortunately, mono-develop freezes while displaying the splash screen.
I see 2 errors: one because libgio is missing, and one concerning "package dmx" not found.
I must sort out tomorrow, what is the critical one.

Libgio would be bad, we have similar issues with the valaide.
There I could workaround by including a newer glib, but 2 people reported instabilities in Puppy after they ran that ide.
So if we have bad luck, it cannot be used in Puppy 4.12, and we depend on Ultrapup/NYP for mono-develop.

But as long as mono itself (as runtime) works, this would be something, we could live with.
I also wonder, how far the runtime could be reduced, if the mono-compiler mcs is taken out. I must compare with prebuilt packages from other distros, what is required as minimum for a runtime.sfs.

I'll keep you informed tomorrow...

Mark
Last edited by MU on Thu 02 Apr 2009, 15:46, edited 1 time in total.
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#3 Post by ttuuxxx »

Hi Mu

A few years back they talked about Paint.Nat being ported with mono, But I've never seen it done, just images, even like almost 3 years later there isn't a package. They even still mention it in the screenshot section, I've always liked Paint.net for a free windows Photoshop type/clone application. Its a shame they never made a linux version, its a lot closer to Photoshop GUI then Gimp or Gimpshop.
http://www.mono-project.com/Screenshots
Well looking forward to you reading about your journey with mono.
ttuuxxx

ps this is the mono/paint sources area
http://code.google.com/p/paint-mono/
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#4 Post by disciple »

I have a mono-paint binary compiled for Debian. I'll hopefully try it tonight with the sfs I have. I think it is from Polymath. Where is wow's sfs?

I think the binary was from http://forum.ubuntu.org.cn/download/file.php?id=53949

BTW I posted about running the freeware Artweaver in Wine. I haven't really used it, but it seemed a lot like Paint.NET. Have you tried it?
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#5 Post by MU »

wow had created a sfs of Gnome (required for monodevelop), not of Mono.
I will upload a sfs of the new mono 2.4 today or tomorrow.

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#6 Post by disciple »

Ah. Thanks for clarifying that.

FTR the mono-paint binary doesn't work with that Mono sfs
I suspect the mono version is too old - the paint-mono website says you need Mono from svn... although I don't know how long ago that was written :)
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

MUguest
Posts: 73
Joined: Sat 09 Dec 2006, 16:40

#7 Post by MUguest »

I have uploaded Mono 2.4.
http://puppyisos.org/isos/2009-01-to-06 ... up02/mono/
User: puppy
Password: linux


There are 2 SFS files.

mono-2.4mini_411.sfs
This is 39 MB.
It includes only Mono itself (and Gtk-sharp).
In many cases, it should be enough to run Mono programs.
It includes the C# compiler.


mono-2.4_411.sfs
This is 49 MB.
It includes several addons like Visual Basic Compiler and Monodevelop.
To see, what addons are included, look at:
http://puppyisos.org/isos/2009-01-to-06 ... mono/pets/

That folder contains all the pets, that I extracted to create this sfs.
The database addon as compiled without MySQL, I can add that on request.

The pets were compiled in Puppy 4.12.
Monodevelop however does not work in Puppy 4.12.
But it works fine in Newyearspup; Ultrapup also should work.
I think the most important difference is the newer Glib, that both puplets use.

At startup, Monodevelop will show a warning concerning Platform services.
It appears, if you run it without Gnome.
Simply confirm, and it will continue without problem :!:

If you want to use gnome, here are some tips:
I used the one from:
http://www.murga-linux.com/puppy/viewtopic.php?t=27864
It is "just" 87 MB.
Monodevelop will not run with the large Gnome 2.22.3 SFS (600 MB) I once made for Muppy. I think, I would have to recompile Monodevelop for it (may do it on request).
I just added wows Gnome.sfs in the bootmanager, and did not change something else, as I do not want to run Gnome itself.
If you intend to run Gnome, read carefully the instruction, on how to add "haldaemon" as new user.

-------------------------
To test Mono, you can go to the folder /usr/local/monotest/16-2/.
There type:
./compile.sh
./run

This should compile and run a small application, that opens a window with a button.

------------------------
Notes:
I compiled the packs with:
./configure --prefix=usr
make
new2dir make install

For Mono itself I added the options to compile without mime-database and desktop-database.

When I tested the final sfs, it refused to compile applications.
The reason was , that some symlinks were not registered by new2dir.
So I copied them manually to the sfs folders (and the Mono pet folder).
This concerns all the symlinks in /usr/lib/mono/.
I did not sort out in detail, which symlink belongs to which addon, so the small sfs contains some "dead" symlinks, that will become "alive", if you add a matching pet.

I also had to modify the startscript (/usr/bin/monodevelop) slightly, as it was incompatible with our Bash.

------------------------------
developers:
Monodevelop has no "Winforms" project in the Project wizard.
So for the screenshot, I chose a C# terminal application.
With a right-click on "Verweise" (english systems: Links?), you can add the dependencies, that your app has. Like System.Drawing.
I then simply replaced the terminal example code with one from a Visual Studio book, and it compiled and ran fine.

For some features like "ikvm" you might need more addons.
I did not include them, as it was not clear, on how to add them (zipped without makefile).
Or there were errors (like mono-tools, "make" ran fine, but "make install" not).
In case you need more, check out:
http://ftp.novell.com/pub/mono/sources-stable/
---------------------------------
Mark
Attachments
monodevelop.jpg
(51.52 KiB) Downloaded 10251 times
Last edited by MUguest on Thu 02 Apr 2009, 08:57, edited 2 times in total.

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#8 Post by MU »

I just saw, that ttuuxx has posted a newer glib for Puppy 4.12 here:
http://www.murga-linux.com/puppy/viewtopic.php?t=39736

Maybe with that one, Monodevelop works in Puppy 4.12.

I did not try it myself.


**edit - no, does not work
here is a Gtk update:
http://murga-linux.com/puppy/viewtopic. ... 161#286161
Must try that, too.

Mark
Last edited by MU on Thu 02 Apr 2009, 16:02, edited 1 time in total.
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

MUguest
Posts: 73
Joined: Sat 09 Dec 2006, 16:40

#9 Post by MUguest »

no, glib is not the reason.
I get the same errors with it.
There ist something about Gtk and icons. So one had to try to upgrade Gtk (what also requires a glib upgrade).

It will be easier, to use ultrapup/nyp instead.
Mark

MUguest
Posts: 73
Joined: Sat 09 Dec 2006, 16:40

#10 Post by MUguest »

hehe, cool 8)
No Gnome is required for Monodevelop :!:

I started it without a Gnomesfs, to see errors, in order to build a reduced set of Gnome libs.
I was pretty astonished:
It will display an error, that some platform services are unavailable, but starts up fine!
So Gnome was only needed to compile Monodevelop, but not to run it!
I quickly created a Gtk# project, and it compiled and ran fine.

I attach a fullscreen screenshot, Monodevelop in NYP02rc7 (running in Virtualbox under Windows XP).

Mark
Attachments
monodevelop1.jpg
(183.96 KiB) Downloaded 1176 times

MUguest
Posts: 73
Joined: Sat 09 Dec 2006, 16:40

#11 Post by MUguest »

I updated the SFS.
Added /usr/local/bin/pkgconfig.
Like this, the C# compiler also works, if devx_411.sfs is not installed.

I also added 3 more plugins for Monodevelop.
monodevelop-debugger-gdb-2.0-i486.pet
monodevelop-debugger-mdb-2.0-i486.pet
monodevelop-vala-2.0-i486.pet

I currently try to build a Puplet, based on NYP02rc7micro, with a slightly reduced devx, Monodevelop and Vala/Genie/gedit.

Should be finished tomorrow.

Mark

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#12 Post by disciple »

For the record, paint.net probably would have run with that sfs.
I am now using that binary with MU's sfs and his gdiplus .pet, which is what I was missing.
It doesn't save files... the paint-mono site says save won't work without svn mono... but I suspect it might work if it was compiled against this Mono, which I think is very new?
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#13 Post by MU »

I uploaded an Iso (190 MB).
http://puppyisos.org/isos/2009-01-to-06 ... nodevelop/
User: puppy
password: linux

It is based on Newyearspup02rc7 (micro, without 3D graficsdrivers).

I added:
- vala 0.5.7
- val(a)ide with Genie support
- Mono with all addons I compiled
- Monodevelop (with vala-support)
- Gedit
- Opera
- Devx from ultrapup, with files removed (Perl, Python, /opt).

Small bug:
to be able to run gedit with a click on the desktop icon, edit /root/Desktop/gedit.deskop
from:
Exec=gedit
to:
Exec=geditstart

I did not check at all, if Opera works or if I forgot files, as I was in hurry.

I included 2 projects:
- for Valaide my winecolorsetter in /root/valide/. (wine itself is not included, so it will no do sensefull things. I is just an example how to use glade).

- For Monodevelop a simple C# Winforms example in /root/Projects.

What really thrilled me:
When you choose "Open Project", you can select to open Visual Studio Project Maps.
I just had created a simple window with buttons and Textfield with the Formdesigner in VS 2008.
This project could be properly opened in Monodevelop!

So it might be worth a try, to open the original Paint.Net project in Monodevelop.
No idea though, if such a complex project will build correctly.

Paint-mono is old, and included rewritten code for Mono 1.
Maybe the rewrite no longer is needed, as Mono 2.4 meanwhile claims to be compatible with .NET 3.5.

I might release a slightly updated Iso next week, this depends on how usable it is already.

By the way...
If you think that 190 MB is huge, then please look at the small attached screenshot.
It shows an error from .Net 3.5, when I tried to install it in Wine (in NYP Midi) :lol: :lol: :lol:

Mark
-----------
ToDo:
update vala to 0.6.
add Desktop icon for Glade
check opera
fix gedit .desktop files
add more examples
include wine?
Attachments
netsetup.jpg
not enought space, just 4.4 gig available *lol*
(66.69 KiB) Downloaded 9936 times
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#14 Post by disciple »

include wine?
Why? Does Mono integrate with Wine now? Or are you just thinking of making a Puppy for running Windows and .NET programs?
In the past the only way Wine and Mono could work together was to install Windows Mono in Wine... I wonder if anybody tried running Paint.NET like that.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#15 Post by MU »

Wine might be handy, to run some windows utilities, as .net apps are usually developed in windows. E.g. you might need a windows packer to extract a sourcecode.
------------
I spent some hours trying to run paint.net.

using paint.mono with makefiles works, but I also cannot save.
Saving .jpg hangs the application.
Saving png creates 0 byte files.
I used the latest code from 2009. That is the current download, just the instructions on the website are old.

It can not be opened as project, as the .sln files miss.

So I tried paint.net.
Current source I could not find, then found via google the 3.0.5 source.
It can be loaded in Monodevelop.
For compilation, you must set the warning level from 4 to 0 in the compileroptions (several times during compilation).
If an error occurs, double click it to load the file that causes it, then set the options).

The application compiles, but when it launches, it crashes, it cannot find Gdi32.dll.

I gave up then after a while.

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#16 Post by MU »

today we discussed, what kind of final project we might do in the end of the C# course (last week of mai).
One idea I have, is the following. But I am not certain, how far it is doable.

A program, that reads in C# files, and converts them to vala.
So you afterwards could compile native binaries, and would not need .net or mono, to run them.

Limitations:
As I have just 1 week, it is impossible, to convert additional libs.
So WindowsForms or such would be ignored.
It just would convert simple things. Example:

Code: Select all

Console.WriteLine("test");
This would become:

Code: Select all

stdout.printf ("test\n")
So the task would be, to replace several calls to "System" with calls to "GLib".
Usually, such a program will not work immedeatly, you had to convert other things by hand.
But it could simplify the process of porting from C# to vala.

If someone knows, if comparable utilities exist, please let me know.

In the next weeks, I will investigate, if it makes sense for only 1 week or not.
Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

wow
Posts: 1052
Joined: Fri 30 Jun 2006, 00:18
Location: Peru

#17 Post by wow »

Download gnome-2.20.3-test02_400.sfs from:
http://puppyisos.org/wow/puppy4sfs/
user: puppy
passw: linux


I need more time to relink all my stuff to puppyisos.org

(Thanks MU)
[url=http://www.puppylinux.com][img]http://i.imgur.com/M4OyHe1.gif[/img][/url]

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#18 Post by MU »

Thanks for the Link, wow :)

------------------------------------------------------------
I tried to install .NET 3.5 SP in Wine again.
This takes really long in virtalbox.
It crashes, if the Wine version is set to XP.
Set to 2003, it works, but after one hour or so, after all the content was extracted by the installer, it stopped with the message, that I had to install .NET 3.0 SP1 first.
As that is a 2.4 MB zip only, I think it will download files.
Due to security and proxy settings, I cannot access the web from Virtualbox, so my experiments in this diretion will stop now.

------------------------------------------------------------
I also looked again at my project idea csharp2vala.
One bad issue might discourage me, from doing it.
In C#, you can overload methods, in Vala not. This could make it impossible, to wrap functions.

Example:
C#:
you can use:

Code: Select all

Console.WriteLine(string_value);
or

Code: Select all

Console.WriteLine(int_value);
This is called "overloading",
The Console class has 2 methods (18 to be exact) of the same name, but they are different, because they take different types of parameters.
If you try that in Vala, you will get an error, that the method was already defined.

Vala just has:

Code: Select all

print(formatstring , value);
So a converter would need a "scanner", that tries to find out, what type the value has.
Then it had to generate code like

Code: Select all

print("%s" , string_value);
or

Code: Select all

print("%d" , int_value);
So it explicitly must define, what type is printed, so this type had to be found out by the scanner.

As this is not only used by the inbuilt classes, but also by the selfwritten ones, it would be pretty difficult.

I must look a bit deeper into this, before I can make a decision.
Maybe I could use "placeholders", so that the converted code has to be corrected by hand afterwards by the programmer.
Then I would not need the scanner.

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#19 Post by MU »

I attach a prototype of csharp2vala.
Screenshot see at bottom.

This is far from creating usable code, but my small included example testproject works.

Extract csharp2vala somewhere, then open it in Visual Studio or Monodevelop.

Extract the "testprojects.tgz" in /root/ (or C:\).

In Windows, you must uncomment the path setting in convertprojects.cs at line 28, and comment the Linux path there.

Then run the project.
It creates /root/testprojects/WindowsFormsApplication1/valaout/.
This is a project, that can be loaded in the ValaIDE.

When you compile it, you get 1 error:
"cannot convert from int to string".
So set line 23 in main.vala to:

Code: Select all

            print( "%d\n", i);
This error demontrates well the "overload" problem I described in my last message.

Currently, the WindowsForms are not converted to Gtk, just an empty Gladefile is created.
This is also not included yet in the code.
I also am not certain yet, if it will be possible, to import some elements like buttons. The layout certainly will break completely, but that could be "rearranged" by hand in Glade.
The eventhandlers in Form1.vala are converted already though.

It currently just prints "Hello World!".

So you see: still a lot to be done... well after some free easter days :D

Mark
Attachments
csharp2vala.jpg
(189.9 KiB) Downloaded 642 times
csharp2vala.tar.gz
(53.26 KiB) Downloaded 603 times
testprojects.tar.gz
(66.32 KiB) Downloaded 617 times
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

MUguest
Posts: 73
Joined: Sat 09 Dec 2006, 16:40

#20 Post by MUguest »

Uploaded a bugfix to the download folder of Monodevelpup.

The "Mac" Gtk theme has some entries, that can cause error dialogs.
This effects the filechooser in Valaide.
Monodevelop even crashes because of this.
The bugfix corrects this.

I also fixed the Glade icon, and the gedit starters.
And included a fix, when the desktop options did not save settings.

Mark

Post Reply