I’ve got some questions about application deployment.
For Windows, it’s quite simple for me. After release compilation I’ve got an EXE file which I can upload on my website with all neccessary *.dll files (dynamic linking because I want to use LGPL licence). It’s really “user-friendly” because the only thing that user has to do is to download these files and double-click on EXE.
What about Mac and Linux? How can I create files easy to install/run for users? (I can compile my app on Linux and Mac so I don’t need to worry about cross-compilation). How should it be done?
Thanks in advance for any answer or hint.
I’m not mac user, so I’m suggesting only for linux
1. you can write installation script (i.e. .run) (ex: proprietary nvidia drivers)
2. you can use installation program, BitRock [bitrock.com] as example (ex: Qt Creator)
3. you can just pack all binary files (executable and needed .so files) and all data files to tar.gz (or tar.bz2) archive (ex: Firefox)
Several applications are shipped with a couple of almost identical files, e.g., install.bat and install.sh, the former for Windows installations and the latter for *nix installations. Since the two files are not executable in the other platform, it is quite simple for the user to execute the right one. Thanks to this, you can script your installation procedure (and include even an automatic download, e.g., wget). Another solution could be to build a simple cross-platform program, like Java, Ruby, Python, Perl, to do all the process.
for Linux, there are two types of installer file you can produce: DEB and RPM. DEBs are the binary installer used on Debian and it’s derivatives, including Ubuntu, and RPM is for the Red Hat derivatives, inclusing Fedora. Creating one of each will cover most of your bases on Linux.
Linux machines are usually using some distribution (Ubuntu, Mint, Fedora, …), and users usually install software from their distributions repository, which contains builds that work on that system. If you want something else, the first option is usually compile it from sources. Thus, compared to Windows, there are two tricks for Linux binary distributions:
1) First trick is that practically all Linux systems have different versions of DLLs. Because of this, pay attention to against what dynamic libraries you link your program when building the distribution version. Critical parts are: dynamic loader (newer systems have newer version, which does not work in older Linux installations) and standard libraries. You can’t get rid of all those dependencies, as you probably don’t want to distribute standard libraries for all kernel versions. It is impossible to make binary distribution to work on all Linux machines, but by selecting old enough versions of those libraries you can make it work on many of them.
2) You can attach other DLLs (e.g. Qt) to package, but Linux machines do not normally look DLLs from current working directory (as Windows does). If your program is meant for local installations (i.e. user has no root access for system-wide installation), you find valuable information from following thread:
EDIT: One addition: One way is to ask user to install Qt from her/his repository (if it is not installed already). Every Linux distribution supporting KDE has some version of Qt.
DEB and RPM. DEBs are the binary installer used on Debian and it’s derivatives, including Ubuntu, and RPM is for the Red Hat derivatives, inclusing Fedora. Creating one of each will cover most of your bases on Linux.for Linux, there are two types of installer file you can produce:
Debian based distribution often allows the installation also of RPMs, though tools that translate RPMs into deb.
If the application is built specifically for Linux (e.g., skype), than this could be a very good solution. However it excludes other *nix from being able to install the application: bsd has its own package format (not to mention the ports tree), solaris has several package formats (ips, opencws, old system v packages). My opinion is that a dual scripting system (.bat and .sh) could be the killer installer if the application does not require a lot of user interaction while installing.
Compiling from source is definitively not an easy solution for the end user, at least if not done in a very automatic way (e.g., ports), that pushes back to a script to compile (and install).
The Mac uses application bundles – please follow the link, the procedure to create those has been explained multiple times already.
If you run into specific problems, you’re welcome to ask in a new thread, of course.
For my view,
I used InstallJammer [installjammer.com] to make installer in windows & linux.
It likes BitRock but it’s opensource :)
For Mac, I used .dmg files to deploy application. But one things to remember that, .dmg files are not writable media. It likes disc images.