I may be doing some Divmod-esque development in the near future, so I figured I'd try to set it up in Windows (so I can code while waiting in my 8000-hour Warcraft battleground queues). Glyph walked me through the process today, so I figure I'd write it down in case I'd ever have to do it again. And this documentation, much like every other bit of Windows documentation I've ever seen, is replete with screenshots. However, to make it less annoying, I've linked to some of those screenshots instead of just plunking them down with an IMG tag.
Edit 2 Nov 2006: Links for OpenSSL and PyOpenSSL have been changed.
Useful tools you may want before you start this.
- PuTTY - SSH utils for Windows. Download the Windows installer, rather than download all the programs separately.
- Python 2.4
- OpenSSL and PyOpenSSL - these are hosted by Glyph, and sometimes it goes down, so here are alternate download sites: OpenSSL, PyOpenSSL (This is a FileFront link - since it's not really game-related, they may take it down. You can also try to build it yourself.)
- Python for Windows extensions
Install Python TimeZone Library
- Download PyTZ
- Extract the compressed file (see screenshot)
- Create Windows binary. (see screenshot) Open up a CMD.EXE shell prompt, go to where PyTZ was extracted, and type:
C:\path\to\directory> python setup.py bdist_wininst
- In the extracted folder, there will be one more folder called "dist" (see screenshot). It contains the installer, which you can then use to install PyTZ (see screenshot).
Set-up Twisted development environment:
- Set up your environment variables (right-click "My Computer" --> Advanced Tab --> Environment Variables)
- Put PuTTY in your system's PATH (C:\Program Files\PuTTY) variable
- Set your user's SVN_SSH variable to "plink"
- Make the correct directory structure and check out Divmod trunk from SVN. Open a command prompt (CMD.EXE) and:
C:\> mkdir Projects C:\> cd Projects C:\Projects> mkdir Divmod C:\Projects> cd Divmod C:\Projects\Divmod> svn co http://divmod.org/svn/Divmod/trunk
Go to the Divmod\trunk\Combinator folder using explorer. There is a file there called divcmd.bat, which is the Divmod Command Shell. From now on, instead of using CMD.exe, use this divcmd.bat instead (you can make a shortcut for it with the spiffy Divmod icon too, if you like).
- Set up chbranch so you can use it to check out branches from SVN, etc. Open up a divcmd.bat shell (see screenshot):
C:\Projects> chbranch Divmod trunk
- Checkout Twisted. In the same divcmd.bat shell (see screenshot):
C:\Projects> chbranch Twisted trunk svn://svn.twistedmatrix.com/svn/Twisted/trunk
Set up Win32 Emacs for Twisted development (optional, if you installed Win32 Emacs):
- Checkout TwistedEmacs. In a divcmd.bat shell, type the following:
chbranch TwistedEmacs trunk svn://svn.twistedmatrix.com/svn/TwistedEmacs/trunk
- Add the following lines to your .emacs file (usually in C:\Documents and Settings\[username]\Application Data\) (see screenshot):
(eval (read (format "(progn %s )" (shell-command-to-string (format "python %s/%s" "C:" "Projects/Divmod/trunk/Combinator/environment.py emacs"))))) (load-file "C:\\Projects\\TwistedEmacs\\trunk\\twisted-dev.el")
Change your twisted-dev group settings. Hit M-x customize-group: twisted-dev:
Make the scratch directory, or set it to be whatever directory you'd like.