Build Environment for SquidNT

To compile Squid a little subset of native WIN32 Unix tools is needed.

The following steps show how configure a working environment based on Microsoft Visual C++:
  1. Install Visual C++ 6.0 and apply its Service Pack 5
  2. Download and install MSYS from www.mingw.org
  3. Add the bin directory of MSYS to your system PATH
  4. Download and install latest stable Windows build of CVSNT from www.cvsnt.org/wiki/Download
  5. Add the "C:\Program Files\GNU\WinCvs 1.2" directory to your system PATH
  6. Download and install ActivePerl from www.activestate.com, let setup to add it to your system PATH
  7. Download latest UnxUtils.zip and UnxUpdates.zip from Karl M. Syring GNU utilities for Win32 page
  8. Extract only gawk.exe, uudecode.exe and uuencode.exe and put they in bin directory of MSYS
  9. Set in the Executable files path of Your Visual C++ the Perl and MSYS bin directory (Tools -> Options -> Directories Tab)
  10. Install the latest Core SDK (64 bit support is not needed) from Platform SDK Site and after the installation register it in Visual Studio with the Register PSDK Directories with Visual Studio shortcut.
  11. Only if you are running Windows NT 4.0, check the presence of psapi.dll in the winnt\system32 Windows NT directory, if missing you can download and install it from download.microsoft.com
  12. If you are running Windows 2000 or later, install the Windows Support Tools, located on the support\tools directory of the Windows installation CD-ROM
  13. Download MAN2HTML2 and put the executable somewhere in the system PATH.
Now you should be able to build SquidNT with Microsoft VisualStudio.

The following steps show how configure a working environment based on MinGW:
  1. Download and install the latest MSYS, MinGW, W32api, MSYS Developer Tool Kit and mingw-utils packages from www.mingw.org
  2. Download latest UnxUtils.zip and UnxUpdates.zip from Karl M. Syring GNU utilities for Win32 page
  3. Extract only uudecode.exe and uuencode.exe and put they in bin directory of MSYS
  4. Only if you are running Windows NT 4.0, check the presence of psapi.dll in the winnt\system32 Windows NT directory, if missing you can download and install it from download.microsoft.com
  5. If you are running Windows 2000 or later, install the Windows Support Tools, located on the support\tools directory of the Windows installation CD-ROM
  6. Download MAN2HTML2 and put the executable somewhere in the system PATH.
Now you should be able to build SquidNT with MinGW.

CVS Environment for SquidNT Developers

To work on Squid sources, a working CVS SSH based environment is needed. In Cygwin and MinGW environments all needed components are already available.
For details, see SourceForge.net Site Docs about CVS and SSH usage.

The following steps show how to configure it in a Microsoft Visual C++ based environment:
  1. Take a look on Squid Development projects CVS repository
  2. Download and install WinCvs (see before)
  3. Download ssh-1.2.14-win32bin.zip
  4. Create directories for the SSH executables and config files
    md c:\usr\local\bin
    md c:\etc
  5. If you don't have a 'home' directory for yourself, create it now. For example, my home directory is c:\users\serassio. In the home directory, create a .ssh directory -- this is where your ssh keys will be stored.
    md c:\users
    md c:\users\serassio
    md c:\users\serassio\.ssh
    Warning: All directories must be in the same logical drive !
  6. Unpack the ssh-1.2.14-win32bin.zip archive into (for example) c:\usr\local\bin
  7. Add c:\usr\local\bin to your PATH.
  8. Using your favorite text editor, create a PASSWD file in c:\etc. The format of a line the file is:
    serassio:x:1:10:Guido Serassio:/users/serassio/:/winnt/system32/cmd.exe
    The important items are #1, #6. #1 is the login name on the local machine. #6 is your home directory. #7 is the command shell on your system (command.com on Win95 and cmd.exe on NT) -- but since it is not a *NIX shell, it's probably useless to put it in there :-).
  9. Set your HOME environment variable to the same directory you entered as item #6 in the /etc/passwd file:
    HOME=c:\users\serassio
  10. Generate an SSH keypair. Unfortunately, there is a bug in the ssh-keygen tool on ssh-1.2.14-win32bin.zip archive: if you don't specify a key comment, it try to auto generate a comment in the usual form username@machine, but it fails on gethostname call, without produce a SSH key par. So you must specify a comment when run ssh-keygen, for example, to generate a keypar with the usual comment:
    ssh-keygen –C %username%@%computername%
    Alternately you can use the ssh-keygen executable from a different SSH archive. For example, you can use ssh-keygen from CygWin. You must set on /etc/passwd of CygWin the same home directory, like:
    serassio::1000:513:Serassio Guido,S-1-5-21-1214440339-1682526488-1708537768-1000:/cygdrive/c/users/serassio:/bin/bash
    After running this command, verify that identity and identity.pub files are present in your .ssh directory.
  11. Test your connection to SourceForge:
    ssh -l username projectname.sourceforge.net
    Of course, substitute your SourceForge username and projectname for username and projectname in the command above.
  12. Accept the key from SourceForge, and when prompted, enter your password for SourceForge.
  13. On your user page at SourceForge, you should find a place to upload your SSH public key. Copy the file identity.pub into the text entry box on the page -- be sure not to add any line breaks or it will not work.
  14. After the requisite 6 hour wait, you should be able to use CVS with SSH without using your password.
  15. Set the system environment variable: CVS_RSH=ssh
Now you should be able to use CVS from NT command line.





Squid Now!