MSWin users will need the Cygwin development environment
in order to get a local copy of NEURON's Subversion repository
and / or compile NEURON from source code.
-
Go to http://www.cygwin.com
and download setup.exe
To avoid cluttering up my desktop,
I made a special directory on my hard drive called
c:\installed\cygwin and put cygwin.exe in there.
-
Run setup.exe as yourself (not as Administrator).
- Select "Install from Internet".
- Specify the Root Install Directory to be c:\cygwin
- Install for "All Users" and set the "Default Text File Type" to be Unix / binary.
- Specify your preferred Local Package Directory (I chose c:\installed\cygwin).
This is where the cygwin installer is going to put a folder that has a long, ugly name.
You're not going to want to see this folder on your desktop.
- Choose a download site that is nearby. ftp sites will probably do faster downloads than http.
I chose ftp://ftp.gtlib.gatech.edu
- Select Packages. Accept the defaults except for the following:
- Archive--get zip and unzip
- Devel--change to Install
- Editors--get what you're familiar with. I chose vim.
- Net--accept the Default selections, but check to make sure openssl is selected.
openssh doesn't seem to be necessary.
- Shells--get rxvt: VT102 terminal emulator for both X and Windows
In each of these cases, be sure to get the "Bin" (binary), not the "Src" (source).
- Cygwin Setup may select additional packages to "meet dependencies"; accept the selections.
- At the last step in installation, the installer asks if you want to
"Create icon on Desktop" or "Add icon to Start Menu".
You will not be using these icons, so uncheck the boxes, then click the Finish button.
Configuring Cygwin
Set up an rxvt shortcut
This will be very handy for quickly creating several shell terminals.
- Open Windows Explorer, go to c:\cygwin\bin, and create a shortcut to rxvt.exe
Move this shortcut to your desktop.
-
Right click on the shortcut icon, select Properties, and change its "Target" string to
c:\cygwin\bin\rxvt.exe -fg black -bg white -sl 1000 -e bash
(that "sl" is lower case "SL", not an s followed by the number 1).
This will give you an rxvt terminal with black text on white background,
which runs under the bash shell, and has 1000 lines of scrollable output.
-
Click on "Apply", then "OK" to close the properties window.
Set up your home directory and bash shell environment
- Double click on the rxvt.exe shortcut to open a bash shell window.
In this window, type
cd /
/bin/ls
That should produce the following output:
Cygwin.bat Cygwin.ico bin cygdrive etc lib proc sbin srv tmp usr var
-
Type the following commands:
/bin/mkdir home
cd home
/bin/mkdir yourname
where "yourname" will be the name of your "home" directory under Cygwin.
There must be no spaces in whatever you choose for "yourname".
-
Next,
cd yourname
and use a text editor to create a file called .bashrc that has these contents:
export PATH=/usr/bin:$PATH
export HOME=/home/yourname
export PATH=$HOME/bin:$PATH
cd
Save the file and close the rxvt window.
-
Test this by opening Cygwin's rxvt window (rxvt.exe shortcut on desktop!)
and executing this command:
pwd
It should return
/home/yourname
Close the rxvt window.
Configuring Cygwin
- copy the "rxvt-native" link to the Desktop from the Cygwin program group in the Start menu
- double click on this link. There is NO need to tinker with the "target" of this link.
When you click on rxvt-native for the first time, Cygwin creates the necessary "." config files in your home directory and sets up your environment for you. After it finishes, just execute the commandto see the long PATH that Cygwin created. Then try
which reveals that you're in
/home/name, wherenameis your MSWin login name.will return
which confirms that your Cygwin home directory is in the directory that MSWin knows as
c:\cygwin\homeWhich makes me wonder: for how long now has Cygwin been capable of doing all these things? I suspect that the answer may be "quite a while."
New and improved is the enemy of good enough