Skip to content
Permalink
Browse files
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
  • Loading branch information
dch committed Dec 30, 2011
1 parent 9d5c72a commit d01656db51cbff65bfdf9e6252471d3c0b0ea852
Showing 13 changed files with 88 additions and 190 deletions.
@@ -7,8 +7,5 @@ bits/setup.log*
bits/http*
bits/ftp*
bits/*.iso
bits/npp*.7z
bits/icu4c*
bits/openssl-*
bits/otp_src_*
bits/zlib-*
bits/*.7z

@@ -28,26 +28,25 @@ consistent repeatable build environment.
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 @@ You should end up with something resembling this structure:
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 @@ Erlang/OTP and therefore CouchDB as well.
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 @@ build of CouchDB.
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 @@ build of CouchDB.
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

@@ -28,7 +28,6 @@ set USE_OPENSSL=1
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
@@ -9,30 +9,12 @@ setx ICU_PATH %icu_path%
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
@@ -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
@@ -10,7 +10,6 @@ mklink /d c:\cygwin\opt\local\pgm\wxWidgets-2.8.11 c:\relax\wxMSW-2.8.11

: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
@@ -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

This file was deleted.

@@ -15,7 +15,7 @@ echo Using Erlang $ERTS_VSN OTP $OTP_VER in $ERL_TOP
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=$ERL_TOP/release/win32/erts-$ERTS_VSN/bin:$ERL_TOP/erts/etc/win32/cygwin_to
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

0 comments on commit d01656d

Please sign in to comment.