commit | 1f4d0cd1012bb9e8bdb2d5d88f8de27fdb18a352 | [log] [tgz] |
---|---|---|
author | dch <dave@muse.net.nz> | Sat Aug 28 22:08:31 2010 +1200 |
committer | dch <dave@muse.net.nz> | Sat Aug 28 22:08:31 2010 +1200 |
tree | 575924c5c7c97c7bfbebb4c59edf88030676a0e2 | |
parent | a7d216a9e56e94c9c6d88a4b2cd9a3de48858485 [diff] |
tweaks
This is a set of scripts designed to help automate as much as practicable the build of CouchDB on Windows
install cygwin using defaults & in addition:
accessibility, admin, archive, audio, base, database: default
devel: ALL autoconf, automake, gcc-, gcc4, openssl-devel, readline
doc: default
editors: vim
games, gnome, graphics, interpreters, KDE, libs, mail, math, mingw, net, perl, publishing, python, security, shells, system, text, utils, web, X11: default
ln -s /cygdrive/c/src /src
download [wxwidgets_bits] from [WxWidgets][http://wxwidgets.org/] & untar using cygwin into /src/ mkdir -p /opt/local/pgm/ ln -s /src/wxWidgets-2.8.11 /opt/local/pgm/wxWidgets-2.8.11
Enable wxUSE_GLCANVAS, wxUSE_POSTSCRIPT and wxUSE_GRAPHICS_CONTEXT in c:\src\wxWidgets-2.8.11\include\wx\msw\setup.h
TODO: can we do this somehow from prompt e.g. vcbuild /rebuild contrib\vstudio\vc9\zlibvc.sln “Release|Win32”
TODO: can we do this somehow from prompt e.g. vcbuild /rebuild contrib\vstudio\vc9\zlibvc.sln “Release|Win32”
http://github.com/erlang/otp/blob/dev/INSTALL-WIN32.md http://www.zerothlaw.org/joomla/index.php?option=com_jd-wiki&Itemid=26&id=wxwidgets:wxwidgets_with_visual_studio_express
sanity check against http://github.com/erlang/otp/blob/dev/INSTALL-WIN32.md
start c:\src\relax.cmd cd /src/otp_src_R13B04/ /src/vcshell.sh eval ./otp_build env_win32
# check that which cl which link return the MS ones, if not then move all /usr/ path components to end ./otp_build autoconf ./otp_build configure ./otp_build boot -a ./otp_build release -a ./otp_build installer_win32
# a one-liner eval `./otp_build env_win32` && ./otp_build autoconf && ./otp_build configure && ./otp_build boot -a && ./otp_build release -a && ./otp_build installer_win32; # to install this build immediately ./release/win32/otp_win32_%OTP-REL% /S
requirements:
useful links http://releases.mozilla.org/pub/mozilla.org/seamonkey/releases/2.0.6/source/seamonkey-2.0.6.source.tar.bz2 https://developer.mozilla.org/En/Developer_Guide/Build_Instructions/Windows_Prerequisites https://developer.mozilla.org/En/SpiderMonkey/Build_Documentation
// ignore: junction c:\src\js_src c:\src\seamonkey\comm-1.9.1\mozilla\js\src run c:\mozilla-build\start-msvc9.bat cd /c/src/js_src autoconf-2.13 ./configure make
from http://www.jrsoftware.org/download.php/ispack-unicode.exe download and install ispack-5.3.10-unicode.exe, including all additional components to c:\src\inno5 & ensure its in the path
you need to have libcurl.lib in the ./configure path (CURL_LIBS="$withval/lib/libcurl") most downloadable libcurls have sasl or other unwanted libs we need this for couch_js.exe to function and for curl for enduser testing untar http://curl.haxx.se/docs/install.html set OPENSSL_PATH=d:\src\openssl set INCLUDE=%INCLUDE%;%OPENSSL_PATH%\include\openssl; set LIBPATH=%LIBPATH%;%OPENSSL_PATH%\lib; set LIB=%LIB%;%OPENSSL_PATH%\lib; couldn't get this to work so instead did: nmake vc-ssl ..... instead i built curl/vc6curl.sln check curl.exe & see what libs it needs - these should be openssl only check that /src/curl-7.21.1/lib/libcurl.lib exists
./configure \ --with-js-include=/cygdrive/c/path_to_seamonkey \ --with-js-lib=/cygdrive/c/path_to_seamonkey_lib \ --with-win32-icu-binaries=/cygdrive/c/path_to_icu_binaries_root \ --with-erlang=$ERL_TOP/release/win32/usr/include \ --with-win32-curl=/cygdrive/c/path/to/curl/root/directory \ --with-openssl-bin-dir=/cygdrive/c/openssl/bin \ --with-msvc-redist-dir=/cygdrive/c/dir/with/vcredist_platform_executable \ --prefix=$ERL_TOP/release/win32
./configure
--prefix=$ERL_TOP/release/win32
--with-win32-icu-binaries=/src/icu
--with-erlang=$ERL_TOP/release/win32/usr/include
--with-win32-curl=/src/curl-7.19.5
--with-openssl-bin-dir=/src/openssl/bin
--with-msvc-redist-dir=/src/vcredist
--with-js-lib=/src/mozilla/js/src
--with-js-include=/src/mozilla/js/src/dist/include/js
CURL curl -> win32-openssl curl-bits
The objective is to take the current manual steps, and have them automated for a successful build off a variety of representative Microsoft current OS using Amazon EC2 infrastructure.
These are all sourced from AWS Windows Servers provided by Amazon. The release build is taken from the Windows 2008 64-bit AMI below. You will need to set up an AWS account before using the AWS console and we recommend using spot instances as these are significantly cheaper to run.
TODO // URLs don't go to right AMIs
ami-c3e40daa | amazon/Windows-Server2008r1sp2-i386-Base-v103 ** bash.exe dumps core
ami-d9e40db0 | amazon/Windows-Server2008r1sp2-x86_64-Base-v103 ** bash.exe and cmd.exe dumps core
ami-f11ff098 | amazon/Windows-Server2003r2-i386-Base-v109 ** too bloody slow
ami-f51ff09c | amazon/Windows-Server2003r2-x86_64-Base-v109
NB both of the Win2008 ones above dump core while installing/running cygwin so we do not build by default
reference CouchDB install is therefore Win2003r2 x86_64 ami-f51ff09c l1.large & snap-080bb263 for accompanying binaries
reference CouchDB install is therefore Win2003r2 x86_i386 ami-f11ff098 c1.medium & snap-080bb263 for accompanying binaries
attach a 30GiB EBS vol for storage of the bits
logon, bring up an admin command prompt by right-clicking on any Command Prompt link and choosing “Run as Administrator”
execute the following within that
diskmgmt.msc -> find the newly attached volume & turn it online
a fix for SEHOP security feature causing cygwin & similar unix shell emulations to dump core
regedit d:\install\bundles\disable_sehop_kb956607.reg net user administrator couchdb1.0.0 net user couchdb 1dot0 /add net localgroup administrators couchdb /add
disable UAC -> control panel -> user accts -> turn UAC off -> restart later
start menu -> server manager -> 2nd pane -> configure IE ESC
disable DEP -> bcdedit.exe /set {current} nx AlwaysOff
restart now
administrator passwd is couchdb1.0.0
lgoon as couchdb with passwd couchdb1dot0
import console_hkcu.reg
import
open up d:\install\bin & copy all .lnk files to desktop
install VC++ excluding silverlight, MSSQL, RSS feeds via D:\VS2008express_SP1_ENUX1504728\VCExpress\setup.exe
run D:\Windows7_SDK_amd64\Setup.exe and install all components (64bit)
run D:\Windows7_SDK_x86\Setup.exe and install all components (32bit)
visit http://www.update.microsoft.com/microsoftupdate/v6/vistadefault.aspx?ln=en-us & install all updates/patches
open d:\src\bundles in explorer & run everything below
install mozilla tools d:\src\bundles\mozillabuildsetup-latest.exe
install npp
install inno5 via ispack including all additional packages
install nsis
install vcredist_x86
install openssl & binaries to openssl dir, ignore warnings about vcredist
install cygwin from local only (no download) selecting all modules to install. This is a limited set compared to full cygwin and saves about 1GiB of download crud + lost install time
[libcurl-bits] http://curl.haxx.se/download/libcurl-7.19.3-win32-ssl-msvc.zip [libcurl-src]: http://curl.haxx.se/download/curl-7.21.1.tar.gz [msvc++]: http://download.microsoft.com/download/E/8/E/E8EEB394-7F42-4963-A2D8-29559B738298/VS2008ExpressWithSP1ENUX1504728.iso [notepadplus_bits]: http://voxel.dl.sourceforge.net/project/notepad-plus/notepad%2B%2B%20releases%20binary/npp%205.7%20bin/npp.5.7.Installer.exe [nsis_bits]: http://voxel.dl.sourceforge.net/project/nsis/NSIS%202/2.46/nsis-2.46-setup.exe [openssl_bits]: http://www.slproweb.com/download/Win32OpenSSL-1_0_0a.exe [ramdisk]: http://www.ltr-data.se/files/imdiskinst.exe [seamonkey_bits]: http://releases.mozilla.org/pub/mozilla.org/seamonkey/releases/2.0.6/source/seamonkey-2.0.6.source.tar.bz2 [vcredist]: http://download.microsoft.com/download/d/1/0/d10d210e-e0ad-4010-b547-bc5e395ef691/vcredist_x86.exe [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 [wxwidgets_bits]: http://voxel.dl.sourceforge.net/project/wxwindows/2.8.11/wxMSW-2.8.11-Setup.exe [zlib-bits]: http://zlib.net/zlib125-dll.zip [zlib-src]: http://zlib.net/zlib-1.2.5.tar.gz
================================================================================ win7 std - default environment
ALLUSERSPROFILE=C:\ProgramData APPDATA=C:\Users\couchdb\AppData\Roaming CLIENTNAME=continuity.muse CommonProgramFiles=C:\Program Files\Common Files CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files CommonProgramW6432=C:\Program Files\Common Files COMPUTERNAME=BUILD ComSpec=C:\Windows\system32\cmd.exe FP_NO_HOST_CHECK=NO HOMEDRIVE=C: HOMEPATH=\Users\couchdb LOCALAPPDATA=C:\Users\couchdb\AppData\Local LOGONSERVER=\BUILD NUMBER_OF_PROCESSORS=1 OPENSSL_CONF=C:\OpenSSL\bin\openssl.cfg OS=Windows_NT Path=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC PROCESSOR_ARCHITECTURE=AMD64 PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 15 Stepping 6, GenuineIntel PROCESSOR_LEVEL=6 PROCESSOR_REVISION=0f06 ProgramData=C:\ProgramData ProgramFiles=C:\Program Files ProgramFiles(x86)=C:\Program Files (x86) ProgramW6432=C:\Program Files PROMPT=$P$G PSModulePath=C:\Windows\system32\WindowsPowerShell\v1.0\Modules
PUBLIC=C:\Users\Public SESSIONNAME=RDP-Tcp#0 SystemDrive=C: SystemRoot=C:\Windows TEMP=C:\Users\couchdb\AppData\Local\Temp TMP=C:\Users\couchdb\AppData\Local\Temp USERDOMAIN=BUILD USERNAME=couchdb USERPROFILE=C:\Users\couchdb VS90COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools
windir=C:\Windows
================================================================================ win7 std - vs2008 environment ALLUSERSPROFILE=C:\ProgramData APPDATA=C:\Users\couchdb\AppData\Roaming CLIENTNAME=continuity.muse CommonProgramFiles=C:\Program Files\Common Files CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files CommonProgramW6432=C:\Program Files\Common Files COMPUTERNAME=BUILD ComSpec=C:\Windows\system32\cmd.exe DevEnvDir=C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE FP_NO_HOST_CHECK=NO FrameworkDir=C:\Windows\Microsoft.NET\Framework FrameworkVersion=v2.0.50727 HOMEDRIVE=C: HOMEPATH=\Users\couchdb INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ATLMFC\INCLUDE;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE;C:\Program Files\Microsoft SDKs\Windows\v6.0A\include; LIB=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ATLMFC\LIB;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\LIB;C:\Program Files\Microsoft SDKs\Windows\v6.0A\lib; LIBPATH=C:\Windows\Microsoft.NET\Framework;C:\Windows\Microsoft.NET\Framework\v2.0.50727;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\ATLMFC\LIB;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\LIB; LOCALAPPDATA=C:\Users\couchdb\AppData\Local LOGONSERVER=\BUILD NUMBER_OF_PROCESSORS=1 OPENSSL_CONF=C:\OpenSSL\bin\openssl.cfg OS=Windows_NT Path=C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools;C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\bin;C:\Windows\Microsoft.NET\Framework;C:\Windows\Microsoft.NET\Framework\Microsoft .NET Framework 3.5 (Pre-Release Version);C:\Windows\Microsoft.NET\Framework\v2.0.50727;C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\VCPackages;C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC PROCESSOR_ARCHITECTURE=AMD64 PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 15 Stepping 6, GenuineIntel PROCESSOR_LEVEL=6 PROCESSOR_REVISION=0f06 ProgramData=C:\ProgramData ProgramFiles=C:\Program Files ProgramFiles(x86)=C:\Program Files (x86) ProgramW6432=C:\Program Files PROMPT=$P$G PSModulePath=C:\Windows\system32\WindowsPowerShell\v1.0\Modules
PUBLIC=C:\Users\Public SESSIONNAME=RDP-Tcp#0 SystemDrive=C: SystemRoot=C:\Windows TEMP=C:\Users\couchdb\AppData\Local\Temp TMP=C:\Users\couchdb\AppData\Local\Temp USERDOMAIN=BUILD USERNAME=couchdb USERPROFILE=C:\Users\couchdb VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC VS90COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools
VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 9.0 windir=C:\Windows WindowsSdkDir=C:\Program Files\Microsoft SDKs\Windows\v6.0A\
================================================================================ perfect path
export PATH=$ERL_TOP/release/win32/erts-5.7.5/bin:
$ERL_TOP/erts/etc/win32/cygwin_tools/vc:
$ERL_TOP/erts/etc/win32/cygwin_tools:
/cygdrive/c/PROGRA1/MICROS1.0/Common7/IDE:
/cygdrive/c/PROGRA1/MICROS1.0/VC/BIN:
/cygdrive/c/PROGRA1/MICROS1.0/Common7/Tools:
/cygdrive/c/WINDOWS/MICROS1.NET/FRAMEW1/:
/cygdrive/c/WINDOWS/MICROS1.NET/FRAMEW1/V201.507:1/MICROS
/cygdrive/c/PROGRA1.0/VC/VCPACK1:
/cygdrive/c/PROGRA1/MICROS3/Windows/v7.0/bin:
/src/openssl:
/src/nsis:
/src/inno5:
/usr/local/bin:
/usr/bin:
/bin:
/cygdrive/c/WINDOWS/system32:
/cygdrive/c/WINDOWS:
/cygdrive/c/WINDOWS/System32/Wbem
export ERL_TOP=/src/otp_src_R13B04 export PATH=$ERL_TOP/release/win32/erts-5.7.5/bin:$ERL_TOP/erts/etc/win32/cygwin_tools/vc:$ERL_TOP/erts/etc/win32/cygwin_tools:/cygdrive/c/PROGRA1/MICROS1.0/Common7/IDE:/cygdrive/c/PROGRA1/MICROS1.0/VC/BIN:/cygdrive/c/PROGRA1/MICROS1.0/Common7/Tools:/cygdrive/c/WINDOWS/MICROS1.NET/FRAMEW1/:/cygdrive/c/WINDOWS/MICROS1.NET/FRAMEW1/V201.507:/cygdrive/c/PROGRA1/MICROS1.0/VC/VCPACK1:/cygdrive/c/PROGRA1/MICROS3/Windows/v7.0/bin:/src/openssl:/src/nsis:/src/inno5:/usr/local/bin:/usr/bin:/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem
export ERL_TOP=/src/otp_src_R14A EXPORT PATH=$ERL_TOP/release/win32/erts-5.8/bin:$ERL_TOP/erts/etc/win32/cygwin_tools/vc:$ERL_TOP/erts/etc/win32/cygwin_tools:/cygdrive/c/PROGRA1/MICROS1.0/Common7/IDE:/cygdrive/c/PROGRA1/MICROS1.0/VC/BIN:/cygdrive/c/PROGRA1/MICROS1.0/Common7/Tools:/cygdrive/c/WINDOWS/MICROS1.NET/FRAMEW1/:/cygdrive/c/WINDOWS/MICROS1.NET/FRAMEW1/V201.507:/cygdrive/c/PROGRA1/MICROS1.0/VC/VCPACK1:/cygdrive/c/PROGRA1/MICROS3/Windows/v7.0/bin:/src/openssl:/src/nsis:/src/inno5:/usr/local/bin:/usr/bin:/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem
fix missing path for disable alsr & run all .reg from local c: partition. try regini instead. after logoff goto eof
i think all we really need (via snapshotted volume) is:
start /wait D:\VS2008express_SP1_ENUX1504728\VCExpress\setup.exe start /wait D:\Windows7_SDK\Setup.exe setx CYGWIN nontsec
and then to ensure that you can still compile javascript from source; junction c:\mozilla-build d:\mozilla-build
echo vcredist and windows updates pause start /wait vcredist_x86.exe /q start /wait http://update.microsoft.com/microsoftupdate/v6
& then final reboot of happiness
./otp_build env_win32
export PATH=$ERL_TOP/release/win32/erts-5.7.5/bin:$ERL_TOP/erts/etc/win32/cygwin_tools/vc:$ERL_TOP/erts/etc/win32/cygwin_tools:/cygdrive/c/PROGRA1/MICROS1.0/Common7/IDE:/cygdrive/c/PROGRA1/MICROS1.0/VC/BIN:/cygdrive/c/PROGRA1/MICROS1.0/Common7/Tools:/cygdrive/c/WINDOWS/MICROS1.NET/FRAMEW1/:/cygdrive/c/WINDOWS/MICROS1.NET/FRAMEW1/V201.507:/cygdrive/c/PROGRA1/MICROS1.0/VC/VCPACK1:/cygdrive/c/PROGRA1/MICROS3/Windows/v7.0/bin:/src/openssl:/src/nsis:/src/inno5:/usr/local/bin:/usr/bin:/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem