giovedì 6 dicembre 2007

How to write a standalone program?

Several years ago I write some program to be run on Windows machine. This programs need to be run from CD so no installation program can be used. At this time the mail solution are two: use Visual Basic or Director. I am mainly like to have the full control of my program so prefer to use Visual Basic. Several month ago e new customer ask to me to realize a CD to put in a book. Now, which development tool use this time? In fact in the last year I'm developing web application using mainly PHP and JSP on linux platform. Again, which development tool I can use to do this? So I give a look about the old Visual Basic plaftorm. Ok the old Visual Basic is dead, and it evolve to VB.NET while Director I never use before so why use it now? So give a look to VB.NET. Ok, seems to be very interesting and powerful .... but there is a LITTLE problem ...... to run the program the virtual machine need to be installed on machine and this is not a good thing for this type of application .... So, no solution? No, of course. From several month I start to look inside MONO, an open source reimplementation of .NET Virtual Machine. In this environment I can create a standalone program using mkbundle utility shipped with mono. Using this solution you have a program that can be run where mono runtime is supported (almost everywhere) and can be transformed on a standalone program for the target that you need. In my case only windows. This utility generate a C program that include all the library needed to start the mono runtime without need to install on the computer. I listen you, and to get the data used by the application? In the past you can store you data inside the program as resource or use a MDB file. Obviously this solution is not portable so I make some test using sqlite to manage the data. This solution is high portable because sqlite is available everywhere. But, it works? Sure, after I post some snapshot taken from Windows and Linux.

Nessun commento: