Not to me on time, even to this boring, but again I got a challenge on my shoulders is really difficult to meet.
The fact is migrating an application to Delphi Lazarus is easy, by the way, but specifically this beautiful Delphi library im wornking on make a heavy use of Windows API messages...
Reviewing the steps to begin to migrate an application to Delphi Lazarus are very simple.
1) Create a new structure, independent of the one containing the Delphi application, so that you touches does not affect your Delphi application (is basic but very few do it).
2) For each Delphi project file (only for the dpr)
makepasx Proyect1.dpr
3) For each .pas file executes the following command
makepasx unit1.pas
4) For each delphi form execute this command
dfmtolfm unit1.dfm
5) Lazarus uses a resource file for each form, with extension lrs. To generate:
lazres unit1.lrs unit1.lfm lazres unit1.lrs unit1.lfm
Made. We already have everything we need to take the first step in our journey of 1000 miles (the more important).Now just compile and see what happens.
Usually some functions or calls vary somewhat between Delphi and Lazarus. It could put some of them here, but it makes no sense because they are many. Instead I will give you a way to resolve discrepancies in the simplest way, or by various methods that generally make me reach the correct result:
1) If you can not find an identifier or method just look in the sources references in the sources of Lazarus. Sounds silly? Is the simplest way, this way you can know that unit is defined and objects that use it.
2) If the identifier or method does not exist in lazarus, go to the forums Lazarus and looking for. Sure someone before you crash with that stone and found how to setp out ;)
3) If none of that works, the friend google comes to the rescue. You might try Lazarus discrepantname or add the word replacement, and so on.
Finally, as the case may happen in the library that attempt to migrate, that there are too many calls to the Windows API. In this case point 2 and 3 are generally much help.
4) Subscribe to groups Lazarus and fpc. Who better than those who have already been there can help you? Even if a feature is not suported they will help you to implement it and produce the miracle of Lazarus and fpc library get enriched. :)
In other deliveries i will comment about my progress in the conversion and as the problems were resolved.
Namaste.
Sunday, July 20, 2008
Tuesday, July 15, 2008
Monday, July 14, 2008
Ubuntu and Lazarus Screenshots
For people who wonder about what it looks like now Lazarus, first I present my Linux desktop, where live the best of Vista (if there is something) Mac and Linux. To say that that does not discriminate against anyone here. ;)
And to continue, as is the current version of Lazarus with all components of RemObjects installed.
I hope you liked.
Namaste
And to continue, as is the current version of Lazarus with all components of RemObjects installed.
I hope you liked.
Namaste
Sunday, July 13, 2008
Ubuntu 8.04 unstable at times.
There is evidence that with the combination of determined harwdware Ubuntu 8.04 (and also other distros) are causing the linux box freezes.
Some blame the new kernel (experimental version 2.6.24-19-generic) and anotthers to video drivers and the list goes on. I am convinced that is the kernel because there was no prior drawbacks.
What to do? Well, we know that ubuntu is unstable, at least more unstable than debian stable, so that nothing of serving complaints, better fill a bug report and rely on the willingness of the developers. It is always better to rely on closed source solutions, of course:)
So if you do not want to go through these issues simply taken because you'll be happy and (though perhaps outdated). For those of us who love the thrill and the risk will still shocks, as when everything grows.
But do not despair the solution is quite simple. Here the steps to follow.
Open a terminal window.
sudo gedit /boot/grub/menu.lst
Find the line boot of the image that these running, we could well see
kernel /vmlinuz-2.6.24-19-generic root=/dev/md2 ro quiet splash
Reeplace it
kernel /vmlinuz-2.6.24-19-generic root=/dev/md2 ro quiet splash locksource=acpi_pm nolapic_timer nohz=off
Exit saving changes
Restart your Linux box already enjoy.
The crash of stopped and everything returns to normal.
Namaste.
Some blame the new kernel (experimental version 2.6.24-19-generic) and anotthers to video drivers and the list goes on. I am convinced that is the kernel because there was no prior drawbacks.
What to do? Well, we know that ubuntu is unstable, at least more unstable than debian stable, so that nothing of serving complaints, better fill a bug report and rely on the willingness of the developers. It is always better to rely on closed source solutions, of course:)
So if you do not want to go through these issues simply taken because you'll be happy and (though perhaps outdated). For those of us who love the thrill and the risk will still shocks, as when everything grows.
But do not despair the solution is quite simple. Here the steps to follow.
Open a terminal window.
sudo gedit /boot/grub/menu.lst
Find the line boot of the image that these running, we could well see
kernel /vmlinuz-2.6.24-19-generic root=/dev/md2 ro quiet splash
Reeplace it
kernel /vmlinuz-2.6.24-19-generic root=/dev/md2 ro quiet splash locksource=acpi_pm nolapic_timer nohz=off
Exit saving changes
Restart your Linux box already enjoy.
The crash of stopped and everything returns to normal.
Namaste.
Saturday, July 12, 2008
Repositorios lazarus testing
Thinking about what it is sometimes difficult for beginner Lazarus install a Linux system, I've created some repositories to facilitate their work.
Here instructions.
The version of Lazarus is the 0.9.25 revision 15753 compiled with GTK2 in ide and packages, which works perfectly in our labs (delphi 7 is a steroid): P
The version 2.3.1 is freepascal super testing, just to risky (though not confess has given us a single complaint, on the contrary)
Following the instructions.
Repositories Lazarus and freepascal testing.
There's no guarantee at all! Use it at your own risk.
Installation instructions:
Add the key GPG
gpg --keyserver hkp://pgp.mit.edu:11371 --recv-keys F93F2601
Add the key to APT system:
gpg --export F93F2601 | sudo apt-key add -
Check whether the key was built:
sudo apt-key list
Add the repository to its list of repositories
You can use synaptic or edit / etc / apt / sources.list directly. Add the line:
deb http://www.petrobox.net/lazarus/ lazarus-testing universe
Install Lazarus
sudo apt-get update
sudo apt-get install lazarus
Enjoy!
Namaste.
Here instructions.
Repository Lazarus / testing FPC versions
The version of Lazarus is the 0.9.25 revision 15753 compiled with GTK2 in ide and packages, which works perfectly in our labs (delphi 7 is a steroid): P
The version 2.3.1 is freepascal super testing, just to risky (though not confess has given us a single complaint, on the contrary)
Following the instructions.
Repositories Lazarus and freepascal testing.
There's no guarantee at all! Use it at your own risk.
Installation instructions:
Add the key GPG
gpg --keyserver hkp://pgp.mit.edu:11371 --recv-keys F93F2601
Add the key to APT system:
gpg --export F93F2601 | sudo apt-key add -
Check whether the key was built:
sudo apt-key list
Add the repository to its list of repositories
You can use synaptic or edit / etc / apt / sources.list directly. Add the line:
deb http://www.petrobox.net/lazarus/ lazarus-testing universe
Install Lazarus
sudo apt-get update
sudo apt-get install lazarus
Enjoy!
Namaste.
Welcome to the parallel worlds of pascal
How's that? Simple, as I explain.
For those who do not know what Pascal is a language created by Nicolas Wirth with the specific aim to teach their students this wonderful world of computing.
He has spent a lot of water from the river since then. The only thing we can assure is that anyone who knows loves pascal.
This blog is intended to reflect present this powerful language in all its parallel worlds, as windows from OS to Mac OS X, microcontroller devices from servers to multi core.
Welcome to the party, you enjoy. ;)
Namaste.
For those who do not know what Pascal is a language created by Nicolas Wirth with the specific aim to teach their students this wonderful world of computing.
He has spent a lot of water from the river since then. The only thing we can assure is that anyone who knows loves pascal.
This blog is intended to reflect present this powerful language in all its parallel worlds, as windows from OS to Mac OS X, microcontroller devices from servers to multi core.
Welcome to the party, you enjoy. ;)
Namaste.
Subscribe to:
Posts (Atom)