Thursday, February 5, 2009

Setting up a developer environment in Windows for CS373.

Before I switched over to Ubuntu, I had banged out this little tutorial on setting up a developer environment for this class in windows. I'm gonna go ahead and post this just in case someone finds it helpful.

NOTE: I had to do these things for windows 7, but if you are using Vista or XP this should be able to get you up and running as well.
--
1. Grab Cygwin: http://www.cygwin.com/setup.exe
When you get to the "Cygwin Setup - Select Packages", under "Category" the first line you should see is "All" and then two arrows spinning around on each other and then "Default". Click on the two arrows until "Default" changes to "Install". This will be a large download so give it some time.

Why cygwin? Cygwin gives you a unix-like terminal in the Windows environment. You can use the windows command prompt if you want but in my opinion it pales in comparison. Plus, by downloading cygwin you'll get a lot of useful utilities like ssh installed automatically.
--
2. Grab Python 2.52: http://www.python.org/download/releases/2.5.2/
Be sure to add the python directory to your PATH in Environment Variables, which can be found in System Properties under the 'Advanced' tab.

Test to see if python is installed correctly by opening cygwin and typing "python". If you see "bash: python: command not found" then something went wrong.
--
3. Install Subversion: http://svn1clicksetup.tigris.org/files/documents/3106/33794/Svn1ClickSetup-1.3.3.exe

This part is easy, just run the exe and it should do everything for you.

Test to see that subversion was installed by opening cygwin and typing "svn".
--
4. Fix buggy things with Cygwin. This probably only applies to Vista and 7 users.

The first problem I had was with the Cygwin Bash Shell being hidden and not having correct permissions. Fixing this allows you to save changes to settings, such as editing the colors or font of the terminal or turning on quickedit mode.
i) Make sure that you have hidden folders turned on. Open windows explorer and go to 'Tools'/'Folder Options...' (press 'alt' to bring up the menu bar if you can't see it). Click the 'View' tab and you should find the option in there.
ii) go to C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Cygwin. Right click on "Cygwin Bash Shell" and click 'Properties'. Go to the 'Security' tab and give full control to Everyone.
iii) Test to see that this worked by opening cygwin, Clicking the black C in the upper left, click 'Properties' and then check 'QuickEdit Mode'. If you don't get an error message then you are good to go.

The other issue I had was with getting subversion to work. I kept getting an error every time I tried to import. Following this guide will fix the problem: http://www.naik-online.com/cygwinremapaddress



The other issue I had was with getting subversion to work. I kept getting an error every time I tried to import. Following this guide will fix the problem: http://www.naik-online.com/cygwinremapaddress

2 comments:

  1. Why do you have multiple copies of each numbered entry?

    Also, check out mintty: http://code.google.com/p/mintty/ which can give you a terminal that's about a million times better than the Windows command prompt that cygwin uses, at least on XP, and probably on Vista as well.

    ReplyDelete
  2. Whoops! Not sure what happened there, something went wrong when I pasted that stuff in.

    As for mintty, I agree. Windows command prompt is horrendous and irritating. If you set up cygwin following my directions mintty gets installed automatically.

    ReplyDelete