Knowledge Base

Winget and Delphi

Have you ever heard of the Windows Package Manager? Microsoft’s command-line tool allows you to install applications very easily. For example, if you type winget install heidisql in a command prompt, the complete installation of HeidiSQL will be done for you at once.

You can also use winget to search for packages, for example by typing winget search heidisql. Currently, there are hundreds of packages available. With winget list you can see all locally installed software, and with winget upgrade --all all installed software will be updated.

Adding your own Delphi program to Winget

Of course, it is also possible to get your own Delphi application installed in the store. The easiest way is to use an installer like Innosetup. Once you have a setup file, you can register it in the store and make your application available to everyone. To register your application it is best to install wingetcreate:

winget install wingetcreate

With wingetcreate you can easily build and test the required manifest file. Just start with

wingetcreate new https://link_to_exe

and follow the instructions.

Maybe good to know:
• You have to select the architecture of your Delphi applications (x86 or x64)
• & characters are not allowed in the company name or product name, but are allowed in other descriptions (publisher, PackageName, ShortDescription)
• The download link must point to a publicly available installer of your application. This download link is also used to install this version via winget. So make sure it is updated per version and not replaced every time.

The wingetcreate application can in many cases recognise the installer type automatically (e.g. InnoSetup or Installshield) – including all company, application and version information.

The wingetcreate application eventually generates a number of ‘.yml’ files containing the information you specified. These are placed where you run the wingetcreate, in the structure ‘manifests’.

In the end, you are asked whether you want the application to create a pull request. Your browser then automatically starts to log in to Github and create a PR from the files created with wingetcreate. Validations and installation checks are done automatically after a PR is created, but ultimately it needs to be merged by a human and that can take a while. Once a volunteer merges your pull request, your application is available through winget.

So, with winget, you have a very easy way to make your application available to everyone. Your application does not have to be an open-source application, you can also distribute commercial applications this way.

Written by Marco Geuze


Let us help you to realise your ambitions

GDK Software UK

(+44) 20 3355 4470

GDK Software USA

+1 (575) 733-5744