2015-05-28 19:04:57 +02:00
|
|
|
|
2016-09-19 17:17:24 +02:00
|
|
|
REM $Id: build_exe.bat,v 1.40 2016/08/19 14:12:29 gilles Exp gilles $
|
|
|
|
|
|
|
|
@SETLOCAL
|
|
|
|
ECHO Currently running through %0 %*
|
2015-05-28 19:04:57 +02:00
|
|
|
|
|
|
|
ECHO Building imapsync.exe
|
|
|
|
|
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
|
|
|
|
CALL pp -o imapsync.exe --link libeay32_.dll --link zlib1_.dll --link ssleay32_.dll .\imapsync
|
|
|
|
IF ERRORLEVEL 1 CALL pp -o imapsync.exe .\imapsync
|
|
|
|
@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 ^
|
|
|
|
-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
|
|
|
|
::------------------------------------------------------
|