Setting up development environment in Windows

Version 1 (Julien Rabin, 2011-05-16 07:26 pm)

1 1 Julien Rabin
h1. Setting up development environment in Windows
2 1 Julien Rabin
3 1 Julien Rabin
"download and install MSVC 2008":http://download.microsoft.com/download/A/5/4/A54BADB6-9C3F-478D-8657-93B3FC9FE62D/vcsetup.exe
4 1 Julien Rabin
5 1 Julien Rabin
"install cygwin":http://cygwin.com/install.html
6 1 Julien Rabin
7 1 Julien Rabin
the setup lets you select, which packages you want to have installed. You’ll need to add the following to the default selection:
8 1 Julien Rabin
* ruby,
9 1 Julien Rabin
* git (core files and optionally git-completion, git-gui and gitk),
10 1 Julien Rabin
* openssh (if want to be able to commit),
11 1 Julien Rabin
* Info-zip (used by the installer.rb script)
12 1 Julien Rabin
13 1 Julien Rabin
Optionally you can install an alternative terminal app (like rxvt), your preferred shell and command line text editor.
14 1 Julien Rabin
15 1 Julien Rabin
An advantage of using rxtv is that it allows you to select and copy text from the terminal. Once you download it, create a shortcut to it, then right click on this shortcut and enter the following in the Target filed:
16 1 Julien Rabin
17 1 Julien Rabin
code. C:\PATH\TO\cygwin\bin\rxvt.exe -sl 1500 -fn "Lucida Console-12" -bg black -fg grey -sr  -e C:\PATH\TO\cygwin\bin\bash --login -i
18 1 Julien Rabin
19 1 Julien Rabin
replacing the @C:\PATH\TO\@ with a path to your cygwin installation folder. You can modify these settings to customise the looks of your terminal.
20 1 Julien Rabin
(more on this  here: http://infrablue.tripod.com/cygwin.html and here: http://www.khngai.com/emacs/bash.php)
21 1 Julien Rabin
22 1 Julien Rabin
You will also probably want to put the path to cygwin\home
23 1 Julien Rabin
USERNAME in the @Start in:@ filed in the same window.
24 1 Julien Rabin
25 1 Julien Rabin
Once you have cygwin setup, follow the instructions here: http://redmine.jamoma.org/projects/jamoma/wiki/Installing_and_setting_up_GIT to set up git.
26 1 Julien Rabin
possible problems:
27 1 Julien Rabin
28 1 Julien Rabin
1. In windows vista and 7 you might encounter some permissions problems. To avoid them, always run cygwin as admisitrator. You can do it by right clicking on the shortcut icon and selecting Run As Administrator or you can permanently set it to run as administrator by selecting this option in the Compatibility tab of the application Properties dialog:
29 1 Julien Rabin
30 1 Julien Rabin
2. If you get something like this:
31 1 Julien Rabin
32 1 Julien Rabin
code. $ ruby build.rb Deployment clean
33 1 Julien Rabin
          1 [main] ruby 2540 C:\cygwin\bin\ruby.exe: *** fatal error - unable to remap \\?\C:\cygwin\lib\ruby\1.8\
34 1 Julien Rabin
i386-cygwin\etc.so to same address as parent: 0x190000 != 0x250000
35 1 Julien Rabin
Stack trace:
36 1 Julien Rabin
Frame         Function  Args
37 1 Julien Rabin
02408248  6102796B  (02408248, 00000000, 00000000, 00000000)
38 1 Julien Rabin
02408538  6102796B  (6117EC60, 00008000, 00000000, 61180977)
39 1 Julien Rabin
02409568  61004F1B  (611A7FAC, 6124355C, 00190000, 00250000)
40 1 Julien Rabin
End of stack trace
41 1 Julien Rabin
42 1 Julien Rabin
You’ll need to run ash.exe:
43 1 Julien Rabin
@:\PATH\TO\cygwin\bin\ash.exe@
44 1 Julien Rabin
45 1 Julien Rabin
then in the shell window:
46 1 Julien Rabin
code. cd /bin
47 1 Julien Rabin
./rebaseall
48 1 Julien Rabin
exit
49 1 Julien Rabin
50 1 Julien Rabin
(source http://dancarroll.org/blog/2010/12/cygwin-unable-to-remap/)
51 1 Julien Rabin
you might need to install ash and rebase first. You can do it by just running cygwins setup.exe (the same you used for the initial installation) and selecting the additional packages.