I have installed gtk on my centos 7 machine and developed a simple gui app that uses gtk. I would now like to write an installer that installs both my app and the required gtk dependencies so that it is easy for the end user to install and run. But I am unsure what is necessary for me to install. One thing that I'm unclear about are the dependencies needed by the client app and the dependencies needed by the display server. In my case both the client and the server are on the same machine. But this may not be the case for the end user. I believe my app dependencies include gtk, gdk, glib, cairo and more. How should my installer check that the end user has the gtk dependencies required to run my app and handle those cases where a dependency is missing?
Rather than putting effort into writing an installer, consider packaging your app for flatpak, which is shipped by default on CentOS 7.
Alternatively, package your app as an RPM.
Installers for individual apps are vanishingly uncommon on Linux due to the use of centralised package managers, which generally do a much better job of installing and uninstalling software correctly than custom installers do.