Getting Started on Windows

From GCD
Revision as of 16:14, 12 April 2010 by Adia (talk | contribs)
Jump to navigation Jump to search

Step-by-step guide to setting up a development environment on Windows

Ralf Haring

5 July 2008

[The assumption in this document is that everything be installed in one directory - D:\maelstrom.]

[This document is located in the source code at pydjango\docs\Getting_Started_on_Windows.txt as well as available online at http://maelstrom.walton.uark.edu/wiki/Getting_Started_on_Windows]


To run a local copy of the web site:

  1. Download the latest Python 2.4.X (currently 2.4.4) from http://www.python.org/download/releases . Run python-2.4.4.msi and install to D:\maelstrom\Python24 . Add D:\maelstrom\Python24 to the end of the PATH environment variable.
  2. Download Tortoise SVN (currently 1.5.0) from http://tortoisesvn.net/downloads . Run TortoiseSVN-1.5.0.13316-win32-svn-1.5.0.msi and install to D:\maelstrom\TortoiseSVN . Restart of OS needed.
  3. Create D:\maelstrom\django . Right click on the dir and choose SVN Checkout. Enter the URL http://code.djangoproject.com/svn/django/trunk , choose Revision 7838 , and click OK. Create a new environment variable PYTHONPATH and set it to D:\maelstrom\django .
  4. Download the latest MySQL 5.0.X (currently 5.0.51b) from http://dev.mysql.com/downloads/mysql/5.0.html#win32 . Run mysql-essential-5.0.51b-win32.msi and install to D:\maelstrom\MySQL . In the configuration wizard, choose Standard Configuration, check Install As Windows Service and Include Bin Directory in Windows PATH.
  5. Download the latest MySQL python module for python 2.4 (currently 1.2.2) from http://sourceforge.net/project/showfiles.php?group_id=22307 . Run MySQL-python-1.2.2.win32-py2.4.exe . It should autodetect the Python install dir from step 2.
  6. Download the latest database dump from http://www.comics.org/beta/GCDData.gz. (WARNING: If downloading in Internet Explorer, it will unzip it for you but won't remove the gz extension.) Unzip it to D:\maelstrom\GCDData . Current unzipped file size is around 397 MB.
  7. Create D:\maelstrom\gcd . Right click on the dir and choose SVN Checkout. Enter the URL https://grandcomic-book.svn.sourceforge.net/svnroot/grandcomic-book/pydjango , choose HEAD Revision, and click OK.
  8. Create a file named D:\maelstrom\gcd\settings_local.py with the following line:
    DATABASE_NAME = 'gcd_dev'
    You can use this to override other settings as well - consult settings.py for the available variables.
  9. Run "mysql -u root -pXXXXX" where XXXXX is the root password set in step 5. Note that there is no space between -p and XXXXX. Enter "CREATE USER gcd_dev;" , then "GRANT ALL ON *.* TO 'gcd_dev'" , and then "quit;" .
  10. Run "mysql -u gcd_dev < D:\maelstrom\GCDData" to import the database.
  11. Run "python D:\maelstrom\gcd\manage.py syncdb" to create the rest of the tables needed by the web site apps. When you are asked about creating an admin user, you can answer "yes" and enter the required info. You can also create the user later if you want.
  12. Run "python D:\maelstrom\gcd\manage.py runserver" to start the web site.
  13. Connect to http://127.0.0.1:8000/gcd/
  14. Read D:\maelstrom\gcd\README.txt for a primer on the source code

Note that while the web site should be functional at this stage, not all actions will work correctly. See how to initialize the database for further steps required.


To change the web site code:

  1. Create a sourceforge user and join project http://sourceforge.net/projects/grandcomic-book/
  2. Edit the files in D:\maelstrom\gcd and test on the local machine. Changed files will appear with a red icon instead of green.
  3. When ready to commit a change, right click and choose SVN Commit. Enter a description of the change and your sourceforge user name and password.