|
Packit Service |
384592 |
:: Those variables should be edited as needed.
|
|
Packit Service |
384592 |
:: Use full paths.
|
|
Packit Service |
384592 |
|
|
Packit Service |
384592 |
:: General paths
|
|
Packit Service |
384592 |
@set WORK_DIR=%cd%\dependencies\build_dir
|
|
Packit Service |
384592 |
@set OUTPUT_DIR=%cd%\dependencies\release_files
|
|
Packit Service |
384592 |
@set SOURCE_DIR=%USERPROFILE%\Downloads
|
|
Packit Service |
384592 |
|
|
Packit Service |
384592 |
:: Dependencies
|
|
Packit Service |
384592 |
@set CMAKE=cmake-3.8.2-win32-x86.zip
|
|
Packit Service |
384592 |
@set PCRE=pcre-8.40.zip
|
|
Packit Service |
384592 |
@set ZLIB=zlib-1.2.11.tar.gz
|
|
Packit Service |
384592 |
@set LIBXML2=libxml2-2.9.4.tar.gz
|
|
Packit Service |
384592 |
@set LUA=lua-5.3.4.tar.gz
|
|
Packit Service |
384592 |
@set CURL=curl-7.54.1.zip
|
|
Packit Service |
384592 |
@set APACHE_SRC=httpd-2.4.27.tar.gz
|
|
Packit Service |
384592 |
@set APACHE_BIN32=httpd-2.4.27-win32-VC11.zip
|
|
Packit Service |
384592 |
@set APACHE_BIN64=httpd-2.4.27-win64-VC11.zip
|
|
Packit Service |
384592 |
@set YAJL=yajl-2.1.0.zip
|
|
Packit Service |
384592 |
@set SSDEEP=ssdeep-2.13.tar.gz
|
|
Packit Service |
384592 |
@set SSDEEP_BIN=ssdeep-2.13.zip
|
|
Packit Service |
384592 |
|
|
Packit Service |
384592 |
@set CMAKE_DIR=%WORK_DIR%\%CMAKE:~0,-4%\bin
|
|
Packit Service |
384592 |
|
|
Packit Service |
384592 |
:: Aditional paths.
|
|
Packit Service |
384592 |
@set PATH=%PATH%;%CMAKE_DIR%;"c:\program files\7-zip"
|
|
Packit Service |
384592 |
|
|
Packit Service |
384592 |
|
|
Packit Service |
384592 |
:: @set VCARGS32="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\vcvars32.bat"
|
|
Packit Service |
384592 |
:: @set VCARGS64="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64\vcvarsx86_amd64.bat"
|
|
Packit Service |
384592 |
|
|
Packit Service |
384592 |
|
|
Packit Service |
384592 |
:: Do not edit bellow this line.
|
|
Packit Service |
384592 |
@set CURRENT_DIR=%cd%
|
|
Packit Service |
384592 |
|
|
Packit Service |
384592 |
@echo Cleaning directories...
|
|
Packit Service |
384592 |
if EXIST "%WORK_DIR%" @rmdir /s /q "%WORK_DIR%"
|
|
Packit Service |
384592 |
if EXIST "%OUTPUT_DIR%" @rmdir /s /q "%OUTPUT_DIR%"
|
|
Packit Service |
384592 |
@mkdir "%WORK_DIR%"
|
|
Packit Service |
384592 |
@if NOT (%ERRORLEVEL%) == (0) goto failed_to_cleanup
|
|
Packit Service |
384592 |
@mkdir "%OUTPUT_DIR%"
|
|
Packit Service |
384592 |
@if NOT (%ERRORLEVEL%) == (0) goto failed_to_cleanup
|
|
Packit Service |
384592 |
|
|
Packit Service |
384592 |
@echo Checking for vcargs... %1
|
|
Packit Service |
384592 |
@if NOT (%1) == "" call %1
|
|
Packit Service |
384592 |
@if (%ERRORLEVEL%) == (1) goto build_wrong_vcargs
|
|
Packit Service |
384592 |
|
|
Packit Service |
384592 |
set APACHE_BIN=%APACHE_BIN32%
|
|
Packit Service |
384592 |
call cl 2>&1 | findstr /C:"x64"
|
|
Packit Service |
384592 |
@if (%ERRORLEVEL%) == (0) set APACHE_BIN=%APACHE_BIN64%
|
|
Packit Service |
384592 |
|
|
Packit Service |
384592 |
@echo Starting with the depdendencies...
|
|
Packit Service |
384592 |
@echo # CMake. - %CMAKE%
|
|
Packit Service |
384592 |
@call dependencies/build_cmake.bat
|
|
Packit Service |
384592 |
@if NOT (%ERRORLEVEL%) == (0) goto build_failed_cmake
|
|
Packit Service |
384592 |
@cd "%CURRENT_DIR%"
|
|
Packit Service |
384592 |
|
|
Packit Service |
384592 |
|
|
Packit Service |
384592 |
@echo # Apache - %HTTPD%/%APACHE24_ZIP%
|
|
Packit Service |
384592 |
@call dependencies/build_apache.bat
|
|
Packit Service |
384592 |
@if NOT (%ERRORLEVEL%) == (0) goto build_failed_apache
|
|
Packit Service |
384592 |
@cd "%CURRENT_DIR%"
|
|
Packit Service |
384592 |
|
|
Packit Service |
384592 |
@echo # pcre. - %PCRE%
|
|
Packit Service |
384592 |
@call dependencies/build_pcre.bat
|
|
Packit Service |
384592 |
@if NOT (%ERRORLEVEL%) == (0) goto build_failed_pcre
|
|
Packit Service |
384592 |
@cd "%CURRENT_DIR%"
|
|
Packit Service |
384592 |
|
|
Packit Service |
384592 |
@echo # zlib - %ZLIB%
|
|
Packit Service |
384592 |
@call dependencies/build_zlib.bat
|
|
Packit Service |
384592 |
@if NOT (%ERRORLEVEL%) == (0) goto build_failed_zlib
|
|
Packit Service |
384592 |
@cd "%CURRENT_DIR%"
|
|
Packit Service |
384592 |
|
|
Packit Service |
384592 |
@echo # libxml2 - %LIBXML2%
|
|
Packit Service |
384592 |
@call dependencies/build_libxml2.bat
|
|
Packit Service |
384592 |
@if NOT (%ERRORLEVEL%) == (0) goto build_failed_libxml2
|
|
Packit Service |
384592 |
@cd "%CURRENT_DIR%"
|
|
Packit Service |
384592 |
|
|
Packit Service |
384592 |
@echo # lua - %LUA%
|
|
Packit Service |
384592 |
@call dependencies/build_lua.bat
|
|
Packit Service |
384592 |
@if NOT (%ERRORLEVEL%) == (0) goto build_failed_lua
|
|
Packit Service |
384592 |
@cd "%CURRENT_DIR%"
|
|
Packit Service |
384592 |
|
|
Packit Service |
384592 |
@echo # curl - %CURL%
|
|
Packit Service |
384592 |
@call dependencies/build_curl.bat
|
|
Packit Service |
384592 |
@if NOT (%ERRORLEVEL%) == (0) goto build_failed_curl
|
|
Packit Service |
384592 |
@cd "%CURRENT_DIR%"
|
|
Packit Service |
384592 |
|
|
Packit Service |
384592 |
@echo # yajl - %YAJL%
|
|
Packit Service |
384592 |
@call dependencies/build_yajl.bat
|
|
Packit Service |
384592 |
@if NOT (%ERRORLEVEL%) == (0) goto build_failed_yajl
|
|
Packit Service |
384592 |
@cd "%CURRENT_DIR%"
|
|
Packit Service |
384592 |
|
|
Packit Service |
384592 |
@echo # ssdeep - %SSDEEP%
|
|
Packit Service |
384592 |
@call dependencies/build_ssdeep.bat
|
|
Packit Service |
384592 |
@if NOT (%ERRORLEVEL%) == (0) goto build_failed_ssdeep
|
|
Packit Service |
384592 |
@cd "%CURRENT_DIR%"
|
|
Packit Service |
384592 |
|
|
Packit Service |
384592 |
@echo All dependencies were built successfully.
|
|
Packit Service |
384592 |
@cd "%CURRENT_DIR%"
|
|
Packit Service |
384592 |
@exit /B 0
|
|
Packit Service |
384592 |
|
|
Packit Service |
384592 |
:failed_to_cleanup
|
|
Packit Service |
384592 |
@echo Failed to cleanup
|
|
Packit Service |
384592 |
@goto failed
|
|
Packit Service |
384592 |
|
|
Packit Service |
384592 |
:build_wrong_vcargs
|
|
Packit Service |
384592 |
@echo Please specify a valid vcargs
|
|
Packit Service |
384592 |
@goto failed
|
|
Packit Service |
384592 |
|
|
Packit Service |
384592 |
:build_failed_apache
|
|
Packit Service |
384592 |
@echo Failed to setup %HTTPD%/%APACHE24_ZIP%...
|
|
Packit Service |
384592 |
@goto failed
|
|
Packit Service |
384592 |
|
|
Packit Service |
384592 |
:build_failed_pcre
|
|
Packit Service |
384592 |
@echo Failed to setup %PCRE%...
|
|
Packit Service |
384592 |
@goto failed
|
|
Packit Service |
384592 |
|
|
Packit Service |
384592 |
:build_failed_zlib
|
|
Packit Service |
384592 |
@echo Failed to setup %ZLIB%...
|
|
Packit Service |
384592 |
@goto failed
|
|
Packit Service |
384592 |
|
|
Packit Service |
384592 |
:build_failed_libxml2
|
|
Packit Service |
384592 |
@echo Failed to setup %LIBXML2%...
|
|
Packit Service |
384592 |
@goto failed
|
|
Packit Service |
384592 |
|
|
Packit Service |
384592 |
:build_failed_lua
|
|
Packit Service |
384592 |
@echo Failed to setup %LUA%...
|
|
Packit Service |
384592 |
@goto failed
|
|
Packit Service |
384592 |
|
|
Packit Service |
384592 |
:build_failed_curl
|
|
Packit Service |
384592 |
@echo Failed to setup %CURL%...
|
|
Packit Service |
384592 |
@goto failed
|
|
Packit Service |
384592 |
|
|
Packit Service |
384592 |
:build_failed_yajl
|
|
Packit Service |
384592 |
@echo Failed to setup %YAJL%...
|
|
Packit Service |
384592 |
@goto failed
|
|
Packit Service |
384592 |
|
|
Packit Service |
384592 |
:build_failed_ssdeep
|
|
Packit Service |
384592 |
@echo Failed to setup %SSDEEP%...
|
|
Packit Service |
384592 |
@goto failed
|
|
Packit Service |
384592 |
|
|
Packit Service |
384592 |
:build_failed_cmake
|
|
Packit Service |
384592 |
@echo Failed to setup %CMAKE%...
|
|
Packit Service |
384592 |
@goto failed
|
|
Packit Service |
384592 |
|
|
Packit Service |
384592 |
:failed
|
|
Packit Service |
384592 |
@cd %CURRENT_DIR%
|
|
Packit Service |
384592 |
@exit /B 1
|
|
Packit Service |
384592 |
|