开发者

Creating installers for complex cross-platform programs

开发者 https://www.devze.com 2022-12-12 10:53 出处:网络
I\'m sketching an application deployment process for a bunch of relatively complex desktop applications. We have both native and Java apps, so the deployment must be able to check for existence of the

I'm sketching an application deployment process for a bunch of relatively complex desktop applications. We have both native and Java apps, so the deployment must be able to check for existence of the JRE and install it if needed. Some of the apps depend on special hardware, so the deployment must also be able to launch the necessary driver installers. Some of the apps are multiplatform, and preferably the same mechanism should be able to create Windows, Linux and Mac OS X installers. That is:

  • The installer must be able to install, in addition to the application itself:
    • Java Runtime Environment.
    • Drivers (hardware) - that is, launch other installers.
  • The installer builder must be operable from the command line so that it can be integrated with an automatic build mechanism that generates installer packages for each platform as nightly builds.
  • In addition, I need to create "update from the web" mechanisms for the applications. It could be included in the installer, or it could also be a separate custom mechanism built into the application.

Now, this is getting a bit complex, and I suspect that there might 开发者_运维知识库be no single installer that could do this all. Therefore I'm thinking between two fundamentally different approaches:

  1. Platform-specific mechanisms: NSIS would create .exe or .msi for Windows, XXX would create .deb for Ubuntu, and YYY would create .dmg for OS X.
  2. Cross-platform installer that would handle all the requirements above: ZZZ?

Any recommendations? Some options that I've looked include:

  • NSIS - Excellent, but Windows only.
  • IzPack - Good, but requires JVM to run.

Is there an universal tool for this, or should I just pick an appropriate tool separately for each platform? In the latter case, what would be "NSIS equivalents" for Ubuntu and Mac OS X?


I have some recommendations as follows.

  • Use WIX (Windows Installer XML) for creating MSI installers for Windows
  • Use Package Maker (part of XCode tools) on MAC OS X, preferably the command line version
  • Write wrapper scripts (in Python or so) to drive the over-all installer creation process.

    • to aggregate all the components you need to install (may be from ur version control system)
    • generate necessary files for Wix and Package Maker as much as possible
    • to run the packaging tool and generate the package
  • Make sure that the overall installer creation process is a simple one command operation overall (with options to create different versions of your package based on criteria like release branch etc.)

Overall, developing this workflow requires some initial effort and quite a lot of thinking. But the end result is quite worth the effort.

I haven't done this on the Linux side, but I guess would use RPM/DEB on that front in this workflow.


BitRock InstallBuilder meets all the requirements, including being multiplatform and providing an autoupdate mechanism


You should take a look at InstallJammer. It will definitely handle the cross-platform elements that you want and can even add entries to the DEB and RPM databases on the target system during installation. OS X support is still experimental, but it mostly works.

0

精彩评论

暂无评论...
验证码 换一张
取 消