Setup Windows

Your Computer

What is Your Computer?

Your computer is the thing you are reading and typing on :) You should know a few things about it before we go much further.

Why do I need my Computer?

Starting development work requires at least a passing familiarity with what is happening inside your machine, what software is installed, and where to look next for help!

Get information about your computer!

  1. Figure out your OS and version
  2. An Administrator type account is pretty helpful
  3. Check to see that you have at least 1 Gb of disk space left.
Control Panel > System
../_images/windows_sys.jpg

Verify It Works!

Know your OS and version number? Good!

Command Line Interface

What is a Command Line Interface (CLI)?

A command line interface (CLI) is way of interacting with a computer by typing commands.

Why do I need a Command Line Interface (CLI)?

Many development tools don’t have graphic user interfaces–they only have command line interfaces. Windows comes with a command line interface called a command prompt. Unfortunately, it does not support all of the tools we want to use.

Get a Command Line Interface (CLI)!

  1. One of the easiest ways to get all the tools at once is from mysysGit
  2. Download and install msysGit-fullinstall from http://code.google.com/p/msysgit/downloads/list
  3. This will install MSYS/Mingw/GitBash (it has many names!).

Note

If you are not an administrator on your machine, you might have to choose an alternate path for install rather than C:\Git, such as C:\Documents and Settings\yourname\Git\.

You will also want to make the MSYS/MINGW bash window behave in a saner way. After opening it, ‘right-click’ on the title bar, and select ‘properties’. Under ‘Edit Options’, enable ‘Quick Edit Mode’.

Verify It Works!

In your command window:

$ bash --version

gedit

What is gedit?

gedit is a cross-platform, syntax-highlighting text editor.

Why do I need gedit?

To write your code in! Word is a fine program, but it is not a text editor.

Verify It Works!

After installing, start gedit up by clicking on its icon, typing gedit from your cli or the like.

Suggested configuration:

In the preferences window

  • view, turn on:

    • display line numbers
    • display right margin
    • highlight matching bracket
    • highlight current line
  • editor:

    • change tab with to 4
    • check the box to insert spaces instead of tabs
  • font & colors:

    • choose a good monospace editor font
    • choose a color scheme (Gregg likes Cobalt)
  • plugins

    • checkupdate
    • code comment
    • drawspaces
    • filebrowser
    • indentlines
    • python console

Once you are satified, restart gedit. If it looks similar to the screenshot below, you are done!

../_images/configured-gedit.png

python

What is python?

Python is a general purpose, dynamically-typed, strongly-typed, interpreted computer programming language.

Why do I need python?

Well, this is a Python progammming workshop!

Get python!

  1. Go to http://python.org/download/ and download the latest version of Python 2.7 (2.7.1 at the time of writing). Unless you know otherwise, get the “Windows Installer” version, and not the “Windows X86-64 Installer” version.
  2. Start up a command prompt by clicking on the Start menu, clicking the Run... option, typing cmd, and hitting enter. If you are using Windows Vista, you should click on the Start menu, type cmd into the Search field directly above the Start menu button, and click on cmd in the search results above the Search field.

Test your Python install by typing \Python27\python.exe and hitting enter. You should see something like:

Python 2.7.1 (r271:86832, ...) on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

To exit the Python prompt, type exit() and press Enter. This will take you back to the Windows command prompt.

We also would like to make sure our python is available from the msys/mgit/mingw cli. After starting up msys/mgit:

$ echo '#!/bin/sh' > /bin/python
$ echo 'C:/Python27/python.exe $*' >> /bin/python
$ echo 'export PATH=$PATH:/c/Python27/Scripts' > ~/.profile
$ source ~/.profile

From here on, if you are in the msys/mgit/mingw cli, you can type python to get a python prompt, should you need one!

Verify It Works!

After install, show your guide that use can start up python. You should see something like:

Python 2.7.1 (r271:86832, ...) on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

Type exit() to return to your terminal/shell. Don’t worry if your version is different than the one shown here. Any 2.x series python 2.5 or higher (i.e., 2.5, 2.6, 2.7) should be fine!