From: Tim Hunter Date: 2004-10-07T22:39:46+09:00 Subject: RubyGem post-install hook (was Re: RubyGems and RPA On Thu, 7 Oct 2004 10:30:18 +0900, Gavin Sinclair wrote: >On Thursday, October 7, 2004, 5:24:50 AM, Chad wrote: > >>> > I think you are ignoring a very important platform...Win32. Realize that >>> > Ruby is a very effective language for folks that merely want to automate >>> > their platform, and most computer users are running Win32 (unfortunate, but >>> > true). For them, they want binary versions of libraries and a graphical >>> > installer. RubyGems does support win32, and will include a GUI for gems >>> > management. >>> >>> ...AND, we Win32 users don't want RubyGems (or any other packaging >>> system) cluttering our normal installer. >>> > >> We had some good conversations with people (including you, I think) at >> RubyConf about how an upcoming/proposed post-install hook might help >> integrate with the Windows install registry. > >What are we actually talking about here? RubyGems is designed for the >packaging of Ruby libraries and applications. Those have no need to >use the registry. Oh.... applications, start menu, all that s..t. I >get it... > Gavin, I initiated one of the RubyConf conversations about a RubyGem post-install hook. I asked about it because Kaspar Schiess' Gem for RMagick (http://rmagick.rubyforge.org) on MS Windows could use it. When you install RMagick on Windows, you run the Gem like any other Gem, but after the normal part is done you have to run a "post-install" script, too. This script scans the Windows Fonts directory and builds the font index that ImageMagick uses. IMO this looks clumsy, and since it's unusual it's easy for the user to overlook it. Of course this step is unique to the RMagick install, but I think it's likely that many extensions will want to add custom installation steps to their Gem install. One of the nice features of Minero Aoki's setup.rb (http://raa.ruby-lang.org/project/setup/) is the availability of pre- and post- hooks for all of the setup steps: config, setup, and install. For example, I take advantage of the post-setup and post-install hooks for the RMagick installation to build and install the example images for the RMagick documentation.