Knowledge Base

Boss Dependency Manager for Delphi

What is it?

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

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 every place.

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

Global configuration

To make it working for Bitbucket repositories, you need a SSH key with a password phrase.
Generate a 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 a 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//

 
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