Packaging a GtkAda application (on Windows)

Ok, my application is ready, but I would like to share it with people not encline to install Gnat and GtkAda.

With ldd from Cygwin, I can spot and copy all the needed DLL. The application starts but complains that Gsettings is absent. I copy the share/glib-2.0 directory. Now it starts, wait a couple of seconds and aborts !

Are there some preferred way to launch an GtkAda from a PC where we don’t want the whole AdaGtk tree ?

1 Like

You install only the things needed. There are lots of directories GTK requires beyond the DLLs. The run-time (GNAT, GTK, GtkAda) ISS file (for the Inno setup) is quite large. In my case (MAX! cube home automation) it is even bigger because I keep supporting 32-bit Windows. Everything goes under the application install directory, just like GNAT does.

P.S. I use msys64 and msys32. Cygwin has issues.

I have got the source of MAX! cube home automation and don’t find the “ISS” file.

(I don’t use Cygwin in my Ada compilation… but find it usefull sometimes)

The file does not belong there. It is too large for pasting here. Send me a mail and I will attach it to the response.

For one my project I used this Python script to gather the dlls: WNM-PGB1-firmware/misc/dll_copy.py at 60faf8348a32a8762d75cf6aef7c09e572882cb4 · wee-noise-makers/WNM-PGB1-firmware · GitHub

Nice.

However, the problem is that when your build system differs from the target you need to collect DLLs on the target. Even the names may differ, because AdaCore does not support some 32-bit targets anymore so I am forced to use ancient compilers. (This is one of the reasons I keep stuff in Ada 95)

OT1. I highly appreciate Debian and Fedora packaging systems. They take away a huge amount of work required under Windows. MS half-heartedly attempted to introduce packages:

dism /online /get-packages

but the thing does not work as it should.

OT2. A word of advice. Do not trust Alire. Keep your compilers close to the chest! :grinning:

But the main problem with GTK is that it needs a lot of external files to work. Fonts, schemas etc.

About Windows and packages, there is now WinGet which seems to be analogous of apt-get, dnf, etc. But I havn’t tested it much.

I’ve been using msys2 and pacman on my end for Windows.

You could try the windows dependency walker. That should tell you all the DLLs used to run a program based on your current PATH, unless you have late loading, for which there are no tools. It will also give you the paths to those DLLs

Perhaps “official” instructions from Gtk could help: Building and distributing your application.

1 Like