Knowledge Base

Boss Dependency Manager for Delphi

What is it?

Boss is a package manager like NPM except that it’s built especially for Delphi. You can easily manage the dependencies in your project. There is a command-line utility available and an IDE integration as well.

Why using a package manager

A package manager keeps track of what Delphi package is installed and allows you to upgrade a package to a newer version easily. Instead of having to install a package every time you change a package, you can just use the upgrade tools of the Boss package manager to keep up to date.

Downloads and installation

Download the command-line tool from this list of downloads. Choose the boss-windows-386.zip file.

Unpack the zip in a local directory and add this directory to your PATH environment variable so that the system can find the boss.exe from everywhere.

Go to the Delphi IDE and install the Boss IDE integration via the GetIt package manager.

Global configuration

To make it work for Bitbucket repositories, you need an SSH key with a password phrase.
Generate an SSH key with the following commands (again, enter a passphrase when asked for it):

ssh-keygen -t rsa -b 4096 -C ""
ssh-keyscan -t rsa bitbucket.org >> %userprofile%/.ssh/known_hosts

Use notepad to open the id_rsa.pub file from the .ssh folder in your Windows userprofile. Copy the content of the file and add it as an SSH key in your Bitbucket account settings.
After this SSH configuration, you can run the login command to save your Bitbucket credentials in the global Boss configuration. Run this command to authenticate:

boss login bitbucket.org

Choose y when asked if SSH should be used or not and choose the default location for your SSH file. Enter the passphrase, and you’re authenticated when you don’t see any message.

Use in a project

Before you can use Boss you have to init Boss in the same folder as your Delphi project file. Right-click in the IDE on the project, go to the Boss option and choose Init. Or run the following command:

boss init

Add a Bitbucket repository as a dependency with the following command:

boss install bitbucket.org/<workspace//

Note that the HTTPS part is skipped and that the URL ends with a /. This will checkout the master branch in a subfolder modules\.
If you want a specific tag, just add :tag directly behind the URL. Be aware that this tag should be in the master branch.

Written by Ricardo Boaro
Director, Brazil

Contact

Let us help you to realise your ambitions

GDK Software UK

(+44) 20 3355 4470

GDK Software USA

+1 (575) 733-5744