Skip to content
Permalink
Browse files
support building from Windows SDK 7.0
  • Loading branch information
dch committed Sep 1, 2011
1 parent 2c5d2e8 commit fcd4f193b1a197218200975ac6c14ad49ebe5fe8
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 48 deletions.
@@ -1,20 +1,17 @@
::setlocal
call "%vs90comntools%\..\..\vc\vcvarsall.bat" x86
path=%path%;%relax%\7zip;%glazier%\bin;%glazier%\bits;
path=%path%;%relax%\7zip;

pushd %glazier%\bits
for %%i in (curl-*.zip) do set curl_ver=%%~ni
for %%i in ("%RELAX%\bits\curl-*.zip") do set curl_ver=%%~ni
set CURL_PATH=%RELAX%\%curl_ver%

set OPENSSL_PATH=%RELAX%\openssl

set USE_SSLEAY=1
set USE_OPENSSL=1
if not defined SSL_PATH echo OpenSSL not found && goto eof
::set USE_SSLEAY=1
::set USE_OPENSSL=1

:: set path for curl & couch compilation later on
set INCLUDE=%INCLUDE%;%OPENSSL_PATH%\include\openssl;%OPENSSL_PATH%\include;%CURL_PATH%\include\curl;%ICU_PATH%\include;
set LIBPATH=%LIBPATH%;%OPENSSL_PATH%\lib;%CURL_PATH%\lib;%ICU_PATH%\lib;
set LIB=%LIB%;%OPENSSL_PATH%\lib;%CURL_PATH%\lib;%ICU_PATH%\lib
set INCLUDE=%INCLUDE%;%SSL_PATH%\include\openssl;%SSL_PATH%\include;%CURL_PATH%\include\curl;
set LIBPATH=%LIBPATH%;%SSL_PATH%\lib;%CURL_PATH%\lib;
set LIB=%LIB%;%SSL_PATH%\lib;%CURL_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
@@ -23,17 +20,19 @@ set CL=/D_BIND_TO_CURRENT_VCLIBS_VERSION=1
:: extract bundle and name
:: stash SSL version
if defined curl_ver rd /s/q %relax%\%curl_ver%
.\setenv -u curl_ver %curl_ver%
7z x curl-*.zip -o%RELAX% -y
setx curl_ver %curl_ver%
7z x "%RELAX%\bits\curl-*.zip" -o%RELAX% -y
popd

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
pushd %relax%\%curl_ver%\winbuild
nmake /f makefile.vc mode=static use_sspi=no with_ssl=static
::with_zlib=static
:: TODO do we *need* zlib?
:: TODO these files should be put into $RELAX/curl/
copy ..\builds\libcurl-release-static-ssl-dll-ipv6\bin\curl.exe %glazier%\bits;

popd
::endlocal
endlocal
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:eof
@@ -1,8 +1,5 @@
::setlocal
call "%vs90comntools%\..\..\vc\vcvarsall.bat" x86
path=%path%;%relax%\7zip;%glazier%\bin;%glazier%\bits;
path=%path%;%relax%\7zip;

pushd %glazier%\bits
set ICU_PATH=%RELAX%\icu

:: set path for ICU compilation later on
@@ -14,17 +11,29 @@ set LIB=%LIB%;%ICU_PATH%\lib
set CL=/D_BIND_TO_CURRENT_VCLIBS_VERSION=1
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: clean up existing installs
rd /s/q %icu_path%
.\setenv -u icu_path %icu_path%
7z x icu4c-*src.zip -o%RELAX% -y
popd
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
pushd "%icu_path%\source\allinone"
vcbuild /useenv /platform:Win32 /M8 allinone.sln "Release|Win32"
::copy ..\builds\libcurl-release-static-ssl-dll-ipv6\bin\curl.exe %glazier%\bits;

::endlocal
:: 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.
:: 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
:: cd $RELAX/icu442/source
:: ./runConfigureICU Cygwin/MSVC --prefix=$RELAX/icu442/build
:: make
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@@ -1,30 +1,39 @@
setlocal
call "%vs90comntools%\..\..\vc\vcvarsall.bat" x86
path=%path%;%relax%\7zip;%relax%\nasm;%relax%\strawberry\perl\bin;%glazier%\bin;%glazier%\bits;
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
:: stash SSL version
pushd %glazier%\bits
del /f/q openssl*.tar
7z x openssl-*.tar.gz -y
for %%i in (openssl-*tar) do set openssl_ver=%%~ni
del /f/q "%TEMP%\openssl*.tar"
7z x "%RELAX%\bits\openssl-*.tar.gz" -y -o"%TEMP%"

:: get the version of OpenSSL into the environment
for %%i in ("%TEMP%\openssl-*.tar") do set openssl_ver=%%~ni
setx openssl_ver %openssl_ver%

if exist "%RELAX%\openssl" rd /s/q %RELAX%\openssl
if defined openssl_ver rd /s/q %relax%\%openssl_ver%
.\setenv -u openssl_ver %openssl_ver%
7z x openssl-*.tar -o%relax%\ -y
popd
7z x "%TEMP%\openssl-*.tar" -o%relax%\ -y

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
pushd %relax%\%openssl_ver%
:: enable-static-engine is now required for Erlang R14B03 to link against
perl Configure VC-WIN32 --prefix=%RELAX%\openssl enable-static-engine
:: from Erlang/OTP R14B03 onwards, OpenSSL is compiled in statically
:: this requires adding enable-static-engine and using target nt.mak
:: here are the older dynamic lib options commented out
perl Configure VC-WIN32 --prefix=%RELAX%\openssl
call ms\do_nasm
nmake -f ms\ntdll.mak
nmake -f ms\ntdll.mak test
nmake -f ms\ntdll.mak install

::perl Configure VC-WIN32 --prefix=%RELAX%\openssl enable-static-engine
::call ms\do_nasm
::nmake -f ms\nt.mak
::nmake -f ms\nt.mak test
::nmake -f ms\nt.mak install

popd
endlocal
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@@ -1,26 +1,26 @@
setlocal
call "%vs90comntools%\..\..\vc\vcvarsall.bat" x86
path=%path%;%relax%\7zip;%relax%\nasm;%relax%\strawberry\perl\bin;%glazier%\bin;%glazier%\bits;
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
:: stash SSL version
pushd %glazier%\bits
del /f/q zlib*.tar
7z x zlib-*.tar.gz -y
for %%i in (zlib-*tar) do set zlib_ver=%%~ni
del /f/q "%TEMP%\zlib*.tar"
7z x "%relax%\bits\zlib-*.tar.gz" -y -o"%TEMP%"
for %%i in ("%TEMP%\zlib-*tar") do set zlib_ver=%%~ni
if defined zlib_ver rd /s/q %relax%\%zlib_ver%
.\setenv -u zlib_ver %zlib_ver%
7z x zlib-*.tar -o%relax%\ -y
setx zlib_ver %zlib_ver%
7z x "%TEMP%\zlib-*.tar" -o%relax%\ -y
popd

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
pushd %relax%\%zlib_ver%\contrib\masmx86
call bld_ml32.bat
popd
pushd %relax%\%zlib_ver%
:: enable-static-engine is now required for Erlang R14B03 to link against
pushd contrib\masmx86 && call bld_ml32.bat && popd
vcbuild /rebuild contrib\vstudio\vc9\zlibvc.sln "Release|Win32"
:: TOOD these need to be put into $RELAX/zlib/
copy contrib\vstudio\vc9\x86\ZlibStatRelease\zlibstat.lib .
popd
endlocal

0 comments on commit fcd4f19

Please sign in to comment.