Setting Up Your Computer’s Environment under Microsoft Windows

This document shows you how to set up your computer’s environment under Microsoft Windows to be as similar as possible as the one in the Digital Systems Laboratory. In fact, these instructions are the ones used to set up that Laboratory in the first place…

The term computer environment, as used in this context, simply means the “look and feel” of the software. In other words, it involves things like the settings you should change in the editor, the icons on your desktop and configuration files for the shell. Some of these things tend to be very subjective and personal (everyone has their own preference regarding colours, for example); these instructions take this into account.

In this document, something like “Start » Settings » Control Panel” means that you click on the Start button, select the Settings sub-menu and finally click on Control Panel. “$” will indicate the Cygwin shell prompt. Anything in a bold monospaced font is what you are expected to type in; an ordinary monospaced font is used for the computer’s response. Please note that this document doesn’t show every response from the computer!

These instructions assume that you have already installed the Cygwin Unix Emulator, the GNU Tools and the TextPad text editor. If not, please install those software packages now.

It is an unfortunate fact of life that every major version of Microsoft Windows behaves differently. This means that you may need to adjust these instructions to suit your version of Windows. These instructions have been verified for Windows 2000 Professional, Windows NT 4 and Windows 98SE only.

Structure of This Document

This document is broken down into a number of sections, all of which you should read. Some sections may have a “For Advanced Users” sub-section; you may safely skip these if you don’t feel like finding out exactly how things are set up in the Laboratory. The sections are:

1.Minimum System Requirements
2.Home Directory Configuration Files
3.Utility Programs (for advanced users)

Minimum System Requirements

These instructions assume that you have already installed the GNU Tools for Microsoft Windows, which you can use to compile, debug and run your programs as part of your laboratory experiments. Part of installing these tools involves checking that your computer meets the minimum computer specification. You may need the Administrators’s password for parts of this setup.

In addition, these instructions assume that this CD-ROM can be found as drive D: on your computer (/cygdrive/d within the Cygwin environment). If it is not, simply substitute the actual drive letter for the “d”. See the instructions for mounting the CD-ROM for more details.

Home Directory Configuration Files

The [List] unsw/common/labsetup-win32/home-config directory contains a number of files that you should copy to your Cygwin home directory. The procedure to do so is:

1. Log in to Microsoft Windows as usual.
2. Start a Cygwin command line window (usually by selecting Start » Program » Cygwin » Cygwin Bash Shell).
3. Assuming your CD-ROM can be found as drive D:, type in the following lines:
cd /cygdrive/d/unsw/common/labsetup-win32/home-config
cp dot.bashrc ~/.bashrc
cp dot.bash_profile ~/.bash_profile
cp gdbtk.ini ~/gdbtk.ini
cd ~
chmod u+w .bashrc .bash_profile gdbtk.ini
source .bash_profile
Remember that the “$” indicates the shell prompt (which might be something quite different from “$”): you don’t type it in. In addition, your browser might split up commands over a number of lines (depending on the width of your browser window); that does not mean you do the same!
4. Close the Cygwin command line window:
exit

Two of the files you have just copied (.bashrc and .bash_profile) are initialisation files for the shell command line. These files include useful aliases (pseudo-commands), various settings and a nice shell prompt.

Utility Programs (For Advanced Users)

The utils/unsw directory contains a number of scripts that are useful for maintaining the Digital Systems Laboratory. In particular, the insync script allows you to synchronise two directories, possibly over a network connection; this allows you, for example, to copy this CD-ROM to the hard drive for local student access. Please see the utils/unsw directory for more information on using these scripts.

Conclusion

Having gotten this far, you have successfully set up your computer’s environment under Microsoft Windows! Now you can proceed to setting up your environment under Linux, if applicable, or to the examples directory on this CD-ROM, or to something else…