Changes between Initial Version and Version 1 of InstallerGenerators


Ignore:
Timestamp:
Oct 29, 2009, 10:50:22 AM (10 years ago)
Author:
flip
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • InstallerGenerators

    v1 v1  
     1= Installer Generators =
     2
     3by Philip
     4
     5Here's round one of my research on tools with which to build a Windows
     6graphical installer for VeSPA. My research consisted of reading a lot of
     7discussions to expose myself to a decently-sized collection of opinions. One
     8phrase I read over and over again was "there's a learning curve".
     9
     10A quick way to narrow the field is to discard the non-free products. The only
     11non-free product about which I read much was Install Shield which is
     12"expensive" and unpopular. I also saw a few references to Visual Studio
     13Installer, but it's not part of the free VS Express Editions.
     14
     15Of the free products, there are three leading contenders, plus a dark horse
     16and one non-installer: WIX (Windows Installer XML), NSIS (Nullsoft Scriptable
     17Install System), Inno Setup, the dark horse InstallJammer and the
     18non-installer py2exe. Each is described in more detail below.
     19
     20WIX and NSIS seem to be the most popular install generators. InstallJammer is
     21notable for being the only one to create cross-platform (Windows & *nix)
     22installers.
     23
     24=== About MSIs ===
     25
     26WIX is different from the rest of these tools because WIX creates a Windows
     27MSI. An MSI is a data file that one feeds to the MS installer. Sysadmins at
     28big companies love 'em because they're friendly to enterprise-type services
     29like Windows Active Directory deployment. Obviously, that's not our target
     30market.
     31
     32I don't know anything about MSIs but my guess is that they're similar to a
     33package management system under *nix. For instance, I'll bet if I install
     34something through an MSI, it will automatically show up in the Windows Control
     35Panel Add/Remove Software list, whereas something installed by other means
     36won't (or won't without some special effort). And MSIs are probably smarter
     37about dealing with whatever security policies Windows has these days.
     38
     39== WIX ==
     40
     41[http://wix.sourceforge.net WIX] is an open source project from Microsoft.
     42Microsoft's "open" offerings often aren't, but this one seems legit.
     43
     44I've seen WIX described as a "thin wrapper" around the MSI format which is
     45reputedly complex and ill-documented. The moral of the story seems to be, "Be
     46prepared to learn a lot about MSIs."
     47
     48This comment summed up a lot of the ones I read about WIX: "WIX sounded like a
     49great idea at first, but we found that it's like a lot of things from
     50Microsoft: easy to do the 80% that most people need, but you better pray
     51you're not in the camp that needs the other 20% because extending it adds
     52mind-numbing complexity to your WIX and build scripts."
     53
     54WIX requires the .NET Framework 2.0 and its Service Pack 1 to run. I suspect
     55these things are common, but I don't know.
     56
     57Here's a feature list for WIX:
     58http://wix.sourceforge.net/faq.html
     59
     60== NSIS ==
     61
     62In contrast to WIX, [http://nsis.sourceforge.net NSIS] creates install EXEs
     63that are just like any other Windows EXE. It offers more flexibility than WIX
     64but comes with the cost of learning the NSIS scripting language. I
     65didn't see anything that suggested the scripting language is easy or a treat
     66to use. One person called it "cumbersome".
     67
     68NSIS grew out of WinAmp and has been around for a long time -- long enough to
     69have its manual translated to French and Polish and to offer commercial
     70support. NSIS users include Adobe, Google and Yahoo. It's got  a lot of users
     71and a Wiki with examples, bunches of plugins, etc.
     72
     73Here's a complete feature list:
     74http://nsis.sourceforge.net/Docs/Chapter1.html#1.3
     75
     76== Inno Setup ==
     77
     78[http://www.jrsoftware.org/isinfo.php Inno Setup] has been around for a while
     79too (since 1997). It's a bus factor 1 project, but it is open source and seems
     80popular enough to maybe get picked up by the community should anything happen
     81to Jordan Russell (the "JR" in jrsoftware.org).
     82
     83The Web site and documentation, while thorough, offer less than the NSIS site,
     84Wiki and documentation.
     85
     86Custom features must be written in Pascal (Inno Setup is written in Delphi).
     87
     88== InstallJammer ==
     89
     90[http://installjammer.com/ InstallJammer] is another bus factor 1 project.
     91It's also open source, but I'm not sure it has enough traction to survive in
     92the absence of its author.
     93
     94I don't see a lot of people talking about it, but those that do say
     95nice things.
     96
     97It's main claim to fame is that it is cross platform, although it does not yet
     98support OS X. While cross platform support is an interesting and unique
     99feature, I'm not sure that it benefits us that much.
     100
     101== py2exe ==
     102
     103[http://www.py2exe.org/ py2exe] isn't an installer ''per se'', but it "converts
     104Python scripts into executable Windows programs, able to run without requiring
     105a Python installation."
     106
     107It's open source, quite popular and has a solid community behind it.
     108
     109One thing that gives me pause is the page that lists some packages which may
     110malfunction after being run through py2exe. The list could also be titled
     111"Modules that Analysis Uses", since just about all of them are on there
     112(cElementTree, ConfigObj, ctypes, MatPlotLib, SciPy, NumPy, and wxPython):
     113http://www.py2exe.org/index.cgi/WorkingWithVariousPackagesAndModules
     114
     115== Do We Need A Graphical Installer? ==
     116
     117Now that we've examined solutions, let's examine the problem.
     118
     119One of the big features provided by an install program is an
     120installation-specific toolbox. In our situation, we'll already have one
     121available in Python's distutils module. (That's assuming that the user has
     122read our prerequisites and at least installed Python. That assumption may or
     123may not be beyond our handholding limit; I'm open for discussion on the
     124topic.)
     125
     126Python's distutils does a lot of work that we don't want to replicate (such as
     127finding the appropriate site-packages directory into which to copy .py files).
     128In addition, most or all of our dependencies will be Python-based, so the
     129easiest and most accurate way to check that they're present will be to attempt
     130to import the library from Python code (e.g. 'import wx').
     131
     132Most of what we need from an install program, therefore, is already present
     133within Python, and using Python for a lot of installation-related tasks is not
     134only smart but necessary. What's more, if I need to do some custom scripting
     135at install time and I can do it in Python or in some install program's
     136homegrown scripting language, I'll choose Python every time.
     137
     138That doesn't leave a lot for a graphical installer to do except (1) check that
     139Python is installed and (2) keep Windows users from being forced to
     140use a command shell to run `python setup.py install`. Since Windows users
     141typically have little exposure to the command line, the value of (2) is
     142considerable, but the cost might be too.
     143
     144
     145== Conclusion ==
     146
     147=== No to a Graphical Installer ===
     148
     149I hope I'm not being naïve, but I don't see that creating an installer buys us
     150much. Nothing I read about these packages left me excited about any of them,
     151and learning the intricacies of the MSI format or NSIS' scripting language
     152doesn't seem likely to pay dividends beyond this project.
     153
     154If I had to choose among the installer generators, I'd say that NSIS is the
     155best choice. I'd check out WIX too since 95% of the work of our installer will
     156be pushed to distutils and therefore the WIX config should be pretty simple.
     157Hopefully our needs would fall in that "easy...80%" and as advised we should
     158"pray you're not in the camp that needs the other 20%".
     159
     160=== Tentative Yes to py2exe ===
     161
     162I'm intrigued by py2exe because it looks a lot easier to use than any of the
     163other applications mentioned here. It seems worth trying out since it is a low
     164cost investment that obviates the need for preinstalling Python and
     165allows Windows users to stay in their comfort zone.