Basie Blog

A Lightweight Software Development Portal in Django

How To Install Basie On Windows XP

with one comment

Hi everyone. Here are the instructions for how to install Basie on Windows XP. They are a work in progress, so please leave comments with suggestions/feedback. Thanks.

NOTE: I know that this seems like a daunting process at first, but it is absolutely worth the effort. The basic outline is: 1. install dependencies, 2. set up the development environment, 3. download and configure Basie. The entire process should take about 20 minutes. Hopefully in the future this will be replaced by a Windows Installer (MSI).

ALSO NOTE: These instructions are for installing the current SVN version of Basie on a clean install of Windows XP. Additional changes may be required for different versions or setups.

Basie Windows XP Install Instructions:

1. The Basie installation process relies heavily on binaries being accessible via the system path. As such, it is advised that you write down the location where each dependency is installed (e.g. “Python 2.5.4 installed to C:\Python25″). You will need this information later, so you can save time and hassle by writing it all down as you go.

Section 1: Installing Dependencies

2. Install Python 2.5.4
   -Python Website: http://www.python.org
   -Release Website: http://www.python.org/download/releases/2.5.4/
   -direct links:
     -x86: http://www.python.org/ftp/python/2.5.4/python-2.5.4.msi
     -Win64-Itanium: http://www.python.org/ftp/python/2.5.4/python-2.5.4.ia64.msi
     -Win64-AMD64: http://www.python.org/ftp/python/2.5.4/python-2.5.4.amd64.msi

3. Install Setuptools for Python 2.5
   -package website: http://pypi.python.org/pypi/setuptools
   -direct link:
     -http://pypi.python.org/packages/2.5/s/setuptools/setuptools-0.6c11.win32-py2.5.exe#md5=cb0cd7b844bed5106aeb0d4583848b1f

4. Install Subversion 1.6.6
   -Subversion website: http://subversion.apache.org/
   -Tigris Binaries for Apache 2.2: http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=8100
   -direct link:
     -http://subversion.tigris.org/files/documents/15/46906/Setup-Subversion-1.6.6.msi

5. Install Subversion 1.6.6 Bindings for Python 2.5
   -direct link:
     -http://subversion.tigris.org/files/documents/15/46889/svn-python-1.6.6.win32-py2.5.exe

6. Install Subversion Development Libraries
   -direct link:
     -http://subversion.tigris.org/files/documents/15/46887/svn-win32-1.6.6_dev.zip
   -Extract ZIP to a permanent location (recommended location: your Subversion install directory, default: “C:\Program Files\Subversion”)

7. Install Subversion Berkeley DB Binaries (similar to above)
   -direct link:
     -http://subversion.tigris.org/files/documents/15/32472/db-4.4.20-win32.zip
   -Extract ZIP to a permanent location (recommended location: your Subversion install directory, default: “C:\Program Files\Subversion”)

8. Install Subversion Libintl Binaries (similar to above)
   -direct link:
     -http://subversion.tigris.org/files/documents/15/20739/svn-win32-libintl.zip
   -Extract ZIP to a permanent location (recommended location: your Subversion install directory, default: “C:\Program Files\Subversion”)

9. Install MinGW 5.1.6
   -MinGW Website: http://www.mingw.org/
   -direct link:
     -http://downloads.sourceforge.net/project/mingw/Automated%20MinGW%20Installer/MinGW%205.1.6/MinGW-5.1.6.exe

10. Install GetText 0.14.4 for Windows
    -GNUWin32 Website: http://gnuwin32.sourceforge.net/
    -GetText Website: http://gnuwin32.sourceforge.net/packages/gettext.htm
    -direct link:
      -http://downloads.sourceforge.net/project/gnuwin32/gettext/0.14.4/gettext-0.14.4.exe

11. Install Junction
    -Sysinternals website:
    -direct link:
      -http://download.sysinternals.com/Files/Junction.zip 
    -Extract ZIP to a permanent location (recommended location: your %windir%\system32 directory, default: “C:\Windows\System32″)

Section 2: Setting Up Development Environment

12. Ensure that all of the following directories are on the system path:
      -Python (default: “C:\Python25\”)
      -Subversion Bin (default: “C:\Program Files\Subversion\bin”)
      -MinGW *Bin* (default: “C:\MinGW\bin”)
      -GnuWin32 Bin (for gettext; default: “C:\Program Files\GnuWin32\bin”)
      -Junction (if not system32 directory)
    Recommended Steps:
      -Right click My Computer and go to properties
      -On the Advanced tab, click Environment variables
      -Under System Variables, double-click Path
      -Add any of the above directories that may be missing without quotation marks to the end of the path, seperated by semicolons
      -For example, appending: “C:\Python25\;C:\Program Files\Subversion\bin;C:\MinGW\bin;C:\Program Files\GnuWin32\bin”
      -Note: The exact directories must be specified for this to work.

13. Create SVN system environment variables for the following variables and directories (without quotation marks):
      -”SVN_DEV” = Subversion Development Libraries Directory (default: “C:\Program Files\Subversion\svn-win32-1.6.6″)
      -”SVN_BDB” = Subversion Berkeley DB Binaries Directory (default: “C:\Program Files\Subversion\db4-win32-4.4.20″)
      -”SVN_LIBINTL” = Subversion Libintl Binaries Directory (default: “C:\Program Files\Subversion\svn-win32-libintl”)
    Recommended Steps:
      -Right click My Computer and go to properties
      -On the Advanced tab, click Environment variables
      -Under System Variables, click New.
      -Add (without quotation marks) a variable named “SVN_DEV” with value “C:\Program Files\Subversion\svn-win32-1.6.6), etc.

14. Create a file named “distutils.cfg” in your pythondir\Lib\distutils (e.g. “C:\Python25\Lib\distutils\distutils.cfg”), containing the following:
    “[build]
    compiler=mingw32″

Section 3: Installing and Configuring Basie

15. Checkout Basie:
      -Open the command prompt (start->run->cmd)
      -cd to the directory where you would like to put basie
      -run svn co https://basieproject.org/stable/svn/basie/trunk basie

16. Fix Linkmedia:
      -Open basie/apps/linkmedia/management/commands/linkmedia.py in wordpad/IDLE
      -Replace “os.symlink(src,dst)” (~line 54) with:
        os.system(”junction \”" + dst + “\” \”" + src + “\”")

17. Fix SVN repository access: 
      -Open basie/apps/vcs/views.py in wordpad/IDLE
      -add “import platform” to the top (near line 6)
      -replace “active_repo = repo.Repo(django_repo.path)” (near line 32) with:
        if (platform.system() == “Windows”):
          active_repo = repo.Repo(django_repo.path.replace(”\\”,”/”).replace(”file://”,”file:///”))
        else:
          active_repo = repo.Repo(django_repo.path)

18. Run the bootstrap script:
      -From the comment prompt,
        -cd to the basie directory
        -run python bootstrap.py

19. Finish the install:
      -From the command prompt,
        -cd to the basie/bin directory
        -run:
          buildout.exe -v -c “c:\basie\buildout.dev.cfg”
          django syncdb
          django linkmedia
          django compilemessages

20. You’re done! You may now start the Basie Development Server by running “django runserver” from the basie/bin directory in the command prompt.

NOTE: If you have run into any errors along the way, please ensure that they are not due to character encodings. Wordpress tends to replace certain symbols (” and – in particular) with expected equivalents for literature, i.e. directional quotation marks and long dashes. There may be other substitutions that I am unaware of. If you’re still having trouble, feel free to send me an email: chadcogar[at symbol]hotmail[dot]com.

Written by chad

March 10th, 2010 at 1:20 pm

One Response to 'How To Install Basie On Windows XP'

Subscribe to comments with RSS or TrackBack to 'How To Install Basie On Windows XP'.

  1. What a good web-site and informative posts! Thanks :)

Leave a Reply