Jump to content
  • Advertisement
Sign in to follow this  
3Ddreamer

Generic Installer - Cross Platform

This topic is 1118 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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)

Edited by 3Ddreamer

Share this post


Link to post
Share on other sites
Advertisement

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

(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.

Share this post


Link to post
Share on other sites

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

Watching thread...

Share this post


Link to post
Share on other sites

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. Edited by l0calh05t

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!