application installer - linux

how to create installer of application( .sh and .pl files) on ubuntu? and how to install it?

We need more details to give you a proper answer. However, if you're looking for something installable on a GNU/Linux distribution, I'd recommend you package your application as an RPM or a DEB.
On the other hand, if you simply want to create a self extracting "installer", you can consider using makeself.
I don't know about any perl tool that does this.

For linux/unix platform I used InstallAnywhere and InstallShield Universal. Both allows to create projects which can be built for various platforms including win and mac and for linux platforms it creates .bin package which can be installed rather with UI or console mode.

Related

How do programmers create a cross platform installer for both Windows and Linux?

I have searched high and low for installers to customize after creating my applications (small, medium, and much bigger) in size. Yes, portable apps great but most people just want to install and also have it just update when updates are available and install and restart the next time or at least warn the user to save the work before the Application can reopen.
Yes, I have looked at NSIS and other installers, but they are merely for windows and not for both windows and Linux. Some of these installer projects have been discontinued. Most people who use Linux don't like to always build from the source.
I was wondering how I can create a POSIX compliant installer that my software can install on both Windows and Linux. What are the steps involved? I assume most or all installers use C++ to do all of the grunt work. I am interested in creating my own to fully understand C++ and how it works. This why I really need to know how an installer is made. Any helpful advice is welcomed.
Thanks in advance.
"Mainstream": A shared packaging format seems elusive. However, there are a few multi-platform deployment tools available. Installsite.org has a list towards the bottom here. I guess the two most commonly used tools are (both are commercial):
Advanced Installer for Java / Advanced Installer Enterprise (Windows and Mac, no Linux)
Flexera InstallAnywhere (Windows, Mac, Linux)
From this answer:

bitrock installer - getting started for Linux

I have read the first few sections of "http://installbuilder.bitrock.com/docs/installbuilder-userguide/index.html" may be 3 to 4 times, but it is quite unclear to me.
I have a project/product that needs to be installed/unistalled/upgraded on user machines, so I guess I can make use of BitRock installer to accomplish the same. Having said that, below are my details:
Target system: Linux (can be 32 bit or 64 bit)
Project Developed using : Qt and C++ etc
For simplicity, if I call the name of the project directory as "Hello world" and my .pro file as "Hello world.pro" and my executable as "Hello world", how can I generate a package depending on the target system (debian or rpm based). As I said, I read the user guide but totally confused about how to integrate BitRock with my development system to generate installer, uninstaller or upgrade binaries.
All I did was download the bitrock installer for QT based Linux, changed the permission of the binary, executed it and chose the default options. Please help me with a simple example.
Btw, the most basic question is that, for me a double click on the installer "installbuilder-qt-8.6.0-linux-installer.run" does not work. No GUI comes up. I prefer to create my installer using the GUI, rather than manually writing XML files
Thanks
This may not be the answer to your question, but the what you are trying is not the standard way of deployment on Linux, instead of using .run file (hardly used) it is better to create debian and rpm packages which can be installed with a single click.
Since you are using Qt you can also try Qt installer framework, which helps you create cross-platform Window Style installers.
http://qt-project.org/wiki/Qt-Installer-Framework

How to bundle an application for Linux

I am writing a (closed-source) application and will provide binaries for all three major platforms (MacOS X, Linux and Windows). It uses Qt under the LGPL license so I am required to dynamically link with the Qt libraries. I understand how to bundle the application for MacOS and Windows by simply providing the Qt dynamic library with the application, but I am unsure how to do this properly for Linux.
It's traditional to provide the application as a package (.deb and .rpm) and allow the package system to resolve the dependencies. Should use this method? If so which distros should I be aiming for (I am assuming Ubuntu and Fedora)? If anyone has any experience with this, I'd be interested in hearing it.
deb, rpm and tarballs are the right ways to go. There are a few non-standard ways that I know of which you might want to consider as well which are more distro agnostic.
Makeself - Self extracting shell scripts that contain your application. This is quite widely used by closed source software distributors.
ZeroInstall - useful for non-root installations.
Listaller - Merged with autoinstall and it seems to be unstable as of now.
You need to provide at least 3 packages for Linux; a .deb for Debian-based systems, a .rpm for RPM-based systems, and a tarball for everything else. Some find it necessary to refine it to provide three or four different .rpm packages, for Fedora, SuSE, Mandriva, and RHEL, depending on the exact library requirements the software has.
There are many ways to do so... but if you want a distribution generic way to bundle an application for Linux, you may check this ( http://codevarium.gameka.com.br/deploying-cc-linux-applications-supporting-both-32-bit-and-64-bit/ ) tutorial. It shows how to copy all the dependencies to a library folder and make a shell script to properly execute the bundle.

NSIS support for Linux and Solaris

Does NSIS support Linux and Solaris? I read somewhere that we can compile nsis script on Linux but cant execute the .exe generated on any other platforms but Windows. Can somebody put more light in this?
No.
See the NSIS feature list for more information ...
Portable Compiler
The NSIS compiler can be compiled for POSIX platforms like
Linux and *BSD. Generated installer
will still run on Windows only, but
this way they can be generated without
Windows or WINE.
You can compile installers on POSIX and Windows systems, but it always produces a Win32 PE file that only runs on Windows (And maybe under WINE on *nix)
Check the NSIS manual for more info
The installer systems for Windows and Linux are completely different.
Whereas Windows' only contribution to a software management system is one registry entry pointing to the uninstaller, Linux has a full working software management system. There are apt, yum, pacman and many more out there, which are supporting many more features and possibilities including automatic execution of scripts and pulling in/installing dependencies. If you have a cross platform application you wanna share, you're either stuck with creating a tar-ball, or you learn how to build deb/rpm etc. packages.
Linux and Windows are not binary compatible, so you can't do that.
But, most of the windows binary installer could able to install at WINE

Best approach to writing a generic installer for a Linux application?

We have a Linux server application that is comprised of a number of open-source tools as well as programs we've written ourselves. Ideally we would like to be able to install this application on any common Linux distribution.
In the past, we've written perl scripts to automate installs of this application. Unfortunately, due to idiosyncrasies of different Linux distros, the logic inside these install scripts gets horribly complex, and can change as new versions of each supported distro are released. Maintaining the installer thus becomes one of the most time-intensive parts of the project!
I'm looking for assistance, be it a framework, documentation, code samples, that can make this process less painful. Here are the types of things our installer needs to do:
Create user/group accounts
Create directory trees with specific ownership and permissions
Install open-source applications, potentially compiling them from source during install
Insert pre-compiled binaries, scripts, config files, and docs into specific directories
Register init-type startup and shutdown scripts
Generate encryption keys
Verify connectivity to a central server
Instead of the installer approach, I think a better way than having a single script that does it at install time is to have a build system which generates .deb or .rpm files suitable for installation on each system you have to support.
A poor man's way of going at that might be to use checkinstall, which creates packages from the files installed via 'make install'. So you'd build your app on each system and have the package magically created in the distro's native format.
I believe that most of the tasks which you describe are fairly standardized between Linux distros. In my experience, the following should work the Debian family (including Ubuntu) and the Red Hat family (including Fedora and CentOS):
Create user / group accounts - adduser command
Create directory trees - mkdir or install, or just expand a tarball
Install open source applications - Unless you have particularly esoteric needs, this should probably be left to the distro's package manager.
Install files - install, or just expand a tarball
Startup and shutdown scripts - install to /etc/init.d then symlink to /etc/rc*.d
VMware Server is freely available for Linux and does most of the tasks which you describe. It uses Perl and maybe shell for its installation and configuration, so you might see the approach that it takes.
However, speaking as a Linux admin, I strongly prefer applications that integrate with my package management system. In other words, create .deb and .rpm files, as Vinko Vrsalovic suggested. Building packages is extremely well documented:
Building RPMs for Fedora (or Red Hat or CentOS): draft documentation, RPM Guide
Building .debs for Debian (or Ubuntu): Debian Maintainer's Guide
I tried Autopackage a few years ago, don't know how universal it is but worked quite well (was the only truly universal way back then). Surely you have to provide some LSB-compatible ways of setting up proper directories on your own, but this piece of software should help you.
Though there's probably still too much diversity among linux distributions to do everything in a completely platform-agnostic way but I may be wrong.
You may want to try BitRock InstallBuilder. It is a cross platform installation tool that allows you to do exactly what you are looking for (adding users, installing services, install pre-compiled binaries, etc). Although some of the other posts mention a number of tools that you could use in your scripts, the problem is that every Linux distribution is a bit different and simple tasks like adding an user or installer a service are suddenly non-trivial when you need to do them across Debian, Ubuntu, Mandriva, RedHat, Gentoo, etc. A good cross platform installer should isolate you from all that. Many commercial open source companies like MySQL, SugarCRM, Zenoss, Jaspersoft, Groundwork etc. have built installers based on our technology exactly because of that (in addition to their regular source code tarballs, etc.) We also provide free licenses for open source projects.
Autopackage now merged with Listaller project. Documentation's not really thorough yet but seems to be working.

Resources