1
0
mirror of https://github.com/imapsync/imapsync.git synced 2024-11-17 08:12:48 +01:00
imapsync/W/build_exe.bat

110 lines
2.8 KiB
Batchfile
Raw Normal View History

2015-05-28 19:04:57 +02:00
2017-09-23 23:54:48 +02:00
REM $Id: build_exe.bat,v 1.46 2017/08/23 13:04:40 gilles Exp gilles $
2016-09-19 17:17:24 +02:00
@SETLOCAL
2017-09-23 23:54:48 +02:00
@ECHO Currently running through %0 %*
2015-05-28 19:04:57 +02:00
2017-09-23 23:54:48 +02:00
@ECHO Building imapsync.exe
2015-05-28 19:04:57 +02:00
2016-01-22 17:52:28 +01:00
@REM the following command change current directory to the dirname of the current batch pathname
CD /D %~dp0
2016-09-19 17:17:24 +02:00
REM Remove the error file because its existence means an error occured during this script execution
IF EXIST LOG_bat\%~nx0.txt DEL LOG_bat\%~nx0.txt
CALL :handle_error CALL :detect_perl
CALL :handle_error CALL :check_modules
CALL :handle_error CALL :pp_exe
@ENDLOCAL
EXIT /B
:pp_exe
@SETLOCAL
2017-09-23 23:54:48 +02:00
@REM CALL pp -o imapsync.exe --link libeay32_.dll --link zlib1_.dll --link ssleay32_.dll .\imapsync
IF %PROCESSOR_ARCHITECTURE% == x86 (
CALL pp -o imapsync.exe -M Test2::Formatter -M Test2::Formatter::TAP -M Test2::Event -M Test2::Event::Info --link zlib1_.dll --link libcrypto-1_1_.dll --link libssl-1_1_.dll .\imapsync
REM CALL pp -o imapsync.exe -M Test2::Formatter -M Test2::Formatter::TAP -M Test2::Event -M Test2::Event::Info --link zlib1_.dll .\imapsync
) ELSE (
CALL pp -o imapsync.exe -M Test2::Formatter -M Test2::Formatter::TAP -M Test2::Event -M Test2::Event::Info .\imapsync
)
2016-09-19 17:17:24 +02:00
@ENDLOCAL
EXIT /B
::------------------------------------------------------
::--------------- Detect Perl --------------------------
:detect_perl
@SETLOCAL
2016-01-22 17:52:28 +01:00
perl -v
2016-09-19 17:17:24 +02:00
@ENDLOCAL
EXIT /B
::------------------------------------------------------
2015-05-28 19:04:57 +02:00
2016-09-19 17:17:24 +02:00
::------------------------------------------------------
::--------------- Check modules are here --------------
:check_modules
@SETLOCAL
2015-05-28 19:04:57 +02:00
perl ^
2016-09-19 17:17:24 +02:00
-mTest::MockObject ^
-mPAR::Packer ^
-mReadonly ^
2015-05-28 19:04:57 +02:00
-mAuthen::NTLM ^
-mData::Dumper ^
-mData::Uniqid ^
-mDigest::HMAC_MD5 ^
-mDigest::HMAC_SHA1 ^
-mDigest::MD5 ^
-mFile::Copy::Recursive ^
-mFile::Spec ^
-mIO::Socket ^
-mIO::Socket::INET ^
-mIO::Socket::IP ^
-mIO::Socket::SSL ^
-mIO::Tee ^
-mMail::IMAPClient ^
2017-09-23 23:54:48 +02:00
-mNet::Ping ^
2015-05-28 19:04:57 +02:00
-mTerm::ReadKey ^
-mTime::Local ^
-mUnicode::String ^
-mURI::Escape ^
2015-08-04 03:44:40 +02:00
-mJSON::WebToken ^
-mLWP::UserAgent ^
-mHTML::Entities ^
-mJSON ^
2015-12-03 18:16:32 +01:00
-mCrypt::OpenSSL::RSA ^
2016-01-22 17:52:28 +01:00
-mEncode::Byte ^
2015-05-28 19:04:57 +02:00
-e ''
2016-09-19 17:17:24 +02:00
IF ERRORLEVEL 1 CALL .\install_modules.bat
@ENDLOCAL
EXIT /B
::------------------------------------------------------
::------------------------------------------------------
::--------------- Handle error -------------------------
:handle_error
SETLOCAL
ECHO IN %0 with parameters %*
%*
SET CMD_RETURN=%ERRORLEVEL%
2015-05-28 19:04:57 +02:00
2016-09-19 17:17:24 +02:00
IF %CMD_RETURN% EQU 0 (
ECHO GOOD END
) ELSE (
ECHO BAD END
IF NOT EXIST LOG_bat MKDIR LOG_bat
ECHO Failure calling: %* >> LOG_bat\%~nx0.txt
)
ENDLOCAL
EXIT /B
::------------------------------------------------------