update all compilers to support SDK 7.1

- remove dependency on specific vcredist version (thanks Pierre Joye)
- path changes in shell scripts
- bump cmake to 2.8.6
- use specific mozilla-build 1.6 toolchain
- remove 7zip from glazier as it is now available in mozilla-build
diff --git a/.gitignore b/.gitignore
index 52ad229..312d639 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,8 +7,5 @@
 bits/http*
 bits/ftp*
 bits/*.iso
-bits/npp*.7z
-bits/icu4c*
-bits/openssl-*
-bits/otp_src_*
-bits/zlib-*
\ No newline at end of file
+bits/*.7z
+
diff --git a/README.md b/README.md
index d61e181..1462ad8 100644
--- a/README.md
+++ b/README.md
@@ -28,26 +28,25 @@
         aria2c.exe --force-sequential=false --max-connection-per-server=1  --check-certificate=false --auto-file-renaming=false --input-file=downloads.md --max-concurrent-downloads=5 --dir=bits --save-session=bits/a2session.txt
          cd bits && md5sum.exe --check md5sums.txt
 
-# Install Compilers    
+# Install Compilers
 ################################################################################
 Due to size, these are not downloaded in the bundle apart from
 mozilla & cygwin setup.
 
-* Install Windows SDK 7.0 either 32 or 64bit for your platform
-    [win7sdk_32bit] or [win7sdk_64bit]
+* Install Windows SDK 7.1 either 32 or 64bit for your platform using
+[win71sdk_websetup] or a downloaded [win71sdk_iso]
 * Run Windows Update for latest patches
 * Reboot
 * Download Mozilla toolkit from [mozbuild] and install per defaults
 * Install [cygwin] components, at least:
     * devel: ALL
-    * editors: vim or emacs 
+    * editors: vim or emacs
     * utils: file
 
 [cygwin]: http://www.cygwin.com/setup.exe
-[msvc++]: http://download.microsoft.com/download/E/8/E/E8EEB394-7F42-4963-A2D8-29559B738298/VS2008ExpressWithSP1ENUX1504728.iso
-[win7sdk_32bit]:	http://download.microsoft.com/download/2/E/9/2E911956-F90F-4BFB-8231-E292A7B6F287/GRMSDK_EN_DVD.iso
-[win7sdk_64bit]:	http://download.microsoft.com/download/2/E/9/2E911956-F90F-4BFB-8231-E292A7B6F287/GRMSDKX_EN_DVD.iso
-[mozbuild]: http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-Latest.exe
+[win71sdk_websetup]: http://www.microsoft.com/download/en/confirmation.aspx?id=8279
+[win71sdk_iso]:	http://go.microsoft.com/fwlink/?LinkID=191420
+[mozbuild]: http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-1.6.exe
 
 # Initial Setup of Environment
 ################################################################################
@@ -64,32 +63,33 @@
         06/09/2011  10:41 p.m.    <SYMLINKD>     bin [z:\r\glazier\bin]
         06/09/2011  10:41 p.m.    <SYMLINKD>     bits [z:\r\glazier\bits]
         03/09/2011  11:00 a.m.    <DIR>          release
-        06/09/2011  10:40 p.m.    <SYMLINKD>     SDK [C:\Program Files\Microsoft SDKs\Windows\v7.0]
+        06/09/2011  10:40 p.m.    <SYMLINKD>     SDK [C:\Program Files\Microsoft SDKs\Windows\v7.1]
         06/09/2011  12:19 a.m.    <SYMLINKD>     tmp [C:\Users\couch\AppData\Local\Temp]
-        06/09/2011  10:40 p.m.    <SYMLINKD>     VC [c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\..]
+        06/09/2011  10:40 p.m.    <SYMLINKD>     VC [c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\..]
 
 
 # Install downloaded tools
 ################################################################################
+
+* copy [vcredist] to `%relax%/` for later use by Erlang and CouchDB builds
+
 The express solution is just to use 7zip to unpack [glazier tools](https://github.com/downloads/dch/glazier/toolbox.7z)
  inside `%relax%`. Or do it manually for the same result:
 
-* Download [7zip] to `%relax%/7zip`
+* Add 7zip from `c:\mozilla-build\7zip` to your path
 * Innosoft's [isetup] to `%relax%/inno5`
 * Nullsoft [NSIS] Installer to `%relax%/nsis`
 * Add 7zip, Inno5, and nsis to the user environment PATH
 * using 7zip, extract and rename [nasm] to `%relax%/nasm`
 * using 7zip, extract and rename [cmake] to `%relax%/cmake`
 * `mkdir strawberry && cd strawberry` then using 7zip, extract Strawberry [Perl]
-* copy [vcredist] to `%relax%/` for later use by Erlang and CouchDB builds
 
 [perl]: http://strawberryperl.com/download/5.12.2.0/strawberry-perl-5.12.2.0-portable.zip
 [nasm]: http://www.nasm.us/pub/nasm/releasebuilds/2.09.07/win32/nasm-2.09.07-win32.zip
-[cmake]: http://www.cmake.org/files/v2.8/cmake-2.8.5-win32-x86.zip
-[vcredist]: http://download.microsoft.com/download/5/D/8/5D8C65CB-C849-4025-8E95-C3966CAFD8AE/vcredist_x86.exe
+[cmake]: http://www.cmake.org/files/v2.8/cmake-2.8.6-win32-x86.zip
+[vcredist]: http://download.microsoft.com/download/1/6/5/165255E7-1014-4D0A-B094-B6A430A6BFFC/vcredist_x86.exe
 [nsis]: http://download.sourceforge.net/project/nsis/NSIS%202/2.46/nsis-2.46-setup.exe
 [isetup]: http://www.jrsoftware.org/download.php/is-unicode.exe
-[7zip]: http://downloads.sourceforge.net/sevenzip/7z465.exe
 
 # wxWidgets
 ################################################################################
@@ -124,7 +124,7 @@
 Our goal is to get the path set up in this order:
 
 1. erlang and couchdb build helper scripts
-2. Microsoft VC compiler, linker, etc from Windows SDK 7.0
+2. Microsoft VC compiler, linker, etc from Windows SDK
 3. cygwin path for other build tools like make, autoconf, libtool
 4. the remaining windows system path
 
@@ -234,7 +234,6 @@
         tar xzf bits/57a6ad20eae9.tar.gz
         cd ./tracemonkey-57a6ad20eae9/js/src
         autoconf-2.13
-        export CXXFLAGS='-D_BIND_TO_CURRENT_VCLIBS_VERSION=1'
         ./configure --enable-static --enable-shared-js
         make
 
@@ -245,7 +244,6 @@
         tar xzf bits/js185-1.0.0.tar.gz
         cd ./js-1.8.5/js/src
         autoconf-2.13
-        export CXXFLAGS='-D_BIND_TO_CURRENT_VCLIBS_VERSION=1'
         ./configure --enable-static --enable-shared-js
         make
 
diff --git a/bin/build_curl.cmd b/bin/build_curl.cmd
index d8b40f9..16a0dc1 100755
--- a/bin/build_curl.cmd
+++ b/bin/build_curl.cmd
@@ -28,7 +28,6 @@
 set INCLUDE=%INCLUDE%;%SSL_PATH%\include;%SSL_PATH%\include\openssl;

 set LIBPATH=%LIBPATH%;%SSL_PATH%\lib;

 set LIB=%LIB%;%SSL_PATH%\lib;

-set CL=/D_BIND_TO_CURRENT_VCLIBS_VERSION=1

 vcbuild /useenv /upgrade /platform:Win32 lib\libcurl.vcproj

 vcbuild /useenv /platform:Win32 lib\libcurl.vcproj "Release|Win32"

 xcopy lib\Release\libcurl.lib lib\ /y

diff --git a/bin/build_icu.cmd b/bin/build_icu.cmd
index 3894acb..15bc1e8 100755
--- a/bin/build_icu.cmd
+++ b/bin/build_icu.cmd
@@ -9,30 +9,12 @@
 if exist "%icu_path%" rd /s/q %icu_path%

 7z x "%relax%\bits\icu4c-*src.zip" -o%relax% -y > NUL:

 pushd %icu_path%

-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

-:: in ICU, the data DLL icudt44.dll built by VC++ is actually a stub, and it

-:: gets modified and expanded later on. The stub doesn't compile correctly under

-:: BIND_TO_CURRENT_VCLIBS_VERSION so we first compile it without this flag to

-:: avoid this error:

-:: 1>   Creating library ..\..\lib\icudt.lib and object ..\..\lib\icudt.exp

-:: 1>stubdata.obj : error LNK2001: unresolved external symbol __forceCRTManifestCUR

-:: 1>..\..\bin\icudt44.dll : fatal error LNK1120: 1 unresolved externals

-:: try adding stubdata.c int __forceCRTManifestCUR=0; or similar

-:: TODO can we try using --with-data-packaging=archive to reduce ICU size?

-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

-set icu_source=%icu_path%\source

-set CL=

-vcbuild /useenv /platform:Win32 /M8 %icu_source%\stubdata\stubdata.vcproj "Release|Win32"

-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

-:: set CL to resolve manifest binding issues & virtualisation hack in ld.sh#171

-set CL=/D_BIND_TO_CURRENT_VCLIBS_VERSION=1

 vcbuild /useenv /platform:Win32 /M8 %icu_source%\allinone\allinone.sln "Release|Win32"

 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

 :: trying this on cygwin instead of windows, to compile with current vclibs

 :: doesn't actually build the data DLL correctly - YMMV

 :: use .tgz package & untar

 :: start SDK setenv.cmd /release /x86

-:: set CL=/D_BIND_TO_CURRENT_VCLIBS_VERSION=1

 :: call \cygwin\cygwin.bat

 :: # check path export PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin

 :: cd $RELAX/icu442/source

diff --git a/bin/build_openssl.cmd b/bin/build_openssl.cmd
index 2a3978a..413a3fc 100755
--- a/bin/build_openssl.cmd
+++ b/bin/build_openssl.cmd
@@ -1,7 +1,6 @@
 setlocal

 path=%path%;%relax%\7zip;%relax%\nasm;%relax%\strawberry\perl\bin;

 

-set CL=/D_BIND_TO_CURRENT_VCLIBS_VERSION=1

 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

 :: clean up existing installs

 :: extract bundle and name

diff --git a/bin/build_wx.cmd b/bin/build_wx.cmd
index e4fd207..1cbd278 100755
--- a/bin/build_wx.cmd
+++ b/bin/build_wx.cmd
@@ -10,7 +10,6 @@
 

 :build

 pushd %RELAX%\wxMSW*\build\msw

-set CL=/D_BIND_TO_CURRENT_VCLIBS_VERSION=1

 vcbuild /useenv  /platform:Win32 /M4 wx.sln "Unicode Release|Win32"

 vcbuild /useenv  /platform:Win32 /M4 wx.sln "Unicode Debug|Win32"

 popd

diff --git a/bin/build_zlib.cmd b/bin/build_zlib.cmd
index c985a9d..98ae8ca 100755
--- a/bin/build_zlib.cmd
+++ b/bin/build_zlib.cmd
@@ -1,7 +1,6 @@
 setlocal

 path=%path%;%relax%\7zip;%relax%\nasm;%relax%\strawberry\perl\bin;

 

-set CL=/D_BIND_TO_CURRENT_VCLIBS_VERSION=1

 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

 :: clean up existing installs

 :: extract bundle and name

diff --git a/bin/glaze.cmd b/bin/glaze.cmd
deleted file mode 100755
index d8b4071..0000000
--- a/bin/glaze.cmd
+++ /dev/null
@@ -1,99 +0,0 @@
-@echo off

-echo Build CouchDB under Windows - Time to Relax v0.7

-

-:: install stuff to C:\relax unless otherwise requested

-if "%relax%" == "" set relax=c:\relax

-

-:: find our source tree from one level up from current bin

-path=%~dp0;%~dp0..\bits;%relax%\7zip;%relax%\bin;%path%;

-

-:: set these paths into the user environment for future usage

-setx RELAX %relax%

-

-:: set up folders

-cd %relax%

-mkdir bits bin release

-

-echo START	retrieving packages...

-pushd bits

-aria2c.exe --force-sequential=false --max-connection-per-server=4  --check-certificate=false --auto-file-renaming=false --input-file=%relax%/downloads.md --max-concurrent-downloads=5 --dir=%relax%/bits --save-session=a2session.txt

-echo DONE	retrieving packages

-

-:: md5 checksums

-echo START	md5 checksums...

-md5sum.exe --check md5sums.txt || echo FAILED: please check any missing or failed files && goto eof

-echo DONE	md5 checksums

-

-:: unpack stuff

-echo START	unpacking tools in [%relax%]...

-pushd %relax%

-

-:: 7zip is used for many things

-echo START	installing 7zip...

-start /wait bits\7z465.exe /S /D=7zip\

-echo DONE	installing 7zip

-

-echo START	installing cygwin...

-bits\setup.exe

-:: c:\cygwin

-:: all users

-:: store bits in d:\glazier\bits\

-:: direct connection

-:: http uidaho or ftp ucmirror.canterbury.ac.nz

-:: defaults + all DEVEL + UTILS/file

-mklink /d c:\cygwin\relax %relax%

-echo END	installing cygwin

-

-echo START	installing latest mozilla build tools...

-start /wait bits\mozillaBuildSetup-Latest.exe /S

-echo DONE	installing mozilla build tools

-

-echo START	install vcredist...

-:: patch in Erlang R14B03 will look for it here

-xcopy bits\vcredist_x86.exe %relax%\ /y /f

-echo DONE	install vcredist

-

-echo START	install win32 assembler...

-7z x bits\nasm-2.09.07-win32.zip -o%relax%\ -y

-move nasm* nasm

-echo DONE	install win32 assembler

-

-echo START      install strawberry perl...

-7z x bits\strawberry-perl-5.12.2.0-portable.zip -o%relax%\strawberry\ -y

-echo DONE	install strawberry perl

-

-echo DONE	unpacking tools in [%relax%]

-

-:unpack source

-echo START	install wxWidgets...

-7z x bits\wxMSW* -aoa -y -o%relax%\

-mkdir c:\cygwin\opt\local\pgm

-mklink /d c:\cygwin\opt\local\pgm\wxWidgets-2.8.11 c:\relax\wxMSW-2.8.11

-echo DONE	install wxWidgets

-

-echo START	install ICU...

-start /wait 7z.exe x bits\icu* -aoa -o%relax%\

-echo DONE	install ICU

-

-echo START	install win32 OpenSSL...

-:: now we build from source using %relax%/nasm and %relax%/strawberry later on

-mkdir %relax%\openssl

-mklink /d c:\openssl %relax%\openssl

-echo DONE	install win32 OpenSSL source

-

-echo START	install NSIS...

-start /wait bits\nsis-2.46-setup.exe /s /d=%relax%\nsis

-echo DONE	install NSIS

-

-echo START	install Inno...

-start /wait bits\isetup-5.4.2-unicode.exe /silent /dir="%relax%\inno5"

-echo DONE	install Inno

-

-echo START	install NotepadPlus...

-7z x  bits\npp.5.8.7.bin.minimalist.7z -o%relax%\npp

-echo DONE	install NotepadPlus

-

-:eof

-::echo please reboot now to complete installation

-::pause

-::TODO shutdown -r -t 5 -y -f

diff --git a/bin/relax.sh b/bin/relax.sh
index 3905237..e6a90eb 100755
--- a/bin/relax.sh
+++ b/bin/relax.sh
@@ -15,7 +15,7 @@
 echo
 
 echo doing sanity checks
-# here we want to see that junction points are set up and 
+# here we want to see that junction points are set up and
 # rebuild path from scratch as ./otp_build env_win32 gets it wrong
 # first up are erlang build helper scripts
 PATH=$ERL_TOP/release/win32/erts-$ERTS_VSN/bin:$ERL_TOP/erts/etc/win32/cygwin_tools/vc:$ERL_TOP/erts/etc/win32/cygwin_tools
@@ -25,18 +25,23 @@
 PATH=$PATH:/relax/vc/Common7/IDE:/relax/VC/VC/BIN:/relax/VC/Common7/Tools:/relax/VC/VC/vcPackages
 
 #### then .Net framework which we need to have clean manifests and SxS for Win7 x64
-PATH=$PATH:/cygdrive/c/WINDOWS/Microsoft.NET/Framework:/cygdrive/c/Microsoft.NET/Framework/v2.0.50727
+PATH=$PATH:/cygdrive/c/WINDOWS/Microsoft.NET/Framework:/cygdrive/c/Microsoft.NET/Framework/v4.0.30319:/cygdrive/c/Microsoft.NET/Framework/v3.5
 
 # then SDKs
 ###PATH=$PATH:/cygdrive/c/PROGRA~1/MICROS~1/Windows/v7.0/bin
 ###PATH=$PATH:/cygdrive/c/PROGRA~1/MICROS~1/Windows/v6.0A/bin
 PATH=$PATH:/relax/SDK/bin:/relax/SDK/bin/x64
 
+# some additional tools in SDK
+# C:\Program Files\Microsoft Windows Performance Toolkit;
+# C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\NETFX 4.0 Tools;
+PATH=$PATH:/cygdrive/c/Program\ Files/Microsoft\ Windows\ Performance\ Toolkit:/relax/SDK/bin/NETFX\ 4.0\ Tools
+
 # then erlang and couchdb build helper scripts
 PATH=$PATH:/relax/openssl:/relax/nsis:/relax/inno5
 
 # then cygwin tools
-PATH=$PATH:/usr/local/bin:/usr/bin:/bin	
+PATH=$PATH:/usr/local/bin:/usr/bin:/bin
 
 # then glazier tools
 PATH=$PATH:/relax/bin:/relax/bits
diff --git a/bin/setup.cmd b/bin/setup.cmd
index 98fa558..2a473ee 100755
--- a/bin/setup.cmd
+++ b/bin/setup.cmd
@@ -9,14 +9,9 @@
 

 :: our goal is to get the path set up in this order:

 :: erlang and couchdb build helper scripts

-:: Microsoft VC compiler and SDK 7.0

+:: Microsoft VC compiler and SDK

 :: cygwin path for other build tools like make

 :: the remaining windows system path

-

-:: C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\link.exe

-:: C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\cl.exe

-:: C:\Program Files\Microsoft SDKs\Windows\v7.0\mc.exe

-:: etc

 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

 

 :: find our source tree from one level up from current bin

@@ -31,20 +26,61 @@
 echo setting up links to tools, SDK and VC++

 

 :: set up junction point to make finding stuff simpler in unix path

+

+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

+:: what build environment are we using?

+:: check for VC10/SDK7.1

+:: SDK 7.1 on Windows 7 x64:

+:: VS100COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\

+:: sdkdir=C:\Program Files\Microsoft SDKs\Windows\v7.1\

+:: where link.exe mc.exe cl.exe mt.exe lc.exe

+:: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\link.exe

+:: C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\MC.Exe

+:: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cl.exe

+:: C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\mt.exe

+:: C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\NETFX 4.0 Tools\lc.exe

+:: C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\lc.exe

+if defined WindowsSDKVersionOverride mklink /d "%RELAX%\SDK" "%programfiles%\Microsoft SDKs\Windows\%WindowsSDKVersionOverride%"

+if defined SDKdir mklink /d "%RELAX%\SDK" "%sdkdir%"

+if defined VS100COMNTOOLS mklink /d "%RELAX%\VC" "%VS100COMNTOOLS%..\.."

+

+:: VS2010/SDK7.1

+

+:: VC90/SDK7.0

 :: VS90ComnTools is the only variable set by the initial install of VC++ 9.0

 :: VS90COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\

 :: the Windows SDK uses a different variable only after you've call SetEnv.cmd first

 :: VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\

-if defined VCINSTALLDIR  mklink /d "%RELAX%\VC" "%VCINSTALLDIR%.."

+:: VCRoot=c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\

+:: SdkSetupDir=C:\Program Files\Microsoft SDKs\Windows\v7.0\Setup

+:: C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\link.exe

+:: C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\cl.exe

+:: C:\Program Files\Microsoft SDKs\Windows\v7.0\mc.exe

+:: etc.

 if defined VS90COMNTOOLS mklink /d "%RELAX%\VC" "%VS90COMNTOOLS%..\.."

+if defined VCINSTALLDIR  mklink /d "%RELAX%\VC" "%VCINSTALLDIR%.."

+if defined SdkSetupDir mklink /d "%RELAX%\VC" "%SdkSetupDir%\.."

 if not exist "%RELAX%\SDK" mklink /d "%RELAX%\SDK" "%programfiles%\Microsoft SDKs\Windows\v7.0"

+

+:: last chance

+if defined VCINSTALLDIR  mklink /d "%RELAX%\VC" "%VCINSTALLDIR%\.."

+if defined WindowsSDKDir mklink /d "%RELAX%\SDK" "%WindowsSDKDir%"

+

+::TODO

+if not exist %relax%\sdk goto fail

+if not exist %relax%\vc goto fail

+

+:: components

 if not exist "c:\cygwin\relax" mklink /d C:\cygwin\relax "%RELAX%"

 if not exist "C:\openssl" mklink /d c:\openssl "%RELAX%\openssl"

 

 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

 goto eof

 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

-

+:fail

+echo [ERROR] unable to determine SDK and VC++ install locations

+exit /b 1

+goto eof

 rem :: example relevant environment variables from a

 rem windows 7 enterprise x64 install

 rem ::::: SDK vars

@@ -54,9 +90,9 @@
 rem Lib=c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Lib;C:\Program Files\Microsoft SDKs\Windows\v7.0\Lib;

 rem MSSdk=C:\Program Files\Microsoft SDKs\Windows\v7.0

 rem NODEBUG=1

-rem ORIGINALPATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\relax\winmerge;c:\relax\7zip;c:\relax\cmake\bin;c:\relax\bin;Z:\Dropbox\tools\pstools;c:\erlang\bin;C:\NuGet\bin;

+rem ORIGINALPATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\relax\winmerge;c:\mozilla-build\7zip;c:\relax\cmake\bin;c:\relax\bin;Z:\Dropbox\tools\pstools;c:\erlang\bin;C:\NuGet\bin;

 rem OS=Windows_NT

-rem Path=c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Bin;c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcpackages;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE;C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\x64;C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin;C:\Windows\Microsoft.NET\Framework\v3.5;C:\Windows\Microsoft.NET\Framework\v2.0.50727;C:\Program Files\Microsoft SDKs\Windows\v7.0\Setup;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\relax\winmerge;c:\relax\7zip;c:\relax\cmake\bin;c:\relax\bin;Z:\Dropbox\tools\pstools;c:\erlang\bin;C:\NuGet\bin;

+rem Path=c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Bin;c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcpackages;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE;C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\x64;C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin;C:\Windows\Microsoft.NET\Framework\v3.5;C:\Windows\Microsoft.NET\Framework\v2.0.50727;C:\Program Files\Microsoft SDKs\Windows\v7.0\Setup;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\relax\winmerge;c:\mozilla-build\7zip;c:\relax\cmake\bin;c:\relax\bin;Z:\Dropbox\tools\pstools;c:\erlang\bin;C:\NuGet\bin;

 rem RegKeyPath=HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VC7

 rem SdkSetupDir=C:\Program Files\Microsoft SDKs\Windows\v7.0\Setup

 rem SdkTools=C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\x64;C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin

@@ -64,7 +100,7 @@
 rem VCINSTALLDIR=c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\

 rem VCRoot=c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\

 rem VSRegKeyPath=HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7

-rem 

+rem

 rem :: base env vars

 rem ALLUSERSPROFILE=C:\ProgramData

 rem APPDATA=C:\Users\couch\AppData\Roaming

@@ -81,7 +117,7 @@
 rem LOGONSERVER=\\RELAX

 rem NUMBER_OF_PROCESSORS=2

 rem OS=Windows_NT

-rem Path=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\relax\winmerge;c:\relax\7zip;c:\relax\cmake\bin;c:\relax\bin;Z:\Dropbox\tools\pstools;c:\erlang\bin;C:\NuGet\bin;

+rem Path=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\relax\winmerge;c:\mozilla-build\7zip;c:\relax\cmake\bin;c:\relax\bin;Z:\Dropbox\tools\pstools;c:\erlang\bin;C:\NuGet\bin;

 rem PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC

 rem PROCESSOR_ARCHITECTURE=AMD64

 rem PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 42 Stepping 7, GenuineIntel

@@ -108,5 +144,5 @@
 rem windir=C:\Windows

 rem windows_tracing_flags=3

 rem windows_tracing_logfile=C:\BVTBin\Tests\installpackage\csilogfile.log

-rem 

+rem

 :eof

diff --git a/bin/shell.cmd b/bin/shell.cmd
index 8ada8e9..d39c6a4 100755
--- a/bin/shell.cmd
+++ b/bin/shell.cmd
@@ -6,16 +6,6 @@
 set TEMP=c:\tmp

 set TMP=c:\tmp

 

-::path=%windir%\system32;%windir%;%windir%\system32\wbem;%windir%\syswow64;

-

-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

-:: various compilation settings from SDKs, VC compiler/linker, etc

-::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

-:: set LINK & CL to resolve manifest binding issues & virtualisation hack in ld.sh#171

-set CL=/D_BIND_TO_CURRENT_VCLIBS_VERSION=1

-:: SETting LINK buggers up couchdb/src/couchdb/priv libtool and subsequent driver creation

-:: set LINK=/manifestuac:"level=asInvoker uiAccess=false"

-

 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

 :: following settings allow Erlang build to locate openssl correctly

 :: and CouchDB to find ICU, Curl, and SSL if required

diff --git a/bits/md5sums.txt b/bits/md5sums.txt
index 63476e5..3bc7576 100755
--- a/bits/md5sums.txt
+++ b/bits/md5sums.txt
@@ -1,21 +1,19 @@
-fcd1b1472302fc7283147f4df471f402 *7z465.exe

-cfdc2ab751bf18049c5ef7866602d8ed *apache-couchdb-1.0.3.tar.gz

 907b763d3a14b6649bf0371ffa75a36b *apache-couchdb-1.1.0.tar.gz

-ef536e5148aacf559735df893b40a1f4 *cmake-2.8.5-win32-x86.zip

 8e0411224c978aaa449210637165072c *curl-7.21.7.zip

 314e582264c36b3735466c522899aa07 *icu4c-4_4_2-src.tgz

 018e04dfd1539529b05b43d5a932f7a4 *isetup-5.4.2-unicode.exe

+aafbb7a9773aae4ae06a7304197843ff *cmake-2.8.6-win32-x86.zip

 a4574365938222adca0a6bd33329cb32 *js185-1.0.0.tar.gz

-15ed342443781bd70d8a09f06a03d5d3 *MozillaBuildSetup-Latest.exe

+998d7ec6d9f07237fe0d54e5c7ffc4ae *MozillaBuildSetup-1.6.exe

 23edf89e61f43dd9f47b01fa7fd7c3bd *nasm-2.09.07-win32.zip

 5e02441c7f3fa4da4f4928a2d42a07c3 *nsis-2.46-setup.exe

 40b6ea380cc8a5bf9734c2f8bf7e701e *openssl-1.0.0d.tar.gz

 ce595447571128bc66f630a8fa13339a *otp_src_R14B01.tar.gz

 7979e662d11476b97c462feb7c132fb7 *otp_src_R14B03.tar.gz

-2ece86924bf59c82b3c1936760ef4631 *setup.exe

+6f819070a9461ff442c708312c919aa5 *setup.exe

 41881cc6a7503748c9ea2b1580af2fd0 *strawberry-perl-5.12.2.0-portable.zip

 5b39aa309baf8633b475f25e23b75677 *tcltk85_win32_bin.tar.gz

 0f2490f78d880ec184d9233df97ab83d *tracemonkey-57a6ad20eae9.tar.gz

-35da2bf2befd998980a495b6f4f55e60 *vcredist_x86.exe

-ad14196b38470d927f438ab08e8f16b3 *wxMSW-2.8.11.zip

 17e778a5f83cff4f32a50999a46ce5b5 *wxMSW-2.8.11_erlang_overlay.zip

+1801436936e64598bab5b87b37dc7f87 *vcredist_x86.exe

+acda3682dd57e13fcb09da2de0a288be *winsdk_web.exe

diff --git a/downloads.md b/downloads.md
index 08c691e..534ba83 100644
--- a/downloads.md
+++ b/downloads.md
@@ -6,8 +6,8 @@
 
 ################################################################################
 ### tools to support erlang and couchdb build
-http://downloads.sourceforge.net/sevenzip/7z465.exe
-
+# http://downloads.sourceforge.net/sevenzip/7z465.exe
+# http://msysgit.googlecode.com/files/Git-1.7.8-preview20111206.exe
 ################################################################################
 ### stuff you might find useful
 #bitvise_sshd_bits		WinSSHD5-Inst.exe	http://dl.bitvise.com/WinSSHD5-Inst.exe
@@ -18,19 +18,14 @@
 ### compilers and SDKs
 http://strawberryperl.com/download/5.12.2.0/strawberry-perl-5.12.2.0-portable.zip
 http://www.nasm.us/pub/nasm/releasebuilds/2.09.07/win32/nasm-2.09.07-win32.zip
-http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-Latest.exe
+http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-1.6.exe
 http://www.cygwin.com/setup.exe
-http://www.cmake.org/files/v2.8/cmake-2.8.5-win32-x86.zip
+http://www.cmake.org/files/v2.8/cmake-2.8.6-win32-x86.zip
+### vc10 sdk 7.1 sp1 please http://www.microsoft.com/download/en/confirmation.aspx?id=8279
+http://download.microsoft.com/download/A/6/A/A6AC035D-DA3F-4F0C-ADA4-37C8E5D34E3D/winsdk_web.exe
 ### vcredist is very carefully chosen to match SDK and VC++ latest patches
- www.microsoft.com/download/en/details.aspx?id=26368
-http://download.microsoft.com/download/5/D/8/5D8C65CB-C849-4025-8E95-C3966CAFD8AE/vcredist_x86.exe
-
-### win7sdk_32bit	GRMSDK_EN_DVD.iso
-#http://download.microsoft.com/download/2/E/9/2E911956-F90F-4BFB-8231-E292A7B6F287/GRMSDK_EN_DVD.iso
-### win7sdk_64bit	GRMSDKX_EN_DVD.iso
-#http://download.microsoft.com/download/2/E/9/2E911956-F90F-4BFB-8231-E292A7B6F287/GRMSDKX_EN_DVD.iso
-### visual_studio_express	VS2008ExpressWithSP1ENUX1504728.iso
-#http://download.microsoft.com/download/E/8/E/E8EEB394-7F42-4963-A2D8-29559B738298/VS2008ExpressWithSP1ENUX1504728.iso
+# http://www.microsoft.com/download/en/details.aspx?id=26999 for vc10
+http://download.microsoft.com/download/1/6/5/165255E7-1014-4D0A-B094-B6A430A6BFFC/vcredist_x86.exe
 
 ################################################################################
 ### OpenSSL and libcURL