O’Reilly’s upcoming Mono: A Developer’s Notebook walks you through nearly 50 mini-projects that will introduce you to the most important and compelling aspects of the 1.0 release. This article, which shows you how to install Mono on Windows, how Gtk# works, and how to write a simple Gtk# program, is just the sort of mini-project you’ll find in the book.
How is gtk on windows these days? I remember using the windows port of the gimp years back, and it was very obviously forign to the rest of the desktop. Does gtk on windows integrate better since those days? If I made something with gtk#, would it be obvious it was a gtk program, or would it have the look and feel of the rest of the windows system?
Yeah its still pretty bad. They are planning ” integration of Win32 native theme” in the 2.6.X release.
http://gtk.org/plan/2.6/
Whoops im an idiot . In gtk# you can take advantage of windows.form(via wine) to render native looking apps.
Gtk in windows does already mimic the native theme. At least the release I got from dropline.
When running Windows, I only use one GTK app, Workrave. Yea, it looks like a GTK app, but its look and feel isn’t very far off from that of Windows applications.
I guess some people go crazy about two applications not looking alike. When I run Linux (which is most of the time), I have no qualms using QT and GTK apps side-by-side, obviously with different themes. All the metaphors are very similar, so there isn’t a real problem for me.
Can the same code be launched on linux too ?
I just installed mono and gtk# on debian,
compiled it okay but when running `mono main.exe’ I have:
Unhandled Exception: System.DllNotFoundException: libgtk-win32-2.0-0.dll
in <0x00053> (wrapper managed-to-native) Gtk.Application:gtk_init (int&,intptr&)
in <0x00038> Gtk.Application:Init ()
in <0x0001b> MainClass:Main (string[])
I’d liked the article would have covered linux too.
Thanks,
Exactly. Even Windows apps aren’t consistent. Windows XP vs Win9x apps vs MS Office titlebar/menus/toolbars/comboboxes vs Norton AntiVirus vs ZoneAlarm vs Photoshop tabs vs… you name it. Almost app commercial apps use non-standard controls because it’s “cool”.
Conclusions: average users don’t care. The only people who complain about some Linux apps’ buttons being 2 pixels bigger than other buttons are OSNews/Slashdot geeks.
Once people realize that our systems are indeed quick enough to run high level functional languages like scheme and common lisp I hope programmers will become ambitious enough to learn better ways of programming.
Unfortunately as it is the profession of programming seems to be becoming like that of the mechanic — once a skilled professional requiring expertise; now some dude who learned visual basic at DeVry.
Is not an option for anybody who want to actually use the application. At least as far as Abiword and GIMP 2 goes. Crashes and quirky behaviour on multiple computers.
I hope programmers will become ambitious enough to learn better ways of programming.
“better way of programming” is very subjective, hard to agree what’s the “good way” and “bad way”.
Unfortunately as it is the profession of programming seems to be becoming like that of the mechanic — once a skilled professional requiring expertise; now some dude who learned visual basic at DeVry.
I don’t see it in such a fatalist light. Yes there is more demand for programmers now than 20 years ago, so of course when you have more programmers you also have more mediocre programmers out there. I don’t buy this “oh, the good old days when every programmer was a genius and just needed 0 and 1 keys” talk. It never existed such a day.
There’s a market for script programmers, a market for the C programmers and a market for Java programmers – and definitively there’s always a market for _good_ programmers.
If one is losing too many job offers for those script kiddies is either because 1) he or she is not positioning himself correctly on the market or 2) he or she is actually mediocre too, but was never told.
And hey, there’s a lot of excellent VB programmers out there too, so don’t underestimate a guy just because he happens to like VB.Net. The quality has to be in the algorithm, not the language of choice
If I were the Mono guys I’d focus on the non-windows platforms.
Why would someone want to use Mono/GTK on Windows when you can download the .net framework, a couple of free tools such as sharpdevelop and webmatrix and have the “real thing” (including windows.forms)?
The only reason I see is to be able to use the same code on other platforms, but I’m not sure it’s compelling enough right now.
If you want to develop software under windows, which runs on both windows and unix machines, you have to use mono. The MS .NET solution is everything, but not platformindependant !
“If you want to develop software under windows, which runs on both windows and unix machines, you have to use mono. The MS .NET solution is everything, but not platformindependant !”
Och ? I run aplications generated with csc easly on linux or netbsd , i have no clue what do you talking about.
I just run it under debian sid (which has mono) nad it works just well (except that you must compile it with mcs -pkg:gtk-sharp instead of mcs -r:gtk-sharp)
AbiWord doesn’t use GTK+ on Windows, so if you have crashes and wierdness that isn’t related to the widget toolkit
I like Mono & C# alot. This makes veery easy to port apps between Win <-> Lin … and why this is different from Java? Well, there isn’t much Java desktop software out there, MS will eventually push .NET for developers (along with Longhorn), but Linux/other Unix-alikes have C# runtim ready, it’s easy to port software for it. I hope this boosts commercial & custom software development on Linux (stuff that is mostly used in corporate world, custom apps and so worth).
And for GTK#, when you write app for GTK#, it pretty much works as it is on both operating systems, unlike using Windows.Forms (which is a bit sloppy on Mono).
Go GTK#!
The “official” GUI framework for .NET, and indeed all of Windows in the future will be system.window.forms. This is why gtk# is somewhat useless, except for implementing system.window.forms (why not use gtk directly?), and for people targetting Linux exclusively. Either way, most people who use .NET will be using SWF.
Novell really needs to bring up the SWF implementation in Mono up to scratch– it’s not very reliable or complete in Mono 1.0.
@Stake:
You are quite wrong. In the “future” (like, uh, two years from now) the GUI toolkit that is most heavily pushed will be Avalon; Windows.Forms is simply a stop-gap because Longhorn has not come, and so, Avalon has not come – and what’s a Windows framework without a GUI?
Mono is, also, redeveloping Windows.Forms from scratch, an entirely managed solution, and there are quiet murmurings in dark, dark corners of the internet that it will be similar to DotGNU’s extremely portable Windows.Forms implementation.
And Mono’s meant to be a good development platform for Linux, which is why GTK# exists – some people just don’t care about Windows. That’s a Good Thing (C) for Linux applications.
Is better to have GTK#for Linux, because the problme most developers have now is the easy implementaton of GUI applications in Linux, so, GTK is native for Linux, as a developer, I think in mono and GTK# to write native applications for Linux, I don’t really care if they run on Windows but of course it is a plus.
…are the maintainers every going to do an executable setup for GTK# 1.0? Its been ten days now.
“AbiWord doesn’t use GTK+ on Windows, so if you have crashes and wierdness that isn’t related to the widget toolkit”
– Mike Hearn
If it does not use GTK+, what does it use on Windows? Win32 directly? MFC? Also I’m sure there are other crappy GUI Windows toolkits which could cause problems
For GTK+ there is a theme called “GTKWimp” that has been bundled with GTK lately that grabs the current look (color scheme or skin) and applies it to GTK widgets. However Abiword doesn’t behave like a GTK app (and never has) you need to make a manifest file and the system skins it directly as a matter of fact I would hazard to say that it only uses GTK on X11. Though I never have had crashes with Abiword I must be lucky.
anyway, as far as consistency is concerned most people don’t seem to be concerned. The most consistent mainstream OS to me was OSX but it’s getting less consistent with each release. Some people (who I think should know better) even accused OSX for being “too consistent”.
As far as windows is concerned a major problem is that developers who make programs for it don’t just have XP. There are various “flavors” of windows that are still in use such as the 9x line and the NT’s under XP. Which people still use for one reason or another. So they try to jazz up their programs appearences by including custom controls. Or they simply do not care and think that the look and feel has nothing to do with how functional it is. Which actually was the mantra of th windows developer of GTK and Gimp for quite some time. However with microsoft they have no excuse because they bundled a window skinner with XP.
I myself tend to be picky on what programs I use and I do theming so my system is mostly matching.
If you want to develop software under windows, which runs on both windows and unix machines, you have to use mono. The MS .NET solution is everything, but not platformindependant !
You are wrong. Mono is not needed on Windows in order to do this. Mono for win32 is simply there for convenience.
I would definitely recommend not using Mono under win32, and instead using the .NET SDK, at least until Mono becomes more complete.
GTK is a nice tool kit, but it is the extras that really makes it shine I feel. To name a few, SourceView is awesome, VTE is absolutely convenient, and Glade is simply yummy.
There’s been a big shift in the Winforms strategy lately. Up to this time they were relying on Wine for their winforms implementation which is not an ideal situation for obvious reasons.
Now Mono is going to do a completely managed Winforms implementation and emulate the most common WndProc calls (similiar to what the dotgnu guys are doing I guess) and maybe later ship a Wine library later on to handle crazy stuff like ActiveX controls and such.
I just wish they would’ve realized this earlier. I guess gtk# is OK, but its a big download on windows, it’s still too gtk’ish for my tastes, and most windows programmers just won’t give a damn.
Dotgnu’s SWF implementation keeps on marching along with a theme engine that looks very nice and also Dotgnu will be getting a JIT in the very near feature.
Oh, and if the smug lisp weenie is reading this. Lisp has had its chance for almost 50 years now. If it was the panacea that the Lisp cult makes it out to be, then it would’ve taken off in the marketplace. Face it, Lisp has historically been way too slow to do a lot. I look at Lisp (and its derivatives) as a nice research langugage for other more mainstream languages to get ideas from.
Oh, and if the smug lisp weenie is reading this. Lisp has had its chance for almost 50 years now. If it was the panacea that the Lisp cult makes it out to be, then it would’ve taken off in the marketplace. Face it, Lisp has historically been way too slow to do a lot. I look at Lisp (and its derivatives) as a nice research langugage for other more mainstream languages to get ideas from.
Lisp has proven itself as quite a remarkable language, if not somewhat arcane. The cult you speak of is made up of some remarkable people, including many graduate students and PHd’s. Lisp is perhaps one of the most classical and academic languages in higher education.
Actually I remember that about Abiword now. It gets confusing because icons and font rendering looks like a default linux build.
Anway I was hoping you could tell me, is the new installer for Firefox on Linux built using autopackage. I believe you are one of the main developers and wanted to say that I wish all Linux apps could be installed like that. Very nice!
I’m running sid me too
Your tip and adding:
export MONO_PATH=/usr/local/lib:$MONO_PATH
now it works.
Thanks again!