Advertisement

Generic Installer - Cross Platform

Started by November 11, 2015 03:20 AM
13 comments, last by brightening-eyes 9 years ago

Hi,

I have been looking for an Operating System Cross-platform generic installer. My projects are nearing the point of needing one. There are some which are available at suspicious "underground" websites, but I refuse to go there for concern about hacking or malware infection of people's computers.

It would be convenient to be able to customize the UI words and the installation destination of the files and folders, maybe with some sort of configuration file.

Any ideas on a clean, customizable but perhaps simple generic installer? (OS cross-platform)

Personal life and your private thoughts always effect your career. Research is the intellectual backbone of game development and the first order. Version Control is crucial for full management of applications and software. The better the workflow pipeline, then the greater the potential output for a quality game. Completing projects is the last but finest order.

by Clinton, 3Ddreamer

I do not think such a thing is possible.

TLDR:

Operating systems are different and they handle software installation in a different fashion. Next-next installers are a very Windows thing. Other OS-es handle adding software quite differently. Do not belive that there is a magic pill that will help you distribute your software in a uniform way (well, apart from Steam maybe). At the very least, users of different OS-es *expect* that adding software will be done differently.

The details:

On Windows:

  • the classic is to use Windows Installer (a.k.a. .msi)
    • many companies use WIX, an abstraction over WI. It is free, and also open source, if you care about that.
    • some use InstallShield
  • many use the Nullsoft installer (NSIS) - also free and open source
  • you can write your own from scratch, it is relatively easy (if you have even modest Win32 experience). Time consuming if you haven't written an installer before.

On Linux dstributions - there is no such a thing as universal installer :) They all go out of their way to make it difficult to provide binary packages that can survive more than a few releases/years, let alone compatible across distributions. There are alternatives to WI, such as .deb and .rpm, but I would recommend against going that route if you depend on other packages being installed, as packages get split or renamed over the years. Most software that works even after decades is to basically statically link against everything and do not depend on OS filesystem layout besides ~ and your installation directory. Also, limit your use of OS libraries to the bare minimum - prefer building all dependencies on your own and bundle them with your app (as you would on Windows). Plan to include a shell script that will force the loader to use your libraries instead of the system libraries (as they will be built with a different compiler version, etc).

If you want graphical installer for Linux - there used to be the Loki installer, but I'd recommend to try Steam and link to their libraries. It will be easier for both you and your users.

I've never owned a Mac, so I can't say anything about that.

Advertisement
I would just like to agree with the above. I have never encountered an installer generator across multiple platforms (as distinct as Windows, MacOS and Linux) and I would be surprised if there was one. Pleasantly surprised, but still surprised.

CMake (via CPack) for example can abstract that away up to a point, but it still uses NSIS on Windows, Bundles on MacOS and I'm-not-really-sure-what on Linux. You are still going to need significant platform-dependent settings and polishing though.

Have you tried the Qt Installer Framework? I'm not sure if it's what you're looking for but I noticed you didn't list it as one which did not appeal to you. It's pretty customisable, though for some things (such as adding environment variables) you will need to invest some time in learning the scripting language to work around its limitations.

We're using InstallJammer. It's open-source and multiplatform:

http://wiki.tcl.tk/15286

It's TCL based and discontinued but works pretty well (and doesn't use java like the others)

(and doesn't use java like the others)


Which of the others does even use Java? Maybe I skipped one but all of those I'm seeing don't.
Advertisement

The more I hear about installers the more I think extracting a .zip is all I want.

Watching thread...

Previously "Krohm"

CMake (via CPack) for example can abstract that away up to a point, but it still uses NSIS on Windows, Bundles on MacOS and I'm-not-really-sure-what on Linux. You are still going to need significant platform-dependent settings and polishing though.


CPack is pretty good. Aside from NSIS, WIX can be used on Windows as well. For Linux it has DEB and RPM generators IIRC. The individual generators aren't completely separate either, as many settings are shared, but yeah, some platform-specific polishing will be necessary (esp. considering that MacOS and Windows have code signing and Linux does not).

The more I hear about installers the more I think extracting a .zip is all I want.
Watching thread...


CPack also supports simple ZIP / 7Z packages.

(and doesn't use java like the others)


Which of the others does even use Java? Maybe I skipped one but all of those I'm seeing don't.

No, I don't speaking about the suggestions in this thread.

I'm referring to the other multiplatform installers like izpack and more

http://alternativeto.net/software/nullsoft-scriptable-install-system-nsis/

If you have no dependencies outside the C++ runtime and OpenGL then Mac and Linux files are just archives. If you want a simple Windows installer then Inno Setup's good and very easy.

Just have a platform-dependent post-build step in your makefile/build script that makes the platform archive/installer. You'd need to boot into Mac/Linux to do the build for them anyway, wouldn't you? When I looked at cross-compiling before it seemed painful.

This topic is closed to new replies.

Advertisement