0

I am looking for a way to create download-and-install style programs for Linux. To clarity what I mean by "download & install", I mean that the installation process proceeds like this:

  1. User downloads graphical installer (NOT a deb, rpm, etc. file... I'm talking about an actual ELF executable) from website
  2. User runs graphical installer (preferably by double-clicking it) as a regular user (not as root) - installer puts program & its dependencies (included with the installer) in a nice place in the home directory and adds things to the desktop environment menus to make running easier
  3. User can now run the program from the desktop environment menus
  4. Uninstaller is installed alongside the program, which can be run at any time

This style of download & install is very similar to the method the majority of traditional personal computer users (in contrast to mobile PC users which are accustomed to app-stores) are used to and I wish to distribute any programs I make using such a method.Plus I just really like this method of software distribution. It just feels right.

I predominantly use C++ and FLTK for Linux programs.

I am interested in all of the different options available for replicating this experience, so feel free to mention different methods of "getting there"

Assume that a program has already been created and that it needs to be "retro-fitted" into this installation style

  • So.. ./configure; make dep; make; make local-install? – DopeGhoti Feb 6 '18 at 18:36
  • I want to distribute pre-compiled binaries though source code would be available – Uncreative Name Feb 6 '18 at 18:39
  • 3
    See unix.stackexchange.com/questions/420513/… - copying precompiled binaries is an iffy proposition at best unless you're absolutely certain that you're bringing all the dependencies along for the ride and you're dropping them on a compatible architecture. And don't even get me started on integrating your self-packaged tool with any user's given GUI configuration. GNOME and KDE are hardly the only games in town, and some users might take umbrage with your installer monkeying with their configs. – DopeGhoti Feb 6 '18 at 18:45
  • 2
    Funny... It just feels right It actually doesn't, it just feels "familiar" (to old timers). The "majority of traditional personal computer users", an endangered species, BTW, will be moving to the App Store model way sooner than you think. Why, you may ask? Because Microsoft said so. – user252181 Feb 6 '18 at 18:51
  • 1
    New linux users who are more used to Windows may appreciate this, or they may just get confused because your program requires a different installation method to all other software on their system. All other linux users will hate it and hate your software by association. It would be better to compile packages for each of the distros you wish to support. or work with the distribution maintainers to help them package your software. – cas Feb 7 '18 at 2:08
1

The most common installation tool of the type you’re after, used nowadays on Linux, is MojoSetup. Many, many games use this, and I’ve come across it used for general-purpose applications as well. As others have mentioned, you’ll need to take care with any libraries you need; many games provide a dynamically-linked binary along with all their dependencies, along with a statically-linked binary.

Another approach, perhaps more future-proof, is to use Flatpak; that will take care of most of the dependency and runtime issues you’re likely to come across.

As far as desktop integration goes, the safest option is to drop a well-formed .desktop file in the appropriate place; most users’ environments will pick those up. Other users will be used to adding a launcher wherever they want to; don’t try doing it for them...

  • Flatpak certainly looks interesting. MojoSetup looks very crusty and outdated, but IDRK what I expected coming up into a Unix Q/A site asking about how to replicate a non-Unix method. When I develop for Linux I am probably going to go for Flatpak because as you said, it is much more future-proof than the method I was describing. Thank you! :) – Uncreative Name Feb 9 '18 at 19:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.