Bullet proof

The installation of packages or “addons” extends the functionality of both the programming and the IDE and this is very good, however there may be problems along the way. As the Lazarus IDE was compiled with FreePascal, adding new packages will require our IDE to be recompiled. But what if the recompile fails, will we lose our IDE?

The Lazarus team thought about that too and they can proudly answer “no” to that question. But we need to be prepared to recover from this situation, how?

If when installing a package or for any other reason our IDE stops working, be aware that there is in the Lazarus installation directory a file “lazarus.exe” that corresponds to what is in use and another – backup – called “lazarus.exe .old”, don't you believe it? Then watch:

In case the IDE stops working, simply run the program “lazarus.old.exe” and this message will appear:

Then click Update Info and the system will return to the previous stage when things worked.

If the IDE broke because of packages you tried to install, take the opportunity to go to Packages|Install and uninstall packages to identify the newly installed packages – which were probably the problematic ones – and then remove them. Note that it is sometimes possible to identify them because they are marked with a “+” icon next to the names indicating that it was a failed installation attempt and they still remain marked to be installed in a next build, see them:

Mark the problematic packages for removal and confirm to have the IDE recompiled. After that, do not run “lazarus.old.exe” anymore, but the current shortcut that points to “lazarus.exe”.

Compiling the IDE may sound strange, but when you install or uninstall certain types of packages this is what happens. The more packages you install, the heavier your IDE will be, so install packages sparingly, install only the ones you will use.

If you want to see in practice how it works, watch the video: