• Home
  • Blog
  • Wiki
  • Projects
  • Contact Us






Building A Custom Cygwin Installer

March 30th, 2009 By admin

Intro – How This And Other Articles Relate To What We Do At The Labs

As this is our blog’s inaugural article, I wanted the content to really reflect the focus of our consulting practice and product development efforts. We founded our business to help our clients squeeze the monkey work out of their software development process, and one of the biggest unnecessary time sponges we see is the frequent occurrence of ‘it works on my box, why not yours?’ types of problems. Many of these occur simply because one of your developers’ environments is missing a third-party component on which some script or procedure depends. If your shop includes a mix of Windows and Linux/Unix developers then one way to ensure that everyone is working off the same set of dependencies is to equip each Windows box with a standardized set of Cygwin utilities. This article will show you how to configure a custom Cygwin installer to help make that happen.

Your Team Likely Depends on A Unique Set of Components

Perhaps you need an svn or cvs client for source code control. You might depend on utilities like Gnu C, Perl, wget, ssh, and so on. Although none of these are installed by default, it is possible to hunt around in the Cygwin installer package list to select what you need. But as your list of requirements grows this gets harder and harder to get right on the first pass. And when newer members of the team forget to install key components they can burn significant chunks of time troubleshooting failed procedures that depend on these components. Creating a custom installer is a great way to ensure that one simple set-up process provides everyone on your team with what that they need to do their jobs.

Birds Eye View of Key Steps and Data Flows

If you made it this far you’re probably interested in how this all works. The diagram below provides a high-level overview of the steps that

  • an administrator or team lead needs to follow to customize the Cygwin installation process;
  • each individual developer follows to install the new default set of components into their environment.
    Birds Eye View of Key Steps and Data Flows Involved in Building the Customized Cygwin Installer

Try It

Before you work through the details of setting up a custom Cygwin install for your organization you might want to try out a sample. We have made a local package directory available at this (password protected) URL that you can try out. Download the zip file, and when you reach step 4 in Guide to Invoking The Customized Cygwin Installation Process enter <UNZIPPED_DIR_ROOT>/cygwin.install.bundles/release.dir  as the local package directory.  Once you launch you’ll notice that a number of programs were installed by default that are not installed by default in a ’stock’ Cygwin installation (rxvt, svn, vim, perl, and a number of others.)

Step-by-step Guide to Creating a Customized Cygwin Installation Process

To a create a customized Cygwin installation perform the following steps:

  1. download and launch the stock Cygwin installer ( http://cygwin.com/setup.exe );
  2. select ‘Download without installing’;
  3. select the ‘Local Package Directory’ which will house your downloaded installable bundles;
  4. select the non-default ‘custom’ set of packages you would normally choose if you were doing an actual install to your machine;
  5. Wait for a few minutes while the packages download, then hit RETURN at the ‘Finish’ dialog.
  6. modify the package metadata in the setup.ini file that is stored in your ‘Local Package Directory (each custom package you wish to be installed by default is defined to be a member of the ‘Base’ category)

Step-by-step Guide to Invoking The Customized Cygwin Installation Process

To invoke the customized Cygwin installation process, perform the following steps:

  1. download and launch the stock Cygwin installer ( http://cygwin.com/setup.exe );
  2. select the option ‘Install from Local Directory’ at the ‘Choose Installation Type’ dialog;
  3. choose the root directory for your Cygwin installation
  4. provide the location of the directory which houses your downloaded installable bundles at the ‘Select Local Package Directory’ dialog  (the same directory you chose in step 3 of the Guide to Creating a Customized Cygwin Installation Process);
  5. Press RETURN at  the Select Packages dialog to accept the defaults;
  6. Press RETURN at the ‘Finish’ dialog.

Wrap-up: Some Closing Thoughts on Cross Platform Development

We hope that this article helps increase the adoption of Cygwin by smoothing out some of the rough edges of customizing its installation. The Lackeys are long time fans of Cygwin as it eases the pain of switching between the two most popular platforms for Java development:  Windows and Unix(Linux).

As a Java developer you are more marketable and effective if you can work productively in either one of these platforms.  I think the same goes for a software development organization: you can gain significant advantages from investing in build systems that can run soup-to-nuts compile, test, and deploy cycles  on both Linux and Windows boxes.  A development organization can also win big by enabling their engineers  to rapidly provision a development environment for either platform. Please let us know if this article has helped you get there.

Add to Technorati Favorites

Share:
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • blogmarks
  • description
  • Furl
  • LinkedIn
  • Live
  • MySpace
  • Netvibes
  • Netvouz
  • NewsVine
  • Ping.fm
  • Pownce
  • Reddit
  • StumbleUpon
  • Technorati
  • Tumblr
  • TwitThis
  • Yahoo! Buzz
  • YahooMyWeb

Posted in Cygwin | 2 Comments »




2 Responses to “Building A Custom Cygwin Installer”

  1. By Sheshadri mantha
    on April 1st, 2009

    hey chris;
    nice… we do run into cygwin install issues – particularly with make, which our install system requires to be penultimate rev. and typically this is handled by “look over the shoulder” while a new install is being made.

    w/ur instructions, can now create a custom cygwin install… (meaning ah! so thats what the “Download w/o Installing” is for).

    Nice work!
    thanx
    Sheshadri


  2. By Finally Exorcised Windows from my Development Laptop | Build Lackey Blog
    on January 16th, 2010

    [...] done some posting in the past about how nice Cygwin is if you find yourself forced to develop in a Windows environment. Even better than Cygwin is no Windows at all, a state which I finally achieved after my solid state [...]


Leave a Reply

  • Categories

    • Build Automation
      • Maven
    • Development Environment Tricks
      • Cygwin
    • Dynamic Languages
      • Groovy
        • Grails
    • Java
    • JQuery
    • Test Automation
      • Selenium
    • Uncategorized

  • Archives

    • June 2010
    • March 2010
    • January 2010
    • December 2009
    • November 2009
    • October 2009
    • September 2009
    • July 2009
    • June 2009
    • May 2009
    • April 2009
    • March 2009
  • Meta

    • Log in
    • RSS
    • Comments RSS
    • Valid XHTML
    • XFN
    • WP