3

There is a lot of software which is released as shell installers, for example:

  • Netbeans

  • Mathematica

  • Bazel (it also provide deb and tar.gz, but .sh is popular)

  • Nvidia Graphics Driver

and so on.

This way to install software is convenient and universal.

Is there a tool (like NSYS and Inno Setup in Windows to generate .exe installers) on Unix-like platform which can automatically generate a .sh installer with the archive of target software and simple configuration?

I prefer an open-source solution.

Stephen Kitt
  • 434,908
pah8J
  • 237
  • 1
  • 3
  • 9

2 Answers2

3

I’m not sure about installers being particularly convenient (compared to distributions’ native packages). However there is a tool which does what you’re looking for, MojoSetup, which produces a single shell script containing the archive to be installed and the installer itself.

Stephen Kitt
  • 434,908
  • Interesting! MojoSetup is hosted on icculus.org, which I associate vaguely with the history of Loki Software, but makeself is what claims to have been used by Loki. I guess it looks like makeself does a minimal self-extract + optionally run a command, whereas MojoSetup actually helps you write an installer (and maybe a graphical one?), at least if you want the same installer features they did. – sourcejedi May 06 '18 at 09:14
  • @sourcejedi MojoSetup is inspired by the lessons learned on Loki Setup. makeself doesn’t aim to meet the same requirements; it’s basically a shar replacement with the ability to run a program after extracting it. Ryan Gordon gave an interesting interview to BoilingSteam.com recently, it’s worth listening to for anyone curious about the history of commercial gaming on Linux! – Stephen Kitt May 06 '18 at 12:47
0

Here is a more powerful tool for build .sh installer(it can also build other format of package too or convert between different format of package).

It is fpm. Here is its GitHub homepage.

The installation of it is not difficult:

On OSX/macOS:

brew install gnu-tar

On Red Hat systems (Fedora 22 or older, CentOS, etc):

yum install ruby-devel gcc make rpm-build rubygems

On Fedora 23 or newer:

dnf install ruby-devel gcc make rpm-build libffi-devel

On Debian-derived systems (Debian, Ubuntu, etc):

apt-get install ruby ruby-dev rubygems build-essential

The usage of it is also friendly (just type fpm --help will work).

pah8J
  • 237
  • 1
  • 3
  • 9