http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/a9485aeb/thirdparty/civetweb-1.9.1/mingw.cmd ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/mingw.cmd b/thirdparty/civetweb-1.9.1/mingw.cmd new file mode 100644 index 0000000..4b26215 --- /dev/null +++ b/thirdparty/civetweb-1.9.1/mingw.cmd @@ -0,0 +1,884 @@ +:: Make sure the extensions are enabled +@verify other 2>nul +@setlocal EnableExtensions EnableDelayedExpansion +@if errorlevel 1 ( + @call :print_usage "Failed to enable extensions" + @exit /b 1 +) + +::Change the code page to unicode +@chcp 65001 1>nul 2>nul +@if errorlevel 1 ( + @call :print_usage "Failed to change the code page to unicode" + @exit /b 1 +) + +:: Set up some global variables +@set "script_name=%~nx0" +@set "script_folder=%~dp0" +@set "script_folder=%script_folder:~0,-1%" +@set "dependency_path=%TEMP%\mingw-build-dependencies" + +:: Check the command line parameters +@set logging_level=1 +:options_loop +@if [%1] == [] goto :options_parsed +@set "arg=%~1" +@set one=%arg:~0,1% +@set two=%arg:~0,2% +@set three=%arg:~0,3% +@if /i [%arg%] == [/?] ( + @call :print_usage "Downloads a specific version of MinGW" + @exit /b 0 +) +@if /i [%arg%] == [/q] set quiet=true +@if /i [%two%] == [/v] @if /i not [%three%] == [/ve] @call :verbosity "!arg!" +@if /i [%arg%] == [/version] set "version=%~2" & shift +@if /i [%arg%] == [/arch] set "arch=%~2" & shift +@if /i [%arg%] == [/exceptions] set "exceptions=%~2" & shift +@if /i [%arg%] == [/threading] set "threading=%~2" & shift +@if /i [%arg%] == [/revision] set "revision=%~2" & shift +@if /i not [!one!] == [/] ( + if not defined output_path ( + set output_path=!arg! + ) else ( + @call :print_usage "Too many output locations: !output_path! !arg!" ^ + "There should only be one output location" + @exit /b 1 + ) +) +@shift +@goto :options_loop +:options_parsed +@if defined quiet set logging_level=0 +@if not defined output_path set "output_path=%script_folder%\mingw-builds" +@set "output_path=%output_path:/=\%" + +:: Set up the logging +@set "log_folder=%output_path%\logs" +@call :iso8601 timestamp +@set "log_path=%log_folder%\%timestamp%.log" +@set log_keep=10 + +:: Get default architecture +@if not defined arch @call :architecture arch + +:: Only keep a certain amount of logs +@set /a "log_keep=log_keep-1" +@if not exist %log_folder% @mkdir %log_folder% +@for /f "skip=%log_keep%" %%f in ('dir /b /o-D /tc %log_folder%') do @( + @call :log 4 "Removing old log file %log_folder%\%%f" + del %log_folder%\%%f +) + +:: Set up some more global variables +@call :windows_version win_ver win_ver_major win_ver_minor win_ver_rev +@call :script_source script_source +@if [%script_source%] == [explorer] ( + set /a "logging_level=logging_level+1" +) + +:: Execute the main function +@call :main "%arch%" "%version%" "%threading%" "%exceptions%" "%revision%" +@if errorlevel 1 ( + @call :log 0 "Failed to download MinGW" + @call :log 0 "View the log at %log_path%" + @exit /b 1 +) + +:: Stop the script if the user double clicked +@if [%script_source%] == [explorer] ( + pause +) + +@endlocal +@goto :eof + +:: -------------------------- Functions start here ---------------------------- + +:main - Main function that performs the download +:: %1 - Target architecture +:: %2 - Version of MinGW to get [optional] +:: %3 - Threading model [optional] +:: %4 - Exception model [optional] +:: %5 - Package revision [optional] +@setlocal +@call :log 6 +@call :log 2 "Welcome to the MinGW download script" +@call :log 6 "------------------------------------" +@call :log 6 +@call :log 2 "This script downloads a specific version of MinGW" +@set "arch=%~1" +@if "%arch%" == "" @exit /b 1 +@set "version=%~2" +@set "threading=%~3" +@set "exceptions=%~4" +@set "revision=%~5" +@call :log 3 "arch = %arch%" +@call :log 3 "version = %version%" +@call :log 3 "exceptions = %exceptions%" +@call :log 3 "threading = %threading%" +@call :log 3 "revision = %revision%" +@call :repository repo +@if errorlevel 1 ( + @call :log 0 "Failed to get the MinGW-builds repository information" + @exit /b 1 +) +@call :resolve slug url "%repo%" "%arch%" "%version%" "%threading%" "%exceptions%" "%revision%" +@if errorlevel 1 ( + @call :log 0 "Failed to resolve the correct URL of MinGW" + @exit /b 1 +) +@call :unpack compiler_path "%url%" "%output_path%\mingw\%slug%" +@if errorlevel 1 ( + @call :log 0 "Failed to unpack the MinGW archive" + @exit /b 1 +) +@rmdir /s /q "%dependency_path%" +@echo.%compiler_path% +@endlocal +@goto :eof + +:repository - Gets the MinGW-builds repository +:: %1 - The return variable for the repository file path +@verify other 2>nul +@setlocal EnableDelayedExpansion +@if errorlevel 1 ( + @call :log 0 "Failed to enable extensions" + @exit /b 1 +) +@set "var=%~1" +@if "%var%" == "" @exit /b 1 +@call :log 7 +@call :log 2 "Getting MinGW repository information" +@set "url=http://downloads.sourceforge.net/project/mingw-w64/Toolchains targetting Win32/Personal Builds/mingw-builds/installer/repository.txt" +@call :log 6 +@call :log 1 "Downloading MinGW repository" +@set "file_path=%dependency_path%\mingw-repository.txt" +@call :download "%url%" "%file_path%" +@if errorlevel 1 ( + @call :log 0 "Failed to download the MinGW repository information" + @exit /b 1 +) +@set "repository_path=%dependency_path%\repository.txt" +@del "%repository_path%" 2>nul +@for /f "delims=| tokens=1-6,*" %%a in (%file_path%) do @( + @set "version=%%~a" + @set "version=!version: =!" + @set "arch=%%~b" + @set "arch=!arch: =!" + @set "threading=%%~c" + @set "threading=!threading: =!" + @set "exceptions=%%~d" + @set "exceptions=!exceptions: =!" + @set "revision=%%~e" + @set "revision=!revision: =!" + @set "revision=!revision:rev=!" + @set "url=%%~f" + @set "url=!url:%%20= !" + @for /l %%a in (1,1,32) do @if "!url:~-1!" == " " set url=!url:~0,-1! + @echo !arch!^|!version!^|!threading!^|!exceptions!^|!revision!^|!url!>> "%repository_path%" +) +@del "%file_path%" 2>nul +@endlocal & set "%var%=%repository_path%" +@goto :eof + +:resolve - Gets the MinGW-builds repository +:: %1 - The return variable for the MinGW slug +:: %2 - The return variable for the MinGW URL +:: %3 - The repository information to use +:: %4 - Target architecture +:: %5 - Version of MinGW to get [optional] +:: %6 - Threading model [optional] +:: %7 - Exception model [optional] +:: %8 - Package revision [optional] +@setlocal +@set "slug_var=%~1" +@if "%slug_var%" == "" @exit /b 1 +@set "url_var=%~2" +@if "%url_var%" == "" @exit /b 1 +@set "repository=%~3" +@if "%repository%" == "" @exit /b 1 +@set "arch=%~4" +@if "%arch%" == "" @exit /b 1 +@call :resolve_version version "%repository%" "%arch%" "%~5" +@if errorlevel 1 @exit /b 1 +@call :resolve_threading threading "%repository%" "%arch%" "%version%" "%~6" +@if errorlevel 1 @exit /b 1 +@call :resolve_exceptions exceptions "%repository%" "%arch%" "%version%" "%threading%" "%~7" +@if errorlevel 1 @exit /b 1 +@call :resolve_revision revision "%repository%" "%arch%" "%version%" "%threading%" "%exceptions%" "%~8" +@if errorlevel 1 @exit /b 1 +@call :log 3 "Finding URL" +@for /f "delims=| tokens=1-6" %%a in (%repository%) do @( + @if "%arch%" == "%%a" ( + @if "%version%" == "%%b" ( + @if "%threading%" == "%%c" ( + @if "%exceptions%" == "%%d" ( + @if "%revision%" == "%%e" ( + @set "url=%%f" +) ) ) ) ) ) +@if "%url%" == "" ( + @call :log 0 "Failed to resolve URL" + @exit /b 1 +) +@set slug=gcc-%version%-%arch%-%threading%-%exceptions%-rev%revision% +@call :log 2 "Resolved slug: %slug%" +@call :log 2 "Resolved url: %url%" +@endlocal & set "%slug_var%=%slug%" & set "%url_var%=%url%" +@goto :eof + +:unpack - Unpacks the MinGW archive +:: %1 - The return variable name for the compiler path +:: %2 - The filepath or URL of the archive +:: %3 - The folder to unpack to +@verify other 2>nul +@setlocal EnableDelayedExpansion +@if errorlevel 1 ( + @call :log 0 "Failed to enable extensions" + @exit /b 1 +) +@set "var=%~1" +@if "%var%" == "" @exit /b 1 +@set "archive_path=%~2" +@if "%archive_path%" == "" @exit /b 1 +@set "folder_path=%~3" +@if "%folder_path%" == "" @exit /b 1 +@set "compiler_path=%folder_path%\bin" +@if exist "%compiler_path%" goto :unpack_done +@call :log 7 +@call :log 2 "Unpacking MinGW archive" +@set "http=%archive_path:~0,4%" +@if "%http%" == "http" ( + @set "url=%archive_path%" + @for /f %%a in ("!url: =-!") do @set "file_name=%%~na" + @for /f %%a in ("!url: =-!") do @set "file_ext=%%~xa" + @set "archive_path=%dependency_path%\!file_name!!file_ext!" + @if not exist "!archive_path!" ( + @call :log 6 + @call :log 1 "Downloading MinGW archive" + @call :download "!url!" "!archive_path!" + @if errorlevel 1 ( + @del "!archive_path!" 2>nul + @call :log 0 "Failed to download: !file_name!!file_ext!" + @exit /b 1 + ) + ) +) +@if not exist "%archive_path%" ( + @call :log 0 "The archive did not exist to unpack: %archive_path%" + @exit /b 1 +) +@for /f %%a in ("%archive_path: =-%") do @set "file_name=%%~na" +@for /f %%a in ("%archive_path: =-%") do @set "file_ext=%%~xa" +@call :log 6 +@call :log 1 "Unpacking MinGW %file_name%%file_ext%" +@call :find_sevenzip sevenzip_executable +@if errorlevel 1 ( + @call :log 0 "Need 7zip to unpack the MinGW archive" + @exit /b 1 +) +@call :iso8601 iso8601 +@for /f %%a in ("%folder_path%") do @set "tmp_path=%%~dpatmp-%iso8601%" +@"%sevenzip_executable%" x -y "-o%tmp_path%" "%archive_path%" > nul +@if errorlevel 1 ( + @rmdir /s /q "%folder_path%" + @call :log 0 "Failed to unpack the MinGW archive" + @exit /b 1 +) +@set "expected_path=%tmp_path%\mingw64" +@if not exist "%expected_path%" ( + @set "expected_path=%tmp_path%\mingw32" +) +@move /y "%expected_path%" "%folder_path%" > nul +@if errorlevel 1 ( + @rmdir /s /q "%tmp_path%" 2>nul + @call :log 0 "Failed to move MinGW folder" + @call :log 0 "%expected_path%" + @call :log 0 "%folder_path%" + @exit /b 1 +) +@rmdir /s /q %tmp_path% +@set "compiler_path=%folder_path%\bin" +:unpack_done +@if not exist "%compiler_path%\gcc.exe" ( + @call :log 0 "Failed to find gcc: %compiler_path%" + @exit /b 1 +) +@endlocal & set "%var%=%compiler_path%" +@goto :eof + +:find_sevenzip - Finds (or downloads) the 7zip executable +:: %1 - The return variable for the 7zip executable path +@setlocal +@set "var=%~1" +@if "%var%" == "" @exit /b 1 +@call :log 2 "Finding 7zip" +@call :find_in_path sevenzip_executable 7z.exe +@if not errorlevel 1 goto :find_sevenzip_done +@call :find_in_path sevenzip_executable 7za.exe +@if not errorlevel 1 goto :find_sevenzip_done +@set checksum=2FAC454A90AE96021F4FFC607D4C00F8 +@set "url=http://7-zip.org/a/7za920.zip" +@for /f %%a in ("%url: =-%") do @set "file_name=%%~na" +@for /f %%a in ("%url: =-%") do @set "file_ext=%%~xa" +@set "archive_path=%dependency_path%\%file_name%%file_ext%" +@if not exist "%archive_path%" ( + @call :log 6 + @call :log 1 "Downloading 7zip archive" + @call :download "%url%" "%archive_path%" %checksum% + @if errorlevel 1 ( + @del "%archive_path%" 2>nul + @call :log 0 "Failed to download: %file_name%%file_ext%" + @exit /b 1 + ) +) +@set "sevenzip_path=%dependency_path%\sevenzip" +@if not exist "%sevenzip_path%" ( + @call :unzip "%archive_path%" "%sevenzip_path%" + @if errorlevel 1 ( + @call :log 0 "Failed to unzip the7zip archive" + @exit /b 1 + ) +) +@set "sevenzip_executable=%sevenzip_path%\7za.exe" +@if not exist "%sevenzip_executable%" ( + @call :log 0 "Failed to find unpacked 7zip: %sevenzip_executable%" + @exit /b 1 +) +:find_sevenzip_done +@call :log 2 "Found 7zip: %sevenzip_executable%" +@endlocal & set "%var%=%sevenzip_executable%" +@goto :eof + +:unzip - Unzips a .zip archive +:: %1 - The archive to unzip +:: %2 - The location to unzip to +@setlocal +@set "archive_path=%~1" +@if "%archive_path%" == "" @exit /b 1 +@set "folder_path=%~2" +@if "%folder_path%" == "" @exit /b 1 +@for /f %%a in ("%archive_path: =-%") do @set "file_name=%%~na" +@for /f %%a in ("%archive_path: =-%") do @set "file_ext=%%~xa" +@call :log 2 "Unzipping: %file_name%%file_ext%" +@call :iso8601 iso8601 +@set "log_path=%temp%\unzip-%iso8601%-%file_name%.log" +@powershell ^ + Add-Type -assembly "system.io.compression.filesystem"; ^ + [io.compression.zipfile]::ExtractToDirectory(^ + '%archive_path%', '%folder_path%') 2>"%log_path%" +@if errorlevel 1 ( + @call :log 0 "Failed to unzip: %file_name%%file_ext%" + @call :log_append "%log_path%" + @exit /b 1 +) +@endlocal +@goto :eof + +:resolve_version - Gets the version of the MinGW compiler +:: %1 - The return variable for the version +:: %2 - The repository information to use +:: %3 - The architecture of the compiler +:: %4 - Version of MinGW to get [optional] +@verify other 2>nul +@setlocal EnableDelayedExpansion +@if errorlevel 1 ( + @call :log 0 "Failed to enable extensions" + @exit /b 1 +) +@set "var=%~1" +@if "%var%" == "" @exit /b 1 +@set "repository=%~2" +@if "%repository%" == "" @exit /b 1 +@set "arch=%~3" +@if "%arch%" == "" @exit /b 1 +@set "version=%~4" +@if not "%version%" == "" goto :resolve_version_done +:: Find the latest version +@call :log 3 "Finding latest version" +@set version=0.0.0 +@for /f "delims=| tokens=1-6" %%a in (%repository%) do @( + @if "%arch%" == "%%a" ( + @call :version_compare result "%version%" "%%b" + @if errorlevel 1 ( + @call :log 0 "Failed to compare versions: %version% %%a" + @exit /b 1 + ) + @if !result! lss 0 set version=%%b + ) +) +:resolve_version_done +@if "%version%" == "" ( + @call :log 0 "Failed to resolve latest version number" + @exit /b 1 +) +@call :log 2 "Resolved version: %version%" +@endlocal & set "%var%=%version%" +@goto :eof + +:resolve_threading - Gets the threading model of the MinGW compiler +:: %1 - The return variable for the threading model +:: %2 - The repository information to use +:: %3 - The architecture of the compiler +:: %4 - The version of the compiler +:: %5 - threading model of MinGW to use [optional] +@verify other 2>nul +@setlocal EnableDelayedExpansion +@if errorlevel 1 ( + @call :log 0 "Failed to enable extensions" + @exit /b 1 +) +@set "var=%~1" +@if "%var%" == "" @exit /b 1 +@set "repository=%~2" +@if "%repository%" == "" @exit /b 1 +@set "arch=%~3" +@if "%arch%" == "" @exit /b 1 +@set "version=%~4" +@if "%version%" == "" @exit /b 1 +@set "threading=%~5" +@if not "%threading%" == "" goto :resolve_threading_done +@call :log 3 "Finding best threading model" +@for /f "delims=| tokens=1-6" %%a in (%repository%) do @( + @if "%arch%" == "%%a" ( + @if "%version%" == "%%b" ( + @if not defined threading ( + @set "threading=%%c" + ) + @if "%%c" == "posix" ( + @set "threading=%%c" +) ) ) ) +:resolve_threading_done +@if "%threading%" == "" ( + @call :log 0 "Failed to resolve the best threading model" + @exit /b 1 +) +@call :log 2 "Resolved threading model: %threading%" +@endlocal & set "%var%=%threading%" +@goto :eof + +:resolve_exceptions - Gets the exception model of the MinGW compiler +:: %1 - The return variable for the exception model +:: %2 - The repository information to use +:: %3 - The architecture of the compiler +:: %4 - The version of the compiler +:: %4 - The threading model of the compiler +:: %5 - exception model of MinGW to use [optional] +@verify other 2>nul +@setlocal EnableDelayedExpansion +@if errorlevel 1 ( + @call :log 0 "Failed to enable extensions" + @exit /b 1 +) +@set "var=%~1" +@if "%var%" == "" @exit /b 1 +@set "repository=%~2" +@if "%repository%" == "" @exit /b 1 +@set "arch=%~3" +@if "%arch%" == "" @exit /b 1 +@set "version=%~4" +@if "%version%" == "" @exit /b 1 +@set "threading=%~5" +@if "%threading%" == "" @exit /b 1 +@set "exceptions=%~6" +@if not "%exceptions%" == "" goto :resolve_exceptions_done +@call :log 3 "Finding best exception model" +@for /f "delims=| tokens=1-6" %%a in (%repository%) do @( + @if "%arch%" == "%%a" ( + @if "%version%" == "%%b" ( + @if "%threading%" == "%%c" ( + @if not defined exceptions ( + @set "exceptions=%%d" + ) + @if "%%d" == "dwarf" ( + @set "exceptions=%%d" + ) + @if "%%d" == "seh" ( + @set "exceptions=%%d" +) ) ) ) ) +:resolve_exceptions_done +@if "%exceptions%" == "" ( + @call :log 0 "Failed to resolve the best exception model" + @exit /b 1 +) +@call :log 2 "Resolved exception model: %exceptions%" +@endlocal & set "%var%=%exceptions%" +@goto :eof + +:resolve_revision - Gets the revision of the MinGW compiler +:: %1 - The return variable for the revision +:: %2 - The repository information to use +:: %3 - The architecture of the compiler +:: %4 - The version of the compiler +:: %4 - The threading model of the compiler +:: %4 - The exception model of the compiler +:: %5 - revision of the MinGW package to use [optional] +@verify other 2>nul +@setlocal EnableDelayedExpansion +@if errorlevel 1 ( + @call :log 0 "Failed to enable extensions" + @exit /b 1 +) +@set "var=%~1" +@if "%var%" == "" @exit /b 1 +@set "repository=%~2" +@if "%repository%" == "" @exit /b 1 +@set "arch=%~3" +@if "%arch%" == "" @exit /b 1 +@set "version=%~4" +@if "%version%" == "" @exit /b 1 +@set "threading=%~5" +@if "%threading%" == "" @exit /b 1 +@set "exceptions=%~6" +@if "%exceptions%" == "" @exit /b 1 +@set "revision=%~7" +@if not "%revision%" == "" goto :resolve_revision_done +@call :log 3 "Finding latest revision" +@for /f "delims=| tokens=1-6" %%a in (%repository%) do @( + @if "%arch%" == "%%a" ( + @if "%version%" == "%%b" ( + @if "%threading%" == "%%c" ( + @if "%exceptions%" == "%%d" ( + @if "%%e" gtr "%revision%" ( + @set "revision=%%e" +) ) ) ) ) ) +:resolve_revision_done +@if "%revision%" == "" ( + @call :log 0 "Failed to resolve latest revision" + @exit /b 1 +) +@call :log 2 "Resolved revision: %revision%" +@endlocal & set "%var%=%revision%" +@goto :eof + +:version_compare - Compares two semantic version numbers +:: %1 - The return variable: +:: - < 0 : if %2 < %3 +:: - 0 : if %2 == %3 +:: - > 0 : if %2 > %3 +:: %2 - The first version to compare +:: %3 - The second version to compare +@setlocal +@set "var=%~1" +@if "%var%" == "" @exit /b 1 +@set "lhs=%~2" +@if "%lhs%" == "" @exit /b 1 +@set "rhs=%~3" +@if "%lhs%" == "" @exit /b 1 +@set result=0 +@for /f "delims=. tokens=1-6" %%a in ("%lhs%.%rhs%") do @( + @if %%a lss %%d ( + set result=-1 + goto :version_compare_done + ) else ( + @if %%a gtr %%d ( + set result=1 + goto :version_compare_done + ) else ( + @if %%b lss %%e ( + set result=-1 + goto :version_compare_done + ) else ( + @if %%b gtr %%e ( + set result=1 + goto :version_compare_done + ) else ( + @if %%c lss %%f ( + set result=-1 + goto :version_compare_done + ) else ( + @if %%c gtr %%f ( + set result=1 + goto :version_compare_done + ) + ) + ) + ) + ) + ) +) +:version_compare_done +@endlocal & set "%var%=%result%" +@goto :eof + +:print_usage - Prints the usage of the script +:: %* - message to print, each argument on it's own line +@setlocal +@for %%a in (%*) do @echo.%%~a +@echo. [email protected] [/?][/v[v...]^|/q][/version][/arch a][/threading t] +@echo. [/exceptions e][/revision r] location +@echo. +@echo. /version v The version of MinGW to download +@echo. /arch a The target architecture [i686^|x86_64] +@echo. /threading t +@echo. Threading model to use [posix^|win32] +@echo. /exceptions e +@echo. Exception model to use [sjlj^|seh^|dwarf] +@echo. /revision e Revision of the release to use +@echo. /v Sets the output to be more verbose +@echo. /v[v...] Extra verbosity, /vv, /vvv, etc +@echo. /q Quiets the output +@echo. /? Shows this usage message +@echo. +@endlocal +@goto :eof + +:script_source - Determines if the script was ran from the cli or explorer +:: %1 - The return variable [cli|explorer] +@verify other 2>nul +@setlocal EnableDelayedExpansion +@if errorlevel 1 ( + @call :log 0 "Failed to enable extensions" + @exit /b 1 +) +@call :log 3 "Attempting to detect the script source" +@echo "The invocation command was: '%cmdcmdline%'" >> %log_path% +@for /f "tokens=1-3,*" %%a in ("%cmdcmdline%") do @( + set cmd=%%~a + set arg1=%%~b + set arg2=%%~c + set rest=%%~d +) +@set quote=" +@if "!arg2:~0,1!" equ "!quote!" ( + if "!arg2:~-1!" neq "!quote!" ( + set "arg2=!arg2:~1!" + ) +) +@call :log 4 "cmd = %cmd%" +@call :log 4 "arg1 = %arg1%" +@call :log 4 "arg2 = %arg2%" +@call :log 4 "rest = %rest%" +@call :log 4 "src = %~f0" +@if /i "%arg2%" == "call" ( + set script_source=cli +) else ( + @if /i "%arg1%" == "/c" ( + set script_source=explorer + ) else ( + set script_source=cli + ) +) +@call :log 3 "The script was invoked from %script_source%" +@endlocal & set "%~1=%script_source%" +@goto :eof + +:architecture - Finds the system architecture +:: %1 - The return variable [i686|x86_64] +@setlocal +@call :log 3 "Determining the processor architecture" +@set "key=HKLM\System\CurrentControlSet\Control\Session Manager\Environment" +@set "var=PROCESSOR_ARCHITECTURE" +@for /f "skip=2 tokens=2,*" %%a in ('reg query "%key%" /v "%var%"') do @set "arch=%%b" +@if "%arch%" == "AMD64" set arch=x86_64 +@if "%arch%" == "x64" set arch=i686 +@call :log 4 "arch = %arch%" +@endlocal & set "%~1=%arch%" +@goto :eof + +:md5 - Gets the MD5 checksum for a file +:: %1 - The hash +:: %2 - The file path +@setlocal +@set "var=%~1" +@set "file_path=%~2" +@if "%var%" == "" @exit /b 1 +@if "%file_path%" == "" @exit /b 1 +@if not exist "%file_path%" @exit /b 1 +@for /f "skip=3 tokens=1,*" %%a in ('powershell Get-FileHash -Algorithm MD5 "'%file_path%'"') do @set hash=%%b +@if not defined hash ( + @call :log 6 + @call :log 0 "Failed to get MD5 hash for %file_path%" + @exit /b 1 +) +@endlocal & set "%var%=%hash: =%" +@goto :eof + +:windows_version - Checks the windows version +:: %1 - The windows version +:: %2 - The major version number return variable +:: %3 - The minor version number return variable +:: %4 - The revision version number return variable +@setlocal +@call :log 3 "Retrieving the Windows version" +@for /f "tokens=2 delims=[]" %%x in ('ver') do @set win_ver=%%x +@set win_ver=%win_ver:Version =% +@set win_ver_major=%win_ver:~0,1% +@set win_ver_minor=%win_ver:~2,1% +@set win_ver_rev=%win_ver:~4% +@call :log 4 "win_ver = %win_ver%" +@endlocal & set "%~1=%win_ver%" ^ + & set "%~2=%win_ver_major%" ^ + & set "%~3=%win_ver_minor%" ^ + & set "%~4=%win_ver_rev%" +@goto :eof + +:find_in_path - Finds a program of file in the PATH +:: %1 - return variable of the file path +@setlocal +@set "var=%~1" +@if "%var%" == "" @exit /b 1 +@set "file=%~2" +@if "%file%" == "" @exit /b 1 +@call :log 3 "Searching PATH for %file%" +@for %%x in ("%file%") do @set "file_path=%%~f$PATH:x" +@if not defined file_path @exit /b 1 +@endlocal & set "%var%=%file_path%" +@goto :eof + +:log_append - Appends another file into the current logging file +:: %1 - the file_path to the file to concatenate +@setlocal +@set "file_path=%~1" +@if "%file_path%" == "" @exit /b 1 +@call :log 3 "Appending to log: %file_path%" +@call :iso8601 iso8601 +@set temp_log=%temp%\append-%iso8601%.log +@call :log 4 "Using temp file %temp_log%" +@type "%log_path%" "%file_path%" > "%temp_log%" 2>nul +@move /y "%temp_log%" "%log_path%" 1>nul +@del "%file_path% 2>nul +@del "%temp_log% 2>nul +@endlocal +@goto :eof + +:iso8601 - Returns the current time in ISO8601 format +:: %1 - the return variable +:: %2 - format [extended|basic*] +:: iso8601 - contains the resulting timestamp +@setlocal +@wmic Alias /? >NUL 2>&1 || @exit /b 1 +@set "var=%~1" +@if "%var%" == "" @exit /b 1 +@set "format=%~2" +@if "%format%" == "" set format=basic +@for /F "skip=1 tokens=1-6" %%g IN ('wmic Path Win32_UTCTime Get Day^,Hour^,Minute^,Month^,Second^,Year /Format:table') do @( + @if "%%~l"=="" goto :iso8601_done + @set "yyyy=%%l" + @set "mm=00%%j" + @set "dd=00%%g" + @set "hour=00%%h" + @set "minute=00%%i" + @set "seconds=00%%k" +) +:iso8601_done +@set mm=%mm:~-2% +@set dd=%dd:~-2% +@set hour=%hour:~-2% +@set minute=%minute:~-2% +@set seconds=%seconds:~-2% +@if /i [%format%] == [extended] ( + set iso8601=%yyyy%-%mm%-%dd%T%hour%:%minute%:%seconds%Z +) else ( + if /i [%format%] == [basic] ( + set iso8601=%yyyy%%mm%%dd%T%hour%%minute%%seconds%Z + ) else ( + @exit /b 1 + ) +) +@set iso8601=%iso8601: =0% +@endlocal & set %var%=%iso8601% +@goto :eof + +:verbosity - Processes the verbosity parameter '/v[v...] +:: %1 - verbosity given on the command line +:: logging_level - set to the number of v's +@setlocal +@set logging_level=0 +@set verbosity=%~1 +:verbosity_loop +@set verbosity=%verbosity:~1% +@if not [%verbosity%] == [] @( + set /a "logging_level=logging_level+1" + goto verbosity_loop +) +@endlocal & set logging_level=%logging_level% +@goto :eof + +:log - Logs a message, depending on verbosity +:: %1 - level +:: [0-4] for CLI logging +:: [5-9] for GUI logging +:: %2 - message to print +@setlocal +@set "level=%~1" +@set "msg=%~2" +@if "%log_folder%" == "" ( + echo Logging was used to early in the script, log_folder isn't set yet + goto :eof +) +@if "%log_path%" == "" ( + echo Logging was used to early in the script, log_path isn't set yet + goto :eof +) +@if not exist "%log_folder%" mkdir "%log_folder%" +@if not exist "%log_path%" echo. 1>nul 2>"%log_path%" +@echo.%msg% >> "%log_path%" +@if %level% geq 5 ( + @if [%script_source%] == [explorer] ( + set /a "level=level-5" + ) else ( + @goto :eof + ) +) +@if "%logging_level%" == "" ( + echo Logging was used to early in the script, logging_level isn't set yet + goto :eof +) +@if %logging_level% geq %level% echo.%msg% 1>&2 +@endlocal +@goto :eof + +:download - Downloads a file from the internet +:: %1 - the url of the file to download +:: %2 - the file to download to +:: %3 - the MD5 checksum of the file (optional) +@setlocal EnableDelayedExpansion +@if errorlevel 1 ( + @call :print_usage "Failed to enable extensions" + @exit /b 1 +) +@set "url=%~1" +@set "file_path=%~2" +@set "checksum=%~3" +@for %%a in (%file_path%) do @set dir_path=%%~dpa +@for %%a in (%file_path%) do @set file_name=%%~nxa +@if "%url%" == "" @exit /b 1 +@if "%file_path%" == "" @exit /b 1 +@if "%dir_path%" == "" @exit /b 1 +@if "%file_name%" == "" @exit /b 1 +@if not exist "%dir_path%" mkdir "%dir_path%" +@call :log 2 "Downloading %url%" +@call :iso8601 iso8601 +@set "temp_path=%temp%\download-%iso8601%-%file_name%" +@set "log_path=%temp%\download-%iso8601%-log-%file_name%" +@call :log 4 "Using temp file %temp_path%" +@powershell Invoke-WebRequest "'%url%'" ^ + -OutFile "'%temp_path%'" ^ + -UserAgent [Microsoft.PowerShell.Commands.PSUserAgent]::IE ^ + 1>nul 2>"%log_path%" +@if errorlevel 1 ( + @call :log 0 "Failed to download %url%" + @call :log_append "%log_path%" + @exit /b 1 +) +@if [%checksum%] neq [] ( + @call :log 4 "Checking %checksum% against %temp_path%" + @call :md5 hash "%temp_path%" + if "!hash!" neq "%checksum%" ( + @call :log 0 "Failed to match checksum: %temp_path%" + @call :log 0 "Hash : !hash!" + @call :log 0 "Checksum: %checksum%" + @exit /b 1 + ) else ( + @call :log 3 "Checksum matched: %temp_path%" + @call :log 3 "Hash : !hash!" + @call :log 3 "Checksum: %checksum%" + ) +) +@call :log 4 "Renaming %temp_path% to %file_path%" +@move /y "%temp_path%" "%file_path%" 1>nul +@endlocal +@goto :eof
http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/a9485aeb/thirdparty/civetweb-1.9.1/resources/Info.plist ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/resources/Info.plist b/thirdparty/civetweb-1.9.1/resources/Info.plist new file mode 100644 index 0000000..f02e19a --- /dev/null +++ b/thirdparty/civetweb-1.9.1/resources/Info.plist @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleExecutable</key> <string>Civetweb</string> + <key>CFBundlePackageType</key> <string>APPL</string> + <key>CFBundleTypeRole</key> <string>None</string> + <key>CFBundleIconFile</key> <string>civetweb</string> + <key>CFBundleIconFiles</key> <array> + <string>civetweb_16x16.png</string> + <string>civetweb_22x22.png</string> + <string>civetweb_32x32.png</string> + <string>civetweb_64x64.png</string> + </array> + <key>LSUIElement</key> <true/> + <key>RunAtLoad</key> <true/> + <key>Label</key> <string>com.nofacepress.civetweb</string> + <key>ProgramArguments</key> <array> </array> + <key>KeepAlive</key> <true/> +</dict> +</plist> http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/a9485aeb/thirdparty/civetweb-1.9.1/resources/Makefile.in-duktape ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/resources/Makefile.in-duktape b/thirdparty/civetweb-1.9.1/resources/Makefile.in-duktape new file mode 100644 index 0000000..869e21b --- /dev/null +++ b/thirdparty/civetweb-1.9.1/resources/Makefile.in-duktape @@ -0,0 +1,60 @@ +# +# Copyright (c) 2015-2017 the Civetweb developers +# +# License http://opensource.org/licenses/mit-license.php MIT License +# + +ifndef WITH_DUKTAPE + $(error WITH_DUKTAPE is not defined) +endif + +# Duktape default version is 1.5.2 (105) +WITH_DUKTAPE_VERSION ?= 105 +DUKTAPE_VERSION_KNOWN = 0 + +# Select src and header according to the Duktape version +ifeq ($(WITH_DUKTAPE_VERSION), 105) + $(info Duktape: Using version 1.5.2) + DUKTAPE_DIR = src/third_party/duktape-1.5.2/src + DUKTAPE_SHARED_LIB_FLAG = -lduktape1.5 + DUKTAPE_CFLAGS = -DDUKTAPE_VERSION_MAKEFILE=105 + DUKTAPE_VERSION_KNOWN = 1 +endif + +ifneq ($(DUKTAPE_VERSION_KNOWN), 1) + $(error Duktape: Unknwon version - $(WITH_DUKTAPE_VERSION)) +endif + + +# Add flags for all Duktape versions +DUKTAPE_CFLAGS += -I$(DUKTAPE_DIR) -DUSE_DUKTAPE + +ifneq ($(TARGET_OS),WIN32) +# DUKTAPE_CFLAGS += +endif + +ifdef WITH_DUKTAPE_SHARED + + DUKTAPE_SOURCE_FILES = + + $(info Duktape: using dynamic linking) + +else + + DUKTAPE_SOURCE_FILES = duktape.c + +ifeq ($(WITH_DUKTAPE_VERSION), 104) +# DUKTAPE_SOURCE_FILES += ... TODO ... +endif + + $(info Duktape: using static library) + +endif + +DUKTAPE_SOURCES = $(addprefix $(DUKTAPE_DIR)/, $(DUKTAPE_SOURCE_FILES)) +DUKTAPE_OBJECTS = $(DUKTAPE_SOURCES:.c=.o) + +OBJECTS += $(DUKTAPE_OBJECTS) +CFLAGS += $(DUKTAPE_CFLAGS) +SOURCE_DIRS = $(DUKTAPE_DIR) + http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/a9485aeb/thirdparty/civetweb-1.9.1/resources/Makefile.in-lua ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/resources/Makefile.in-lua b/thirdparty/civetweb-1.9.1/resources/Makefile.in-lua new file mode 100644 index 0000000..630b580 --- /dev/null +++ b/thirdparty/civetweb-1.9.1/resources/Makefile.in-lua @@ -0,0 +1,148 @@ +# +# Copyright (c) 2013 No Face Press, LLC +# Copyright (c) 2014-2017 the Civetweb developers +# +# License http://opensource.org/licenses/mit-license.php MIT License +# + +ifndef WITH_LUA + $(error WITH_LUA is not defined) +endif + +# Lua Default version is 502 +WITH_LUA_VERSION ?= 502 +LUA_VERSION_KNOWN = 0 + +# Select src and header according to the Lua version +ifeq ($(WITH_LUA_VERSION), 501) + $(info Lua: Using version 5.1.5) + LUA_DIR = src/third_party/lua-5.1.5/src + LUA_SHARED_LIB_FLAG = -llua5.1 + LUA_CFLAGS = -DLUA_VERSION_MAKEFILE=501 + LUA_VERSION_KNOWN = 1 +endif +ifeq ($(WITH_LUA_VERSION), 502) + $(info Lua: Using version 5.2.4) + LUA_DIR = src/third_party/lua-5.2.4/src + LUA_SHARED_LIB_FLAG = -llua5.2 + LUA_CFLAGS = -DLUA_VERSION_MAKEFILE=502 + LUA_VERSION_KNOWN = 1 +endif +ifeq ($(WITH_LUA_VERSION), 503) + $(info Lua: Using version 5.3.3) + LUA_DIR = src/third_party/lua-5.3.3/src + LUA_SHARED_LIB_FLAG = -llua5.3 + LUA_CFLAGS = -DLUA_COMPAT_5_2 -DLUA_VERSION_MAKEFILE=503 + LUA_VERSION_KNOWN = 1 +endif + +ifneq ($(LUA_VERSION_KNOWN), 1) + $(error Lua: Unknwon version - $(WITH_LUA_VERSION)) +endif + + +# Add flags for all Lua versions +LUA_CFLAGS += -I$(LUA_DIR) -DLUA_COMPAT_ALL -DUSE_LUA + +ifneq ($(TARGET_OS),WIN32) + LUA_CFLAGS += -DLUA_USE_POSIX -DLUA_USE_DLOPEN +endif + +ifdef WITH_LUA_SHARED + + LUA_SOURCE_FILES = + + $(info Lua: using dynamic linking) + +else + + LUA_SOURCE_FILES = lapi.c \ + lauxlib.c \ + lbaselib.c \ + lcode.c \ + ldblib.c \ + ldebug.c \ + ldo.c \ + ldump.c \ + lfunc.c \ + lgc.c \ + linit.c \ + liolib.c \ + llex.c \ + lmathlib.c \ + lmem.c \ + loadlib.c \ + lobject.c \ + lopcodes.c \ + loslib.c \ + lparser.c \ + lstate.c \ + lstring.c \ + lstrlib.c \ + ltable.c \ + ltablib.c \ + ltm.c \ + lundump.c \ + lvm.c \ + lzio.c + +ifeq ($(WITH_LUA_VERSION), 502) + LUA_SOURCE_FILES += lbitlib.c \ + lcorolib.c \ + lctype.c +endif +ifeq ($(WITH_LUA_VERSION), 503) + LUA_SOURCE_FILES += lbitlib.c \ + lcorolib.c \ + lctype.c \ + lutf8lib.c +endif + + $(info Lua: using static library) + +endif + +LUA_SOURCES = $(addprefix $(LUA_DIR)/, $(LUA_SOURCE_FILES)) +LUA_OBJECTS = $(LUA_SOURCES:.c=.o) + +OBJECTS += $(LUA_OBJECTS) +CFLAGS += $(LUA_CFLAGS) +SOURCE_DIRS = $(LUA_DIR) + + +ifneq ($(WITH_LUA_VERSION), 501) + SQLITE_DIR = src/third_party + SQLITE_SOURCE_FILES = sqlite3.c lsqlite3.c + SQLITE_SOURCES = $(addprefix $(SQLITE_DIR)/, $(SQLITE_SOURCE_FILES)) + SQLITE_OBJECTS = $(SQLITE_SOURCES:.c=.o) + SQLITE_CFLAGS = -I$(SQLITE_DIR) -DTHREADSAFE=1 -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS + OBJECTS += $(SQLITE_OBJECTS) + CFLAGS += $(SQLITE_CFLAGS) + CFLAGS += -DUSE_LUA_SQLITE3 + #SOURCE_DIRS = $(SQLITE_DIR) +endif + + +LFS_DIR = src/third_party +LFS_SOURCE_FILES = lfs.c +LFS_SOURCES = $(addprefix $(LFS_DIR)/, $(LFS_SOURCE_FILES)) +LFS_OBJECTS = $(LFS_SOURCES:.c=.o) +LFS_CFLAGS = -I$(LFS_DIR) +OBJECTS += $(LFS_OBJECTS) +CFLAGS += $(LFS_CFLAGS) +CFLAGS += -DUSE_LUA_FILE_SYSTEM +#SOURCE_DIRS = $(LFS_DIR) + + +ifneq ($(WITH_LUA_VERSION), 501) + LXML_DIR = src/third_party + LXML_SOURCE_FILES = LuaXML_lib.c + LXML_SOURCES = $(addprefix $(LXML_DIR)/, $(LXML_SOURCE_FILES)) + LXML_OBJECTS = $(LXML_SOURCES:.c=.o) + LXML_CFLAGS = -I$(LXML_DIR) + OBJECTS += $(LXML_OBJECTS) + CFLAGS += $(LXML_CFLAGS) + CFLAGS += -DUSE_LUA_LUAXML + #SOURCE_DIRS = $(LXML_DIR) +endif + http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/a9485aeb/thirdparty/civetweb-1.9.1/resources/Makefile.in-os ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/resources/Makefile.in-os b/thirdparty/civetweb-1.9.1/resources/Makefile.in-os new file mode 100644 index 0000000..9ad1132 --- /dev/null +++ b/thirdparty/civetweb-1.9.1/resources/Makefile.in-os @@ -0,0 +1,22 @@ +# +# Copyright (c) 2013 No Face Press, LLC +# License http://opensource.org/licenses/mit-license.php MIT License +# + +# Override this using TARGET_OS=LINUX on the command line +ifeq ($(TARGET_OS),) + ifeq ($(OS),Windows_NT) + TARGET_OS = WIN32 + else + UNAME_S := $(shell uname -s) + ifeq ($(UNAME_S),Linux) + TARGET_OS = LINUX + else + ifeq ($(UNAME_S),Darwin) + TARGET_OS = OSX + else + TARGET_OS = BSD + endif + endif + endif +endif http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/a9485aeb/thirdparty/civetweb-1.9.1/resources/cert/client.crt ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/resources/cert/client.crt b/thirdparty/civetweb-1.9.1/resources/cert/client.crt new file mode 100644 index 0000000..d6cd7ef --- /dev/null +++ b/thirdparty/civetweb-1.9.1/resources/cert/client.crt @@ -0,0 +1,14 @@ +-----BEGIN CERTIFICATE----- +MIICOTCCAaICCQCXNPrLNIw8IDANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQGEwJ4 +eDELMAkGA1UECAwCeHgxCzAJBgNVBAcMAnh4MQswCQYDVQQKDAJ4eDELMAkGA1UE +CwwCeHgxCzAJBgNVBAMMAnh4MREwDwYJKoZIhvcNAQkBFgJ4eDAeFw0xNTEwMjUy +MzMxNDJaFw0yNTEwMjIyMzMxNDJaMGExCzAJBgNVBAYTAnh4MQswCQYDVQQIDAJ4 +eDELMAkGA1UEBwwCeHgxCzAJBgNVBAoMAnh4MQswCQYDVQQLDAJ4eDELMAkGA1UE +AwwCeHgxETAPBgkqhkiG9w0BCQEWAnh4MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCB +iQKBgQDGwWIIU2KUEufa0Ga5lnm7I8cX4LPRIFX4zL3g1Kuw27eRaJWJLz3Y97oi +m0fUmhhKJoEFDxj9U4UbXZWMxzH5F8RfupUu+9yDqTWjTRaUQiM/C7dSPEevfqNP +zBoERPrMzm9W5d8Ke04vpUzk0duoE6vyNQVECroNlHY7R4zQjwIDAQABMA0GCSqG +SIb3DQEBCwUAA4GBAKZiZ2+sYJWFnQcfqcDJBwrbTo98SSxfryPmeVQSuM8AXC4I +baX+fqkatdFidDBl96Aq8pDfqeAz+gqRoJ+Dx7opn5/b0WcB0lD+v25x+nO8g4z7 +HBzpVtvRTkC7dGase72csnqvyWm1xTSiHNRIghl0kZy8wb6V9GmJsHxBoKWN +-----END CERTIFICATE----- http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/a9485aeb/thirdparty/civetweb-1.9.1/resources/cert/client.csr ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/resources/cert/client.csr b/thirdparty/civetweb-1.9.1/resources/cert/client.csr new file mode 100644 index 0000000..8c5dbdc --- /dev/null +++ b/thirdparty/civetweb-1.9.1/resources/cert/client.csr @@ -0,0 +1,11 @@ +-----BEGIN CERTIFICATE REQUEST----- +MIIBoTCCAQoCAQAwYTELMAkGA1UEBhMCeHgxCzAJBgNVBAgMAnh4MQswCQYDVQQH +DAJ4eDELMAkGA1UECgwCeHgxCzAJBgNVBAsMAnh4MQswCQYDVQQDDAJ4eDERMA8G +CSqGSIb3DQEJARYCeHgwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMbBYghT +YpQS59rQZrmWebsjxxfgs9EgVfjMveDUq7Dbt5FolYkvPdj3uiKbR9SaGEomgQUP +GP1ThRtdlYzHMfkXxF+6lS773IOpNaNNFpRCIz8Lt1I8R69+o0/MGgRE+szOb1bl +3wp7Ti+lTOTR26gTq/I1BUQKug2UdjtHjNCPAgMBAAGgADANBgkqhkiG9w0BAQsF +AAOBgQCVJKEisDii5qFbV75rOGF+tTChv3c051pWerl8U42s/MQ3jhzNb8+i7f2n +Kn4yZU3u91xtAruAoKFPSnFpgQKyBRv57g5eM03nrUUImZcRT5Kkf4YsqRMsZ2yH +MYk6QbTrJwibUoqEUUFgv0n5ONUBoEvhzZr0K9KZ3DLyIg1rpQ== +-----END CERTIFICATE REQUEST----- http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/a9485aeb/thirdparty/civetweb-1.9.1/resources/cert/client.key ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/resources/cert/client.key b/thirdparty/civetweb-1.9.1/resources/cert/client.key new file mode 100644 index 0000000..ea9e739 --- /dev/null +++ b/thirdparty/civetweb-1.9.1/resources/cert/client.key @@ -0,0 +1,15 @@ +-----BEGIN RSA PRIVATE KEY----- +MIICXAIBAAKBgQDGwWIIU2KUEufa0Ga5lnm7I8cX4LPRIFX4zL3g1Kuw27eRaJWJ +Lz3Y97oim0fUmhhKJoEFDxj9U4UbXZWMxzH5F8RfupUu+9yDqTWjTRaUQiM/C7dS +PEevfqNPzBoERPrMzm9W5d8Ke04vpUzk0duoE6vyNQVECroNlHY7R4zQjwIDAQAB +AoGAUPrNxHKlAYvKZ77te8QxiOwE3FezLAuuu5Y/7vD3mzGKU3Z3JtPWsSYN8ret +xpOaPev+OV9zYRO8ce/pVNh8JTcvywU9SaaxzrMVIq+8rOfM8oCXwpKr7FqV6fO3 +a9JzofV6A2x3mzWqyixRVSGBWTC3Oc5+uaTX5pmJvMFgKLECQQDxFopXbhgPUVtQ +Wa5onj3qDtYsuJALBDaHDV7nSoQySZpHn1DS/w1n+INOuwkXXfMzqdRDKGDh5VVe +5rF1k1nVAkEA0wyI7aXYIJuYli5fCN6bwGQTwmwoWbyDDE+VkZlMUm8KhIzdnFjP +j9+ntNshNYyKf6H9XqxuizNyiLyiWl+u0wJAXLWgSXLKycktZj62dQC1Kna+IcBv +k+zw0wpvPl5Ha9cl/vji6eCu1RaZ2ALQwi2cwndCavjyGKxKIg5wm5goaQJAc4dC +EW0ecUMbdOJvbWiGM/vUgTI5qF20EvIhuvECwYE9ba+6xBItlOFmaW8mr6x+SD3B +d6jGXnbMNKOl7/i+twJBANIFBVZBal85Wn0V5MJFDWLB1vPSxXwb4OBwVD+j52H7 +YwpRbUn3/4CkiagDPdzio80WkWdkqpGZoVyDUpZi5Fg= +-----END RSA PRIVATE KEY----- http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/a9485aeb/thirdparty/civetweb-1.9.1/resources/cert/client.pem ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/resources/cert/client.pem b/thirdparty/civetweb-1.9.1/resources/cert/client.pem new file mode 100644 index 0000000..331fd70 --- /dev/null +++ b/thirdparty/civetweb-1.9.1/resources/cert/client.pem @@ -0,0 +1,29 @@ +-----BEGIN CERTIFICATE----- +MIICOTCCAaICCQCXNPrLNIw8IDANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQGEwJ4 +eDELMAkGA1UECAwCeHgxCzAJBgNVBAcMAnh4MQswCQYDVQQKDAJ4eDELMAkGA1UE +CwwCeHgxCzAJBgNVBAMMAnh4MREwDwYJKoZIhvcNAQkBFgJ4eDAeFw0xNTEwMjUy +MzMxNDJaFw0yNTEwMjIyMzMxNDJaMGExCzAJBgNVBAYTAnh4MQswCQYDVQQIDAJ4 +eDELMAkGA1UEBwwCeHgxCz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shNYyKf6H9XqxuizNyiLyiWl+u0wJAXLWgSXLKycktZj62dQC1Kna+IcBv +k+zw0wpvPl5Ha9cl/vji6eCu1RaZ2ALQwi2cwndCavjyGKxKIg5wm5goaQJAc4dC +EW0ecUMbdOJvbWiGM/vUgTI5qF20EvIhuvECwYE9ba+6xBItlOFmaW8mr6x+SD3B +d6jGXnbMNKOl7/i+twJBANIFBVZBal85Wn0V5MJFDWLB1vPSxXwb4OBwVD+j52H7 +YwpRbUn3/4CkiagDPdzio80WkWdkqpGZoVyDUpZi5Fg= +-----END RSA PRIVATE KEY----- http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/a9485aeb/thirdparty/civetweb-1.9.1/resources/cert/make_cert.bat ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/resources/cert/make_cert.bat b/thirdparty/civetweb-1.9.1/resources/cert/make_cert.bat new file mode 100644 index 0000000..27f8850 --- /dev/null +++ b/thirdparty/civetweb-1.9.1/resources/cert/make_cert.bat @@ -0,0 +1,22 @@ +del server.* + +c:\OpenSSL-Win32\bin\openssl.exe genrsa -des3 -out server.key 4096 + +c:\OpenSSL-Win32\bin\openssl.exe req -sha256 -new -key server.key -out server.csr -utf8 + +copy server.key server.key.orig + +c:\OpenSSL-Win32\bin\openssl.exe rsa -in server.key.orig -out server.key + +echo [ v3_ca ] > server.ext.txt +echo [ req ] >> server.ext.txt +echo req_extensions = my_extensions >> server.ext.txt +echo [ my_extensions ] >> server.ext.txt +echo extendedKeyUsage=serverAuth >> server.ext.txt +echo crlDistributionPoints=URI:http://localhost/crl.pem >> server.ext.txt + +c:\OpenSSL-Win32\bin\openssl.exe x509 -req -days 365 -extensions v3_ca -extfile server.ext.txt -in server.csr -signkey server.key -out server.crt + +copy server.crt server.pem + +type server.key >> server.pem http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/a9485aeb/thirdparty/civetweb-1.9.1/resources/cert/make_certs ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/resources/cert/make_certs b/thirdparty/civetweb-1.9.1/resources/cert/make_certs new file mode 100644 index 0000000..1dcf32b --- /dev/null +++ b/thirdparty/civetweb-1.9.1/resources/cert/make_certs @@ -0,0 +1,31 @@ +#using "pass" for every password + +openssl genrsa -des3 -out client.key 1024 +openssl req -new -key client.key -out client.csr + +cp client.key client.key.orig + +openssl rsa -in client.key.orig -out client.key + +openssl x509 -req -days 3650 -in client.csr -signkey client.key -out client.crt + +cp client.crt client.pem +cat client.key >> client.pem + +openssl pkcs12 -export -inkey client.key -in client.pem -name ClientName -out client.pfx + + + +openssl genrsa -des3 -out server.key 1024 +openssl req -new -key server.key -out server.csr + +cp server.key server.key.orig + +openssl rsa -in server.key.orig -out server.key + +openssl x509 -req -days 3650 -in server.csr -signkey server.key -out server.crt + +cp server.crt server.pem +cat server.key >> server.pem + +openssl pkcs12 -export -inkey server.key -in server.pem -name ServerName -out server.pfx http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/a9485aeb/thirdparty/civetweb-1.9.1/resources/cert/server.crt ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/resources/cert/server.crt b/thirdparty/civetweb-1.9.1/resources/cert/server.crt new file mode 100644 index 0000000..b43ac60 --- /dev/null +++ b/thirdparty/civetweb-1.9.1/resources/cert/server.crt @@ -0,0 +1,30 @@ +-----BEGIN CERTIFICATE----- +MIIFOzCCAyOgAwIBAgIJAPbrrAobpdmKMA0GCSqGSIb3DQEBCwUAMF0xCzAJBgNV +BAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBX +aWRnaXRzIFB0eSBMdGQxFjAUBgNVBAMMDTkwLjE0Ni4xMTguOTgwHhcNMTYwODI1 +MjIyMjE2WhcNMTcwODI1MjIyMjE2WjBdMQswCQYDVQQGEwJBVTETMBEGA1UECAwK +U29tZS1TdGF0ZTEhMB8GA1UECgwYSW50ZXJuZXQgV2lkZ2l0cyBQdHk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zLYz0elm1xvkdH4kcKx1x1mMYfppFuIR9O0c0uVdGI95 +ElJoU+4AhGg6YWR2BWw0vNjFThB2uPmvgvmHos00i/81LcDqxeUm7PbN7/sXxp+I +GAXqZ2+ffKh0aKfNB8IuTg6NL5S3+9oo8ZOLyHwnuMMsKQOKR8tKghEXdxHkfuxk +a4RJmzNT477NOPEO+2cKuYbbQ6uL5zJxTDWhCfEEh0s2o4/0T0A8ClkgGKP6SgC7 +hp/yW0/rTeaRURK6fGnmxAl8cg7979OMqa/KaK2vnqJQFxlJg1qwJzu078NZ/KUX ++obupnukdyRJPxFAgdYOfwdaFz1RmCz1VznlrDoGcJnHPeI7ZY0fze/U83TW2qOx +b2GGlQ62LeovgnKel4XE2NxwmshcnDR5CCs3tkNFDXNjKSNeNgxR4/bddGpomO0= +-----END CERTIFICATE----- http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/a9485aeb/thirdparty/civetweb-1.9.1/resources/cert/server.csr ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/resources/cert/server.csr b/thirdparty/civetweb-1.9.1/resources/cert/server.csr new file mode 100644 index 0000000..002e0ba --- /dev/null +++ b/thirdparty/civetweb-1.9.1/resources/cert/server.csr @@ -0,0 +1,28 @@ +-----BEGIN CERTIFICATE REQUEST----- +MIIE1TCCAr0CAQAwXTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUx +ITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEWMBQGA1UEAwwNOTAu +MTQ2LjExOC45ODCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAN8Zb1YG +K8ZmnPsGKfXeSvTHSphYIeZHGNbzssUMYRQEbSXaYKh/6kA12/8+tTeG2hJQiVL8 +CbZhpCBF0v/D10ThXcq/O/qh2bKuuNbgE18/D2RtjfSkRn3e5oF0yM9Y/9HJegxW +E+/xLDktYBoXMr3YejERgcDx4Wp1X/YyDFnjNOj/O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gtPUMGCYutURb5Ic5kbkwk4tgHg95DFl1H+ +fsWaEYZ9lmWrK+dV/5DYAfMqdBEkKMH4j0PqjQAhulYbf/Mo8HnQoL4SxUb/Yd1J +l6979lflRVEBPxNt2OOWgUAFQBef0HnHYf/2XQo32Sdy/Q/bcANtDK7MkFahFNK5 +kNQtD7P+oUZZNstTogL+IaH5AiyGJ7igho4HKMsXeCrs3npxrJM0ppo= +-----END CERTIFICATE REQUEST----- http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/a9485aeb/thirdparty/civetweb-1.9.1/resources/cert/server.key ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/resources/cert/server.key b/thirdparty/civetweb-1.9.1/resources/cert/server.key new file mode 100644 index 0000000..b67ef52 --- /dev/null +++ b/thirdparty/civetweb-1.9.1/resources/cert/server.key @@ -0,0 +1,51 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIJKgIBAAKCAgEA3xlvVgYrxmac+wYp9d5K9MdKmFgh5kcY1vOyxQxhFARtJdpg +qH/qQDXb/z61N4baElCJUvwJtmGkIEXS/8PXROFdyr87+qHZsq641uATXz8PZG2N +9KRGfd7mgXTIz1j/0cl6DFYT7/EsOS1gGhcyvdh6MRGBwPHhanVf9jIMWeM06P85 +SPgQu4pKWOyT+jSLJp2V3MTriuskJtTu9ViBR/J6s1qxfKVlaMOsFlqh1wLuGgme +FclpFCXmqi3a4x4PFU1PNOHCeS7WFnFiLtD8kR2cnOpXl0lgqFNAHh7vLbTwqfOy +AU70Bs5kFO00nXc6zVFLcT4OPMg/0GO8VUmZ7WbwAhBqNo/CBb6CSSbfzk/vY4Si +iBsvVP3pPCM0Y63v6p/85FkwIWP6Waa4Y3mzuO6X+Msis/pruVvO0R6wE5vBERqG +VOIDbJbRhq8ef4m28GjBS+bbO+zs6BPJuEAEpnLfyaALHdzwNPTtNsK2vFk83yda +jc78I4pkz7izX4YU1bX0nB2vDJPMMXiDecPd1pd8vRb6z2J4EWH7kmXjH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/BMXOn +A1bgb4ndx1TnCnp3UXFyYiXzas+ZQzDKGj4bD4fuTFcftbpVxxmY/2AozsUD1IpK +BNgn857o9Yq3kvzatjfuLvA9E78SaMIw+QKCAQEAlTSQh3qA6BB/iZS0EWFac4Qe +P7k5Eth+tCXoMHSf/i1IZoIreKiW9n4uT902UEhxJEPR2gtJulyAnul4xH+9txAB +u/SdKm7ZmqNUlARdvSUp02PeFbkAe14/dK9LOEJ4Rr979BqTCi/prD1w1OaYCkuT +UD1QcHYSHiHeht5WHDY4ig2ImGw34C0qFvgKeJKCfZwPwOTyqNNT/2MLmGnPF1Tx +0rS7xBRe2dyPZAeJZB0ilz0ykE+mTcNSLVmWJHDl7YkMIfbnJGGOjmce+tKkkrfA +lq0Myvx9q0Rj+RWhjI+iCHcAnOUJLIdK1TmFS4DxCzRPqx3rCiY8SBbWXJUTwA== +-----END RSA PRIVATE KEY----- http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/a9485aeb/thirdparty/civetweb-1.9.1/resources/cert/server.pem ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/resources/cert/server.pem b/thirdparty/civetweb-1.9.1/resources/cert/server.pem new file mode 100644 index 0000000..5b443e1 --- /dev/null +++ b/thirdparty/civetweb-1.9.1/resources/cert/server.pem @@ -0,0 +1,81 @@ +-----BEGIN CERTIFICATE----- +MIIFOzCCAyOgAwIBAgIJAPbrrAobpdmKMA0GCSqGSIb3DQEBCwUAMF0xCzAJBgNV +BAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBX +aWRnaXRzIFB0eSBMdGQxFjAUBgNVBAMMDTkwLjE0Ni4xMTguOTgwHhcNMTYwODI1 +MjIyMjE2WhcNMTcwODI1MjIyMjE2WjBdMQswCQYDVQQGEwJBVTETMBEGA1UECAwK +U29tZS1TdGF0ZTEhMB8GA1UECgwYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMRYw +FAYD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QzDKGj4bD4fuTFcftbpVxxmY/2AozsUD1IpK +BNgn857o9Yq3kvzatjfuLvA9E78SaMIw+QKCAQEAlTSQh3qA6BB/iZS0EWFac4Qe +P7k5Eth+tCXoMHSf/i1IZoIreKiW9n4uT902UEhxJEPR2gtJulyAnul4xH+9txAB +u/SdKm7ZmqNUlARdvSUp02PeFbkAe14/dK9LOEJ4Rr979BqTCi/prD1w1OaYCkuT +UD1QcHYSHiHeht5WHDY4ig2ImGw34C0qFvgKeJKCfZwPwOTyqNNT/2MLmGnPF1Tx +0rS7xBRe2dyPZAeJZB0ilz0ykE+mTcNSLVmWJHDl7YkMIfbnJGGOjmce+tKkkrfA +lq0Myvx9q0Rj+RWhjI+iCHcAnOUJLIdK1TmFS4DxCzRPqx3rCiY8SBbWXJUTwA== +-----END RSA PRIVATE KEY----- http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/a9485aeb/thirdparty/civetweb-1.9.1/resources/civetweb.conf ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/resources/civetweb.conf b/thirdparty/civetweb-1.9.1/resources/civetweb.conf new file mode 100644 index 0000000..00aacde --- /dev/null +++ b/thirdparty/civetweb-1.9.1/resources/civetweb.conf @@ -0,0 +1,32 @@ +# Civetweb web server configuration file. +# For detailed description of every option, visit +# https://github.com/civetweb/civetweb/blob/master/docs/UserManual.md +# Lines starting with '#' and empty lines are ignored. +# To make a change, remove leading '#', modify option's value, +# save this file and then restart Civetweb. + +document_root . +listening_ports 8080 + +# cgi_pattern **.cgi$|**.pl$|**.php$ +# cgi_environment +# put_delete_auth_file +# cgi_interpreter +# protect_uri +# authentication_domain mydomain.com +# ssi_pattern **.shtml$|**.shtm$ +# throttle +# access_log_file +# enable_directory_listing yes +# error_log_file +# global_auth_file +# index_files index.html,index.htm,index.cgi,index.shtml,index.php,index.lp +# enable_keep_alive no +# access_control_list +# extra_mime_types +# ssl_certificate +# num_threads 50 +# run_as_user +# url_rewrite_patterns +# hide_files_patterns +# request_timeout_ms 30000 http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/a9485aeb/thirdparty/civetweb-1.9.1/resources/civetweb.icns ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/resources/civetweb.icns b/thirdparty/civetweb-1.9.1/resources/civetweb.icns new file mode 100644 index 0000000..af1f121 Binary files /dev/null and b/thirdparty/civetweb-1.9.1/resources/civetweb.icns differ http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/a9485aeb/thirdparty/civetweb-1.9.1/resources/civetweb.psd ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/resources/civetweb.psd b/thirdparty/civetweb-1.9.1/resources/civetweb.psd new file mode 100644 index 0000000..accbe31 Binary files /dev/null and b/thirdparty/civetweb-1.9.1/resources/civetweb.psd differ http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/a9485aeb/thirdparty/civetweb-1.9.1/resources/civetweb_16x16.png ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/resources/civetweb_16x16.png b/thirdparty/civetweb-1.9.1/resources/civetweb_16x16.png new file mode 100644 index 0000000..10ea1d2 Binary files /dev/null and b/thirdparty/civetweb-1.9.1/resources/civetweb_16x16.png differ http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/a9485aeb/thirdparty/civetweb-1.9.1/resources/[email protected] ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/resources/[email protected] b/thirdparty/civetweb-1.9.1/resources/[email protected] new file mode 100644 index 0000000..7621fb1 Binary files /dev/null and b/thirdparty/civetweb-1.9.1/resources/[email protected] differ http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/a9485aeb/thirdparty/civetweb-1.9.1/resources/civetweb_22x22.png ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/resources/civetweb_22x22.png b/thirdparty/civetweb-1.9.1/resources/civetweb_22x22.png new file mode 100644 index 0000000..f0b9094 Binary files /dev/null and b/thirdparty/civetweb-1.9.1/resources/civetweb_22x22.png differ http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/a9485aeb/thirdparty/civetweb-1.9.1/resources/[email protected] ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/resources/[email protected] b/thirdparty/civetweb-1.9.1/resources/[email protected] new file mode 100644 index 0000000..bdb3614 Binary files /dev/null and b/thirdparty/civetweb-1.9.1/resources/[email protected] differ http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/a9485aeb/thirdparty/civetweb-1.9.1/resources/civetweb_32x32.png ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/resources/civetweb_32x32.png b/thirdparty/civetweb-1.9.1/resources/civetweb_32x32.png new file mode 100644 index 0000000..62471e3 Binary files /dev/null and b/thirdparty/civetweb-1.9.1/resources/civetweb_32x32.png differ http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/a9485aeb/thirdparty/civetweb-1.9.1/resources/[email protected] ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/resources/[email protected] b/thirdparty/civetweb-1.9.1/resources/[email protected] new file mode 100644 index 0000000..e192a45 Binary files /dev/null and b/thirdparty/civetweb-1.9.1/resources/[email protected] differ http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/a9485aeb/thirdparty/civetweb-1.9.1/resources/civetweb_64x64.png ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/resources/civetweb_64x64.png b/thirdparty/civetweb-1.9.1/resources/civetweb_64x64.png new file mode 100644 index 0000000..bc8b995 Binary files /dev/null and b/thirdparty/civetweb-1.9.1/resources/civetweb_64x64.png differ http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/a9485aeb/thirdparty/civetweb-1.9.1/resources/[email protected] ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/resources/[email protected] b/thirdparty/civetweb-1.9.1/resources/[email protected] new file mode 100644 index 0000000..d6ad7b4 Binary files /dev/null and b/thirdparty/civetweb-1.9.1/resources/[email protected] differ http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/a9485aeb/thirdparty/civetweb-1.9.1/resources/cleanup.lua ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/resources/cleanup.lua b/thirdparty/civetweb-1.9.1/resources/cleanup.lua new file mode 100644 index 0000000..ab9557d --- /dev/null +++ b/thirdparty/civetweb-1.9.1/resources/cleanup.lua @@ -0,0 +1,92 @@ +-- Lua script used to clean up tabs and spaces in C, CPP and H files. +-- Copyright (c) 2014, bel +-- MIT License (http://opensource.org/licenses/mit-license.php) +-- +-- It can be used from the command line: +-- Call Lua5.1 or Lua5.2 + this script file + the C/CPP/H file to clean +-- +-- It can be used in Visual Studio as an external tool: +-- command: Lua5.1.exe or Lua5.2.exe +-- argument: "X:\civetweb\resources\cleanup.lua" $(ItemPath) +-- + +clean = arg[1] +print("Cleaning " .. clean) + +lines = io.lines(clean) +if not lines then + print("Can not open file " .. clean) + return +end + +function trimright(s) + return s:match "^(.-)%s*$" +end + +local lineend = false +local tabspace = false +local changed = false +local invalid = false +local newfile = {} + +lineno = 0 +incmt = false + +for l in lines do + lineno = lineno + 1 + local lt = trimright(l) + if (lt ~= l) then + lineend = true + changed = true + end + local mcmt = l:find("%/%*"); + if mcmt then + if incmt then + print("line " .. lineno .. " nested comment") + end + if not (l:sub(mcmt):find("%*%/")) then + -- multiline comment begins here + incmt = true + end + elseif incmt then + if not l:find("^%s*%*") then + print("line " .. lineno .. " multiline comment without leading *") + end + if l:find("%*%/") then + incmt = false + end + else + local cmt = l:find("//") + if (cmt) and (l:sub(cmt-5, cmt+1) ~= "http://") and (l:sub(cmt-6, cmt+1) ~= "https://") then + print("line " .. lineno .. " has C++ comment //") + end + end + local lts = lt:gsub('\t', ' ') + if (lts ~= lt) then + tabspace = true + changed = true + end + for i=1,#lts do + local b = string.byte(lts,i) + if b<32 or b>=127 then + print("Letter " .. string.byte(l,i) .. " (" .. b .. ") found in line " .. lts) + invalid = true + end + end + + newfile[#newfile + 1] = lts +end + +print("Line endings trimmed: " .. tostring(lineend)) +print("Tabs converted to spaces: " .. tostring(tabspace)) +print("Invalid characters: " .. tostring(invalid)) + +if changed then + local f = io.open(clean, "wb") + for i=1,#newfile do + f:write(newfile[i]) + f:write("\n") + end + f:close() + print("File cleaned") +end http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/a9485aeb/thirdparty/civetweb-1.9.1/resources/coverity_check.sh ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/resources/coverity_check.sh b/thirdparty/civetweb-1.9.1/resources/coverity_check.sh new file mode 100644 index 0000000..7cb8439 --- /dev/null +++ b/thirdparty/civetweb-1.9.1/resources/coverity_check.sh @@ -0,0 +1,33 @@ +#! /bin/sh + +ls src/civetweb.c +if [ "$?" = "0" ]; then + echo "Building files for coverity check ..." +else + echo "Run this script from the root directory of project!" 1>&2 + echo "username@hostname:/somewhere/civetweb$ ./resources/coverity_check.sh" 1>&2 + exit 1 +fi + +rm -rf cov_int/ +make clean + +../cov-analysis-linux64-7.6.0/bin/cov-build --dir cov-int make WITH_IPV6=1 WITH_WEBSOCKET=1 WITH_LUA_SHARED=1 + +rm civetweb_coverity_check.tgz +tar czvf civetweb_coverity_check.tgz cov-int + +echo +ls -la civetweb_coverity_check.tgz + +if [ "$?" = "0" ]; then + echo "... done" + echo +else + echo "No civetweb_coverity_check.tgz file" 1>&2 + echo + exit 1 +fi + +exit 0 + http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/a9485aeb/thirdparty/civetweb-1.9.1/resources/duktape-logo.png ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/resources/duktape-logo.png b/thirdparty/civetweb-1.9.1/resources/duktape-logo.png new file mode 100644 index 0000000..afdc0f8 Binary files /dev/null and b/thirdparty/civetweb-1.9.1/resources/duktape-logo.png differ http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/a9485aeb/thirdparty/civetweb-1.9.1/resources/itworks.html ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/resources/itworks.html b/thirdparty/civetweb-1.9.1/resources/itworks.html new file mode 100644 index 0000000..cba3bad --- /dev/null +++ b/thirdparty/civetweb-1.9.1/resources/itworks.html @@ -0,0 +1,23 @@ +<html> +<head> +<title>Civetweb: It Works!</title> +</head> +<body> +<div style="float:right; width:100%; text-align:center;"> +</div> +<div style="float:left; height:50%; margin-bottom:-200px;"></div> +<div style="clear:both; height:400px; width:400px; margin: auto; position:relative;"> +<img src="civetweb_64x64.png" alt="logo"/> +<p> +<b style="font-size:larger"><a style="text-decoration:none" href="https://sourceforge.net/projects/civetweb/">Civetweb</a></b><br> +<i>Your web server</i> +<ul> +<li><a href="https://github.com/civetweb/civetweb/blob/master/docs/UserManual.md">User Manual</a></li> +<li><a href="https://github.com/civetweb/civetweb/blob/master/RELEASE_NOTES.md">Release Notes</a></li> +<li><a href="https://sourceforge.net/projects/civetweb/">Downloads</a></li> +<li><a href="https://github.com/civetweb/civetweb">GitHub</a></li> +</ul> +</p> +</div> +</body> +</html> http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/a9485aeb/thirdparty/civetweb-1.9.1/resources/jni/Android.mk ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/resources/jni/Android.mk b/thirdparty/civetweb-1.9.1/resources/jni/Android.mk new file mode 100644 index 0000000..f24981a --- /dev/null +++ b/thirdparty/civetweb-1.9.1/resources/jni/Android.mk @@ -0,0 +1,6 @@ +LOCAL_PATH := $(call my-dir)/../.. +include $(CLEAR_VARS) +LOCAL_CFLAGS := -std=c99 -O2 -W -Wall -pthread -pipe $(COPT) +LOCAL_MODULE := civetweb +LOCAL_SRC_FILES := src\main.c src\civetweb.c +include $(BUILD_EXECUTABLE) http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/a9485aeb/thirdparty/civetweb-1.9.1/resources/lua-logo.jpg ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/resources/lua-logo.jpg b/thirdparty/civetweb-1.9.1/resources/lua-logo.jpg new file mode 100644 index 0000000..67de666 Binary files /dev/null and b/thirdparty/civetweb-1.9.1/resources/lua-logo.jpg differ http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/a9485aeb/thirdparty/civetweb-1.9.1/resources/luafilesystem-logo.jpg ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/resources/luafilesystem-logo.jpg b/thirdparty/civetweb-1.9.1/resources/luafilesystem-logo.jpg new file mode 100644 index 0000000..4a2e855 Binary files /dev/null and b/thirdparty/civetweb-1.9.1/resources/luafilesystem-logo.jpg differ http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/a9485aeb/thirdparty/civetweb-1.9.1/resources/luasqlite-logo.jpg ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/resources/luasqlite-logo.jpg b/thirdparty/civetweb-1.9.1/resources/luasqlite-logo.jpg new file mode 100644 index 0000000..9388126 Binary files /dev/null and b/thirdparty/civetweb-1.9.1/resources/luasqlite-logo.jpg differ http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/a9485aeb/thirdparty/civetweb-1.9.1/resources/luaxml-logo.jpg ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/resources/luaxml-logo.jpg b/thirdparty/civetweb-1.9.1/resources/luaxml-logo.jpg new file mode 100644 index 0000000..9916f6e Binary files /dev/null and b/thirdparty/civetweb-1.9.1/resources/luaxml-logo.jpg differ http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/a9485aeb/thirdparty/civetweb-1.9.1/resources/mingw.bat ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/resources/mingw.bat b/thirdparty/civetweb-1.9.1/resources/mingw.bat new file mode 100644 index 0000000..8703266 --- /dev/null +++ b/thirdparty/civetweb-1.9.1/resources/mingw.bat @@ -0,0 +1,15 @@ +@rem MinGW build test - used to test MinGW builds locally +@rem Adapt path/versions before use + +@rem This batch file must be used from the repository root +@if exist mingw.bat cd .. + + +@set PATH=%ProgramFiles%\mingw-w64\i686-4.9.2-win32-dwarf-rt_v3-rev1\mingw32\bin;%PATH% +@set PATH=%ProgramFiles%\GnuWin32\bin;%PATH% + +@rem Alternative ways to use mingw +@rem make CC=gcc CFLAGS=-w CFLAGS+=-Iinclude/ CFLAGS+=-lws2_32 CFLAGS+=-liphlpapi +@rem gcc src\civetweb.c src\main.c -Iinclude\ -lws2_32 -lpthread -lcomdlg32 -w + +make build CC=gcc WITH_LUA=1 WITH_WEBSOCKET=1 http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/a9485aeb/thirdparty/civetweb-1.9.1/resources/res.rc ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/resources/res.rc b/thirdparty/civetweb-1.9.1/resources/res.rc new file mode 100644 index 0000000..38a80bb --- /dev/null +++ b/thirdparty/civetweb-1.9.1/resources/res.rc @@ -0,0 +1 @@ +100 ICON DISCARDABLE "systray.ico" http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/a9485aeb/thirdparty/civetweb-1.9.1/resources/sqlite3-logo.jpg ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/resources/sqlite3-logo.jpg b/thirdparty/civetweb-1.9.1/resources/sqlite3-logo.jpg new file mode 100644 index 0000000..14b01df Binary files /dev/null and b/thirdparty/civetweb-1.9.1/resources/sqlite3-logo.jpg differ http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/a9485aeb/thirdparty/civetweb-1.9.1/resources/ssl_cert.pem ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/resources/ssl_cert.pem b/thirdparty/civetweb-1.9.1/resources/ssl_cert.pem new file mode 100644 index 0000000..f7e15a0 --- /dev/null +++ b/thirdparty/civetweb-1.9.1/resources/ssl_cert.pem @@ -0,0 +1,50 @@ +-----BEGIN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+pZ9XYuGkyEbQKl7VFO +kRaTyT9+T5Al20yuuTvByUscbf17X6HsxwlOflCMJmRmMeOlAVs4NyHyumxj0oh1 +N6XYk6JdLjD7fxlCvseDcmSePyJrDQInEcDAXY2uMsBylyXoR4FwbYbFSB2y9tcf +uIm7IPXlTP14qE1erVtyK3cCAwEAATANBgkqhkiG9w0BAQQFAAOCAQEAW4yZdqpB +oIdiuXRosr86Sg9FiMg/cn+2OwQ0QIaA8ZBwKsc+wIIHEgXCS8J6316BGQeUvMD+ +plNe0r4GWzzmlDMdobeQ5arPRB89qd9skE6pAMdLg3FyyfEjz3A0VpskolW5VBMr +P5R7uJ1FLgH12RyAjZCWYcCRqEMOffqvyMCH6oAjyDmQOA5IssRKX/HsHntSH/HW +W7slTcP45ty1b44Nq22/ubYk0CJRQgqKOIQ3cLgPomN1jNFQbAbfVTaK1DpEysrQ +5V8a8gNW+3sVZmV6d1Mj3pN2Le62wUKuV2g6BNU7iiwcoY8HI68aRxz2hVMS+t5f +SEGI4JSxV56lYg== +-----END CERTIFICATE----- +-----BEGIN DH PARAMETERS----- +MEYCQQD+ef8hZ4XbdoyIpJyCTF2UrUEfX6mYDvxuS5O1UNYcslUqlj6JkA11e/yS +6DK8Z86W6mSj5CEk4IjbyEOECXH7AgEC +-----END DH PARAMETERS----- http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/a9485aeb/thirdparty/civetweb-1.9.1/resources/systray.ico ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/resources/systray.ico b/thirdparty/civetweb-1.9.1/resources/systray.ico new file mode 100644 index 0000000..380c0ee Binary files /dev/null and b/thirdparty/civetweb-1.9.1/resources/systray.ico differ http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/a9485aeb/thirdparty/civetweb-1.9.1/src/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/thirdparty/civetweb-1.9.1/src/CMakeLists.txt b/thirdparty/civetweb-1.9.1/src/CMakeLists.txt new file mode 100644 index 0000000..281c324 --- /dev/null +++ b/thirdparty/civetweb-1.9.1/src/CMakeLists.txt @@ -0,0 +1,291 @@ +# The C API library +add_library(c-library civetweb.c) +set_target_properties(c-library PROPERTIES + OUTPUT_NAME "civetweb" + VERSION ${CIVETWEB_VERSION} + SOVERSION ${CIVETWEB_VERSION} +) +if (BUILD_SHARED_LIBS) + target_compile_definitions(c-library PRIVATE CIVETWEB_DLL_EXPORTS) +endif() +target_include_directories( + c-library PUBLIC + ${PROJECT_SOURCE_DIR}/include) +install( + TARGETS c-library + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin + COMPONENT c-library) +install(FILES + ${PROJECT_SOURCE_DIR}/include/civetweb.h + DESTINATION include + COMPONENT c-library) + +# Need Windows sockets if available +find_package(WinSock) +if (WINSOCK_FOUND) + target_link_libraries(c-library WINSOCK::WINSOCK) +endif() + +# We need threading +find_package(Threads) +target_link_libraries(c-library ${CMAKE_THREAD_LIBS_INIT}) + +# Need the realtime library if we're using timers +find_package(LibRt) +if (CIVETWEB_ENABLE_WEBSOCKETS AND CIVETWEB_ENABLE_LUA AND LIBRT_FOUND) + target_link_libraries(c-library LIBRT::LIBRT) +endif() + +# We need to link OpenSSL if not dynamically loading +if (CIVETWEB_ENABLE_SLL AND NOT CIVETWEB_ENABLE_OPENSLL_DYNAMIC_LOADING) + find_package(OpenSSL) + target_link_libraries(c-library ${OPENSSL_LIBRARIES}) +else() + find_package(LibDl) + if (LIBDL_FOUND) + target_link_libraries(c-library -ldl) + endif() +endif() + +# If Lua support is needed we build some extra Lua libraries +if (CIVETWEB_ENABLE_LUA) + include(ExternalProject) + + # Determine if we should print to the output + if (CIVETWEB_ENABLE_THIRD_PARTY_OUTPUT) + set(THIRD_PARTY_LOGGING 0) + else() + set(THIRD_PARTY_LOGGING 1) + endif() + + # If Lua is static we must build it from source + if (NOT CIVETWEB_ENABLE_LUA_SHARED) + if (LINUX) + set(LUA_MAKE_TARGET linux) + elseif(DARWIN) + set(LUA_MAKE_TARGET macosx) + elseif(FREEBSD) + set(LUA_MAKE_TARGET freebsd) + elseif(WINDOWS) + set(LUA_MAKE_TARGET mingw) + elseif(UNIX) + set(LUA_MAKE_TARGET posix) + else() + set(LUA_MAKE_TARGET generic) + endif() + set(LUA_BUILD_COMMAND "${CMAKE_MAKE_PROGRAM};${LUA_MAKE_TARGET}") + if (BUILD_SHARED_LIBS) + set(LUA_BUILD_COMMAND "${LUA_BUILD_COMMAND};MYCFLAGS=-fPIC") + endif() + ExternalProject_Add(lua + URL "http://www.lua.org/ftp/lua-${CIVETWEB_LUA_VERSION}.tar.gz" + URL_MD5 ${CIVETWEB_LUA_MD5_HASH} + PREFIX "${CIVETWEB_THIRD_PARTY_DIR}" + CONFIGURE_COMMAND "" + BUILD_COMMAND ${LUA_BUILD_COMMAND} + BUILD_IN_SOURCE 1 + INSTALL_COMMAND make install "INSTALL_TOP=<INSTALL_DIR>" + LOG_DOWNLOAD ${THIRD_PARTY_LOGGING} + LOG_UPDATE ${THIRD_PARTY_LOGGING} + LOG_CONFIGURE ${THIRD_PARTY_LOGGING} + LOG_BUILD ${THIRD_PARTY_LOGGING} + LOG_TEST ${THIRD_PARTY_LOGGING} + LOG_INSTALL ${THIRD_PARTY_LOGGING}) + ExternalProject_Get_Property(lua INSTALL_DIR) + set(LUA_INSTALL_DIR ${INSTALL_DIR}) + unset(INSTALL_DIR) + link_directories("${LUA_INSTALL_DIR}/lib") + include_directories("${LUA_INSTALL_DIR}/include") + set(LUA_LIBRARIES "${LUA_INSTALL_DIR}/lib/liblua.a") + add_dependencies(c-library lua) + else() + find_package(Lua) + endif() + + # Lua Filesystem Support + string(REPLACE "." "_" LUA_FILESYSTEM_VERSION_UNDERSCORE ${CIVETWEB_LUA_FILESYSTEM_VERSION}) + ExternalProject_Add(luafilesystem + URL "https://github.com/keplerproject/luafilesystem/archive/v_${LUA_FILESYSTEM_VERSION_UNDERSCORE}.tar.gz" + URL_MD5 ${CIVETWEB_LUA_FILESYSTEM_MD5_HASH} + PREFIX "${CIVETWEB_THIRD_PARTY_DIR}" + PATCH_COMMAND ${CMAKE_COMMAND} -E copy + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/luafilesystem/CMakeLists.txt" <SOURCE_DIR>/CMakeLists.txt + CMAKE_ARGS + "-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}" + "-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>" + LOG_DOWNLOAD ${THIRD_PARTY_LOGGING} + LOG_UPDATE ${THIRD_PARTY_LOGGING} + LOG_CONFIGURE ${THIRD_PARTY_LOGGING} + LOG_BUILD ${THIRD_PARTY_LOGGING} + LOG_TEST ${THIRD_PARTY_LOGGING} + LOG_INSTALL ${THIRD_PARTY_LOGGING}) + ExternalProject_Get_Property(luafilesystem INSTALL_DIR) + set(LUA_FILESYSTEM_INSTALL_DIR ${INSTALL_DIR}) + unset(INSTALL_DIR) + link_directories("${LUA_FILESYSTEM_INSTALL_DIR}/lib") + include_directories("${LUA_FILESYSTEM_INSTALL_DIR}/include") + set(LUA_LIBRARIES "${LUA_LIBRARIES};${LUA_FILESYSTEM_INSTALL_DIR}/lib/libluafilesystem.a") + add_dependencies(c-library luafilesystem) + + # Lua SQLite Support + if (${CIVETWEB_LUA_SQLITE_VERSION} VERSION_EQUAL "0.9.3") + set(LUA_SQLITE_FILENAME lsqlite3_fsl09w.zip) + elseif (${CIVETWEB_LUA_SQLITE_VERSION} VERSION_EQUAL "0.9.2") + set(LUA_SQLITE_FILENAME lsqlite3_fsl09v.zip) + elseif (${CIVETWEB_LUA_SQLITE_VERSION} VERSION_EQUAL "0.9.1") + set(LUA_SQLITE_FILENAME lsqlite3_fsl09t.zip) + else() + message(FATAL_ERROR "The Lua SQLite archive filename is unknown for version ${CIVETWEB_LUA_SQLITE_VERSION}") + endif() + ExternalProject_Add(luasqlite + URL "http://lua.sqlite.org/index.cgi/zip/${LUA_SQLITE_FILENAME}" + URL_MD5 ${CIVETWEB_LUA_SQLITE_MD5_HASH} + PREFIX "${CIVETWEB_THIRD_PARTY_DIR}" + PATCH_COMMAND ${CMAKE_COMMAND} -E copy + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/luasqlite/CMakeLists.txt" <SOURCE_DIR>/CMakeLists.txt + CMAKE_ARGS + "-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}" + "-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>" + LOG_DOWNLOAD ${THIRD_PARTY_LOGGING} + LOG_UPDATE ${THIRD_PARTY_LOGGING} + LOG_CONFIGURE ${THIRD_PARTY_LOGGING} + LOG_BUILD ${THIRD_PARTY_LOGGING} + LOG_TEST ${THIRD_PARTY_LOGGING} + LOG_INSTALL ${THIRD_PARTY_LOGGING}) + ExternalProject_Get_Property(luasqlite INSTALL_DIR) + set(LUA_SQLITE_INSTALL_DIR ${INSTALL_DIR}) + unset(INSTALL_DIR) + link_directories("${LUA_SQLITE_INSTALL_DIR}/lib") + set(LUA_LIBRARIES "${LUA_LIBRARIES};${LUA_SQLITE_INSTALL_DIR}/lib/libluasqlite.a") + add_dependencies(c-library luasqlite) + + # Lua XML Support + if (${CIVETWEB_LUA_XML_VERSION} VERSION_EQUAL "1.8.0") + set(LUA_XML_FILENAME LuaXML_130610.zip) + elseif (${CIVETWEB_LUA_XML_VERSION} VERSION_EQUAL "1.7.4") + set(LUA_XML_FILENAME LuaXML_101012.zip) + else() + message(FATAL_ERROR "The Lua XML archive filename is unknown for version ${CIVETWEB_LUA_XML_VERSION}") + endif() + ExternalProject_Add(luaxml + URL "http://viremo.eludi.net/LuaXML/${LUA_XML_FILENAME}" + URL_MD5 ${CIVETWEB_LUA_XML_MD5_HASH} + PREFIX "${CIVETWEB_THIRD_PARTY_DIR}" + PATCH_COMMAND ${CMAKE_COMMAND} -E copy + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/luaxml/CMakeLists.txt" <SOURCE_DIR>/CMakeLists.txt + CMAKE_ARGS + "-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}" + "-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>" + LOG_DOWNLOAD ${THIRD_PARTY_LOGGING} + LOG_UPDATE ${THIRD_PARTY_LOGGING} + LOG_CONFIGURE ${THIRD_PARTY_LOGGING} + LOG_BUILD ${THIRD_PARTY_LOGGING} + LOG_TEST ${THIRD_PARTY_LOGGING} + LOG_INSTALL ${THIRD_PARTY_LOGGING}) + ExternalProject_Get_Property(luaxml INSTALL_DIR) + set(LUA_XML_INSTALL_DIR ${INSTALL_DIR}) + unset(INSTALL_DIR) + link_directories("${LUA_XML_INSTALL_DIR}/lib") + set(LUA_LIBRARIES "${LUA_LIBRARIES};${LUA_XML_INSTALL_DIR}/lib/libluaxml.a") + add_dependencies(c-library luaxml) + + # SQLite Support + string (REGEX MATCHALL "[0-9]+" SQLITE_VERSION_MATCHES ${CIVETWEB_SQLITE_VERSION}) + list(GET SQLITE_VERSION_MATCHES 0 SQLITE_VERSION_MAJOR) + list(GET SQLITE_VERSION_MATCHES 1 SQLITE_VERSION_MINOR) + list(GET SQLITE_VERSION_MATCHES 2 SQLITE_VERSION_PATCH) + set(SQLITE_FILE_VERSION ${SQLITE_VERSION_MAJOR}0${SQLITE_VERSION_MINOR}0${SQLITE_VERSION_PATCH}00) + ExternalProject_Add(sqlite + URL "http://www.sqlite.org/2015/sqlite-amalgamation-${SQLITE_FILE_VERSION}.zip" + URL_MD5 ${CIVETWEB_SQLITE_MD5_HASH} + PREFIX "${CIVETWEB_THIRD_PARTY_DIR}" + PATCH_COMMAND ${CMAKE_COMMAND} -E copy + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/sqlite/CMakeLists.txt" <SOURCE_DIR>/CMakeLists.txt + CMAKE_ARGS + "-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}" + "-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>" + LOG_DOWNLOAD ${THIRD_PARTY_LOGGING} + LOG_UPDATE ${THIRD_PARTY_LOGGING} + LOG_CONFIGURE ${THIRD_PARTY_LOGGING} + LOG_BUILD ${THIRD_PARTY_LOGGING} + LOG_TEST ${THIRD_PARTY_LOGGING} + LOG_INSTALL ${THIRD_PARTY_LOGGING}) + ExternalProject_Get_Property(sqlite INSTALL_DIR) + set(SQLITE_INSTALL_DIR ${INSTALL_DIR}) + unset(INSTALL_DIR) + link_directories("${SQLITE_INSTALL_DIR}/lib") + include_directories("${SQLITE_INSTALL_DIR}/include") + set(LUA_LIBRARIES "${LUA_LIBRARIES};${SQLITE_INSTALL_DIR}/lib/libsqlite.a") + add_dependencies(c-library sqlite) + + # Link all the Lua libraries + target_link_libraries(c-library ${LUA_LIBRARIES}) +endif() + +# The web server executable +add_executable(c-executable main.c) +set_target_properties(c-executable PROPERTIES + OUTPUT_NAME "civetweb" +) +install( + TARGETS c-executable + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin + COMPONENT server) +if (BUILD_SHARED_LIBS) + target_compile_definitions(c-executable PRIVATE CIVETWEB_DLL_IMPORTS) +endif() +target_include_directories( + c-executable PUBLIC + ${PROJECT_SOURCE_DIR}/include) +target_link_libraries(c-executable c-library) +if (LIBRT_FOUND) + target_link_libraries(c-executable LIBRT::LIBRT) +endif() + +if (CIVETWEB_ENABLE_LUA) + add_library(lua-library third_party/lfs.c third_party/lsqlite3.c third_party/LuaXML_lib.c third_party/sqlite3.c) + set_target_properties(lua-library PROPERTIES + OUTPUT_NAME "lua-library" + VERSION ${CIVETWEB_VERSION} + SOVERSION ${CIVETWEB_VERSION} + ) + target_include_directories( + lua-library PUBLIC + ${PROJECT_SOURCE_DIR}/src/third_party/lua-5.2.4) + install( + TARGETS lua-library + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin + COMPONENT lua-library) +endif() + +# The C++ API library +if (CIVETWEB_ENABLE_CXX) + add_library(civetweb-cpp CivetServer.cpp) + set_target_properties(civetweb-cpp PROPERTIES + OUTPUT_NAME "civetweb-cpp" + VERSION ${CIVETWEB_VERSION} + SOVERSION ${CIVETWEB_VERSION} + ) + if (BUILD_SHARED_LIBS) + target_compile_definitions(civetweb-cpp PRIVATE CIVETWEB_DLL_EXPORTS) + endif() + target_include_directories( + civetweb-cpp PUBLIC + ${PROJECT_SOURCE_DIR}/include) + install( + TARGETS civetweb-cpp + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin + COMPONENT civetweb-cpp) + install(FILES + ${PROJECT_SOURCE_DIR}/include/CivetServer.h + DESTINATION include + COMPONENT civetweb-cpp) +endif()
