« Previous - Version 10/24 (diff) - Next » - Current version
Robert Terzi, 12/01/2013 12:43 pm


Setting up a Win32 Development Environment

Library and Runtime Prerequisites

Get and install the following in this order:

  1. Python 2.7.x
  2. PyGTK Win32 All-in-one installer
  3. PyLibXML2
  4. PyWin32
  5. PySerial

Notes:

  • For any of the above, be sure to get the latest version, and the py27 variant if/when available.
  • If you are on 64-bit Windows, be sure to either download the 32 or 64-bit variants of each of the above. They must all match bitness in order to work together.
  • On Windows 7 (and possibly other newer versions of Windows with UAC) the PyLibXML2 installer will generate an error during the installation about not being able to modify the runtime directory.

When everything is installed, you will want to make sure that Python is in your system PATH variable:

Windows XP

  • On the Desktop or in the Start menu, right-click on My Computer and choose Properties
  • In the dialog that opens, on the Advanced tab, click on Environment Variables
  • Under System variables, find Path, select it, and then edit Edit
  • At the end of the existing value, add exactly this string: ;C:\Python27 (obviously adjust this path if you installed it elsewhere. Don't forget the leading semicolon)
  • Click the OK buttons until you're done.

Windows Vista/7

  • In the Windows menu, right-click on the Computer item and choose Properties
  • Click on Advanced System Settings on the left
  • In the dialog that opens, click on Environment Variables
  • Under System variables, find Path, select it, and then edit Edit
  • At the end of the existing value, add exactly this string: ;C:\Python27\bin (obviously adjust this path if you installed it elsewhere. Don't forget the leading semicolon)
  • Click the OK buttons until you're done.

CHIRP Development Process

Get and install the mercurial source code management tool:

Clone the repository

The next step is to download a copy of the repository. This is done from the command-line, and will create a chirp.hg/ directory in your current directory. Thus, you should change to the place you want it to be first. For example:

C:\Users\Foo> cd \MyWorkspace
C:\MyWorkspace> hg clone http://d-rats.com/hg/chirp.hg

Run chirp

Python should be in your search path from the install, but if not, put it in the system PATH environment variable. Once you do that, you should be able to enter the directory that was created in the clone step above, and run chirpw with python:

C:\MyWorkspace> cd chirp.hg
C:\MyWorkspace\chirp.hg> python chirpw

Setting up a Win32 Build Environment to create chirp .exe files

The following notes are for setting up a chirp build environment on a Win32 system, that can be used to create chirp .exe files and the installer for running on other Win32 systems without requiring a Python environment. Note: it is probably best to use the 32 bit versions of all of the components if your intent is to build an .exe that will work on the widest range of Windows systems.

  1. Follow the directions above to create a working chirp development environment
  2. Install py2exe - This utility creates .exe files from python environments. See http://www.py2exe.org/
  3. Install cygwin - Cygwin provides a Unix/Linux like environment on a Windows system using the freely available GNU tools. See http://www.cygwin.com/
    1. During the cygwin installation, make sure zip and unzip are installed (from the Archive group) to provide the command line tools that can be used to manipulate ZIP files.
  4. install NSIS - The free Nullsoft Scriptable Install System is used to create Windows installer packages. These are the .exe's that most users will download to install chirp on a Windows system. See http://nsis.sourceforge.net/

Creating Win32 .exe files

Follow the above instructions to setup a chirp build environment on a Windows system.

  1. Launch Cygwin Terminal to get a command prompt.
  2. cd to the chirp.hg directory where your sources are.
  3. run ./build/make_Win32_build.sh
  4. The output in winds up in c:\cygwin (To Be Verified)