How can I produce an installer for a set of source codes for a specific application in Linux? Also, what are the actions happening when one installs software in Linux?
As there's more than one Linux distro, there's also more than one package management solution. I think that creating an app installer depends more on the target audience than on the target system.
- If you plan to produce an installer for confirmed Linux users, then a source tarball will suffice.
- If you target desktop users or non-confirmed Linux users, then produce DEB and RPM packages since those two package management tools cover the major Linux distros.
Also what is the actions happening when we install a software in Linux?
For source tarballs, nothing actually. The user is left alone to compile the source archive and figure out what are the dependencies (libraries and so on) without what the application wouldn't run.
For DEB and RPM (and other package management tools) the process of figuring out what dependencies are needed and the installation operation, is managed entirely by the package management tool(a connection to the Internet is needed to download the dependencies). The package management tool is responsible for registering the just installed app and all its dependencies in a local registry system so it wouldn't be necessary to install them once more for future needs.
DEB: a Debian package file. apt is Debian's package management tool.
RPM: RedHat Package Manager file. The same name goes for the package management tool.
Some commercial software or games sometimes uses Nixstaller:
Nixstaller is an Open Source project with the goal to create user friendly and flexible installers that work on various UNIX like systems.
Using Nixstaller we can create installers that works on most modern distributions, can install app locally or in system and looks like Windows installers ;).
But the best solution is to create native packages for each distribution so it could be managed via system package manager. For more details information about this you need to write more details about what you want to accomplish.