pmcyg - a tool for generating stand-alone Cygwin installers

Overview

pmcyg is a tool for creating a customized offline installer for Cygwin(TM), the Unix-like environment for Windows. This can be used to create a complete Cygwin installation system on a cdrom, dvd, or USB flash disk. pmcyg can be used on a wide variety of operating systems (e.g. Linux, MacOS, FreeBSD, Windows), allowing one to build the installation media without needing a Windows system with internet access.

pmcyg will assemble a collection of Cygwin packages based on a user-supplied list of Cygwin package names, and download only those packages and their dependencies from a Cygwin mirror site, to create a partial mirror of the Cygwin release. This avoids having to download many GB of the official Cygwin release, e.g. using wget. With pmcyg you can easily create a minimalistic installer that can be as small as 32MB.

Installation

To use pmcyg, you will need a recent version of Python installed (version 3.1 or later). This is available on most GNU/Linux distributions, as part of Cygwin itself, or as a native Windows application.

To use pmcyg's graphical user interface, you will also need the 'Tkinter' toolkit typically available in the 'python3-tk' or 'python3-tkinter' packages of Linux or cygwin installations. The standard Windows installer for Python automatically installs the Tkinter toolkit by default.

Usage

To build your off-line Cygwin installer, pmcyg will help you through the following steps:

  • Assembling a list of Cygwin packages you need
  • Selecting a mirror site from which to download Cygwin packages
  • Prompting pmcyg to download packages and their dependencies

After that, you can use a standard CD or DVD-burning application to create an offline installer, optionally with autorun capability. You can even use pmcyg to download directly onto a USB key.

You can simply mirror the entire set of Cygwin packages, which will occupy about 4GB, or you can list particular packages that you want to have available. This package list can be based on a template which pmcyg will generate, or might be as simple as:

# Base packages
bash
cygwin-doc

# Development packages
cppunit		[arch=x86,x86_64]
gcc-g++
mercurial
ocaml		[arch=x86]

# Editors
ed
emacs-X11
nedit
vim

# X11 Window system
xcalc		[arch=x86_64]
xorg-server
xterm

If you want to create a copy of all the packages installed on an existing Cygwin system, then you could generate the package list by using cygcheck:

cygcheck -cd | tail -n +3 | cut -f 1 -d " " > mypackages.txt

For the most complete Cygwin distribution, pmcyg can also optionally include Cygwin source packages (taking about 20GB if you mirror the entire Cygwin tree).

When used with its graphical user interface, pmcyg will automatically try to find the latest official list of Cygwin mirrors sites, and present a sorted selection based on geographical region.

pmcyg will check the versions of packages in your local directory, and update those packages with newer versions if available from your selected download site. This allows you to maintain a current version of all your favourite Cygwin packages and the 'setup.exe' installer, which you could keep on a USB memory stick, ready for use as an offline installer on any PC without direct internet access.

Downloading

pmcyg is hosted on GitHub, where you can download the latest release. Earlier releases are also available on Sourceforge.

Feedback

The author would welcome any constructive feedback on pmcyg. This can be sent to rwpenney«AT»users«DOT»sourceforge«DOT»net .

pmcyg with Tkinter GUI

pmcyg running on WinXP

pmcyg updating a pre-existing download


Last updated 19 September 2020
© Copyright RW Penney, 2010-2020