Skip to content
Permalink
Browse files
Merge branch 'windows_sdk_7.0'
  • Loading branch information
dch committed Sep 12, 2011
2 parents e96caa1 + e44a1d2 commit be5621b4c131eef5235db9956d17361d893df54e
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 60 deletions.
@@ -189,32 +189,18 @@ can take several hours on slower machines:
# ICU 4.4.2
################################################################################
Ideally ICU would compile with current VC runtime using VC++ directly but
it doesn't. Instead we use cygwin make tools and VC++ compiler.
it doesn't directly, so a stubdata.obj is built first, then the rest is compiled
using the latest VC runtimes.

* download ICU 4.4.2 unix source from [icu442]
* Download ICU 4.4.2 windows source from [icu442]
* either re-use the "shell.cmd" from before, or open a Windows SDK prompt
via `setenv /release /x86` again

cd $RELAX
DEST=`pwd`/icu
tar xzf bits/icu4c-4_4_2-src.tgz
cd $DEST/source
./runConfigureICU Cygwin/MSVC --prefix=$DEST
make
make install
cp $DEST/lib/*.dll $DEST/bin/

* the last line is because CouchDB still looks in icu/bin/ for the DLLs even though the build puts them
in icu/lib/. This should probably be changed in CouchDB
* confirm that the resulting ICU DLLs have the appropriate manifests

[icu442]: http://download.icu-project.org/files/icu4c/4.4.2/icu4c-4_4_2-src.tgz

%relax%\bin\build_icu.cmd

* then run the following 4 scripts in order
* confirm that the resulting ICU DLLs have the appropriate manifests

couchdb_config.sh
couchdb_build.sh
[icu442]: http://download.icu-project.org/files/icu4c/4.4.2/icu4c-4_4_2-src.zip

# LibcURL
################################################################################
@@ -296,14 +282,11 @@ For CouchDB 1.1.0, the patch from [COUCHDB-1152] is required.
/relax/bin/couchdb_config_js180.sh
/relax/bin/couchdb_build.sh

For CouchDB 1.2.x, most patches are already in trunk, apart from 1 patch, and a
filthy hack. The hack is needed until `configure.ac` is updated to identify
that curl is not required and that the cygwin library version of it should not
be pulled into CouchDB by accident.
For CouchDB 1.2.x, patches are in trunk from a small, filthy hack, which
is needed until `configure.ac` avoids detection of cygwin's curl.

cd /relax && svn checkout https://svn.apache.org/repos/asf/couchdb/trunk
cd trunk
patch -p1 < ../bits/COUCHDB-1197_libtool_sed_hackery.patch
mv /usr/bin/curl-config /usr/bin/curl-config.dist
./bootstrap
/relax/bin/couchdb_config_js185.sh
@@ -1,42 +1,46 @@
path=%path%;%relax%\7zip;
:: obsolete for the moment, we build under cygwin to get a working
:: BIND_TO_CURRENT_VCLIBS_VERSION during build of the icu data dll
goto eof
setlocal
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: icu doesn't have a version name in the archive path
set ICU_PATH=%RELAX%\icu

:: set path for ICU compilation later on
set INCLUDE=%INCLUDE%;%ICU_PATH%\include;
set LIBPATH=%LIBPATH%;%ICU_PATH%\lib;
set LIB=%LIB%;%ICU_PATH%\lib

:: set LINK & CL to resolve manifest binding issues & virtualisation hack in ld.sh#171
set CL=/D_BIND_TO_CURRENT_VCLIBS_VERSION=1
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: clean up existing installs
setx ICU_PATH %icu_path%
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: ensure we have a fresh source tree to build from
if exist "%icu_path%" rd /s/q %icu_path%
setx icu_path %icu_path%
7z x "%RELAX%\bits\icu4c-*src.zip" -o%RELAX% -y

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
pushd "%icu_path%\source\allinone"
vcbuild /useenv /platform:Win32 /M8 allinone.sln "Release|Win32"
:: can we try using --with-data-packaging=archive to reduce ICU size?
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
popd

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: trying this on cygwin instead of windows, to compile with
:: current vclibs.
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\bin\bash.exe
:: export PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin
:: call \cygwin\cygwin.bat
:: # check path export PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin
:: cd $RELAX/icu442/source
:: ./runConfigureICU Cygwin/MSVC --prefix=$RELAX/icu442/build
:: make
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: make && make install
:: cp ../lib/*.dll ../bin/
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:eof
endlocal
@@ -14,5 +14,6 @@ export COUCH_TOP
--with-js-include=/relax/js-1.8.5/js/src/dist/include \
2>&1 | tee $COUCH_TOP/build_configure.txt
### --enable-static \
### --with-win32-curl=/relax/curl \

echo DONE. | tee -a $COUCH_TOP/build_configure.txt
@@ -49,8 +49,8 @@ http://www.erlang.org/download/tcltk85_win32_bin.tar.gz
# bits required to build couch
### libicu icu4c-4_4_2-src.zip
# http://download.icu-project.org/files/icu4c/4.4.2/icu4c-4_4_2-src.zip
### libicu icu4c-4_4_2-src.tgz
http://download.icu-project.org/files/icu4c/4.4.2/icu4c-4_4_2-src.tgz
### libicu icu4c-4_4_2-src.tgz (unix variant for cygwin wrapped build)
## http://download.icu-project.org/files/icu4c/4.4.2/icu4c-4_4_2-src.tgz
### inno5_setup isetup-5.4.2-unicode.exe
http://www.jrsoftware.org/download.php/is-unicode.exe
### spidermonkey 57a6ad20eae9.tar.gz

0 comments on commit be5621b

Please sign in to comment.