Author Topic: About installers & cross-platform  (Read 1042 times)

0 Members and 1 Guest are viewing this topic.

Offline Fury

  • The Curmudgeon
  • 213
About installers & cross-platform
Modders often distribute their work in simple zip, gz or rar archives which is fine for basic mods. But mods that are in scale with projects like TAP, TBP, BWO, FSPort, Inferno, WCS, etc should use installers to reach the casual gamers and achieve a professional and quality look.

So far generating installers have been pretty straightforward with using self-extracting zip or rar archives, it is not very professional looking but gets the job done. Some have even used real installers like NSIS which is commendable. But there is something wrong with this picture. It's all win32-only. To create an installer for windows basically means that a project has to create and maintain another archive for unix-based platforms. This is waste of time and effort and most of all, waste of webspace. Or simply forget unix gamers and trust they can run the windows installer through Wine or something.

FS2_Open is no longer win32-only application so it would be advisable to look into viable way to supply an unified package for all supported platforms that can also create shortcuts, registry entries, etc for the platform the installer is run on. This can be achieved by using a cross-platform installer. I know taylor is working on an installer but it is still in its early development stages and will take considerable time to become stable and well-featured, so I am presenting you an alternative; IzPack.

IzPack is coded in Java and it creates java installers (.jar file), but does this mean that you have to know java programming language? No, IzPack installation scripts are xml files, no java coding required. See attached install.xml-file. OK, so IzPack creates .jar files, how do you launch jar files? You need to have Java Runtime Environment (JRE) or Java Development Kit (JDK) installed. This won't be a problem in most linux distros which either have Sun Java JRE or Blackdown JRE installed. OS X comes with Java pre-installed. Even most Windows users have Java Runtime installed since it is needed in many instances. However, to minimize the chance that a Windows user does not have Java installed and does not even know what it is, you can use Launch4j to create a native win32 exe-file which bundles Java Runtime and launches the jar installer, without user needing to install Java.

So for all this only two files are needed, which can be named as setup-shared.jar and setup-win.exe for example. Zip both into the same compressed archive and you have cross-platform installer ready for the masses.

If you know java programming, you can take this even further by using LZMA SDK to create even smaller jar-installer. And already ported, but older version can be found here. What is LZMA? If you want to take things to the extreme, compress the win32-executable with UPX. What is UPX? I have to add that IzPack's default compression is quite good, so not adding LZMA and UPX compression is not that big of a deal.

[attachment deleted by admin]
« Last Edit: July 11, 2006, 03:55:37 am by Fury »

 

Offline Xelion

  • 28
  • In the Ether
Re: About installers & cross-platform
Looked into bitrock? They're cross-platform (limited though). Also give out free licenses to open source projects which I think the SCP qualifies :)

  

Offline taylor

  • Super SCP/Linux Guru
  • 212
    • http://www.icculus.org/~taylor
Re: About installers & cross-platform
The FS2 source code doesn't qualify under OSD (Open Source Definition), so BitRock isn't an immediate option.  You can ask them about it and can maybe get a free license, but techically FS2/FS2_Open/SCP, nor anything based on that code, will ever qualify as "open source", since you can't profit from it.