Almost there. Removing contrib/build/msvc and other obsolete stuff.
This commit is contained in:
parent
c84a11f8bf
commit
a3bdd0283b
@ -1,289 +0,0 @@
|
||||
@echo off
|
||||
SETLOCAL
|
||||
|
||||
REM ---------------------------------------------------
|
||||
REM -- Created by danielkaneider for the exiv2 project
|
||||
REM ---------------------------------------------------
|
||||
|
||||
|
||||
rem https://github.com/madler/zlib/commits
|
||||
SET ZLIB_COMMIT_LONG=50893291621658f355bc5b4d450a8d06a563053d
|
||||
|
||||
rem https://github.com/pol51/OpenSSL-CMake
|
||||
SET SSL_COMMIT_LONG=595a9e4384e1280659080f7c7029e66544b772a8
|
||||
|
||||
rem https://github.com/bagder/curl
|
||||
SET CURL_COMMIT_LONG=dd39a671019d713bd077be9eed511c2dc6013598
|
||||
|
||||
rem http://www.npcglib.org/~stathis/blog/precompiled-openssl/
|
||||
SET OPENSSL_VERSION=openssl-1.0.2d
|
||||
|
||||
|
||||
IF EXIST ..\msvc (
|
||||
echo.
|
||||
echo.ERROR: This file should NOT be executed within the exiv2 source directory,
|
||||
echo. but in a new empty folder!
|
||||
echo.
|
||||
goto error_end
|
||||
)
|
||||
|
||||
ml64.exe > NUL
|
||||
IF ERRORLEVEL 1 (
|
||||
set Platform=Win32
|
||||
set RawPlatform=x86
|
||||
set CpuPlatform=ia32
|
||||
) ELSE (
|
||||
set Platform=x64
|
||||
set RawPlatform=x64
|
||||
set CpuPlatform=intel64
|
||||
)
|
||||
|
||||
call setenv.cmd
|
||||
|
||||
|
||||
IF %Platform% EQU x64 (
|
||||
set VS_CMAKE=%VS_CMAKE% Win64
|
||||
)
|
||||
|
||||
IF NOT EXIST %CMAKE_EXE% (
|
||||
echo.
|
||||
echo.ERROR: CMake not found: %CMAKE_EXE%
|
||||
echo.
|
||||
goto error_end
|
||||
)
|
||||
|
||||
SET 7Z_PATH=%CYGWIN_DIR%\lib\p7zip\7z.exe
|
||||
IF NOT EXIST %CYGWIN_DIR%\lib\p7zip\7z.exe GOTO cygwin_error
|
||||
IF NOT EXIST %CYGWIN_DIR%\bin\cp.exe GOTO cygwin_error
|
||||
IF NOT EXIST %CYGWIN_DIR%\bin\gzip.exe GOTO cygwin_error
|
||||
IF NOT EXIST %CYGWIN_DIR%\bin\mv.exe GOTO cygwin_error
|
||||
IF NOT EXIST %CYGWIN_DIR%\bin\svn.exe GOTO cygwin_error
|
||||
IF NOT EXIST %CYGWIN_DIR%\bin\tar.exe GOTO cygwin_error
|
||||
IF NOT EXIST %CYGWIN_DIR%\bin\unzip.exe GOTO cygwin_error
|
||||
IF NOT EXIST %CYGWIN_DIR%\bin\wget.exe GOTO cygwin_error
|
||||
SET PATH=%PATH%;%CYGWIN_DIR%\bin
|
||||
GOTO cygwin_ok
|
||||
|
||||
:cygwin_error
|
||||
echo ERROR: Cygwin with
|
||||
echo 7z
|
||||
echo cp
|
||||
echo gzip
|
||||
echo mv
|
||||
echo svn
|
||||
echo tar
|
||||
echo unzip
|
||||
echo wget
|
||||
echo is required
|
||||
GOTO error_end
|
||||
|
||||
:cygwin_ok
|
||||
|
||||
|
||||
IF NOT DEFINED Configuration (
|
||||
set Configuration=Release
|
||||
)
|
||||
|
||||
cls
|
||||
echo.
|
||||
echo.--- %VS_CMAKE% ---
|
||||
echo.Configuration = %Configuration%
|
||||
echo.Platform = %Platform% (%RawPlatform%)
|
||||
echo.
|
||||
|
||||
IF NOT EXIST %TEMP_DIR% (
|
||||
mkdir %TEMP_DIR%
|
||||
)
|
||||
|
||||
|
||||
IF NOT EXIST vcDlls (
|
||||
mkdir vcDlls
|
||||
robocopy "%vcinstalldir%redist\%RawPlatform%" vcDlls /MIR >nul
|
||||
)
|
||||
|
||||
IF NOT EXIST vcDlls\selected (
|
||||
mkdir vcDlls\selected
|
||||
|
||||
%CYGWIN_DIR%\bin\cp.exe vcDlls/**/vcomp* vcDlls/selected
|
||||
%CYGWIN_DIR%\bin\cp.exe vcDlls/**/msv* vcDlls/selected
|
||||
)
|
||||
|
||||
SET INSTALL_DIR=dist
|
||||
IF NOT EXIST %INSTALL_DIR% (
|
||||
mkdir %INSTALL_DIR%
|
||||
)
|
||||
|
||||
|
||||
|
||||
SET ZLIB_COMMIT=%ZLIB_COMMIT_LONG:~0,7%
|
||||
IF NOT EXIST %TEMP_DIR%\zlib-%ZLIB_COMMIT%.zip (
|
||||
%CYGWIN_DIR%\bin\wget.exe -O %TEMP_DIR%/zlib-%ZLIB_COMMIT%.zip --no-check-certificate http://github.com/madler/zlib/zipball/%ZLIB_COMMIT_LONG%
|
||||
)
|
||||
|
||||
IF NOT EXIST zlib-%ZLIB_COMMIT% (
|
||||
%CYGWIN_DIR%\bin\unzip.exe -q %TEMP_DIR%/zlib-%ZLIB_COMMIT%.zip
|
||||
%CYGWIN_DIR%\bin\mv.exe madler-zlib-* zlib-%ZLIB_COMMIT%
|
||||
)
|
||||
|
||||
IF NOT EXIST zlib-%ZLIB_COMMIT%.build (
|
||||
mkdir zlib-%ZLIB_COMMIT%.build
|
||||
|
||||
pushd zlib-%ZLIB_COMMIT%.build
|
||||
%CMAKE_EXE% -G "%VS_CMAKE%" -DCMAKE_INSTALL_PREFIX=..\%INSTALL_DIR% ..\zlib-%ZLIB_COMMIT%
|
||||
IF errorlevel 1 goto error_end
|
||||
%CMAKE_EXE% --build . --config %Configuration%
|
||||
IF errorlevel 1 goto error_end
|
||||
%CMAKE_EXE% --build . --config %Configuration% --target install
|
||||
IF errorlevel 1 goto error_end
|
||||
|
||||
popd
|
||||
)
|
||||
|
||||
IF NOT EXIST %TEMP_DIR%\expat-2.1.0.tar (
|
||||
%CYGWIN_DIR%\bin\wget.exe -O %TEMP_DIR%/expat-2.1.0.tar.gz http://sourceforge.net/projects/expat/files/expat/2.1.0/expat-2.1.0.tar.gz/download
|
||||
%CYGWIN_DIR%\bin\gzip.exe -d %TEMP_DIR%/expat-2.1.0.tar.gz
|
||||
)
|
||||
IF NOT EXIST expat-2.1.0 (
|
||||
%CYGWIN_DIR%\bin\tar.exe -xf %TEMP_DIR%/expat-2.1.0.tar
|
||||
)
|
||||
|
||||
IF NOT EXIST expat-2.1.0.build (
|
||||
mkdir expat-2.1.0.build
|
||||
|
||||
pushd expat-2.1.0.build
|
||||
%CMAKE_EXE% -G "%VS_CMAKE%" -DCMAKE_INSTALL_PREFIX=..\%INSTALL_DIR% ..\expat-2.1.0
|
||||
IF errorlevel 1 goto error_end
|
||||
%CMAKE_EXE% --build . --config %Configuration%
|
||||
IF errorlevel 1 goto error_end
|
||||
%CMAKE_EXE% --build . --config %Configuration% --target install
|
||||
IF errorlevel 1 goto error_end
|
||||
popd
|
||||
)
|
||||
|
||||
|
||||
|
||||
REM SET SSL_COMMIT=%SSL_COMMIT_LONG:~0,7%
|
||||
REM IF NOT EXIST %TEMP_DIR%\OpenSSL-%SSL_COMMIT%.zip (
|
||||
REM %CYGWIN_DIR%\bin\wget.exe -O %TEMP_DIR%/OpenSSL-%SSL_COMMIT%.zip --no-check-certificate http://github.com/pol51/OpenSSL-CMake/zipball/%SSL_COMMIT_LONG%
|
||||
REM )
|
||||
REM
|
||||
REM IF NOT EXIST OpenSSL-%SSL_COMMIT% (
|
||||
REM %CYGWIN_DIR%\bin\unzip.exe -q %TEMP_DIR%/OpenSSL-%SSL_COMMIT%.zip
|
||||
REM %CYGWIN_DIR%\bin\mv.exe pol51-OpenSSL-CMake-* OpenSSL-%SSL_COMMIT%
|
||||
REM )
|
||||
REM
|
||||
REM REM IF NOT EXIST OpenSSL-%SSL_COMMIT%.build (
|
||||
REM REM mkdir OpenSSL-%SSL_COMMIT%.build
|
||||
REM
|
||||
REM pushd OpenSSL-%SSL_COMMIT%
|
||||
REM %CMAKE_EXE% -G "%VS_CMAKE%" -DCMAKE_INSTALL_PREFIX=..\%INSTALL_DIR% .
|
||||
REM IF errorlevel 1 goto error_end
|
||||
REM %CMAKE_EXE% --build . --config %Configuration%
|
||||
REM IF errorlevel 1 goto error_end
|
||||
REM %CMAKE_EXE% --build . --config %Configuration% --target install
|
||||
REM IF errorlevel 1 goto error_end
|
||||
REM
|
||||
REM REM popd
|
||||
REM REM )
|
||||
|
||||
|
||||
SET OPENSSL_LONG=%OPENSSL_VERSION%-%VS_OPENSSL%
|
||||
IF NOT EXIST %TEMP_DIR%\%OPENSSL_LONG%.7z (
|
||||
%CYGWIN_DIR%\bin\wget.exe -O %TEMP_DIR%/%OPENSSL_LONG%.7z --no-check-certificate http://www.npcglib.org/~stathis/downloads/%OPENSSL_LONG%.7z
|
||||
)
|
||||
IF NOT EXIST %OPENSSL_LONG% (
|
||||
%CYGWIN_DIR%\lib\p7zip\7z.exe x %TEMP_DIR%/%OPENSSL_LONG%.7z
|
||||
IF %Platform% EQU x64 (
|
||||
ren %OPENSSL_LONG%\lib xxlib
|
||||
ren %OPENSSL_LONG%\lib64 lib
|
||||
ren %OPENSSL_LONG%\bin xxbin
|
||||
ren %OPENSSL_LONG%\bin64 bin
|
||||
)
|
||||
)
|
||||
robocopy %OPENSSL_LONG%\bin %INSTALL_DIR%\bin libeay32MD.dll /MIR /NJS >nul
|
||||
robocopy %OPENSSL_LONG%\bin %INSTALL_DIR%\bin ssleay32MD.dll /MIR /NJS >nul
|
||||
|
||||
|
||||
SET CURL_COMMIT=%CURL_COMMIT_LONG:~0,7%
|
||||
IF NOT EXIST %TEMP_DIR%\curl-%CURL_COMMIT%.zip (
|
||||
%CYGWIN_DIR%\bin\wget.exe -O %TEMP_DIR%/curl-%CURL_COMMIT%.zip --no-check-certificate http://github.com/bagder/curl/zipball/%CURL_COMMIT_LONG%
|
||||
)
|
||||
|
||||
IF NOT EXIST curl-%CURL_COMMIT% (
|
||||
%CYGWIN_DIR%\bin\unzip.exe -q %TEMP_DIR%/curl-%CURL_COMMIT%.zip
|
||||
%CYGWIN_DIR%\bin\mv.exe bagder-curl-* curl-%CURL_COMMIT%
|
||||
)
|
||||
|
||||
IF NOT EXIST curl-%CURL_COMMIT%.build (
|
||||
mkdir curl-%CURL_COMMIT%.build
|
||||
|
||||
pushd curl-%CURL_COMMIT%.build
|
||||
%CMAKE_EXE% -G "%VS_CMAKE%" -DCMAKE_INSTALL_PREFIX=..\%INSTALL_DIR% -DCMAKE_PREFIX_PATH=..\%OPENSSL_LONG% -DBUILD_CURL_TESTS=OFF -DCMAKE_USE_OPENSSL=ON -DCMAKE_USE_LIBSSH2=OFF ..\curl-%CURL_COMMIT%
|
||||
IF errorlevel 1 goto error_end
|
||||
%CMAKE_EXE% --build . --config %Configuration%
|
||||
IF errorlevel 1 goto error_end
|
||||
%CMAKE_EXE% --build . --config %Configuration% --target install
|
||||
IF errorlevel 1 goto error_end
|
||||
|
||||
popd
|
||||
)
|
||||
|
||||
SET SSH_VERSION=0.7.2
|
||||
IF NOT EXIST %TEMP_DIR%\libssh-%SSH_VERSION%.zip (
|
||||
%CYGWIN_DIR%\bin\wget.exe -O %TEMP_DIR%/libssh-%SSH_VERSION%.zip --no-check-certificate https://git.libssh.org/projects/libssh.git/snapshot/libssh-%SSH_VERSION%.zip
|
||||
)
|
||||
IF NOT EXIST libssh-%SSH_VERSION% (
|
||||
%CYGWIN_DIR%\bin\unzip.exe -q %TEMP_DIR%/libssh-%SSH_VERSION%.zip
|
||||
)
|
||||
IF NOT EXIST libssh-%SSH_VERSION%.build (
|
||||
mkdir libssh-%SSH_VERSION%.build
|
||||
|
||||
pushd libssh-%SSH_VERSION%.build
|
||||
|
||||
%CMAKE_EXE% -G "%VS_CMAKE%" -DWITH_GSSAPI=OFF -DWITH_ZLIB=ON -DWITH_SFTP=ON -DWITH_SERVER=OFF -DWITH_EXAMPLES=OFF -DWITH_NACL=OFF -DCMAKE_PREFIX_PATH=..\%OPENSSL_LONG% -DWITH_PCAP=OFF -DCMAKE_INSTALL_PREFIX=..\%INSTALL_DIR% ..\libssh-%SSH_VERSION%
|
||||
|
||||
IF errorlevel 1 goto error_end
|
||||
%CMAKE_EXE% --build . --config %Configuration%
|
||||
IF errorlevel 1 goto error_end
|
||||
%CMAKE_EXE% --build . --config %Configuration% --target install
|
||||
IF errorlevel 1 goto error_end
|
||||
|
||||
popd
|
||||
)
|
||||
|
||||
|
||||
IF NOT EXIST %EXIV_DIR% (
|
||||
%CYGWIN_DIR%\bin\svn.exe co svn://dev.exiv2.org/svn/trunk %EXIV_DIR%
|
||||
) ELSE (
|
||||
REM %CYGWIN_DIR%\bin\svn.exe update %EXIV_DIR%
|
||||
)
|
||||
|
||||
IF NOT EXIST %EXIV_DIR%.build (
|
||||
mkdir %EXIV_DIR%.build
|
||||
)
|
||||
|
||||
pushd %EXIV_DIR%.build
|
||||
|
||||
%CMAKE_EXE% -G "%VS_CMAKE%" -DCMAKE_INSTALL_PREFIX=..\%INSTALL_DIR% -DCMAKE_PROGRAM_PATH=%SVN_DIR% -DEXIV2_ENABLE_WEBREADY=ON -DEXIV2_ENABLE_BUILD_SAMPLES=ON -DEXIV2_ENABLE_CURL=ON -DEXIV2_ENABLE_SSH=ON -DEXIV2_ENABLE_NLS=ON -DEXIV2_ENABLE_WIN_UNICODE=ON -DEXIV2_ENABLE_SHARED=ON ..\%EXIV_DIR%
|
||||
|
||||
IF errorlevel 1 goto error_end
|
||||
|
||||
%CMAKE_EXE% --build . --config %Configuration%
|
||||
IF errorlevel 1 goto error_end
|
||||
%CMAKE_EXE% --build . --config %Configuration% --target install
|
||||
IF errorlevel 1 goto error_end
|
||||
popd
|
||||
goto end
|
||||
|
||||
|
||||
IF errorlevel 1 goto error_end
|
||||
popd
|
||||
|
||||
goto end
|
||||
|
||||
:error_end
|
||||
REM pause
|
||||
|
||||
:end
|
||||
|
||||
endlocal
|
||||
@ -1,52 +0,0 @@
|
||||
@echo off
|
||||
|
||||
REM ---------------------------------------------------
|
||||
REM -- Created by danielkaneider for the exiv2 project
|
||||
REM ---------------------------------------------------
|
||||
|
||||
|
||||
SET CYGWIN_DIR=c:\cygwin64
|
||||
SET TEMP_DIR=.downloaddir
|
||||
|
||||
SET CMAKE_EXE=C:\Data\Programs\cmake-3.3.2-win32-x86\bin\cmake.exe
|
||||
|
||||
SET SVN_DIR=C:\Data\Programs\Apache-Subversion-1.8.13\bin
|
||||
|
||||
SET EXIV_DIR=exiv2-trunk
|
||||
|
||||
REM Options: -------------------------------------------
|
||||
|
||||
REM enable another configuration (defaulting to Release)
|
||||
REM SET Configuration=Debug
|
||||
|
||||
IF DEFINED VS140COMNTOOLS (
|
||||
REM Visual Studio 2015
|
||||
set VS_SHORT=vc14
|
||||
set VS_CMAKE=Visual Studio 14
|
||||
set VS_PROG_FILES=Microsoft Visual Studio 14.0
|
||||
set VS_OPENSSL=vs2015
|
||||
) ELSE IF DEFINED VS120COMNTOOLS (
|
||||
REM Visual Studio 2013
|
||||
set VS_SHORT=vc12
|
||||
set VS_CMAKE=Visual Studio 12
|
||||
set VS_PROG_FILES=Microsoft Visual Studio 12.0
|
||||
set VS_OPENSSL=vs2013
|
||||
) ELSE IF DEFINED VS110COMNTOOLS (
|
||||
REM Visual Studio 2012
|
||||
set VS_SHORT=vc11
|
||||
set VS_CMAKE=Visual Studio 11
|
||||
set VS_PROG_FILES=Microsoft Visual Studio 11.0
|
||||
set VS_OPENSSL=vs2012
|
||||
) ELSE IF DEFINED VS100COMNTOOLS (
|
||||
REM Visual Studio 2010
|
||||
set VS_SHORT=vc10
|
||||
set VS_CMAKE=Visual Studio 10
|
||||
set VS_PROG_FILES=Microsoft Visual Studio 10.0
|
||||
set VS_OPENSSL=vs2010
|
||||
) ELSE (
|
||||
REM Visual Studio 2008
|
||||
set VS_SHORT=vc9
|
||||
set VS_CMAKE=Visual Studio 9 2008
|
||||
set VS_PROG_FILES=Microsoft Visual Studio 9.0
|
||||
set VS_OPENSSL=vs2008
|
||||
)
|
||||
@ -1,215 +0,0 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<matrix-project plugin="matrix-project@1.6">
|
||||
<actions/>
|
||||
<description>Exiv2 builds</description>
|
||||
<logRotator class="hudson.tasks.LogRotator">
|
||||
<daysToKeep>20</daysToKeep>
|
||||
<numToKeep>20</numToKeep>
|
||||
<artifactDaysToKeep>-1</artifactDaysToKeep>
|
||||
<artifactNumToKeep>-1</artifactNumToKeep>
|
||||
</logRotator>
|
||||
<keepDependencies>false</keepDependencies>
|
||||
<properties>
|
||||
<hudson.plugins.svn__release__mgr.JobPropertyImpl plugin="svn-release-mgr@1.2">
|
||||
<maxRevisions>30</maxRevisions>
|
||||
</hudson.plugins.svn__release__mgr.JobPropertyImpl>
|
||||
<hudson.model.ParametersDefinitionProperty>
|
||||
<parameterDefinitions>
|
||||
<hudson.model.BooleanParameterDefinition>
|
||||
<name>Win32</name>
|
||||
<description></description>
|
||||
<defaultValue>false</defaultValue>
|
||||
</hudson.model.BooleanParameterDefinition>
|
||||
<hudson.model.BooleanParameterDefinition>
|
||||
<name>x64</name>
|
||||
<description></description>
|
||||
<defaultValue>true</defaultValue>
|
||||
</hudson.model.BooleanParameterDefinition>
|
||||
<hudson.model.BooleanParameterDefinition>
|
||||
<name>static</name>
|
||||
<description></description>
|
||||
<defaultValue>false</defaultValue>
|
||||
</hudson.model.BooleanParameterDefinition>
|
||||
<hudson.model.BooleanParameterDefinition>
|
||||
<name>dll</name>
|
||||
<description></description>
|
||||
<defaultValue>true</defaultValue>
|
||||
</hudson.model.BooleanParameterDefinition>
|
||||
<hudson.model.BooleanParameterDefinition>
|
||||
<name>release</name>
|
||||
<description></description>
|
||||
<defaultValue>true</defaultValue>
|
||||
</hudson.model.BooleanParameterDefinition>
|
||||
<hudson.model.BooleanParameterDefinition>
|
||||
<name>debug</name>
|
||||
<description></description>
|
||||
<defaultValue>false</defaultValue>
|
||||
</hudson.model.BooleanParameterDefinition>
|
||||
<hudson.model.BooleanParameterDefinition>
|
||||
<name>tests</name>
|
||||
<description></description>
|
||||
<defaultValue>true</defaultValue>
|
||||
</hudson.model.BooleanParameterDefinition>
|
||||
<hudson.model.BooleanParameterDefinition>
|
||||
<name>teste</name>
|
||||
<description></description>
|
||||
<defaultValue>false</defaultValue>
|
||||
</hudson.model.BooleanParameterDefinition>
|
||||
<hudson.model.BooleanParameterDefinition>
|
||||
<name>testv</name>
|
||||
<description></description>
|
||||
<defaultValue>true</defaultValue>
|
||||
</hudson.model.BooleanParameterDefinition>
|
||||
<hudson.model.BooleanParameterDefinition>
|
||||
<name>testx</name>
|
||||
<description></description>
|
||||
<defaultValue>false</defaultValue>
|
||||
</hudson.model.BooleanParameterDefinition>
|
||||
<hudson.model.BooleanParameterDefinition>
|
||||
<name>msvc</name>
|
||||
<description></description>
|
||||
<defaultValue>true</defaultValue>
|
||||
</hudson.model.BooleanParameterDefinition>
|
||||
<hudson.model.ChoiceParameterDefinition>
|
||||
<name>Builder</name>
|
||||
<description></description>
|
||||
<choices class="java.util.Arrays$ArrayList">
|
||||
<a class="string-array">
|
||||
<string>2005</string>
|
||||
<string>2003</string>
|
||||
<string>2008</string>
|
||||
<string>2010</string>
|
||||
<string>2012</string>
|
||||
</a>
|
||||
</choices>
|
||||
</hudson.model.ChoiceParameterDefinition>
|
||||
<hudson.model.ChoiceParameterDefinition>
|
||||
<name>ACTION</name>
|
||||
<description></description>
|
||||
<choices class="java.util.Arrays$ArrayList">
|
||||
<a class="string-array">
|
||||
<string>/rebuild</string>
|
||||
<string>/build</string>
|
||||
<string>/clean</string>
|
||||
<string>/upgrade</string>
|
||||
</a>
|
||||
</choices>
|
||||
</hudson.model.ChoiceParameterDefinition>
|
||||
<hudson.model.ChoiceParameterDefinition>
|
||||
<name>BuildEnv</name>
|
||||
<description></description>
|
||||
<choices class="java.util.Arrays$ArrayList">
|
||||
<a class="string-array">
|
||||
<string>native</string>
|
||||
<string>CMake</string>
|
||||
</a>
|
||||
</choices>
|
||||
</hudson.model.ChoiceParameterDefinition>
|
||||
<hudson.model.ChoiceParameterDefinition>
|
||||
<name>COMPILER</name>
|
||||
<description></description>
|
||||
<choices class="java.util.Arrays$ArrayList">
|
||||
<a class="string-array">
|
||||
<string>G++</string>
|
||||
<string>Clang</string>
|
||||
</a>
|
||||
</choices>
|
||||
</hudson.model.ChoiceParameterDefinition>
|
||||
<hudson.model.BooleanParameterDefinition>
|
||||
<name>macosx</name>
|
||||
<description></description>
|
||||
<defaultValue>true</defaultValue>
|
||||
</hudson.model.BooleanParameterDefinition>
|
||||
<hudson.model.BooleanParameterDefinition>
|
||||
<name>linux</name>
|
||||
<description></description>
|
||||
<defaultValue>true</defaultValue>
|
||||
</hudson.model.BooleanParameterDefinition>
|
||||
<hudson.model.BooleanParameterDefinition>
|
||||
<name>cygwin</name>
|
||||
<description></description>
|
||||
<defaultValue>true</defaultValue>
|
||||
</hudson.model.BooleanParameterDefinition>
|
||||
<hudson.model.BooleanParameterDefinition>
|
||||
<name>mingw</name>
|
||||
<description></description>
|
||||
<defaultValue>true</defaultValue>
|
||||
</hudson.model.BooleanParameterDefinition>
|
||||
<hudson.model.StringParameterDefinition>
|
||||
<name>COMMENT</name>
|
||||
<description></description>
|
||||
<defaultValue>None</defaultValue>
|
||||
</hudson.model.StringParameterDefinition>
|
||||
<hudson.model.BooleanParameterDefinition>
|
||||
<name>expat</name>
|
||||
<description></description>
|
||||
<defaultValue>true</defaultValue>
|
||||
</hudson.model.BooleanParameterDefinition>
|
||||
<hudson.model.BooleanParameterDefinition>
|
||||
<name>zlib</name>
|
||||
<description></description>
|
||||
<defaultValue>true</defaultValue>
|
||||
</hudson.model.BooleanParameterDefinition>
|
||||
<hudson.model.BooleanParameterDefinition>
|
||||
<name>libssh</name>
|
||||
<description></description>
|
||||
<defaultValue>false</defaultValue>
|
||||
</hudson.model.BooleanParameterDefinition>
|
||||
<hudson.model.BooleanParameterDefinition>
|
||||
<name>curl</name>
|
||||
<description></description>
|
||||
<defaultValue>false</defaultValue>
|
||||
</hudson.model.BooleanParameterDefinition>
|
||||
<hudson.model.BooleanParameterDefinition>
|
||||
<name>openssl</name>
|
||||
<description></description>
|
||||
<defaultValue>false</defaultValue>
|
||||
</hudson.model.BooleanParameterDefinition>
|
||||
</parameterDefinitions>
|
||||
</hudson.model.ParametersDefinitionProperty>
|
||||
</properties>
|
||||
<scm class="hudson.scm.SubversionReleaseSCM" plugin="svn-release-mgr@1.2">
|
||||
<locations>
|
||||
<hudson.scm.SubversionReleaseSCM_-ModuleLocation>
|
||||
<remote>svn://dev.exiv2.org/svn/trunk</remote>
|
||||
<local>.</local>
|
||||
</hudson.scm.SubversionReleaseSCM_-ModuleLocation>
|
||||
</locations>
|
||||
<useUpdate>false</useUpdate>
|
||||
</scm>
|
||||
<canRoam>true</canRoam>
|
||||
<disabled>true</disabled>
|
||||
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
|
||||
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
|
||||
<triggers>
|
||||
<hudson.triggers.SCMTrigger>
|
||||
<spec>H/10 * * * *
|
||||
</spec>
|
||||
<ignorePostCommitHooks>false</ignorePostCommitHooks>
|
||||
</hudson.triggers.SCMTrigger>
|
||||
</triggers>
|
||||
<concurrentBuild>true</concurrentBuild>
|
||||
<axes>
|
||||
<hudson.matrix.LabelAxis>
|
||||
<name>label</name>
|
||||
<values>
|
||||
<string>cygwin</string>
|
||||
<string>linux</string>
|
||||
<string>macosx</string>
|
||||
<string>mingw</string>
|
||||
<string>msvc</string>
|
||||
</values>
|
||||
</hudson.matrix.LabelAxis>
|
||||
</axes>
|
||||
<builders>
|
||||
<hudson.tasks.Shell>
|
||||
<command>./contrib/buildserver/jenkins_build.sh
|
||||
</command>
|
||||
</hudson.tasks.Shell>
|
||||
</builders>
|
||||
<publishers/>
|
||||
<buildWrappers/>
|
||||
<executionStrategy class="hudson.matrix.DefaultMatrixExecutionStrategyImpl">
|
||||
<runSequentially>false</runSequentially>
|
||||
</executionStrategy>
|
||||
</matrix-project>
|
||||
@ -1,275 +0,0 @@
|
||||
@@@Luis@@@@@b ;mm /##Gilles###\
|
||||
j@@@#Robin", Brad /@@@Thomas@@@@Q
|
||||
@@@# \ ## @@@b |@@@b
|
||||
@@@# .;;;;, ,;;;, ,;;;; ,;;;p .;;; 7@@ ]Alan
|
||||
@@@# j@@@@, ]@@#/ '@@@# j@@@# ]@@^ ;@@@"
|
||||
@@@Andreas@C "@@@p @@@" @@@b j@@@p @@b @@@#/
|
||||
@@@#^7"7%#\ ^@@@@@#~ Benb 1@@@ {@# s@@@#
|
||||
@@@# Niels @@@b @@@Q ]@# ;@@@#/
|
||||
@@@# ,@@##@@m @@@b @@@p @@C #@@#C
|
||||
@@@# ,/ s@@# @@@@ @@@b Volker @Tuan@
|
||||
]@@@Abhinav@@\ /@@@\ \@@@Q @@@Q %@@@# /@@@@Mahesh@@#
|
||||
/@@Raphael@@@@@\ /@@@@@\ C++ Metadata Library /@Sridhar@@@v0.26.1\
|
||||
|
||||
exiv2/contrib/cmake/msvc/ReadMe.txt
|
||||
-----------------------------------
|
||||
|
||||
How to use this
|
||||
---------------
|
||||
|
||||
1 Setting up your machine
|
||||
You need cmake.exe, svn.exe and 7z.exe on your PATH.
|
||||
|
||||
Please get "Windows" versions of cmake/svn/7z (NOT Cygwin or MinGW versions)
|
||||
|
||||
cd <exiv2dir>/contrib/cmake/msvc
|
||||
...\cmake\msvc> cmd /c "vcvars 2015 64 & cmakeBuild.cmd --build"
|
||||
|
||||
cmakeBuild.cmd creates Visual Studio solution/project files
|
||||
Option: --build says "build using the generated files"
|
||||
|
||||
More options: --static --test --debug --webready etc... (see below)
|
||||
|
||||
2 Selecting the version of Visual Studio
|
||||
|
||||
You should initialize the Visual Studio environment
|
||||
using the version of vcvars32.bat or vcvarsall.bat
|
||||
installed with Visual Studio. For example:
|
||||
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio 8\VC\bin\vcvars32.bat"
|
||||
|
||||
The batch file contrib\cmake\msvc\vcvars.bat is designed to take the pain
|
||||
out of this - provided Visual Studio is installed in %ProgramFiles(x86)%
|
||||
%ProgramFiles(x86)% is usually c:\Program Files (x86)
|
||||
|
||||
vcvars 2005 32 # sets 2005 x86
|
||||
vcvars 2010 64 # sets 2010 amd64
|
||||
|
||||
3 Always build "out of source". I recommend:
|
||||
cd <exiv2dir>\contrib\cmake\cmake
|
||||
cmd.exe
|
||||
vcvars 2015 64
|
||||
cmakeBuild --help # display syntax and options
|
||||
cmakeBuild --build
|
||||
....
|
||||
exit
|
||||
|
||||
+-------------------------------------------------------+
|
||||
| Never attempt to build in a directory with a space in |
|
||||
| the path name. Example c:\My Build Tree\exiv2\build |
|
||||
+-------------------------------------------------------+
|
||||
|
||||
You should never have reason to modify the code in cmakeBuild.cmd
|
||||
You may wish to change the defaults in cmakeDefaults.cmd
|
||||
You can change the defaults on the command-line (or modify cmakeDefaults.cmd)
|
||||
You can also change defaults using the dos set command. For example:
|
||||
set _CONFIG_=Debug
|
||||
|
||||
To unset an environment string, set _CONFIG_=
|
||||
|
||||
For your first build, I recommend the command:
|
||||
cmakeBuild --pause --verbose
|
||||
|
||||
This will print out a lot of information, and pause after each build step.
|
||||
|
||||
When you are building happily, you may prefer:
|
||||
cmakeBuild --silent
|
||||
|
||||
4 Options
|
||||
C:\Users\rmills\gnu\github\clanmills\exiv2\contrib\cmake\msvc>cmakeBuild --help
|
||||
Options: --help | --silent | --verbose | --pause | --dryrun | --trace | --test
|
||||
--build | --static | --unicode | --nls | --webready | --video | --samples
|
||||
--exiv2 C:\Users\rmills\gnu\github\clanmills\exiv2 | --work work | --config Release | --generator generator
|
||||
--zlib zlib-1.2.8 | --expat expat-2.1.0 | --curl curl-7.45.0 | --libssh libssh-0.7.2
|
||||
--bash c:\cygwin64\bin\bash.exe
|
||||
|
||||
Option switches.
|
||||
--help Print help message and quit
|
||||
--silent Run script with minimal "chatter"
|
||||
--verbose Run script with maximum "chatter"
|
||||
--pause Pause at every build step
|
||||
--dryrun Don't build anything. Report and quit
|
||||
--trace Show commands begin executed by the script (implies --build --samples)
|
||||
--test Execute the test suite after the build
|
||||
|
||||
--build Build the code
|
||||
--static Build and link static libraries and programs
|
||||
--dll Build DLLs (not static libraries)
|
||||
--unicode Build UNICODE path support
|
||||
--ascii Do not build UNICODE path support
|
||||
--nls Build with Natural Language Support
|
||||
--webready Build and Link the webready feature
|
||||
--video Build and link video support
|
||||
--samples Include samples in projects
|
||||
--debug Build debug (shorthand for --config Debug)
|
||||
--release Build release (shorthand for --config Release)
|
||||
|
||||
Option/values (See section 10 below)
|
||||
--zlib zlib-1.2.8
|
||||
--expath expat-2.1.0
|
||||
--curl curl-7.44.0
|
||||
--libssh libssh-0.7.2
|
||||
|
||||
Other build key/value pairs:
|
||||
--config Release | Debug
|
||||
--generator The script default is almost always correct and is passed as -G "Generator" to CMake
|
||||
--work The "work" directory in which the build will be performed (see 4 below)
|
||||
--bash Path to bash.exe to be used when --test is specified.
|
||||
|
||||
5 What gets built?
|
||||
The build is performed in work_Config (for example work_Release)
|
||||
The output is generated in dist
|
||||
dist\..mumble..\bin contains *.exe and *.dll files
|
||||
dist\..mumble..\lib contains *.lib files
|
||||
dist\..mumble..\include contains *.h and *.hpp files
|
||||
|
||||
mumble identifies the compiler and build.
|
||||
Example C:\gnu\github\exiv2\contrib\cmake\msvc\dist\2013\x64\dll\Release\bin
|
||||
2013 = Visual Studio Choices: 2005 | 2008 | 2010 | 2012 | 2013 | 2015 | 2017
|
||||
x64 = 64 bit build Win32 | x64
|
||||
dll = shared library dll | static
|
||||
Release = configuration Release | Debug | RelWithDebInfo | MinSizeRel
|
||||
|
||||
6 Building manually with CMake
|
||||
The cmake option -G Generator should be chosen for the version of Visual Studio installed.
|
||||
cmake --help for more information
|
||||
|
||||
I personally always build/test with Visual Studio 2005 in 64 bits.
|
||||
The generator is: "Visual Studio 8 2005 Win64"
|
||||
|
||||
cd <exiv2dir>
|
||||
mkdir ../build
|
||||
cd ../build
|
||||
|
||||
rem download support libraries
|
||||
svn export svn://dev.exiv2.org/svn/team/libraries/zlib-1.2.8.tar.gz
|
||||
svn export svn://dev.exiv2.org/svn/team/libraries/expat-2.1.0.tar.gz
|
||||
|
||||
...
|
||||
for webready
|
||||
you need curl-7.45.0 libssh-0.7.2 and openssl-1.0.1p
|
||||
See below: "About webready support libraries (openssl, libssh and curl)
|
||||
...
|
||||
|
||||
rem create a temp directory and a dist (distribution) directory
|
||||
mkdir temp # build, compile and link in this directory
|
||||
mkdir dist # the output artifacts are stored here
|
||||
|
||||
rem build zlib-1.2.8
|
||||
mkdir temp\zlib-1.2.8
|
||||
cd temp\zlib-1.2.8
|
||||
cmake -G "Visual Studio 8 2005 Win64" "-DCMAKE_INSTALL_PREFIX=..\..dist" ..\..\zlib-1.2.8
|
||||
cmake --build . # TAKE CARE with expat-2.1.0 use: cmake --build . --target expat
|
||||
cmake --build . --target install
|
||||
cd ..\..
|
||||
|
||||
rem build expat-2.1.0 and other required libraries
|
||||
|
||||
rem build exiv2
|
||||
mkdir temp\exiv2
|
||||
cd temp\exiv2
|
||||
cmake -G "Visual Studio 8 2005 Win64" "-DCMAKE_INSTALL_PREFIX=..\..\dist" ^
|
||||
"-DCMAKE_LIBRARY_PATH=..\..\dist\lib" "-DCMAKE_INCLUDE_PATH=..\..\dist\include" ^
|
||||
-DBUILD_SHARED_LIBS=ON ^
|
||||
..\..\..\<exiv2dir>
|
||||
cmake --build . --config Release
|
||||
cmake --build . --config Release --target install
|
||||
|
||||
7 About webready support libraries (openssl, libssh and curl)
|
||||
|
||||
+-----------------------------------------------+
|
||||
| cmakeBuild.cmd always builds shared (--dll) |
|
||||
| when you use --webready |
|
||||
| You can build static versions of exiv2 and |
|
||||
| supporting libraries with the msvc/ solution |
|
||||
+-----------------------------------------------+
|
||||
|
||||
a) openssl
|
||||
You cannot build openssl with CMake. However we have prebuilt binaries which
|
||||
you can download and extract into your build tree.
|
||||
|
||||
You will have to match the version to your compiler.
|
||||
In this example: vs2015/64 bit
|
||||
|
||||
svn export svn://dev.exiv2.org/svn/team/libraries/openssl-1.0.1p-vs2015.7z
|
||||
7z x openssl-1.0.1p-vs2015.7z
|
||||
xcopy/yesihq openssl-1.0.1p-vs2015\bin64 dist\bin"
|
||||
xcopy/yesihq openssl-1.0.1p-vs2015\lib64 dist\bin"
|
||||
xcopy/yesihq openssl-1.0.1p-vs2015\include64 dist\include"
|
||||
|
||||
In this example: vs2008/32 bit
|
||||
svn export svn://dev.exiv2.org/svn/team/libraries/openssl-1.0.1p-vs2008.7z
|
||||
7z x openssl-1.0.1p-vs2015.7z
|
||||
xcopy/yesihq openssl-1.0.1p-vs2008\bin dist\bin"
|
||||
xcopy/yesihq openssl-1.0.1p-vs2008\lib dist\bin"
|
||||
xcopy/yesihq openssl-1.0.1p-vs2008\include dist\include"
|
||||
|
||||
The script contrib/cmake/msvc/cmakeOpenssl was used to create the vs2005.7z file
|
||||
from a complete build performed by msvc/exiv2-webready.sln and openssl-1.0.1p source
|
||||
|
||||
b) curl
|
||||
curl does not seem to build with CMake.
|
||||
It announces itself "the curl cmake build system is poorly maintained. Be aware"
|
||||
|
||||
I have given up trying to get this to work and used nmake in the winbuild directory.
|
||||
For more information, read: winbuild\BUILD.WINDOWS.txt
|
||||
|
||||
c) libssh
|
||||
Three changes have been made to libssh to build with VS2015, VS2008, VS2995
|
||||
These have been reported (with fixes)
|
||||
VS2015: https://red.libssh.org/issues/214
|
||||
VS2005/8: https://red.libssh.org/issues/2205
|
||||
|
||||
The fixes are included in svn://dev.exiv2.org/svn/team/libraries/libssh-0.7.2.tar.gz
|
||||
A 'vanilla' version of libssh will may require those fixes to be applied.
|
||||
|
||||
8 Build options
|
||||
You can inspect CMake options by running 'grep option <exiv2dir>/CMakeLists.txt'
|
||||
|
||||
C:\cygwin64\home\rmills\gnu\github\clanmills\exiv2\contrib\cmake\msvc>cd ..\..\..
|
||||
C:\cygwin64\home\rmills\gnu\github\clanmills\exiv2>grep option CMakeLists.txt
|
||||
# options and their default values
|
||||
option( BUILD_SHARED_LIBS "Build exiv2 as a shared library (dll)" ON )
|
||||
option( EXIV2_ENABLE_XMP "Build with XMP metadata support" ON )
|
||||
option( EXIV2_ENABLE_PNG "Build with png support (requires libz)" ON )
|
||||
option( EXIV2_ENABLE_NLS "Build native language support (requires gettext)" ON )
|
||||
option( EXIV2_ENABLE_PRINTUCS2 "Build with Printucs2" ON )
|
||||
option( EXIV2_ENABLE_LENSDATA "Build including lens data" ON )
|
||||
option( EXIV2_ENABLE_VIDEO "Build video support into library" OFF )
|
||||
option( EXIV2_ENABLE_WEBREADY "Build webready support into library" OFF )
|
||||
option( EXIV2_ENABLE_DYNAMIC_RUNTIME "Use dynamic runtime (used for static libs)" OFF )
|
||||
option( EXIV2_ENABLE_WIN_UNICODE "Use Unicode paths (wstring) on Windows" OFF )
|
||||
option( EXIV2_ENABLE_CURL "USE Libcurl for HttpIo" OFF )
|
||||
option( EXIV2_ENABLE_SSH "USE Libssh for SshIo" OFF )
|
||||
option( EXIV2_BUILD_SAMPLES "Build sample applications" ON )
|
||||
option( EXIV2_BUILD_PO "Build translations files" OFF )
|
||||
option( EXIV2_BUILD_EXIV2_COMMAND "Build exiv2 command-line executable" ON )
|
||||
|
||||
9 Running the test suite
|
||||
http://dev.exiv2.org/projects/exiv2/wiki/How_do_I_run_the_test_suite_for_Exiv2
|
||||
|
||||
You can run the test-suite directly from cmakeBuild.cmd with the argument --test
|
||||
You need cygwin's bash.exe to run the test suite.
|
||||
|
||||
10 Building with different versions of the support libraries
|
||||
You can change the standard libraries. For example, to build with curl-7.39.0
|
||||
1) set _CURL_=curl-7.39.0
|
||||
2) add curl-7.39.0.tar.gz in your build directory
|
||||
|
||||
To change the version of openssl:
|
||||
1) set _OPENSSL_=openssl-1.0.1j
|
||||
2) add openssl-1.0.1j-vs2015.zip into your build directory
|
||||
|
||||
11 Rebuilding with VS 2005/8/10/12/13/15/17 32/64
|
||||
The script cmakeBuildAll.cmd is provided for convenience:
|
||||
cmakeBuildAll.cmd --test > rebuildAll.txt
|
||||
To view progress, open another shell: tail -f rebuildAll.txt
|
||||
|
||||
cmakeBuildAll.cmd takes about a hour if you don't specify --webready
|
||||
14 build+test cycles of about 5 minutes each. Just over 1 hour.
|
||||
With webready, 14 build+test cycles of 12 minutes = 3 hours
|
||||
>>>>>>> robin/master
|
||||
|
||||
Robin Mills
|
||||
robin@clanmills.com
|
||||
Updated: 2017-09-13
|
||||
@ -1,12 +0,0 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int,const char**)
|
||||
{
|
||||
const char* vs[] = { "unknown" , "2005", "2008", "2010", "2012", "2013", "2015","2017" };
|
||||
int v = (_MSC_VER-1300)/100;
|
||||
if ( v < 0 || v >= (sizeof(vs)/sizeof(vs[0])) ) v = 0;
|
||||
if ( v == 6 && _MSC_VER >= 1910 ) v++ ; // 2017 _MSC_VAR == 1910!
|
||||
|
||||
fprintf(stderr,"_%s = %d (%s) sizeof(void*) = %d\n","MSC_VER",_MSC_VER,vs[v],(int)sizeof(void*));
|
||||
return 0;
|
||||
}
|
||||
@ -1,515 +0,0 @@
|
||||
@echo off
|
||||
setlocal enableextensions
|
||||
|
||||
rem ----
|
||||
rem always run this script in <exiv2dir>/contrib/cmake/msvc
|
||||
cd %~dp0
|
||||
|
||||
set "_BUILDDIR_=%CD%"
|
||||
call:echo calling cmakeDefaults.cmd
|
||||
call cmakeDefaults.cmd
|
||||
IF ERRORLEVEL 1 (
|
||||
echo "*** cmakeDefaults.cmd has failed ***" >&2
|
||||
GOTO error_end
|
||||
)
|
||||
|
||||
:GETOPTS
|
||||
set _CLAIMED_=0
|
||||
if /I "%1" == "--bash" call:set "_BASH_=%2"& shift
|
||||
if /I "%1" == "--config" call:set "_CONFIG_=%2"& shift
|
||||
if /I "%1" == "--curl" call:set "_CURL_=%2"& shift
|
||||
if /I "%1" == "--exiv2" call:set "_EXIV2_=%2"& shift
|
||||
if /I "%1" == "--expat" call:set "_EXPAT_=%2"& shift
|
||||
if /I "%1" == "--generator" call:set "_GENERATOR_=%2"& shift
|
||||
if /I "%1" == "--openssl" call:set "_OPENSSL_=%2"& shift
|
||||
if /I "%1" == "--libssh" call:set "_LIBSSH_=%2"& shift
|
||||
if /I "%1" == "--work" call:set "_WORK_=%2"& shift
|
||||
if /I "%1" == "--zlib" call:set "_ZLIB_=%2"& shift
|
||||
|
||||
if /I "%1" == "--help" call:Help && goto end
|
||||
if /I "%1" == "--dryrun" call:set "_DRYRUN_=1"
|
||||
if /I "%1" == "--build" call:set "_BUILD_=1"
|
||||
if /I "%1" == "--samples" call:set "_SAMPLES_=1"
|
||||
if /I "%1" == "--pause" call:set "_PAUSE_=1"
|
||||
if /I "%1" == "--silent" call:set "_SILENT_=1"
|
||||
if /I "%1" == "--static" call:set "_SHARED_=0"
|
||||
if /I "%1" == "--shared" call:set "_SHARED_=1"
|
||||
if /I "%1" == "--dll" call:set "_SHARED_=1"
|
||||
if /I "%1" == "--test" call:set "_TEST_=1"
|
||||
if /I "%1" == "--trace" call:set "_TRACE_=1"
|
||||
if /I "%1" == "--verbose" call:set "_VERBOSE_=1"
|
||||
if /I "%1" == "--video" call:set "_VIDEO_=1"
|
||||
if /I "%1" == "--webready" call:set "_WEBREADY_=1"
|
||||
if /I "%1" == "--unicode" call:set "_UNICODE_=1"
|
||||
if /I "%1" == "--ascii" call:set "_UNICODE_=0"
|
||||
if /I "%1" == "--nls" call:set "_NLS_=1"
|
||||
if /I "%1" == "--debug" call:set "_CONFIG_=Debug"
|
||||
if /I "%1" == "--release" call:set "_CONFIG_=Release"
|
||||
|
||||
if /I "%_CLAIMED_%" == "0" (
|
||||
echo "*** unknown command argument %1 ***" >&2
|
||||
goto error_end
|
||||
)
|
||||
|
||||
shift
|
||||
if not (%1) EQU () goto GETOPTS
|
||||
goto main
|
||||
|
||||
:set
|
||||
set %1
|
||||
set _CLAIMED_=1
|
||||
exit /b 0
|
||||
|
||||
:help
|
||||
echo Options: --help ^| --silent ^| --verbose ^| --pause ^| --dryrun ^| --trace ^| --test
|
||||
echo. --build ^| --static ^| --unicode ^| --nls ^| --webready ^| --video ^| --samples
|
||||
echo. --exiv2 %_EXIV2_% ^| --work %_WORK_% ^| --config %_CONFIG_% ^| --generator generator
|
||||
echo. --zlib %_ZLIB_% ^| --expat %_EXPAT_% ^| --curl %_CURL_% ^| --libssh %_LIBSSH_%
|
||||
echo. --bash %_BASH_%
|
||||
exit /b 0
|
||||
|
||||
:report
|
||||
echo.&&echo.&&echo.
|
||||
echo.------ cmakeBuild Settings ----------
|
||||
echo.bash = %_BASH_%
|
||||
echo.binpath = %_BINPATH_%
|
||||
echo.build = %_BUILD_%
|
||||
echo.builddir = %_BUILDDIR_%
|
||||
echo.config = %_CONFIG_%
|
||||
echo.curl = %_CURL_%
|
||||
echo.dryrun = %_DRYRUN_%
|
||||
echo.exiv2 = %_EXIV2_%
|
||||
echo.expat = %_EXPAT_%
|
||||
echo.generator = %_GENERATOR_%
|
||||
echo.install = %_INSTALL_%
|
||||
echo.incpath = %_INCPATH_%
|
||||
echo.libpath = %_LIBPATH_%
|
||||
echo.libssh = %_LIBSSH_%
|
||||
echo.nls = %_NLS_%
|
||||
echo.openssl = %_OPENSSL_%
|
||||
echo.platform = %PLATFORM%
|
||||
echo.samples = %_SAMPLES_%
|
||||
echo.shared = %_SHARED_%
|
||||
echo.test = %_TEST_%
|
||||
echo.unicode = %_UNICODE_%
|
||||
echo.vc = %_VC_%
|
||||
echo.video = %_VIDEO_%
|
||||
echo.vs = %_VS_%
|
||||
echo.webready = %_WEBREADY_%
|
||||
echo.work = %_WORK_%
|
||||
echo.zlib = %_ZLIB_%
|
||||
echo.&&echo.&&echo.
|
||||
exit /b 0
|
||||
|
||||
:main
|
||||
if NOT DEFINED _SILENT_ set _VERBOSE_=1
|
||||
set _UNSUPPORTED_=
|
||||
|
||||
rem ----
|
||||
call:echo _EXIV2_ = %_EXIV2_%
|
||||
|
||||
rem ----
|
||||
call:echo testing VSINSTALLDIR "%VSINSTALLDIR%"
|
||||
IF NOT DEFINED VSINSTALLDIR (
|
||||
echo "VSINSTALLDIR not set. Run vcvars32.bat or vcvarsall.bat or vcvars.bat ***"
|
||||
GOTO error_end
|
||||
)
|
||||
IF NOT EXIST "%VSINSTALLDIR%" (
|
||||
echo "VSINSTALLDIR %VSINSTALLDIR% does not exist. Run vcvars32.bat or vcvarsall.bat ***"
|
||||
GOTO error_end
|
||||
)
|
||||
|
||||
if /I "%VSINSTALLDIR%" == "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\" set "_VS_=2017" && set "_VC_=15"
|
||||
if /I "%VSINSTALLDIR%" == "%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\" set "_VS_=2015" && set "_VC_=14"
|
||||
if /I "%VSINSTALLDIR%" == "%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\" set "_VS_=2013" && set "_VC_=12"
|
||||
if /I "%VSINSTALLDIR%" == "%ProgramFiles(x86)%\Microsoft Visual Studio 11.0\" set "_VS_=2012" && set "_VC_=11"
|
||||
if /I "%VSINSTALLDIR%" == "%ProgramFiles(x86)%\Microsoft Visual Studio 10.0\" set "_VS_=2010" && set "_VC_=10"
|
||||
if /I "%VSINSTALLDIR%" == "%ProgramFiles(x86)%\Microsoft Visual Studio 9.0" set "_VS_=2008" && set "_VC_=9"
|
||||
if /I "%VSINSTALLDIR%" == "%ProgramFiles(x86)%\Microsoft Visual Studio 8" set "_VS_=2005" && set "_VC_=8"
|
||||
|
||||
if NOT DEFINED _VC_ set _VS_=
|
||||
if NOT DEFINED _VS_ (
|
||||
echo "*** Unsupported version of Visual Studio in '%VSINSTALLDIR%' ***"
|
||||
GOTO error_end
|
||||
)
|
||||
|
||||
call:echo testing architecture
|
||||
set _ARCH_=64
|
||||
if /I "%PROCESSOR_ARCHITECTURE%" == "x86" set _ARCH_=32
|
||||
if /I "%VSCMD_ARG_HOST_ARCH%" == "x86" set _ARCH_=32
|
||||
|
||||
if /I "%_ARCH_%" == "32" (
|
||||
set Platform=Win32
|
||||
set RawPlatform=x86
|
||||
set CpuPlatform=ia32
|
||||
)
|
||||
|
||||
if NOT DEFINED Platform (
|
||||
set Platform=x64
|
||||
set RawPlatform=x64
|
||||
set CpuPlatform=intel64
|
||||
)
|
||||
call:echo Platform = %Platform% (%RawPlatform%)
|
||||
|
||||
call:echo determine generator
|
||||
if NOT DEFINED _GENERATOR_ (
|
||||
set "_GENERATOR_=Visual Studio %_VC_% %_VS_%"
|
||||
IF /I "%Platform%" == "x64" set "_GENERATOR_=Visual Studio %_VC_% %_VS_% Win64"
|
||||
)
|
||||
call:echo GENERATOR = %_GENERATOR_%
|
||||
|
||||
rem ----
|
||||
call:echo testing out of source build
|
||||
dir/s exiv2.cpp >NUL 2>NUL
|
||||
IF NOT ERRORLEVEL 1 (
|
||||
echo "*** error: do not execute this script within the exiv2 source directory ***"
|
||||
goto error_end
|
||||
)
|
||||
|
||||
rem ----
|
||||
call:echo testing compiler
|
||||
cl > NUL 2>NUL
|
||||
IF ERRORLEVEL 1 (
|
||||
echo "*** ensure cl is on path. Run vcvars32.bat or vcvarsall.bat ***"
|
||||
GOTO error_end
|
||||
)
|
||||
if NOT DEFINED _SILENT_ cl
|
||||
|
||||
rem ----
|
||||
call:echo testing svn is on path
|
||||
svn --version > NUL
|
||||
IF ERRORLEVEL 1 (
|
||||
echo "*** please ensure svn.exe is on the PATH ***"
|
||||
GOTO error_end
|
||||
)
|
||||
|
||||
rem ----
|
||||
call:echo testing 7z is on path
|
||||
7z > NUL
|
||||
IF ERRORLEVEL 1 (
|
||||
echo "*** please ensure 7z.exe is on the PATH ***"
|
||||
GOTO error_end
|
||||
)
|
||||
|
||||
rem ----
|
||||
call:echo testing cmake is on path
|
||||
cmake --version > NUL
|
||||
IF ERRORLEVEL 1 (
|
||||
echo "*** please ensure cmake.exe is on the PATH ***"
|
||||
GOTO error_end
|
||||
)
|
||||
|
||||
rem ----
|
||||
call:echo fixups
|
||||
set _WORK_=%_WORK_%_%_CONFIG_%
|
||||
if DEFINED _TRACE_ (
|
||||
set _VERBOSE_=1
|
||||
echo on
|
||||
)
|
||||
if DEFINED _TEST_ (
|
||||
set _SAMPLES_=1
|
||||
set _BUILD_=1
|
||||
)
|
||||
if DEFINED _WEBREADY_ set _SHARED_=1
|
||||
|
||||
if /I "%_SHARED_%" == "1" set _MODE_=dll
|
||||
if /I "%_SHARED_%" == "0" set _MODE_=static
|
||||
|
||||
rem ----
|
||||
call:echo testing work directory _WORK_ = %_WORK_%
|
||||
if EXIST "%_WORK_%" rmdir/s/q "%_WORK_%"
|
||||
del/s CMakeCache.txt >NUL 2>NUL
|
||||
IF NOT EXIST "%_WORK_%" mkdir "%_WORK_%"
|
||||
pushd "%_WORK_%"
|
||||
set "_WORK_=%CD%"
|
||||
popd
|
||||
call:echo _WORK_ = %_WORK_%
|
||||
|
||||
rem ----
|
||||
call:echo testing INSTALL
|
||||
SET _INSTALL_=dist\%_VS_%\%Platform%\%_MODE_%\%_CONFIG_%
|
||||
if NOT EXIST %_INSTALL_% mkdir %_INSTALL_%
|
||||
pushd %_INSTALL_%
|
||||
set "_INSTALL_=%CD%"
|
||||
popd
|
||||
call:echo _INSTALL_ = %_INSTALL_%
|
||||
|
||||
set "_LIBPATH_=%_INSTALL_%\bin"
|
||||
set "_INCPATH_=%_INSTALL_%\include"
|
||||
set "_BINPATH_=%_INSTALL_%\bin"
|
||||
set "_ONCPATH_=%_INCPATH_%"
|
||||
set _LIBPATH_=%_LIBPATH_:\=/%
|
||||
set _INCPATH_=%_INCPATH_:\=/%
|
||||
set _BINPATH_=%_BINPATH_:\=/%
|
||||
|
||||
if defined _TEST_ if NOT EXIST "%_BASH_%" (
|
||||
echo "*** bash does not exist %_BASH_% ***"
|
||||
GOTO error_end
|
||||
)
|
||||
|
||||
if NOT DEFINED _GENERATOR_ set "_GENERATOR_=%VS_CMAKE%"
|
||||
if /I "%_GENERATOR_%" == "NMake" set "_GENERATOR_=NMake Makefiles"
|
||||
|
||||
rem Fixup for openssl/vs 2017
|
||||
if /I "%_OPENSSL_%" == "openssl-1.0.1p" if /I "%_VS_%" == 2017 set _OPENSSL_ = openssl-1.1.0f
|
||||
|
||||
call:cltest
|
||||
call:report
|
||||
|
||||
IF DEFINED _DRYRUN_ goto end
|
||||
IF DEFINED _PAUSE_ pause
|
||||
|
||||
echo ---------- ZLIB building with cmake ------------------
|
||||
call:buildLib %_ZLIB_% -DCMAKE_INSTALL_PREFIX=%_INSTALL_%
|
||||
|
||||
rem Fixup ZLIB. This should be possible inside CMake
|
||||
if /I "%_MODE_%" == "static" (
|
||||
if EXIST "%_WORK_%\%_ZLIB_%\%_CONFIG_%\zlibstaticd.lib" copy/y "%_WORK_%\%_ZLIB_%\%_CONFIG_%\zlibstaticd.lib" "%_LIBPATH_%\zlibd.lib"
|
||||
if EXIST "%_WORK_%\%_ZLIB_%\%_CONFIG_%\zlibstatic.lib" copy/y "%_WORK_%\%_ZLIB_%\%_CONFIG_%\zlibstatic.lib" "%_LIBPATH_%\zlib.lib"
|
||||
)
|
||||
|
||||
echo ---------- EXPAT building with cmake -----------------
|
||||
set "_TARGET_=--target expat"
|
||||
if /I "%_SHARED_%" == "0" (
|
||||
call:buildLib %_EXPAT_% -DCMAKE_INSTALL_PREFIX=%_INSTALL_% -DBUILD_shared=0 -DCMAKE_C_FLAGS_RELEASE=/MT -DCMAKE_C_FLAGS_DEBUG=/MTd -DBUILD_examples=0 -DBUILD_tests=0
|
||||
) else (
|
||||
call:buildLib %_EXPAT_% -DCMAKE_INSTALL_PREFIX=%_INSTALL_% -DBUILD_examples=0 -DBUILD_tests=0
|
||||
)
|
||||
set _TARGET_=
|
||||
|
||||
if DEFINED _WEBREADY_ (
|
||||
echo ---------- OPENSSL installing pre-built binaries -----------------
|
||||
call:getOPENSSL %_OPENSSL_%
|
||||
if errorlevel 1 set _OPENSSL_= && set _WEBREADY_=
|
||||
)
|
||||
|
||||
if DEFINED _WEBREADY_ (
|
||||
echo ---------- LIBSSH building with cmake -----------------
|
||||
call:buildLib %_LIBSSH_% -DCMAKE_INSTALL_PREFIX=%_INSTALL_% -DCMAKE_LIBRARY_PATH=%_LIBPATH_% -DCMAKE_INCLUDE_PATH=%_INCPATH_% -DWITH_GSSAPI=OFF -DWITH_ZLIB=ON -DWITH_SFTP=ON -DWITH_SERVER=OFF -DWITH_EXAMPLES=OFF -DWITH_NACL=OFF -DWITH_PCAP=OFF
|
||||
if errorlevel 1 set _LIBSSH_= && set _WEBREADY_=
|
||||
)
|
||||
|
||||
if DEFINED _WEBREADY_ (
|
||||
set CURL_CMAKE=
|
||||
if DEFINED CURL_CMAKE (
|
||||
echo ---------- CURL building with cmake -----------------
|
||||
call:buildLib %_CURL_% -DCMAKE_INSTALL_PREFIX=%_INSTALL_% -DCMAKE_LIBRARY_PATH=%_LIBPATH_% -DCMAKE_INCLUDE_PATH=%_INCPATH_% -DWITH_GSSAPI=OFF -DWITH_ZLIB=OFF -DWITH_SFTP=OFF -DWITH_SERVER=OFF -DWITH_EXAMPLES=OFF -DWITH_NACL=OFF -DWITH_PCAP=OFF -DCMAKE_USE_LIBSSH2=OFF -DCMAKE_USE_LIBSSH=OFF
|
||||
if errorlevel 1 set _WEBREADY_=
|
||||
) ELSE (
|
||||
rmdir/s/q "%_ONCPATH_%\curl" >NUL 2>NUL
|
||||
if NOT EXIST "%_ONCPATH_%"\curl (
|
||||
echo ---------- CURL building with nmake -----------------
|
||||
IF NOT EXIST %_CURL_%.tar.gz svn export svn://dev.exiv2.org/svn/team/libraries/%_CURL_%.tar.gz >NUL
|
||||
pushd "%_WORK_%"
|
||||
|
||||
IF EXIST %_CURL_% rmdir/s/q %_CURL_%
|
||||
IF NOT EXIST %_CURL_%.tar.gz copy "%_BUILDDIR_%\%_CURL_%.tar.gz" >NUL
|
||||
IF NOT EXIST %_CURL_%.tar 7z x %_CURL_%.tar.gz
|
||||
7z x %_CURL_%.tar
|
||||
|
||||
cd "%_CURL_%\winbuild"
|
||||
call:run nmake /f Makefile.vc mode=%_MODE_% vc=%_VC_% machine=%RawPlatform% "WITH_DEVEL=%_INSTALL_%" WITH_ZLIB=%_MODE_% ENABLE_WINSSL=yes ENABLE_IDN=no
|
||||
if errorlevel 1 set _CURL_= && set _WEBREADY_=
|
||||
if DEFINED _WEBREADY_ (
|
||||
cd ..
|
||||
call:run copy builds\libcurl-vc%_VC_%-%RawPlatform%-release-%_MODE_%-zlib-%_MODE_%-ipv6-sspi-winssl\lib\* "%_LIBPATH_%"
|
||||
call:run copy builds\libcurl-vc%_VC_%-%RawPlatform%-release-%_MODE_%-zlib-%_MODE_%-ipv6-sspi-winssl\bin\* "%_BINPATH_%"
|
||||
call:run xcopy/yesihq builds\libcurl-vc%_VC_%-%RawPlatform%-release-%_MODE_%-zlib-%_MODE_%-ipv6-sspi-winssl\include\curl "%_ONCPATH_%"\curl
|
||||
)
|
||||
popd
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
if NOT DEFINED _WEBREADY_ set _CURL_= && set _LIBSSH_=
|
||||
|
||||
echo ---------- EXIV2 building with cmake ------------------
|
||||
set "EXIV_B=%_WORK_%\exiv2"
|
||||
IF EXIST "%EXIV_B%" rmdir/s/q "%EXIV_B%"
|
||||
IF NOT EXIST "%EXIV_B%" mkdir "%EXIV_B%"
|
||||
pushd "%EXIV_B%"
|
||||
set ENABLE_CURL=-DEXIV2_ENABLE_CURL=OFF
|
||||
set ENABLE_LIBSSH=-DEXIV2_ENABLE_SSH=OFF
|
||||
set ENABLE_WEBREADY=-DEXIV2_ENABLE_WEBREADY=OFF
|
||||
set ENABLE_VIDEO=-DEXIV2_ENABLE_VIDEO=OFF
|
||||
set ENABLE_SHARED=ON
|
||||
set ENABLE_DYNAMIC=ON
|
||||
|
||||
if defined _CURL_ set ENABLE_CURL=-DEXIV2_ENABLE_CURL=ON
|
||||
if defined _LIBSSH_ set ENABLE_LIBSSH=-DEXIV2_ENABLE_SSH=ON
|
||||
if defined _WEBREADY_ set ENABLE_WEBREADY=-DEXIV2_ENABLE_WEBREADY=ON
|
||||
if defined _VIDEO_ set ENABLE_VIDEO=-DEXIV2_ENABLE_VIDEO=ON
|
||||
if /I "%_MODE_%" == "static" (
|
||||
set ENABLE_SHARED=OFF
|
||||
set ENABLE_DYNAMIC=OFF
|
||||
)
|
||||
set BUILD_SAMPLES=OFF
|
||||
if DEFINED _SAMPLES_ set BUILD_SAMPLES=ON
|
||||
|
||||
call:run cmake -G "%_GENERATOR_%" -DCMAKE_BUILD_TYPE=%_CONFIG_% -DCMAKE_INSTALL_PREFIX=%_INSTALL_% -DCMAKE_LIBRARY_PATH=%_LIBPATH_% -DCMAKE_INCLUDE_PATH=%_INCPATH_% ^
|
||||
-DEXIV2_ENABLE_NLS=%_NLS_% -DEXIV2_BUILD_SAMPLES=%BUILD_SAMPLES% ^
|
||||
-DEXIV2_ENABLE_WIN_UNICODE=%_UNICODE_% -DBUILD_SHARED_LIBS=%ENABLE_SHARED% ^
|
||||
-DEXIV2_ENABLE_DYNAMIC_RUNTIME=%ENABLE_DYNAMIC% ^
|
||||
%ENABLE_WEBREADY% %ENABLE_CURL% %ENABLE_LIBSSH% %ENABLE_VIDEO% ^
|
||||
"%_EXIV2_%"
|
||||
|
||||
IF errorlevel 1 (
|
||||
echo "*** cmake errors in EXIV2 ***" >&2
|
||||
popd
|
||||
goto error_end
|
||||
)
|
||||
|
||||
rem if DEFINED _BUILDX_ devenv %_WORK_%\exiv2\exiv2.sln /Build "%_CONFIG_%|%Platform%" /ProjectConfig INSTALL
|
||||
|
||||
if DEFINED _BUILD_ call:run cmake --build . --config %_CONFIG_%
|
||||
IF errorlevel 1 (
|
||||
echo "*** build errors in EXIV2 ***" >&2
|
||||
popd
|
||||
goto error_end
|
||||
)
|
||||
|
||||
if DEFINED _BUILD_ call:run cmake --build . --config %_CONFIG_% --target install
|
||||
IF errorlevel 1 (
|
||||
echo "*** install errors in EXIV2 ***" >&2
|
||||
popd
|
||||
goto error_end
|
||||
)
|
||||
popd
|
||||
|
||||
if defined _TEST_ (
|
||||
pushd "%_EXIV2_%\test"
|
||||
"%_BASH_%" -c "export 'PATH=/usr/bin:$PATH' ; ./testMSVC.sh $(cygpath -au '%_BINPATH_%')"
|
||||
popd
|
||||
exit /b 0
|
||||
)
|
||||
|
||||
rem -----------------------------------------
|
||||
rem Exit
|
||||
rem end syntax: GOTO end
|
||||
:end
|
||||
endlocal
|
||||
exit /b 0
|
||||
|
||||
rem end with an error syntax: GOTO error_end
|
||||
:error_end
|
||||
endlocal
|
||||
exit /b 1
|
||||
|
||||
rem -----------------------------------------
|
||||
rem Functions
|
||||
rem echo (or don't if --silent). syntax: call:echo args ...
|
||||
:echo
|
||||
if NOT DEFINED _SILENT_ echo %*%
|
||||
exit /b 0
|
||||
|
||||
rem run a command. syntax call:run args
|
||||
:run
|
||||
if defined _VERBOSE_ (
|
||||
echo.
|
||||
echo ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
echo CD = %CD%
|
||||
echo %*%
|
||||
if DEFINED _PAUSE_ pause
|
||||
)
|
||||
if defined _SILENT_ %*% >nul 2>nul
|
||||
if NOT defined _SILENT_ %*%
|
||||
|
||||
set _RESULT_=%ERRORLEVEL%
|
||||
if DEFINED _PAUSE_ pause
|
||||
exit /b %_RESULT_%
|
||||
|
||||
rem build a library with CMake. syntax: call:buildLib name cmake-args ...
|
||||
:buildLib
|
||||
cd "%_BUILDDIR_%"
|
||||
set "LOB=%1"
|
||||
shift
|
||||
|
||||
set "LOB_B=%_WORK_%\%LOB%"
|
||||
set "LOB_TAR=%LOB%.tar"
|
||||
set "LOB_TAR_GZ=%LOB_TAR%.gz"
|
||||
|
||||
IF NOT EXIST "%LOB_TAR_GZ%" svn export svn://dev.exiv2.org/svn/team/libraries/%LOB_TAR_GZ% >NUL
|
||||
IF NOT EXIST "%LOB_TAR%" 7z x "%LOB_TAR_GZ%"
|
||||
IF NOT EXIST "%LOB%" 7z x "%LOB_TAR%"
|
||||
if NOT EXIST "%LOB_B%" mkdir "%LOB_B%"
|
||||
|
||||
pushd "%LOB_B%"
|
||||
call:run cmake -G "%_GENERATOR_%" -DCMAKE_BUILD_TYPE=%_CONFIG_% %* ..\..\%LOB%
|
||||
IF errorlevel 1 (
|
||||
echo "*** cmake errors in %LOB% ***"
|
||||
popd
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
call:run cmake --build . --config %_CONFIG_% %_TARGET_%
|
||||
IF errorlevel 1 (
|
||||
echo "*** warning: build errors in %LOB% ***"
|
||||
)
|
||||
|
||||
rem --static expat fails to install on VS 2010+
|
||||
set buildLibInstallExpatStatic=0
|
||||
if /I "%_TARGET_%" == "--target expat" if /I "%_MODE_%" == "static" set buildLibInstallExpatStatic=1
|
||||
|
||||
if /I "%buildLibInstallExpatStatic%" == "1" (
|
||||
rem msvc\expat-2.1.0\lib\expat*.h => msvc\dist\2005\x64\static\Release\include
|
||||
call:run copy/y "%_BUILDDIR_%\%LOB%\lib\expat*.h" "%_ONCPATH_%"
|
||||
|
||||
rem msvc\work\expat-2.1.0\release\*.lib => msvc\dist\2005\x64\static\Release\lib
|
||||
call:run copy/y "%_WORK_%\%LOB%\%_CONFIG_%\*.lib" "%_INSTALL_%\lib"
|
||||
) else (
|
||||
call:run cmake --build . --config %_CONFIG_% --target install
|
||||
)
|
||||
|
||||
IF errorlevel 1 (
|
||||
echo "*** warning: install errors in %LOB% ***"
|
||||
)
|
||||
popd
|
||||
exit /b 0
|
||||
|
||||
rem -----------------------------------------
|
||||
rem get pre-built openssl binaries syntax: call:getOPENSSL version
|
||||
:getOPENSSL
|
||||
cd "%_BUILDDIR_%"
|
||||
|
||||
set "LOB=%1-vs%_VS_%"
|
||||
set "LOB_7Z=%LOB%.7z"
|
||||
|
||||
IF NOT EXIST "%LOB_7Z%" svn export svn://dev.exiv2.org/svn/team/libraries/%LOB_7Z% >NUL
|
||||
IF NOT EXIST "%LOB%" 7z x "%LOB_7Z%" >nul
|
||||
|
||||
set _BINARY_=bin
|
||||
set _LIBRARY_=lib
|
||||
set _INCLUDE_=include
|
||||
if /I "%Platform%" == "x64" (
|
||||
set "_BINARY_=bin64"
|
||||
set "_LIBRARY_=lib64"
|
||||
set "_INCLUDE_=include64"
|
||||
)
|
||||
|
||||
xcopy/yesihq "%LOB%\%_BINARY_%" "%_INSTALL_%\bin"
|
||||
xcopy/yesihq "%LOB%\%_LIBRARY_%" "%_INSTALL_%\lib"
|
||||
xcopy/yesihq "%LOB%\%_INCLUDE_%" "%_INSTALL_%\include"
|
||||
|
||||
rem curl requires libeay32 and ssleay32 (and not libeay32MD and ssleay32MD)
|
||||
pushd "%_INSTALL_%\lib"
|
||||
copy libeay32MD.lib libeay32.lib
|
||||
copy ssleay32MD.lib ssleay32.lib
|
||||
popd
|
||||
pushd "%_INSTALL_%\bin"
|
||||
copy libeay32MD.dll libeay32.dll
|
||||
copy ssleay32MD.dll ssleay32.dll
|
||||
popd
|
||||
|
||||
exit /b 0
|
||||
|
||||
rem -----------------------------------------
|
||||
rem this runs the compiler and reports _MSC_VER and sizeof(void*)
|
||||
:cltest
|
||||
pushd "%_EXIV2_%\contrib\cmake\msvc"
|
||||
nmake -a cltest.exe
|
||||
cltest.exe
|
||||
popd
|
||||
exit /b %ERRORLEVEL%
|
||||
|
||||
rem That's all Folks!
|
||||
rem -----------------------------------------
|
||||
@ -1 +0,0 @@
|
||||
for %%a in (64 32) do for %%v in (2017 2015 2013 2012 2010 2008 2005) do for %%s in (--static --dll) do for %%r in (--release --debug) do for %%u in (--ascii --unicode) do cmd /c "vcvars %%v %%a && cmakeBuild --test %%s %%r %%u %* 2>&1"
|
||||
@ -1,35 +0,0 @@
|
||||
@echo off
|
||||
|
||||
rem set up some defaults to be used by cmakeBuild.cmd and related scripts
|
||||
rem use environment strings to set defaults which will not be clobbered by this script
|
||||
|
||||
if NOT DEFINED _CONFIG_ set _CONFIG_=Release
|
||||
if NOT DEFINED _WORK_ set _WORK_=work
|
||||
if NOT DEFINED _EXIV2_ set _EXIV2_=..\..\..
|
||||
if NOT DEFINED _CURL_ set _CURL_=curl-7.45.0
|
||||
if NOT DEFINED _LIBSSH_ set _LIBSSH_=libssh-0.7.2
|
||||
if NOT DEFINED _OPENSSL_ set _OPENSSL_=openssl-1.0.1p
|
||||
if NOT DEFINED _ZLIB_ set _ZLIB_=zlib-1.2.8
|
||||
if NOT DEFINED _EXPAT_ set _EXPAT_=expat-2.1.0
|
||||
if NOT DEFINED _BASH_ set _BASH_=c:\cygwin64\bin\bash.exe
|
||||
if NOT DEFINED _SHARED_ set _SHARED_=1
|
||||
if NOT DEFINED _UNICODE_ set _UNICODE_=0
|
||||
if NOT DEFINED _NLS_ set _NLS_=0
|
||||
if NOT DEFINED COPYCMD set COPYCMD=/Y
|
||||
|
||||
rem ---------- check that EXIV2 exists
|
||||
echo checking that %_EXIV2_% exists
|
||||
if NOT EXIST %_EXIV2_% (
|
||||
echo "_EXIV2_ = %_EXIV2_% does not exist ***" >&2
|
||||
exit /b 1
|
||||
)
|
||||
pushd %_EXIV2_%
|
||||
set _EXIV2_=%CD%
|
||||
popd
|
||||
if NOT EXIST %_EXIV2_%\src\version.cpp (
|
||||
echo "_EXIV2_ = %_EXIV2_% %_EXIV2_%\src\version.cpp does not exist ***" >&2
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
rem That's all Folks!
|
||||
rem
|
||||
@ -1,52 +0,0 @@
|
||||
@echo off
|
||||
rem I have been unable to find public builds of openssl for VS2005
|
||||
rem this script is used to export openssl builds from VS
|
||||
rem I am keeping this in our code base for future use, although I hope never to need it again!
|
||||
rem this is a throw away script and not intended for public use
|
||||
|
||||
rem trg=the .7z being built
|
||||
rem dst=directory in which to create trg.7z
|
||||
set trg=openssl-1.0.1p-vs2005
|
||||
set dst=\gnu\exiv2\team\libraries\%trg%\
|
||||
|
||||
call cmakeDefaults >NUL 2>NUL
|
||||
if ERRORLEVEL 1 echo *** cmakeDefaults failed *** && exit /b 1
|
||||
|
||||
rem src=pre-built. Use msvc/exiv2-webready.sln openssl.vcproj to build 32/64 openssl Release and ReleaseDLL
|
||||
set src=%_EXIV2_%\msvc\openssl\
|
||||
|
||||
if NOT EXIST %src%\x64\ReleaseDLL\ssl\openssl.cnf echo *** file %src%\x64\ReleaseDLL\ssl\openssl.cnf does not exist *** && exit /b 1
|
||||
if NOT EXIST %dst% echo "*** destination %dst% does not exist && exit /b 1
|
||||
|
||||
echo copying %src% to %dst%
|
||||
pause
|
||||
copy %src%Win32\ReleaseDLL\bin\libeay32.dll %dst%bin\libeay32MD.dll
|
||||
copy %src%Win32\ReleaseDLL\bin\ssleay32.dll %dst%bin\libeay32MDd.dll
|
||||
copy %src%x64\ReleaseDLL\bin\libeay32.dll %dst%bin64\libeay32MD.dll
|
||||
copy %src%x64\ReleaseDLL\bin\ssleay32.dll %dst%bin64\libeay32MDd.dll
|
||||
|
||||
copy %src%Win32\ReleaseDLL\lib\libeay32.lib %dst%lib\libeay32MD.lib
|
||||
copy %src%Win32\ReleaseDLL\lib\ssleay32.lib %dst%lib\libeay32MDd.lib
|
||||
copy %src%x64\ReleaseDLL\lib\libeay32.lib %dst%lib64\libeay32MD.lib
|
||||
copy %src%x64\ReleaseDLL\lib\ssleay32.lib %dst%lib64\libeay32MDd.lib
|
||||
|
||||
copy %src%Win32\Release\lib\libeay32.lib %dst%lib\libeay32MT.lib
|
||||
copy %src%Win32\Release\lib\ssleay32.lib %dst%lib\libeay32MTd.lib
|
||||
copy %src%x64\Release\lib\libeay32.lib %dst%lib64\libeay32MT.lib
|
||||
copy %src%x64\Release\lib\ssleay32.lib %dst%lib64\libeay32MTd.lib
|
||||
|
||||
xcopy/yesihq %src%Win32\Release\include\openssl %dst%include\openssl
|
||||
xcopy/yesihq %src%x64\Release\include\openssl %dst%include64\openssl
|
||||
|
||||
copy %src%x64\ReleaseDLL\ssl\*.cnf %dst%ssl
|
||||
|
||||
rem create trg.7z
|
||||
pushd %dst%..
|
||||
del/s *.exe *.pdb *.exp
|
||||
if EXIST %trg%.7z del %trg%.7z
|
||||
7z a %trg%.7z %trg%\
|
||||
dir %trg%.7z
|
||||
popd
|
||||
|
||||
rem That's all folks
|
||||
rem ------------------------------------------
|
||||
@ -1,86 +0,0 @@
|
||||
@echo off
|
||||
|
||||
if defined VSINSTALLDIR (
|
||||
echo already installed
|
||||
goto eof
|
||||
)
|
||||
set "_ARG_=%1"
|
||||
|
||||
rem help
|
||||
if "%_ARG_%" EQU "" (
|
||||
echo syntax: %0 [2005 ^| 2008 ^| 2010 ^| 2012 ^| 2013 ^| 2015] ^| 2017] [64]
|
||||
goto eof
|
||||
)
|
||||
|
||||
if NOT DEFINED ProgramFiles(x86) set ProgramFiles(x86)=C:\Program Files (x86)
|
||||
if NOT DEFINED VS80COMNTOOLS set VS80COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 8\Common7\Tools\
|
||||
if NOT DEFINED VS90COMNTOOLS set VS90COMNTOOLS=c:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\
|
||||
rem VS100COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\
|
||||
rem VS110COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\
|
||||
rem VS120COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\
|
||||
rem VS140COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\
|
||||
rem VS71COMNTOOLS=c:\Program Files (x86)\Microsoft Visual Studio .NET 2003\Common7\Tools\
|
||||
rem VS80COMNTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 8\Common7\Tools\
|
||||
rem VS90COMNTOOLS=c:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\
|
||||
|
||||
set "_OPT_=%2"
|
||||
if NOT DEFINED _OPT_ set _OPT_=64
|
||||
if "%_OPT_%" EQU "x64" set "_OPT_=64"
|
||||
|
||||
if "%_ARG_%" EQU "2005" (
|
||||
if "%_OPT_%" EQU "64" (
|
||||
pushd "%ProgramFiles(x86)%\Microsoft Visual Studio 8\VC\bin\amd64\"
|
||||
call vcvarsamd64.bat
|
||||
set PROCESSOR_ARCHITECTURE=AMD64
|
||||
) else (
|
||||
pushd "%ProgramFiles(x86)%\Microsoft Visual Studio 8\VC\bin"
|
||||
call vcvars32.bat
|
||||
set PROCESSOR_ARCHITECTURE=x86
|
||||
)
|
||||
popd
|
||||
goto eof
|
||||
)
|
||||
|
||||
if "%_ARG_%" EQU "2017" (
|
||||
@echo on
|
||||
pushd "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\Common7\Tools"
|
||||
if "%_OPT_%" EQU "64" call vsdevcmd.bat -arch=amd64
|
||||
if "%_OPT_%" EQU "32" call vsdevcmd.bat -arch=x86
|
||||
popd
|
||||
goto eof
|
||||
)
|
||||
|
||||
|
||||
rem set the variable _VC_
|
||||
set _VC_=
|
||||
|
||||
if "%_ARG_%" EQU "2008" set "_VC_=9.0"
|
||||
if "%_ARG_%" EQU "2010" set "_VC_=10.0"
|
||||
if "%_ARG_%" EQU "2012" set "_VC_=11.0"
|
||||
if "%_ARG_%" EQU "2013" set "_VC_=12.0"
|
||||
if "%_ARG_%" EQU "2015" set "_VC_=14.0"
|
||||
|
||||
if DEFINED _VC_ (
|
||||
pushd "%ProgramFiles(x86)%\Microsoft Visual Studio %_VC_%\VC\"
|
||||
if "%_OPT_%" EQU "64" (
|
||||
vcvarsall.bat x86_amd64
|
||||
set PROCESSOR_ARCHITECTURE=AMD64
|
||||
) else (
|
||||
vcvarsall.bat x86
|
||||
set PROCESSOR_ARCHITECTURE=x86
|
||||
)
|
||||
if errorlevel 1 (
|
||||
echo.*** error - failed ***
|
||||
) else (
|
||||
echo Success Environment for Visual Studio %_VC_% = %*
|
||||
)
|
||||
popd
|
||||
) else (
|
||||
echo unknown version of Visual Studio %*
|
||||
set _ARG_=
|
||||
call:help
|
||||
)
|
||||
|
||||
rem
|
||||
rem That's all Folks!
|
||||
:eof
|
||||
Loading…
Reference in New Issue
Block a user