Installing supplementary Lazarus/Free Pascal packages.
Linux users are well familiar with the concept of packages. These are software bundles, identified by a name and a version number, independent from other packages,
except those, they depend on. A given version of a given Ubuntu package requires a minimal version of Ubuntu itself; older versions mostly continue to run on the new
version of the operating system (backward compatibility). Packages largely contribute in having a correctly and smoothly running system:
|As Linux, Lazarus is based on packages. The initial installation includes those features, that you need in everyday programming. Other features have been downloaded, but aren't actually part of the Lazarus GUI. If in Lazarus, you choose Packages > Install/Uninstall Packages, a window opens, showing you, which components are part of your installation and which you may directly install, by selecting them in the right pane of the window.
|The Lazarus Online package manager.
|"Online Package Manager(OPM) is a tool that automates the process of installing, upgrading, configuring Lazarus packages. The packages are stored in the main repository as zip files, along with a JSON file. The JSON contains all necessary information about the packages. On request the packages are downloaded, extracted, compiled, installed into the IDE. If available, it's also possible to update a previously installed package from the maintainer webpage". This is, how the Online package manager is described at the Free Pascal website. Here the link to the full document, with all details concerning the installation and usage of OPM.
|Installing a package from those available to install, displays a list with all actual and new packages, showing if they are to be installed (new), kept or removed (what may happen for package compatibility reasons). The IDE will then be rebuild, and if all goes well, the new features will be parts of your Lazarus installation. The screenshot on the left shows the online package manager package installation list; the one on the right a common message, that you may get with new installs. The warning "The unit unit-name exists twice in the unit path of the IDE" results from the fact, that some unit is already present in the actual Lazarus installation, and is also present as part of your new installation files. I think, that you can safely ignore the warning, by pushing the "Ignore All" button.
|Running the Online package manager.
|After successful installation, the Online package manager may be launched from Package > Online Package Manager. A list of packages is displayed. Opening a given list entry shows all details about the package, in particular the installed and repository version, with the possibility to update to the latest release. For details, how to use the Online package manager, please use the link above to the corresponding page on the Free Pascal website.
|Manual installation of Lazarus packages.
You don't need to use the Online package manager to install Lazarus packages; you can also do it by downloading a Lazarus package file. This may be useful
if you want to install the package, when being offline, if for some reason, you want to install an earlier version of the package, or if the package is some
non-official third-party Lazarus extension (not available in OPM). When doing a manual installation of Lazarus packages, please keep in mind the following:
|To manually install a Lazarus package, unzip the download archive and open the .lpk file in Lazarus. This may be done in the IDE by choosing Package > Open Package File (.lpk) and browsing to this file, or by double-clicking the .lpk file. The package window opens. Choosing Compile is a good practice to see, if the archive is complete. To install the package, choose Use > Install.
|If supplementary packages are needed, the installer informs you, that they will automatically be installed; confirm, by pushing the "OK" button (screenshot on the left). Installing new packages makes necessary the rebuild of the Lazarus IDE; when asked for this, confirm by pushing the "Yes" button (screenshot on the right).
|The new feature (extension) is now part of the actual Lazarus installation. Where you can access it within the IDE depends on the package. We saw above, that the Online package manager appears as a new item in the "Package" menu. For the here used RichMemo package, a new icon is created in the "Common Controls" tab (screenshot below). Other possibility, as for for LNet, for example, a new tab with several icons is created.
If you find this text helpful, please, support me and this website by signing my guestbook.