I'd like to hear if anyone has any Visual Basic apps running on Linux using Mono. I'd be curious to see app screen shots, code, and info on what issues you had.
Brad!
Printable View
I'd like to hear if anyone has any Visual Basic apps running on Linux using Mono. I'd be curious to see app screen shots, code, and info on what issues you had.
Brad!
Yeah I have. I'm preparing a tutorial anyway. I'll post it in a day or two.
I don't have any screen shots right now, but the biggest issue by far that I have seen is that sometimes programmers will do something in a windows-specific way when an alternative exists, usually because it's easier.
The first example that jumps to mind is dealing with file paths -- if you write some code (C#) like:
this is going to cause a problem running under Linux, where the '/' character is used to separate directories. Appropriate code would be:Code:new FileStream("SomeFolder\\data.xml");
// or
path = this_path + @"\" + "data.xml";
Another issue is that file names under *nix systems are case sensitive. The files 'README' 'ReadMe' and 'readme' can all coexist in the same directory. So if a programmer refers to a file as "MyFile.txt" once and "myfile.txt" later, strange behavior will occur.Code:path = Path.Combine(this_path, "data.xml");
// or
path = this_path + Path.DirectorySeparatorChar + "data.xml"
// etc.
Ubuntu users should avoid the mono package from repo and instead use the Linux Installer for x86 from this page .This installs the latest package from mono.
Also useful is the Mono Analyzer tool that finds out porting issues with your project.
Applications built using gtk# on Linux require the gtksharp runtime to run under windows.
The monodevelop IDE is pretty much easy to use and easily converts VS.2003 projects to VS.2005 but the widgets were a bit buggy esp. the way they required containers to be added first.
ps:waiting anxiously for woss's tuto's. :D
If you're doing .NET development on linux, try to stay away from using the System.Windows.Forms namespace. It has less support on mono and there are plenty of better alternatives, GTK# coming to mind here. It's got a different style to the SWF way of creating a GUI, but that's half the fun in learning something new :)
Quote:
Originally Posted by tr333
What does this do if you want to create IL that will run on both windows and linux? Wouldn't it be best to stick to .NET Framework classes if you want cross platform compatability?
You can get GTK for Windows.
I just installed mono on my mac, how do I create apps?
You might find an IDE for C# on OSX if you search google, but I never bothered to look. Compile your code for .NET1.1 with the "mcs" (C#) or "mbas" (VB) cmdline programs. Use the "gmcs" program for compiling .NET2.0 code. Then create a .app file for your program with the "macpack" utility.Quote:
Originally Posted by xxarmoxx
Mono:OSX
Mono Migration Analyzer - A tool to help you identify issues when porting .NET apps to Mono.
Guide: Porting Winforms Applications - A guide on porting Winforms apps to Mono.