Titanium on MS Windows

Using the GNU Cygwin environment

by Dan Bonachea

This page describes the use of the Titanium compiler on the GNU Cygwin Environment for Microsoft Windows (http://www.cygwin.com/)

Cygwin is a great UNIX emulator that runs on most MS Windows systems and includes ports of all the standard UNIX tools and programs, thereby providing an easy porting environment for UNIX-based tools such as Titanium. 

Minimal System Requirements:
Intel x86 running MS Windows 95, 98, NT, 2000, ME or XP
Internet connection (minimum install requires about 40 MB of download)
Minimal install requires about 175 MB of disk space for Cygwin, and about 100MB of disk space for Titanium

General Info

I ported Titanium to Cygwin primarily for development purposes (provides a convenient way for MS Windows users to do development work on Titanium applications or the compiler itself), but if you have a powerful windows SMP or NT cluster then it's also a potential production platform. The backends currently supported on the Cygwin platform are:

Installing Titanium on Cygwin

Instructions for Titanium users who wish to use a pre-built Titanium compiler on their MS Windows system

  1. Download the Cygwin setup program from http://www.cygwin.com/ (direct download) and run it
    I used version 1.5.18, but any newer version should also work. Follow the install prompts until you get to the screen for selecting the installation packages. Be sure to note the pathname you selected as the root of your Cygwin filesystem (which will appear as a regular windows directory).

  2. Select the appropriate Cygwin packages for installation
    Titanium requires the following packages for correct operation:
        All the "Base" packages, plus gcc, binutils, make, and perl (and openssh, if you want to use the udp-* backends)
    There's a number of other useful packages available, many direct ports of traditional UNIX tools - choose whatever else you need to feel comfortable working in the UNIX environment.

  3. Once Cygwin installation is complete, download the Titanium compiler binary distribution for Cygwin and place it in the /usr/local directory of your Cygwin filesystem.
    (A debug version of the build is also available)
    If you are using an older version of Cygwin (pre-gcc 3.x: run gcc --version to check) then you may need to use an older version of the binary distribution (prepared on Cygwin 1.3.10).
    See entire distribution archive

  4. Unzip the compiler distribution USING CYGWIN (not WinZIP)
    From your Cygwin prompt, run the commands:  
        cd /usr/local
        gunzip -c titanium.tar.gz | tar xvf -

  5. The Titanium compiler will be placed in /usr/local/titanium/bin/tcbuild, and can be used from the Cygwin command prompt just like on any other UNIX system (see the Titanium software page for usage instructions)

Building the Titanium Compiler on Cygwin

For Titanium compiler developers or people who wish to use a more recent version of the compiler than the distribution provided above

  1. Download the Cygwin setup program as above and run.

  2. Select the appropriate Cygwin packages for installation
    Building Titanium requires all the packages listed above for running Titanium, and in addition the following packages:
        tcsh, automake, autoconf, bison, flex, m4
    You also will need the NT version of emacs, and (if you want to run the regression test suite) the pdksh version of ksh

  3. Download the Titanium sources or check them out of prcs

  4. Unzip the compiler sources USING CYGWIN (not WinZIP)

  5. Bootstrap, configure and build as usual

Distributing Titanium-Cygwin Applications 

Applications compiled using the Cygwin port of the Titanium compiler can easily be run on other MS Windows systems without the full Cygwin environment. All that's required is the application executable itself, and the Cygwin DLL library, which resides in /bin/cygwin1.dll. (Running the Titanium compiler requires the full Cygwin environment because it internally calls various UNIX tools provided by Cygwin such as gcc and perl)

If you have any questions, please Contact Dan.