Changeset 04ef932 in nscp
- Timestamp:
- 08/10/11 07:37:24 (22 months ago)
- Branches:
- master, 0.4.0, 0.4.1, 0.4.2
- Children:
- 54ac968
- Parents:
- e11d494
- Files:
-
- 7 added
- 35 edited
-
CMakeLists.txt (modified) (11 diffs)
-
build.cmake (modified) (2 diffs)
-
build/cmake/FindPythonInterpEx.cmake (added)
-
build/cmake/FindPythonLibsEx.cmake (added)
-
build/cmake/NSCPPBuffer.cmake (modified) (1 diff)
-
build/python/config.py (added)
-
build/python/postbuild.py (modified) (3 diffs)
-
changelog (modified) (1 diff)
-
helpers/installers/installer/CMakeLists.txt (modified) (1 diff)
-
helpers/installers/installer/Product.wxs (modified) (3 diffs)
-
helpers/settings_manager/CMakeLists.txt (modified) (1 diff)
-
include/file_helpers.hpp (modified) (3 diffs)
-
include/nsca/nsca_packet.hpp (modified) (1 diff)
-
include/nscapi/functions.hpp (modified) (3 diffs)
-
include/nscapi/nscapi_core_wrapper.cpp (modified) (2 diffs)
-
include/nscapi/nscapi_core_wrapper.hpp (modified) (1 diff)
-
include/parsers/helpers.cpp (modified) (2 diffs)
-
include/parsers/where.cpp (modified) (1 diff)
-
include/scripts/functions.hpp (added)
-
include/socket_helpers.hpp (modified) (4 diffs)
-
include/strEx.h (modified) (4 diffs)
-
include/unicode_char.hpp (modified) (1 diff)
-
libs/protobuf/log.proto.h (modified) (1 diff)
-
modules/CheckNSCP/CheckNSCP.cpp (modified) (4 diffs)
-
modules/LUAScript/LUAScript.cpp (modified) (6 diffs)
-
modules/LUAScript/LUAScript.h (modified) (3 diffs)
-
modules/LUAScript/script_wrapper.hpp (modified) (6 diffs)
-
modules/NRPEClient/CMakeLists.txt (modified) (1 diff)
-
modules/NRPEServer/CMakeLists.txt (modified) (1 diff)
-
modules/NSCAAgent/CMakeLists.txt (modified) (1 diff)
-
scripts/CMakeLists.txt (modified) (2 diffs)
-
scripts/lua/test.lua (added)
-
scripts/python/test.py (added)
-
scripts/python/test_second.py (added)
-
service/CMakeLists.txt (modified) (1 diff)
-
service/NSCPlugin.cpp (modified) (1 diff)
-
service/NSClient++.cpp (modified) (3 diffs)
-
service/settings_logger_impl.cpp (modified) (1 diff)
-
service/simple_client.hpp (modified) (1 diff)
-
tools/error_reporter/CMakeLists.txt (modified) (1 diff)
-
version.hpp (modified) (1 diff)
-
version.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
CMakeLists.txt
re11d494 r04ef932 34 34 SET(PROTOBUF_DIR "${INC_PROTOBUF_DIR}" CACHE PATH "Path to google protocol buffer root") 35 35 IF(WIN32 AND MSVC) 36 SET(PROTOBUF_INCLUDE_DIR "${PROTOBUF_DIR}/src" "Path to google protocol buffer source")36 SET(PROTOBUF_INCLUDE_DIR "${PROTOBUF_DIR}/src") 37 37 SET(PROTOBUF_LIBRARYDIR "${INC_PROTOBUF_LIBRARYDIR}") 38 38 SET(PROTOBUF_LIBRARY_PREFIX "") … … 42 42 # TODO 43 43 ENDIF(WIN32 AND MSVC) 44 45 44 46 # ### ### ### ### 45 47 # Crypto++ … … 86 88 INCLUDE(${BUILD_CMAKE_FOLDER}/functions.cmake) 87 89 90 91 FIND_PACKAGE(PythonInterpEx) 92 FIND_PACKAGE(PythonLibsEx) 93 IF (NOT PYTHONINTERP_FOUND) 94 MESSAGE(FATAL_ERROR "Could not find python which is required for building") 95 ELSE (NOT PYTHONINTERP_FOUND) 96 message(STATUS "Found python in: ${PYTHON_EXECUTABLE}") 97 ENDIF (NOT PYTHONINTERP_FOUND) 98 IF (PYTHONLIBSEX_FOUND) 99 MESSAGE(STATUS "Found python (lib) in: ${PYTHON_LIBRARY}") 100 ENDIF (PYTHONLIBSEX_FOUND) 101 102 88 103 SET(VERSION_TXT ${CMAKE_CURRENT_SOURCE_DIR}/version.txt) 89 IF( ${INCREASE_BUILD} STREQUAL 1)104 IF("${INCREASE_BUILD}" STREQUAL "1") 90 105 EXECUTE_PROCESS( 91 106 COMMAND ${PYTHON_EXECUTABLE} … … 98 113 ) 99 114 MESSAGE(STATUS "===================== Bumping version") 100 ENDIF( ${INCREASE_BUILD} STREQUAL 1)115 ENDIF("${INCREASE_BUILD}" STREQUAL "1") 101 116 102 117 EXECUTE_PROCESS( … … 186 201 if(BREAKPAD_FOUND) 187 202 MESSAGE(STATUS "Found google breakpad") 188 SET(NSCP_GLOBAL_DEFINES ${NSCP_GLOBAL_DEFINES} -DUSE_BREAK_PAD) 203 SET(NSCP_GLOBAL_DEFINES ${NSCP_GLOBAL_DEFINES} -DUSE_BREAK_PAD -DBOOST_FILESYSTEM_VERSION=2) 204 INCLUDE_DIRECTORIES("${BREAKPAD_INCLUDE_DIR}") 189 205 else(BREAKPAD_FOUND) 190 206 MESSAGE(WARNING "Breakpad was not found in: ${BREAKPAD_EXCEPTION_HANDLER_INCLUDE_DIR}/${BREAKPAD_EXCEPTION_HANDLER_LIBRARIES}") … … 193 209 FIND_PACKAGE(OpenSSL) 194 210 if(OPENSSL_FOUND) 195 MESSAGE(STATUS "Found OpenSSL ")211 MESSAGE(STATUS "Found OpenSSL: ${OPENSSL_INCLUDE_DIR}") 196 212 SET(NSCP_GLOBAL_DEFINES ${NSCP_GLOBAL_DEFINES} -DUSE_SSL) 197 213 else(OPENSSL_FOUND) … … 199 215 endif(OPENSSL_FOUND) 200 216 201 FIND_PACKAGE(Boost COMPONENTS system filesystem thread regex date_time program_options REQUIRED)217 FIND_PACKAGE(Boost COMPONENTS system filesystem thread regex date_time program_options python REQUIRED) 202 218 if(Boost_FOUND) 203 219 MESSAGE(STATUS "Found boost in: ${Boost_INCLUDE_DIRS} / ${Boost_LIBRARY_DIRS}") … … 212 228 ENDIF(WIN32) 213 229 else(Boost_FOUND) 214 MESSAGE(FATAL_ERROR ,"boost NOT fround: ${Boost_ERROR_REASON}")230 MESSAGE(FATAL_ERROR "boost NOT fround: ${Boost_ERROR_REASON}") 215 231 endif(Boost_FOUND) 216 232 217 233 if(PROTOBUF_FOUND) 218 message(STATUS "Found proto in: ${PROTOBUF_ LIBRARY} (${PROTOBUF_PROTOC_EXECUTABLE})")219 INCLUDE_DIRECTORIES( ${PROTOBUF_INCLUDE_DIR})234 message(STATUS "Found proto in: ${PROTOBUF_INCLUDE_DIR} / ${PROTOBUF_LIBRARY} (${PROTOBUF_PROTOC_EXECUTABLE})") 235 INCLUDE_DIRECTORIES("${PROTOBUF_INCLUDE_DIR}") 220 236 else(PROTOBUF_FOUND) 221 message(FATAL_ERROR , "Protocol buffers NOT found (${PROTOBUF_LIBRARYDIR},)")237 message(FATAL_ERROR "Protocol buffers NOT found (${PROTOBUF_LIBRARYDIR})") 222 238 endif(PROTOBUF_FOUND) 223 239 … … 299 315 ENDIF(NOT WIN32) 300 316 301 FIND_PACKAGE(PythonInterp)302 IF (NOT PYTHONINTERP_FOUND)303 MESSAGE(FATAL_ERROR "Could not find python which is required for building")304 ELSE (NOT PYTHONINTERP_FOUND)305 message(STATUS "Found python in: ${PYTHON_EXECUTABLE}")306 ENDIF (NOT PYTHONINTERP_FOUND)307 308 309 317 SET(NSCP_GLOBAL_DEFINES ${NSCP_GLOBAL_DEFINES} -DUNICODE -D_UNICODE -D_WIN32_WINNT=0x0403) 310 318 # TODO: Fix this issue! (crypto++ and masm) … … 367 375 368 376 SET(NSCP_DEF_PLUGIN_LIB 369 ${Boost_LIBRARIES}377 # ${Boost_LIBRARIES} 370 378 ${CMAKE_THREAD_LIBS_INIT} 379 ${Boost_PROGRAM_OPTIONS_LIBRARY} 380 ${Boost_THREAD_LIBRARY} 371 381 ${EXTRA_LIBS} 372 382 ${PROTOBUF_LIBRARY} … … 453 463 ${BUILD_TARGET_EXE_PATH}/postbuild.py 454 464 ) 465 CONFIGURE_FILE( 466 ${BUILD_PYTHON_FOLDER}/config.py 467 ${BUILD_TARGET_EXE_PATH}/config.py 468 ) -
build.cmake
r7ec3dd1 r04ef932 11 11 MESSAGE(STATUS "Detected x64") 12 12 SET(INC_NSCP_LIBRARYDIR D:/source/lib/x64) 13 SET(PYTHON_ROOT c:/python/27x64) 13 14 ELSE() 14 15 MESSAGE(STATUS "Detected w32") 15 16 SET(INC_NSCP_LIBRARYDIR D:/source/lib/x86) 17 SET(PYTHON_ROOT c:/python/27) 16 18 ENDIF() 17 19 18 20 SET(INC_GOOGLE_BREAKPAD_DIR "D:/source/libraries/google-breakpad-svn") 19 21 20 SET(INC_BOOST_INCLUDEDIR " ${INC_NSCP_INCLUDEDIR}")22 SET(INC_BOOST_INCLUDEDIR "D:/source/include/boost-1_47") 21 23 SET(INC_BOOST_LIBRARYDIR "${INC_NSCP_LIBRARYDIR}") 22 24 SET(INC_PROTOBUF_LIBRARYDIR "${INC_NSCP_LIBRARYDIR}") … … 35 37 36 38 SET(INC_OPENSSL_INCLUDEDIR "/usr/include/") 39 SET(PROTOBUF_INCLUDE_DIR "/usr/include/") 37 40 38 41 ENDIF(WIN32) -
build/cmake/NSCPPBuffer.cmake
r1f24a1c r04ef932 97 97 ARGS --cpp_out ${CMAKE_CURRENT_BINARY_DIR} --proto_path ${CMAKE_CURRENT_SOURCE_DIR} ${ABS_FIL} 98 98 DEPENDS ${ABS_FIL} 99 COMMENT "Running protocol buffer compiler on ${FIL} " VERBATIM )99 COMMENT "Running protocol buffer compiler on ${FIL} - ${PROTOBUF_PROTOC_EXECUTABLE}" VERBATIM ) 100 100 101 101 SET_SOURCE_FILES_PROPERTIES(${${VAR}} ${INCL} PROPERTIES GENERATED TRUE) -
build/python/postbuild.py
re11d494 r04ef932 6 6 7 7 8 BREAKPAD_FOUND = "${BREAKPAD_FOUND}" 9 BREAKPAD_FOUND = "FALSE" 10 BREAKPAD_DUMPSYMS_EXE = "${BREAKPAD_DUMPSYMS_EXE}" 11 BUILD_TARGET_EXE_PATH = "${BUILD_TARGET_EXE_PATH}" 12 BUILD_PYTHON_FOLDER = "${BUILD_PYTHON_FOLDER}" 13 VERSION = "${VERSION_SERIES}.${VERSION_MAJOR}.${VERSION_MINOR}" 14 CMAKE_CL_64 = "${CMAKE_CL_64}" 15 ARCHIVE_FOLDER = "${ARCHIVE_FOLDER}" 16 VERSION_TXT = "${VERSION_TXT}" 17 VERSION_ARCH = "${VERSION_ARCH}" 8 execfile("config.py") 18 9 19 10 sys.path.append(BUILD_PYTHON_FOLDER) … … 23 14 version.read() 24 15 datestr = version.datestr() 16 vstring = version.version() 25 17 26 18 def rename_and_move(file, target): … … 66 58 os.mkdir(target_archives) 67 59 68 for f in find_by_pattern(BUILD_TARGET_EXE_PATH, '* .msi'):60 for f in find_by_pattern(BUILD_TARGET_EXE_PATH, '*%s*.msi'%vstring): 69 61 rename_and_move(f, target_installer) 70 for f in find_by_pattern(BUILD_TARGET_EXE_PATH, '* .zip'):62 for f in find_by_pattern(BUILD_TARGET_EXE_PATH, '*%s*.zip'%vstring): 71 63 rename_and_move(f, target_archives) 72 64 -
changelog
re11d494 r04ef932 6 6 * Fixa dependonservice LanManWorkStation (old win) 7 7 * Fix RtlStringFromGUID problem on NT4 8 9 2011-08-10 10 * Fixed so it builds and runs on linux (but parser had issues so disabled som grammar rules whichneeds to be enabled again) 11 * Added a lot of freatures and cleand up the PythonScript module 12 * Started to merge som features from PythonScript back to Lua script 13 14 2011-08-07 15 * Fixed a lot of issues with PythonScript module adding suport for alias and "raw command processing" 16 * Fixed issue with loading plugins and aliases as well as duplicate plugin detection 17 18 2011-08-01 19 * Added new module: PythonScript 8 20 9 21 2011-07-25 -
helpers/installers/installer/CMakeLists.txt
r7ec3dd1 r04ef932 35 35 "NagiosPlugins.vbs_script lib" 36 36 "wrapper.vbs_script lib" 37 38 "test.py.vbs_script lib" 39 "test_second.py.vbs_script lib" 37 40 38 41 counters.defs_files -
helpers/installers/installer/Product.wxs
re11d494 r04ef932 36 36 <Media Id="1" Cabinet="Product.cab" EmbedCab="yes" CompressionLevel="high" /> 37 37 <Directory Id="TARGETDIR" Name="SourceDir"> 38 <Directory Id="$(var.ProgramFiles)">39 <Directory Id="INSTALLLOCATION" Name="$(var.App.Path)">40 <Component Id="MainClient" Guid="F6636DB0-A0B9-4dd2-B74C-$(var.Postfix.GUID)" Win64="$(var.Win64)">41 <File Id="NSClientEXE" Name="nscp.exe" DiskId="1" KeyPath="yes"38 <Directory Id="$(var.ProgramFiles)"> 39 <Directory Id="INSTALLLOCATION" Name="$(var.App.Path)"> 40 <Component Id="MainClient" Guid="F6636DB0-A0B9-4dd2-B74C-$(var.Postfix.GUID)" Win64="$(var.Win64)"> 41 <File Id="NSClientEXE" Name="nscp.exe" DiskId="1" KeyPath="yes" 42 42 Source="$(var.Source)/nscp.exe" Vital="yes"> 43 <Shortcut Id="StartmenuNSClientTest" Directory="ProgramMenuDir"43 <Shortcut Id="StartmenuNSClientTest" Directory="ProgramMenuDir" 44 44 Name="$(var.App.Title) ($(var.arch), test)" WorkingDirectory="INSTALLDIR" Icon="nscp.exe" 45 45 Advertise="yes" IconIndex="0" Arguments="--test" Description="Run $(var.App.Title) in test mode" /> 46 <fire:FirewallException Id="FWX1" Name="NSClient++ Monitoring Agent" Scope="any" IgnoreFailure="yes" />47 </File>48 <ServiceInstall Id="SWCNSCP"46 <fire:FirewallException Id="FWX1" Name="NSClient++ Monitoring Agent" Scope="any" IgnoreFailure="yes" /> 47 </File> 48 <ServiceInstall Id="SWCNSCP" 49 49 Name="[SERVICE_NAME]" DisplayName="$(var.App.Title) ($(var.arch))" 50 50 Type="ownProcess" Start="auto" ErrorControl="normal" Interactive="no" 51 51 Description="Monitoring agent for nagios (and others) used to respond to status queries" 52 52 Arguments="--service --run --name [SERVICE_NAME]" /> 53 <ServiceControl Id="StartSWCNSCP" Name="[SERVICE_NAME]" Start="install" Stop="both" Wait="yes" Remove="uninstall" />54 <RemoveFolder Id="RemoveMenuShortcuts" Directory="ProgramMenuDir" On="uninstall" />55 </Component>56 <Component Id="Shortcuts" Guid="E6636DB0-A0B9-4dd2-B74C-$(var.Postfix.GUID)" Win64="$(var.Win64)">57 <Shortcut Id="StartmenuNSClientStart" Directory="ProgramMenuDir" Name="Start $(var.App.Title) ($(var.arch))"53 <ServiceControl Id="StartSWCNSCP" Name="[SERVICE_NAME]" Start="install" Stop="both" Wait="yes" Remove="uninstall" /> 54 <RemoveFolder Id="RemoveMenuShortcuts" Directory="ProgramMenuDir" On="uninstall" /> 55 </Component> 56 <Component Id="Shortcuts" Guid="E6636DB0-A0B9-4dd2-B74C-$(var.Postfix.GUID)" Win64="$(var.Win64)"> 57 <Shortcut Id="StartmenuNSClientStart" Directory="ProgramMenuDir" Name="Start $(var.App.Title) ($(var.arch))" 58 58 WorkingDirectory='INSTALLDIR' Icon="nscp.exe" IconIndex="0" 59 59 Arguments="--service --name [SERVICE_NAME] --start" Description="Start the $(var.App.Title) service" /> 60 <Shortcut Id="StartmenuNSClientStop" Directory="ProgramMenuDir" Name="Stop $(var.App.Title) ($(var.arch))"60 <Shortcut Id="StartmenuNSClientStop" Directory="ProgramMenuDir" Name="Stop $(var.App.Title) ($(var.arch))" 61 61 WorkingDirectory='INSTALLDIR' Icon="nscp.exe" IconIndex="0" 62 62 Arguments="--service --name [SERVICE_NAME] --stop" Description="Stop the $(var.App.Title) service" /> 63 <Shortcut Id="StarmentNSCHelp" Directory="ProgramMenuDir" Name="Documentation"63 <Shortcut Id="StarmentNSCHelp" Directory="ProgramMenuDir" Name="Documentation" 64 64 Target="[HELP_LINK]" Icon="doc.ico" 65 65 Description="Visit the NSClient++ WIKI for documentation"> 66 </Shortcut>67 <RegistryValue Root="HKCU" Key="Software\NSClient++\Installer" Name="shortcuts" Type="integer" Value="1" KeyPath="yes"/>68 </Component>69 <Component Id="Helpers" Guid="A6636DB0-A0B9-4dd2-B74C-$(var.Postfix.GUID)" Win64="$(var.Win64)">70 <!--66 </Shortcut> 67 <RegistryValue Root="HKCU" Key="Software\NSClient++\Installer" Name="shortcuts" Type="integer" Value="1" KeyPath="yes"/> 68 </Component> 69 <Component Id="Helpers" Guid="A6636DB0-A0B9-4dd2-B74C-$(var.Postfix.GUID)" Win64="$(var.Win64)"> 70 <!-- 71 71 <File Id="NSClientTRAY" Name="nstray.exe" DiskId="1" 72 72 Source="$(var.Source)/nstray.exe" Vital="yes"> … … 76 76 </File> 77 77 --> 78 <File Id="ErrorReporter" Name="reporter.exe" DiskId="1" Source="$(var.Source)/reporter.exe" Vital="yes" />79 <!--78 <File Id="ErrorReporter" Name="reporter.exe" DiskId="1" Source="$(var.Source)/reporter.exe" Vital="yes" /> 79 <!-- 80 80 <File Id="NSClientINI" Name="NSC.ini" LongName="NSC.ini" DiskId="1" Source="$(var.Path.ini)/NSC.ini" Vital="yes"/> 81 81 --> 82 </Component>83 <Component Id="RandomFiles" Guid="B4636DB0-A0B9-4dd2-B74C-$(var.Postfix.GUID)" Win64="$(var.Win64)">84 <File Id="Changelog" Name="changelog.txt" DiskId="1" Source="$(var.Source)/changelog" Vital="no" />85 <File Id="Counters" Name="counters.defs" DiskId="1" Source="$(var.Source)/counters.defs" Vital="no" />86 <File Id="License" Name="license.txt" DiskId="1" Source="$(var.Source)/license.txt" Vital="no" KeyPath="yes" />87 <File Id="settingsMap" Name="old-settings.map" DiskId="1" Source="$(var.Source)/old-settings.map" Vital="no" />88 89 <RemoveFile Id="LogFile1" Name="nsclient.log" On="uninstall" />90 <RemoveFile Id="LogFile2" Name="nsc.log" On="uninstall" />91 <RemoveFile Id="OldConfig" Name="nsc.old" On="uninstall" />92 <RemoveFile Id="NewConfig" Name="nsc.new" On="uninstall" />93 </Component>94 <Component Id="NagiosDocumentation" Guid="9B490E67-5472-4267-889C-$(var.Postfix.GUID)" Win64="$(var.Win64)">95 <File Id="doc.usage.nagios" Name="Nagios Usage Guide.pdf" DiskId="1" Source="$(var.Source)/docs/Nagios Usage Guide.pdf" Vital="no" KeyPath="yes">96 <Shortcut Id="Startmenu.doc.nagios" Directory="ProgramMenuDir" Name="Nagios Usage Guide" Advertise="yes" 82 </Component> 83 <Component Id="RandomFiles" Guid="B4636DB0-A0B9-4dd2-B74C-$(var.Postfix.GUID)" Win64="$(var.Win64)"> 84 <File Id="Changelog" Name="changelog.txt" DiskId="1" Source="$(var.Source)/changelog" Vital="no" /> 85 <File Id="Counters" Name="counters.defs" DiskId="1" Source="$(var.Source)/counters.defs" Vital="no" /> 86 <File Id="License" Name="license.txt" DiskId="1" Source="$(var.Source)/license.txt" Vital="no" KeyPath="yes" /> 87 <File Id="settingsMap" Name="old-settings.map" DiskId="1" Source="$(var.Source)/old-settings.map" Vital="no" /> 88 89 <RemoveFile Id="LogFile1" Name="nsclient.log" On="uninstall" /> 90 <RemoveFile Id="LogFile2" Name="nsc.log" On="uninstall" /> 91 <RemoveFile Id="OldConfig" Name="nsc.old" On="uninstall" /> 92 <RemoveFile Id="NewConfig" Name="nsc.new" On="uninstall" /> 93 </Component> 94 <Component Id="NagiosDocumentation" Guid="9B490E67-5472-4267-889C-$(var.Postfix.GUID)" Win64="$(var.Win64)"> 95 <File Id="doc.usage.nagios" Name="Nagios Usage Guide.pdf" DiskId="1" Source="$(var.Source)/docs/Nagios Usage Guide.pdf" Vital="no" KeyPath="yes"> 96 <Shortcut Id="Startmenu.doc.nagios" Directory="ProgramMenuDir" Name="Nagios Usage Guide" Advertise="yes" 97 97 WorkingDirectory="INSTALLDIR" Description="Nagios Usage Guide"/> 98 </File>99 </Component>100 <Component Id="ReferenceDocumentation" Guid="8B490E67-5472-4267-889C-$(var.Postfix.GUID)" Win64="$(var.Win64)">101 <File Id="doc.reference" Name="NSClient++ Reference Manual.pdf" DiskId="1" Source="$(var.Source)/docs/NSClient++ Reference Manual.pdf" Vital="no" KeyPath="yes">102 <Shortcut Id="Startmenu.doc.ref" Directory="ProgramMenuDir" Name="NSClient++ Reference Manual" Advertise="yes" 98 </File> 99 </Component> 100 <Component Id="ReferenceDocumentation" Guid="8B490E67-5472-4267-889C-$(var.Postfix.GUID)" Win64="$(var.Win64)"> 101 <File Id="doc.reference" Name="NSClient++ Reference Manual.pdf" DiskId="1" Source="$(var.Source)/docs/NSClient++ Reference Manual.pdf" Vital="no" KeyPath="yes"> 102 <Shortcut Id="Startmenu.doc.ref" Directory="ProgramMenuDir" Name="NSClient++ Reference Manual" Advertise="yes" 103 103 WorkingDirectory="INSTALLDIR" Description="NSClient++ Reference Manual"/> 104 </File> 105 </Component> 106 <Directory Id="INSTALLLOCATION_SECURITY" Name="security"> 107 <Component Id="NRPEServerCert" Guid="5A0246F8-5167-45db-2E46-$(var.Postfix.GUID)" Win64="$(var.Win64)"> 108 <File Id="NRPECert" Name="nrpe_dh_512.pem" DiskId="1" Source="$(var.Source)/security/nrpe_dh_512.pem" Vital="no"/> 109 </Component> 110 </Directory> 111 <Directory Id="INSTALLLOCATION_MODS" Name="modules"> 112 <Component Id="NRPEServer" Guid="5A0246F8-5167-45db-B246-$(var.Postfix.GUID)" Win64="$(var.Win64)"> 113 <File Id="NRPEListenerDLL" Name="NRPEListener.dll" DiskId="1" Source="$(var.Source)/modules/NRPEServer.dll" Vital="no" /> 114 <File Id="NRPEClientDLL" Name="NRPEClient.dll" DiskId="1" Source="$(var.Source)/modules/NRPEClient.dll" Vital="no" /> 115 </Component> 116 <Component Id="NSCListener" Guid="6DAF8BB9-9A56-48f5-B2C5-$(var.Postfix.GUID)" Win64="$(var.Win64)"> 117 <File Id="NSCListenerDLL" Name="NSClientListener.dll" DiskId="1" Source="$(var.Source)/modules/NSClientServer.dll" Vital="no" /> 118 </Component> 119 <Component Id="NSCA" Guid="8820A304-C596-4393-A72F-$(var.Postfix.GUID)" Win64="$(var.Win64)"> 120 <File Id="NSCAAgentDLL" Name="NSCAAgent.dll" DiskId="1" Source="$(var.Source)/modules/NSCAAgent.dll" Vital="no" /> 121 <File Id="SchedulerDLL" Name="Scheduler.dll" DiskId="1" Source="$(var.Source)/modules/Scheduler.dll" Vital="no" /> 122 </Component> 123 <Component Id="Plugins" Guid="9B490E67-5472-4266-96DC-$(var.Postfix.GUID)" Win64="$(var.Win64)"> 124 <!-- NOT PORTED MODULES ! 104 </File> 105 </Component> 106 <Directory Id="INSTALLLOCATION_SECURITY" Name="security"> 107 <Component Id="NRPEServerCert" Guid="5A0246F8-5167-45db-2E46-$(var.Postfix.GUID)" Win64="$(var.Win64)"> 108 <File Id="NRPECert" Name="nrpe_dh_512.pem" DiskId="1" Source="$(var.Source)/security/nrpe_dh_512.pem" Vital="no"/> 109 </Component> 110 </Directory> 111 <Directory Id="INSTALLLOCATION_MODS" Name="modules"> 112 <Component Id="NRPEServer" Guid="5A0246F8-5167-45db-B246-$(var.Postfix.GUID)" Win64="$(var.Win64)"> 113 <File Id="NRPEListenerDLL" Name="NRPEListener.dll" DiskId="1" Source="$(var.Source)/modules/NRPEServer.dll" Vital="no" /> 114 <File Id="NRPEClientDLL" Name="NRPEClient.dll" DiskId="1" Source="$(var.Source)/modules/NRPEClient.dll" Vital="no" /> 115 </Component> 116 <Component Id="NSCListener" Guid="6DAF8BB9-9A56-48f5-B2C5-$(var.Postfix.GUID)" Win64="$(var.Win64)"> 117 <File Id="NSCListenerDLL" Name="NSClientListener.dll" DiskId="1" Source="$(var.Source)/modules/NSClientServer.dll" Vital="no" /> 118 </Component> 119 <Component Id="NSCA" Guid="8820A304-C596-4393-A72F-$(var.Postfix.GUID)" Win64="$(var.Win64)"> 120 <File Id="NSCAAgentDLL" Name="NSCAAgent.dll" DiskId="1" Source="$(var.Source)/modules/NSCAAgent.dll" Vital="no" /> 121 <File Id="SchedulerDLL" Name="Scheduler.dll" DiskId="1" Source="$(var.Source)/modules/Scheduler.dll" Vital="no" /> 122 </Component> 123 <Component Id="PythonScript" Guid="8820A304-C696-4393-A72F-$(var.Postfix.GUID)" Win64="$(var.Win64)"> 124 <File Id="PythonScript" Name="PythonScript.dll" DiskId="1" Source="$(var.Source)/modules/PythonScript.dll" Vital="no" /> 125 </Component> 126 <Component Id="Plugins" Guid="9B490E67-5472-4266-96DC-$(var.Postfix.GUID)" Win64="$(var.Win64)"> 127 <!-- NOT PORTED MODULES ! 125 128 <File Id="ModRemoteConfiguration.dll" Name="RmtCfg.dll" LongName="RemoteConfiguration.dll" DiskId="1" Source="$(var.Source)/modules/RemoteConfiguration.dll" Vital="no" /> 126 129 <File Id="ModSysTray.dll" Name="SysTray.dll" LongName="SysTray.dll" DiskId="1" Source="$(var.Source)/modules/SysTray.dll" Vital="no" /> 127 130 <File Id="A_DebugLogMetrics.dll" Name="ADebug.dll" LongName="A_DebugLogMetrics.dll" DiskId="1" Source="$(var.Source)/modules/A_DebugLogMetrics.dll" Vital="no" /> 128 131 --> 129 <File Id="ModCheckEventLog.dll" Name="CheckEventLog.dll" DiskId="1" Source="$(var.Source)/modules/CheckEventLog.dll" Vital="no" />130 <File Id="ModCheckExternalScripts.dll" Name="CheckExternalScripts.dll" DiskId="1" Source="$(var.Source)/modules/CheckExternalScripts.dll" Vital="no" />131 <File Id="ModCheckHelpers.dll" Name="CheckHelpers.dll" DiskId="1" Source="$(var.Source)/modules/CheckHelpers.dll" Vital="no" />132 <File Id="ModCheckSystem.dll" Name="CheckSystem.dll" DiskId="1" Source="$(var.Source)/modules/CheckSystem.dll" Vital="no" />133 <File Id="ModCheckWMI.dll" Name="CheckWMI.dll" DiskId="1" Source="$(var.Source)/modules/CheckWMI.dll" Vital="no" />134 <File Id="ModFileLogger.dll" Name="FileLogger.dll" DiskId="1" Source="$(var.Source)/modules/FileLogger.dll" Vital="no" />135 <File Id="ModLUAScript.dll" Name="LUAScript.dll" DiskId="1" Source="$(var.Source)/modules/LUAScript.dll" Vital="no" />136 <File Id="ModCheckNSCP.dll" Name="CheckNSCP.dll" DiskId="1" Source="$(var.Source)/modules/CheckNSCP.dll" Vital="no" />137 <File Id="ModCheckDisk.dll" Name="CheckDisk.dll" DiskId="1" Source="$(var.Source)/modules/CheckDisk.dll" Vital="no" />138 <File Id="ModCheckTaskSched.dll" Name="CheckTaskSched.dll" DiskId="1" Source="$(var.Source)/modules/CheckTaskSched.dll" Vital="no" />139 <File Id="ModCheckTaskSched2.dll" Name="CheckTaskSched2.dll" DiskId="1" Source="$(var.Source)/modules/CheckTaskSched2.dll" Vital="no" />140 </Component>141 </Directory>142 <Directory Id="INSTALLLOCATION_SCRIPTS" Name="scripts">143 <Component Id="Scripts" Guid="9B490E67-5472-4268-96DF-$(var.Postfix.GUID)" Win64="$(var.Win64)">144 <File Id="script001" Name="check_60s.bat" DiskId="1" Source="$(var.Source)/scripts/check_60s.bat" Vital="no" />145 <File Id="script002" Name="check_battery.vbs" DiskId="1" Source="$(var.Source)/scripts/check_battery.vbs" Vital="no" />146 <File Id="script003" Name="check_no_rdp.bat" DiskId="1" Source="$(var.Source)/scripts/check_no_rdp.bat" Vital="no" />147 <File Id="script004" Name="check_printer.vbs" DiskId="1" Source="$(var.Source)/scripts/check_printer.vbs" Vital="no" />148 <File Id="script005" Name="check_ok.bat" DiskId="1" Source="$(var.Source)/scripts/check_ok.bat" Vital="no" />149 <File Id="script006" Name="check_files.vbs" DiskId="1" Source="$(var.Source)/scripts/check_files.vbs" Vital="no" />150 <File Id="script007" Name="check_ping.bat" DiskId="1" Source="$(var.Source)/scripts/check_ping.bat" Vital="no" />151 <File Id="script008" Name="check_updates.vbs" DiskId="1" Source="$(var.Source)/scripts/check_updates.vbs" Vital="no" />152 <File Id="sample002" Name="check_test.ps1" DiskId="1" Source="$(var.Source)/scripts/check_test.ps1" Vital="no" />153 <File Id="sample003" Name="check_test.vbs" DiskId="1" Source="$(var.Source)/scripts/check_test.vbs" Vital="no" />154 <!--132 <File Id="ModCheckEventLog.dll" Name="CheckEventLog.dll" DiskId="1" Source="$(var.Source)/modules/CheckEventLog.dll" Vital="no" /> 133 <File Id="ModCheckExternalScripts.dll" Name="CheckExternalScripts.dll" DiskId="1" Source="$(var.Source)/modules/CheckExternalScripts.dll" Vital="no" /> 134 <File Id="ModCheckHelpers.dll" Name="CheckHelpers.dll" DiskId="1" Source="$(var.Source)/modules/CheckHelpers.dll" Vital="no" /> 135 <File Id="ModCheckSystem.dll" Name="CheckSystem.dll" DiskId="1" Source="$(var.Source)/modules/CheckSystem.dll" Vital="no" /> 136 <File Id="ModCheckWMI.dll" Name="CheckWMI.dll" DiskId="1" Source="$(var.Source)/modules/CheckWMI.dll" Vital="no" /> 137 <File Id="ModFileLogger.dll" Name="FileLogger.dll" DiskId="1" Source="$(var.Source)/modules/FileLogger.dll" Vital="no" /> 138 <File Id="ModLUAScript.dll" Name="LUAScript.dll" DiskId="1" Source="$(var.Source)/modules/LUAScript.dll" Vital="no" /> 139 <File Id="ModCheckNSCP.dll" Name="CheckNSCP.dll" DiskId="1" Source="$(var.Source)/modules/CheckNSCP.dll" Vital="no" /> 140 <File Id="ModCheckDisk.dll" Name="CheckDisk.dll" DiskId="1" Source="$(var.Source)/modules/CheckDisk.dll" Vital="no" /> 141 <File Id="ModCheckTaskSched.dll" Name="CheckTaskSched.dll" DiskId="1" Source="$(var.Source)/modules/CheckTaskSched.dll" Vital="no" /> 142 <File Id="ModCheckTaskSched2.dll" Name="CheckTaskSched2.dll" DiskId="1" Source="$(var.Source)/modules/CheckTaskSched2.dll" Vital="no" /> 143 </Component> 144 </Directory> 145 <Directory Id="INSTALLLOCATION_SCRIPTS" Name="scripts"> 146 <Component Id="Scripts" Guid="9B490E67-5472-4268-96DF-$(var.Postfix.GUID)" Win64="$(var.Win64)"> 147 <File Id="script001" Name="check_60s.bat" DiskId="1" Source="$(var.Source)/scripts/check_60s.bat" Vital="no" /> 148 <File Id="script002" Name="check_battery.vbs" DiskId="1" Source="$(var.Source)/scripts/check_battery.vbs" Vital="no" /> 149 <File Id="script003" Name="check_no_rdp.bat" DiskId="1" Source="$(var.Source)/scripts/check_no_rdp.bat" Vital="no" /> 150 <File Id="script004" Name="check_printer.vbs" DiskId="1" Source="$(var.Source)/scripts/check_printer.vbs" Vital="no" /> 151 <File Id="script005" Name="check_ok.bat" DiskId="1" Source="$(var.Source)/scripts/check_ok.bat" Vital="no" /> 152 <File Id="script006" Name="check_files.vbs" DiskId="1" Source="$(var.Source)/scripts/check_files.vbs" Vital="no" /> 153 <File Id="script007" Name="check_ping.bat" DiskId="1" Source="$(var.Source)/scripts/check_ping.bat" Vital="no" /> 154 <File Id="script008" Name="check_updates.vbs" DiskId="1" Source="$(var.Source)/scripts/check_updates.vbs" Vital="no" /> 155 <File Id="sample002" Name="check_test.ps1" DiskId="1" Source="$(var.Source)/scripts/check_test.ps1" Vital="no" /> 156 <File Id="sample003" Name="check_test.vbs" DiskId="1" Source="$(var.Source)/scripts/check_test.vbs" Vital="no" /> 157 <!-- 155 158 Scripts missing 156 159 <File Id="lua001" Name="test.lua" LongName="test.lua" DiskId="1" Source="$(var.Source)/scripts/test.lua" Vital="no" /> 157 160 --> 158 </Component> 159 <Directory Id="INSTALLLOCATION_SCRIPTS_LIB" Name="lib"> 160 <Component Id="ScriptLibs" Guid="9B490E67-5472-4267-96DF-$(var.Postfix.GUID)" Win64="$(var.Win64)"> 161 <File Id="lib001" Name="NagiosPlugins.vbs" DiskId="1" Source="$(var.Source)/scripts/lib/NagiosPlugins.vbs" Vital="no" /> 162 <File Id="lib002" Name="wrapper.vbs" DiskId="1" Source="$(var.Source)/scripts/lib/wrapper.vbs" Vital="no" /> 163 </Component> 164 </Directory> 165 </Directory> 166 </Directory> 167 </Directory> 161 </Component> 162 <Directory Id="INSTALLLOCATION_SCRIPTS_LIB" Name="lib"> 163 <Component Id="ScriptLibs" Guid="9B490E67-5472-4267-96DF-$(var.Postfix.GUID)" Win64="$(var.Win64)"> 164 <File Id="lib001" Name="NagiosPlugins.vbs" DiskId="1" Source="$(var.Source)/scripts/lib/NagiosPlugins.vbs" Vital="no" /> 165 <File Id="lib002" Name="wrapper.vbs" DiskId="1" Source="$(var.Source)/scripts/lib/wrapper.vbs" Vital="no" /> 166 </Component> 167 </Directory> 168 <Directory Id="INSTALLLOCATION_SCRIPTS_PYTHON" Name="python"> 169 <Component Id="PythonScripts" Guid="8820A304-C697-4393-A72F-$(var.Postfix.GUID)" Win64="$(var.Win64)"> 170 <File Id="P_script_001" Name="test.py" DiskId="1" Source="$(var.Source)/scripts/python/test.py" Vital="no" /> 171 <File Id="P_script_002" Name="test_second.py" DiskId="1" Source="$(var.Source)/scripts/python/test_second.py" Vital="no" /> 172 </Component> 173 </Directory> 174 </Directory> 175 </Directory> 176 </Directory> 168 177 169 178 <!-- ### Start Menu Items ### --> … … 197 206 <ComponentRef Id="NSCListener" /> 198 207 </Feature> 199 <Feature Id="NSCAPlugin" Title="NSCA plugin" Description="Plugin to submit passive results to an NSCA server" Level="1" Absent="disallow"> 200 <ComponentRef Id="NSCA" /> 201 </Feature> 202 <Feature Id="SampleScripts" Title="Sample Scripts" Description="Some sample client-side scripts to use with NRPE" Level="1" Absent="disallow"> 208 <Feature Id="NSCAPlugin" Title="NSCA plugin" Description="Plugin to submit passive results to an NSCA server" Level="1" Absent="disallow"> 209 <ComponentRef Id="NSCA" /> 210 </Feature> 211 <Feature Id="PythonScript" Title="Python Scripting" Description="Python scripting requires python to be installed)" Level="1" Absent="disallow"> 212 <ComponentRef Id="PythonScript" /> 213 <ComponentRef Id="PythonScripts" /> 214 </Feature> 215 <Feature Id="SampleScripts" Title="Sample Scripts" Description="Some sample client-side scripts to use with NRPE" Level="1" Absent="disallow"> 203 216 <ComponentRef Id="Scripts" /> 204 217 <ComponentRef Id="ScriptLibs" /> -
helpers/settings_manager/CMakeLists.txt
r3bdaf18 r04ef932 37 37 ) 38 38 ENDIF(WIN32) 39 40 ADD_DEFINITIONS(${NSCP_GLOBAL_DEFINES}) 41 39 42 add_library (${TARGET} ${service_SRCS}) 40 43 -
include/file_helpers.hpp
rd66ccee r04ef932 40 40 } 41 41 static std::wstring get_filename(boost::filesystem::wpath path) { 42 return path. leaf();42 return path.filename(); 43 43 } 44 44 static std::wstring get_path(std::wstring file) { … … 48 48 static std::wstring get_filename(std::wstring file) { 49 49 boost::filesystem::wpath path = file; 50 return path. leaf();50 return path.filename(); 51 51 } 52 52 }; … … 59 59 if (boost::filesystem::is_directory(path)) 60 60 return pattern_type(path, _T("")); 61 return pattern_type(path.branch_path(), path. leaf() /*filename()*/);61 return pattern_type(path.branch_path(), path.filename()); 62 62 } 63 63 static pattern_type split_path_ex(std::wstring path) { -
include/nsca/nsca_packet.hpp
rd66ccee r04ef932 153 153 data->crc32_value= swap_bytes::hton<u_int32_t>(0); 154 154 155 ZeroMemory(data->get_host_ptr(), host.size()+1);155 memset(data->get_host_ptr(), 0, host.size()+1); 156 156 host.copy(data->get_host_ptr(), host.size()); 157 ZeroMemory(data->get_desc_ptr(nsca::length::host_length), service.size()+1);157 memset(data->get_desc_ptr(nsca::length::host_length), 0, service.size()+1); 158 158 service.copy(data->get_desc_ptr(nsca::length::host_length), service.size()); 159 ZeroMemory(data->get_result_ptr(nsca::length::host_length, nsca::length::desc_length), result.size()+1);159 memset(data->get_result_ptr(nsca::length::host_length, nsca::length::desc_length), 0, result.size()+1); 160 160 result.copy(data->get_result_ptr(nsca::length::host_length, nsca::length::desc_length), result.size()); 161 161 -
include/nscapi/functions.hpp
r7ec3dd1 r04ef932 141 141 boost::tokenizer<boost::escaped_list_separator<wchar_t>, std::wstring::const_iterator, std::wstring> tok(perf, boost::escaped_list_separator<wchar_t>(L'\\', L' ', L'\'')); 142 142 BOOST_FOREACH(std::wstring s, tok) { 143 if (s.size() == 0) 144 break; 143 145 strEx::splitVector items = strEx::splitV(s, _T(";")); 144 if (items.size() < 3) 146 if (items.size() < 1) { 147 ::PluginCommand::PerformanceData* perfData = resp->add_perf(); 148 perfData->set_type(PluginCommand::PerformanceData_Type_STRING); 149 std::pair<std::wstring,std::wstring> fitem = strEx::split(_T(""), _T("=")); 150 perfData->set_alias("invalid"); 151 ::PluginCommand::PerformanceData_StringValue* stringPerfData = perfData->mutable_string_value(); 152 stringPerfData->set_value("invalid performance data"); 145 153 break; 154 } 146 155 147 156 ::PluginCommand::PerformanceData* perfData = resp->add_perf(); … … 158 167 floatPerfData->set_unit(to_string(fitem.second.substr(pend))); 159 168 } 160 floatPerfData->set_warning(trim_to_double(items[1])); 161 floatPerfData->set_critical(trim_to_double(items[2])); 169 if (items.size() > 2) { 170 floatPerfData->set_warning(trim_to_double(items[1])); 171 floatPerfData->set_critical(trim_to_double(items[2])); 172 } 162 173 if (items.size() >= 5) { 163 174 floatPerfData->set_minimum(trim_to_double(items[3])); … … 165 176 } 166 177 } 178 // std::wcout << _T("Converting performance data") << perf << _T(" -- ") << utf8::cvt<std::wstring>(build_performance_data(*resp)) << std::endl; 167 179 } 168 180 static std::string build_performance_data(::PluginCommand::Response const &payload) { -
include/nscapi/nscapi_core_wrapper.cpp
r7ec3dd1 r04ef932 184 184 message.SerializeToString(&request); 185 185 186 return InjectCommand(command.c_str(), request, result); 187 } 188 189 NSCAPI::nagiosReturn nscapi::core_wrapper::InjectCommand(const std::wstring command, std::string request, std::string & result) 190 { 191 if (!fNSAPIInject) 192 throw nscapi::nscapi_exception(_T("NSCore has not been initiated...")); 186 193 char *buffer = NULL; 187 194 unsigned int buffer_size = 0; 188 189 195 NSCAPI::nagiosReturn retC = InjectCommandRAW(command.c_str(), request.c_str(), request.size(), &buffer, &buffer_size); 190 196 … … 209 215 return retC; 210 216 } 211 212 217 /** 213 218 * A wrapper around the InjetCommand that is simpler to use. -
include/nscapi/nscapi_core_wrapper.hpp
rd66ccee r04ef932 134 134 NSCAPI::nagiosReturn InjectCommandRAW(const wchar_t* command, const char *request, const unsigned int request_len, char **response, unsigned int *response_len); 135 135 void DestroyBuffer(char**buffer); 136 NSCAPI::nagiosReturn InjectCommand(const std::wstring command, std::string request, std::string & result); 136 137 NSCAPI::nagiosReturn InjectCommand(const std::wstring command, const std::list<std::wstring> argument, std::string & result); 137 138 NSCAPI::nagiosReturn InjectSimpleCommand(const std::wstring command, const std::list<std::wstring> argument, std::wstring & message, std::wstring & perf); -
include/parsers/helpers.cpp
r1f24a1c r04ef932 1 1 #include <parsers/helpers.hpp> 2 2 3 #include < time.h>3 #include <boost/date_time.hpp> 4 4 5 5 namespace parsers { … … 10 10 return now; 11 11 } 12 namespace pt = boost::posix_time; 13 namespace gt = boost::gregorian; 14 namespace dt = boost::date_time; 15 16 inline std::time_t to_time_t(pt::ptime t) { 17 if( t == dt::neg_infin ) 18 return 0; 19 else if( t == dt::pos_infin ) 20 return LONG_MAX; 21 pt::ptime start(gt::date(1970,1,1)); 22 return (t-start).total_seconds(); 23 } 24 25 26 12 27 void constants::reset() { 13 __time64_t utctime; 14 _time64(&utctime); 15 now = utctime; 28 now = to_time_t(pt::second_clock::local_time()); 29 // __time64_t utctime; 30 // _time64(&utctime); 31 // now = utctime; 16 32 // struct tm localtime; 17 33 // _localtime64_s(&localtime, &utctime); -
include/parsers/where.cpp
re11d494 r04ef932 1 #pragma once2 3 1 #include <list> 4 2 #include <iostream> -
include/socket_helpers.hpp
rd66ccee r04ef932 126 126 void read_with_timeout(AsyncReadStream& sock, RawSocket& rawSocket, const MutableBufferSequence& buffers, boost::posix_time::time_duration duration) { 127 127 boost::optional<boost::system::error_code> timer_result; 128 boost::asio::deadline_timer timer(sock. io_service());128 boost::asio::deadline_timer timer(sock.get_io_service()); 129 129 timer.expires_from_now(duration); 130 130 timer.async_wait(boost::bind(set_result, &timer_result, _1)); … … 133 133 async_read(sock, buffers, boost::bind(set_result, &read_result, _1)); 134 134 135 sock. io_service().reset();136 while (sock. io_service().run_one()) {135 sock.get_io_service().reset(); 136 while (sock.get_io_service().run_one()) { 137 137 if (read_result) 138 138 timer.cancel(); … … 148 148 void write_with_timeout(AsyncWriteStream& sock, RawSocket& rawSocket, const MutableBufferSequence& buffers, boost::posix_time::time_duration duration) { 149 149 boost::optional<boost::system::error_code> timer_result; 150 boost::asio::deadline_timer timer(sock. io_service());150 boost::asio::deadline_timer timer(sock.get_io_service()); 151 151 timer.expires_from_now(duration); 152 152 timer.async_wait(boost::bind(set_result, &timer_result, _1)); … … 155 155 async_write(sock, buffers, boost::bind(set_result, &read_result, _1)); 156 156 157 sock. io_service().reset();158 while (sock. io_service().run_one()) {157 sock.get_io_service().reset(); 158 while (sock.get_io_service().run_one()) { 159 159 if (read_result) 160 160 timer.cancel(); -
include/strEx.h
r3bdaf18 r04ef932 36 36 #include <cctype> 37 37 38 #ifdef __GNUC__ 39 #include <iconv.h> 40 #include <errno.h> 41 #endif 42 38 43 #include <boost/lexical_cast.hpp> 39 44 #include <boost/date_time.hpp> … … 817 822 } 818 823 } 819 824 /* 825 #ifdef __GNUC__ 826 size_t Wcslen(const wchar_t*w) 827 { 828 size_t size=0; 829 while (*w++) 830 size++; 831 return size; 832 } 833 #endif 834 #ifdef WIN32 835 #define Wcslen wcslen 836 #endif 837 */ 820 838 namespace utf8 { 821 839 /** Converts a std::wstring into a std::string with UTF-8 encoding. */ … … 853 871 WideCharToMultiByte(CP_UTF8, 0, str.c_str(), static_cast<int>(str.length()), const_cast<char*>(buf.c_str()), nChars, NULL, NULL); 854 872 return buf; 873 #else 874 size_t wideSize = sizeof(wchar_t)*str.length(); 875 size_t outbytesLeft = wideSize+sizeof(char); //We cannot know how many wide character there is yet 876 877 //Copy the instring 878 char *inString = (char*)new wchar_t[str.length()+1]; 879 memcpy(inString, str.c_str(), wideSize+sizeof(wchar_t)); 880 881 //Create buffer for output 882 char *outString = new char[outbytesLeft]; 883 memset(outString, 0, sizeof(char)*(outbytesLeft)); 884 885 char *inPointer = inString; 886 char *outPointer = outString; 887 888 iconv_t convDesc = iconv_open("UTF-8", "WCHAR_T"); 889 iconv(convDesc, &inPointer, &wideSize, &outPointer, &outbytesLeft); 890 iconv_close(convDesc); 891 892 std::string retval(outString); 893 894 //Cleanup 895 delete[] inString; 896 delete[] outString; 897 898 return retval; 855 899 #endif 856 900 } … … 870 914 MultiByteToWideChar(CP_UTF8, 0, str.c_str(), static_cast<int>(str.length()), const_cast<wchar_t*>(buf.c_str()), nChars); 871 915 return buf; 916 #else 917 size_t utf8Length = str.length(); 918 size_t outbytesLeft = utf8Length*sizeof(wchar_t); 919 920 //Copy the instring 921 char *inString = new char[str.length()+1]; 922 strcpy(inString, str.c_str()); 923 924 //Create buffer for output 925 char *outString = (char*)new wchar_t[utf8Length+1]; 926 memset(outString, 0, sizeof(wchar_t)*(utf8Length+1)); 927 928 char *inPointer = inString; 929 char *outPointer = outString; 930 931 iconv_t convDesc = iconv_open("WCHAR_T", "UTF-8"); 932 iconv(convDesc, &inPointer, &utf8Length, &outPointer, &outbytesLeft); 933 iconv_close(convDesc); 934 935 std::wstring retval( (wchar_t *)outString ); 936 937 //Cleanup 938 delete[] inString; 939 delete[] outString; 940 941 return retval; 872 942 #endif 873 943 } -
include/unicode_char.hpp
rd66ccee r04ef932 11 11 #define _T(x) L ## x 12 12 #endif 13 13 #include <unicode/ustring.h> 14 14 #endif 15 15 16 #include <unicode/ustring.h> -
libs/protobuf/log.proto.h
re11d494 r04ef932 1 1 #pragma once 2 2 3 #include " D:/source/nscp/build/x64/libs/protobuf/log.pb.h"3 #include "/mnt/nscp/build/linux/libs/protobuf/log.pb.h" 4 4 -
modules/CheckNSCP/CheckNSCP.cpp
re11d494 r04ef932 22 22 23 23 #include <file_helpers.hpp> 24 #include <unicode_char.hpp> 24 25 25 26 #include <settings/client/settings_client.hpp> … … 85 86 86 87 int CheckNSCP::get_crashes(std::wstring &last_crash) { 88 #ifdef WIN32 87 89 if (!file_helpers::checks::is_directory(crashFolder)) { 88 90 return 0; … … 109 111 last_crash = last_file; 110 112 return count; 113 #else 114 return 0; 115 #endif 111 116 } 112 117 … … 125 130 std::wstring last_crash; 126 131 int crash_count = get_crashes(last_crash); 127 if (crash_count > 0) 128 strEx::append_list(msg, strEx::itos(crash_count) + _T(" crash(es), last crash: ") + last_crash, _T(", ")); 132 if (crash_count > 0){ 133 std::wstring tmp = strEx::itos(crash_count) + _T(" crash(es), last crash: ") + last_crash; 134 strEx::append_list(msg, tmp, _T(", ")); 135 } 129 136 130 137 std::wstring last_error; 131 138 int err_count = get_errors(last_error); 132 if (err_count > 0) 133 strEx::append_list(msg, strEx::itos(err_count) + _T(" error(s), last error: ") + last_error, _T(", ")); 139 if (err_count > 0) { 140 std::wstring tmp = strEx::itos(err_count) + _T(" error(s), last error: ") + last_error; 141 strEx::append_list(msg, tmp, _T(", ")); 142 } 134 143 135 144 if (msg.empty()) -
modules/LUAScript/LUAScript.cpp
rd66ccee r04ef932 46 46 try { 47 47 48 root_ = get_core()->getBasePath(); 49 48 50 sh::settings_registry settings(get_settings_proxy()); 49 51 settings.set_alias(alias, _T("lua")); … … 52 54 (_T("LUA SCRIPT SECTION"), _T("Section for the LUAScripts module.")) 53 55 54 (_T("scripts"), sh::fun_values_path(boost::bind(&LUAScript::loadScript, this, _1 )),56 (_T("scripts"), sh::fun_values_path(boost::bind(&LUAScript::loadScript, this, _1, _2)), 55 57 _T("LUA SCRIPTS SECTION"), _T("A list of scripts available to run from the LuaSCript module.")) 56 58 ; … … 62 64 // addAllScriptsFrom(scriptDirectory_); 63 65 // } 64 root_ = get_core()->getBasePath(); 66 67 68 69 70 BOOST_FOREACH(script_container &script, scripts_) { 71 try { 72 boost::shared_ptr<script_wrapper::lua_script> instance = boost::shared_ptr<script_wrapper::lua_script>(new script_wrapper::lua_script(script)); 73 instance->pre_load(this); 74 instances_.push_back(instance); 75 } catch (script_wrapper::LUAException e) { 76 NSC_LOG_ERROR_STD(_T("Could not load script ") + script.to_wstring() + _T(": ") + e.getMessage()); 77 } 78 } 65 79 66 80 // } catch (nrpe::server::nrpe_exception &e) { … … 81 95 82 96 void LUAScript::register_command(script_wrapper::lua_script* script, std::wstring command, std::wstring function) { 83 NSC_LOG_MESSAGE(_T("Script loading: ") + script->get_ script() + _T(": ") + command);97 NSC_LOG_MESSAGE(_T("Script loading: ") + script->get_wscript() + _T(": ") + command); 84 98 commands_[command] = lua_func(script, function); 85 99 } 86 100 87 bool LUAScript::loadScript(const std::wstring file) { 101 boost::optional<boost::filesystem::wpath> LUAScript::find_file(std::wstring file) { 102 std::list<boost::filesystem::wpath> checks; 103 checks.push_back(file); 104 checks.push_back(root_ / _T("scripts") / _T("lua") / file); 105 checks.push_back(root_ / _T("scripts") / file); 106 checks.push_back(root_ / _T("lua") / file); 107 checks.push_back(root_ / file); 108 BOOST_FOREACH(boost::filesystem::wpath c, checks) { 109 NSC_DEBUG_MSG_STD(_T("Looking for: ") + c.string()); 110 if (boost::filesystem::exists(c)) 111 return boost::optional<boost::filesystem::wpath>(c); 112 } 113 NSC_LOG_ERROR(_T("Script not found: ") + file); 114 return boost::optional<boost::filesystem::wpath>(); 115 } 116 117 bool LUAScript::loadScript(std::wstring alias, std::wstring file) { 88 118 try { 89 std::wstring file_ = file; 119 if (file.empty()) { 120 file = alias; 121 alias = _T(""); 122 } 90 123 91 if (!file_helpers::checks::exists(file_)) { 92 file_ = root_ + file; 93 if (!file_helpers::checks::exists(file_)) { 94 NSC_LOG_ERROR(_T("Script not found: ") + file + _T(" (") + file_ + _T(")")); 95 return false; 96 } 97 } 98 NSC_DEBUG_MSG_STD(_T("Loading script: ") + file + _T(" (") + file_ + _T(")")); 99 script_wrapper::lua_script *script = new script_wrapper::lua_script(file_); 100 script->pre_load(this); 101 scripts_.push_back(script); 124 boost::optional<boost::filesystem::wpath> ofile = find_file(file); 125 if (!ofile) 126 return false; 127 script_container::push(scripts_, alias, *ofile); 128 NSC_DEBUG_MSG_STD(_T("Adding script: ") + ofile->string() + _T(" as ") + alias + _T(")")); 102 129 return true; 103 } catch (script_wrapper::LUAException e) {104 NSC_LOG_ERROR_STD(_T("Could not load script: ") + file + _T(", ") + e.getMessage());105 130 } catch (...) { 106 131 NSC_LOG_ERROR_STD(_T("Could not load script: (Unknown exception) ") + file); … … 111 136 112 137 bool LUAScript::unloadModule() { 113 for (script_list::const_iterator cit = scripts_.begin(); cit != scripts_.end() ; ++cit) { 114 delete (*cit); 115 } 116 scripts_.clear(); 138 instances_.clear(); 117 139 return true; 118 140 } … … 129 151 bool error = false; 130 152 commands_.clear(); 131 for (script_list::const_iterator cit = scripts_.begin(); cit != scripts_.end() ; ++cit) {153 for (script_list::const_iterator cit = instances_.begin(); cit != instances_.end() ; ++cit) { 132 154 try { 133 155 (*cit)->reload(this); 134 156 } catch (script_wrapper::LUAException e) { 135 157 error = true; 136 message += _T("Exception when reloading script: ") + (*cit)->get_ script() + _T(": ") + e.getMessage();137 NSC_LOG_ERROR_STD(_T("Exception when reloading script: ") + (*cit)->get_ script() + _T(": ") + e.getMessage());158 message += _T("Exception when reloading script: ") + (*cit)->get_wscript() + _T(": ") + e.getMessage(); 159 NSC_LOG_ERROR_STD(_T("Exception when reloading script: ") + (*cit)->get_wscript() + _T(": ") + e.getMessage()); 138 160 } catch (...) { 139 161 error = true; 140 message += _T("Unhandeled Exception when reloading script: ") + (*cit)->get_ script();141 NSC_LOG_ERROR_STD(_T("Unhandeled Exception when reloading script: ") + (*cit)->get_ script());162 message += _T("Unhandeled Exception when reloading script: ") + (*cit)->get_wscript(); 163 NSC_LOG_ERROR_STD(_T("Unhandeled Exception when reloading script: ") + (*cit)->get_wscript()); 142 164 } 143 165 } -
modules/LUAScript/LUAScript.h
r3bdaf18 r04ef932 26 26 #include "script_wrapper.hpp" 27 27 28 #include <boost/optional.hpp> 29 30 #include <scripts/functions.hpp> 31 32 28 33 class LUAScript : public nscapi::impl::SimpleCommand, public script_wrapper::lua_handler, public nscapi::impl::simple_plugin { 29 34 private: … … 41 46 }; 42 47 48 script_container::list_type scripts_; 49 43 50 typedef std::map<std::wstring,lua_func> cmd_list; 44 typedef std::list< script_wrapper::lua_script*> script_list;51 typedef std::list<boost::shared_ptr<script_wrapper::lua_script> > script_list; 45 52 46 53 cmd_list commands_; 47 script_list scripts_;48 std::wstringroot_;54 script_list instances_; 55 boost::filesystem::wpath root_; 49 56 50 57 public: … … 71 78 bool hasCommandHandler(); 72 79 bool hasMessageHandler(); 73 bool loadScript(const std::wstring script); 80 boost::optional<boost::filesystem::wpath> find_file(std::wstring file); 81 bool loadScript(std::wstring alias, std::wstring file); 74 82 NSCAPI::nagiosReturn handleCommand(const std::wstring command, std::list<std::wstring> arguments, std::wstring &message, std::wstring &perf); 75 83 //NSCAPI::nagiosReturn RunLUA(const unsigned int argLen, wchar_t **char_args, std::wstring &message, std::wstring &perf); -
modules/LUAScript/script_wrapper.hpp
rd66ccee r04ef932 10 10 #include "luna.h" 11 11 12 #include <scripts/functions.hpp> 12 13 13 14 namespace script_wrapper { … … 304 305 class lua_script { 305 306 Lua_State L; 306 std::wstring script_; 307 public: 308 lua_script(const std::wstring file) : script_(file) { 307 std::string script_; 308 std::string alias_; 309 public: 310 lua_script(const script_container &script) : script_(utf8::cvt<std::string>(script.script.string())), alias_(utf8::cvt<std::string>(script.alias)) { 309 311 load(); 310 312 } … … 312 314 luaL_openlibs(L); 313 315 nsclient_wrapper::luaopen(L); 314 //Luna<Account>::Register(L);315 //lua_register(L, "register_command", register_command);316 317 if (luaL_loadfile(L, strEx::wstring_to_string(script_).c_str()) != 0) { 318 throw LUAException(_T("Failed to load script: ") + script_ + _T(": ") + s2w(lua_tostring(L, -1)));319 }320 321 } 322 std:: wstring get_script() const {316 if (luaL_loadfile(L, script_.c_str()) != 0) { 317 throw LUAException(_T("Failed to load script: ") + get_wscript() + _T(": ") + s2w(lua_tostring(L, -1))); 318 } 319 320 } 321 std::wstring get_wscript() const { 322 return utf8::cvt<std::wstring>(script_); 323 } 324 std::string get_script() const { 323 325 return script_; 324 326 } … … 333 335 lua_manager::set_script(L, this); 334 336 if (lua_pcall(L, 0, 0, 0) != 0) { 335 throw LUAException(_T("Failed to parse script: ") + script_+ _T(": ") + s2w(lua_tostring(L, -1)));337 throw LUAException(_T("Failed to parse script: ") + get_wscript() + _T(": ") + s2w(lua_tostring(L, -1))); 336 338 } 337 339 } … … 368 370 if (!lua_isfunction(L, -1)) { 369 371 lua_pop(L, 1); // remove function from LUA stack 370 throw LUAException(_T("Failed to run script: ") + script_+ _T(": Function not found: handle"));372 throw LUAException(_T("Failed to run script: ") + get_wscript() + _T(": Function not found: handle")); 371 373 } 372 374 lua_pushstring(L, w2s(cmd).c_str()); … … 382 384 if (lua_pcall(L, 2, LUA_MULTRET, 0) != 0) { 383 385 std::wstring err = strEx::string_to_wstring(lua_tostring(L, -1)); 384 NSC_LOG_ERROR_STD(_T("Failed to call main function in script: ") + script_+ _T(": ") + err);386 NSC_LOG_ERROR_STD(_T("Failed to call main function in script: ") + get_wscript() + _T(": ") + err); 385 387 lua_pop(L, 1); // remove error message 386 388 return NSCAPI::returnUNKNOWN; -
modules/NRPEClient/CMakeLists.txt
rd66ccee r04ef932 30 30 31 31 add_library(${TARGET} MODULE ${SRCS}) 32 INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR}) 32 33 33 34 target_link_libraries(${TARGET} -
modules/NRPEServer/CMakeLists.txt
rd66ccee r04ef932 44 44 45 45 add_library(${TARGET} MODULE ${SRCS}) 46 INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR}) 46 47 47 48 target_link_libraries(${TARGET} -
modules/NSCAAgent/CMakeLists.txt
rd66ccee r04ef932 38 38 39 39 add_library(${TARGET} MODULE ${SRCS}) 40 INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR}) 40 41 41 42 target_link_libraries(${TARGET} -
scripts/CMakeLists.txt
r7ec3dd1 r04ef932 5 5 FILE (GLOB scripts_PS1 "*.ps1") 6 6 FILE (GLOB scripts_LIB "lib/*.vbs") 7 FILE (GLOB scripts_PYT "python/*.py") 8 FILE (GLOB scripts_LUA "lua/*.lua") 7 9 8 10 SET(script_ALL ${scripts_BAT} ${scripts_VBS} ${scripts_PS1}) … … 20 22 copy_single_file("script lib" lib/${filename} scripts/lib) 21 23 ENDFOREACH(file ${scripts_LIB}) 24 25 FOREACH(file ${scripts_PYT}) 26 get_filename_component(filename ${file} NAME) 27 #MESSAGE(STATUS " + lib - ${filename}") 28 copy_single_file("script python" python/${filename} scripts/python) 29 ENDFOREACH(file ${scripts_PYT}) 30 31 FOREACH(file ${scripts_LUA}) 32 get_filename_component(filename ${file} NAME) 33 #MESSAGE(STATUS " + lib - ${filename}") 34 copy_single_file("script lua" lua/${filename} lua/python) 35 ENDFOREACH(file ${scripts_LUA}) -
service/CMakeLists.txt
r7ec3dd1 r04ef932 85 85 ENDIF(BREAKPAD_FOUND) 86 86 87 ADD_DEFINITIONS(${NSCP_GLOBAL_DEFINES}) 88 87 89 add_executable (${TARGET} ${service_SRCS}) 88 90 89 MESSAGE(STATUS " Extra:${EXTRA_LIBS}")91 MESSAGE(STATUS "All libraries: ${Boost_FILESYSTEM_LIBRARY}, ${NSCP_DEF_PLUGIN_LIB}, ${EXTRA_LIBS}") 90 92 91 93 target_link_libraries(${TARGET} -
service/NSCPlugin.cpp
r1ecd26f r04ef932 446 446 447 447 bool NSCPlugin::is_duplicate( boost::filesystem::wpath file, std::wstring alias ) { 448 if (alias.empty() )448 if (alias.empty() && alias_.empty()) 449 449 return module_.get_file() == dll::dll::fix_module_name(file); 450 return module_.get_file() == dll::dll::fix_module_name(file) || alias == alias_; 451 } 450 if (alias.empty() || alias_.empty()) 451 return false; 452 return module_.get_file() == dll::dll::fix_module_name(file) && alias == alias_; 453 } -
service/NSClient++.cpp
r7ec3dd1 r04ef932 390 390 391 391 settings::string_list list = settings_manager::get_settings()->get_keys(MAIN_MODULES_SECTION); 392 BOOST_FOREACH(std::wstring key, list) { 393 std::wstring val = settings_manager::get_settings()->get_string(MAIN_MODULES_SECTION, key); 394 if ((key.length() > 4) && (key.substr(key.length()-4) == _T(".dll")) ) 395 key = key.substr(0, key.length()-4); 396 if (val.empty() || val == _T("enabled")) { 397 ret.insert(plugin_alias_list_type::value_type(_T(""), key)); 398 } else if (val == _T("disabled") && !active) { 399 ret.insert(plugin_alias_list_type::value_type(_T("disabled"), key)); 400 } else if (val == _T("disabled")) { 401 } else { 402 ret.insert(plugin_alias_list_type::value_type(key, val)); 403 } 392 BOOST_FOREACH(std::wstring plugin, list) { 393 std::wstring alias = settings_manager::get_settings()->get_string(MAIN_MODULES_SECTION, plugin); 394 if (plugin == _T("enabled")) { 395 plugin = alias; 396 alias = _T(""); 397 } else if ((active && plugin == _T("disabled")) || (active && alias == _T("disabled"))) 398 continue; 399 else if (plugin == _T("disabled")) { 400 plugin = alias; 401 alias = _T(""); 402 } else if (alias == _T("disabled")) { 403 alias = _T(""); 404 } 405 if (!alias.empty()) { 406 std::wstring tmp = plugin; 407 plugin = alias; 408 alias = tmp; 409 } 410 LOG_DEBUG_CORE_STD(_T("Found: ") + plugin + _T(" as ") + alias); 411 if (plugin.length() > 4 && plugin.substr(plugin.length()-4) == _T(".dll")) 412 plugin = plugin.substr(0, plugin.length()-4); 413 ret.insert(plugin_alias_list_type::value_type(alias, plugin)); 404 414 } 405 415 if (!active) { … … 459 469 BOOST_FOREACH(v, plugins) { 460 470 try { 461 addPlugin(pluginPath / v.second, _T(""));471 addPlugin(pluginPath / v.second, v.first); 462 472 } catch (NSPluginException &e) { 463 473 LOG_CRITICAL_CORE_STD(_T("Failed to register plugin: ") + e.what()); … … 974 984 NSClientT::plugin_type NSClientT::addPlugin(boost::filesystem::wpath file, std::wstring alias) { 975 985 { 976 LOG_DEBUG_CORE_STD(_T("addPlugin(") + file.string() + _T(" ,") + alias + _T(")"));986 LOG_DEBUG_CORE_STD(_T("addPlugin(") + file.string() + _T(" as ") + alias + _T(")")); 977 987 // Check if this is a duplicate plugin (if so return that instance) 978 988 boost::unique_lock<boost::shared_mutex> writeLock(m_mutexRW, boost::get_system_time() + boost::posix_time::seconds(10)); -
service/settings_logger_impl.cpp
r1ecd26f r04ef932 1 #pragma once2 3 1 #include "settings_logger_impl.hpp" 4 2 #include "NSClient++.h" -
service/simple_client.hpp
r7ec3dd1 r04ef932 43 43 break; 44 44 } else if (s == _T("plugins")) { 45 log(_T(" Listing plugins..."));45 log(_T("Plugins: ")); 46 46 core_->listPlugins(); 47 } else if (s == _T("list") ) {48 log(_T(" Listing commands..."));47 } else if (s == _T("list") || s == _T("commands")) { 48 log(_T("Commands:")); 49 49 std::list<std::wstring> lst = core_->list_commands(); 50 50 for (std::list<std::wstring>::const_iterator cit = lst.begin(); cit!=lst.end();++cit) 51 std::wcout << *cit << _T(": ") << core_->describeCommand(*cit) << std::endl; 52 log(_T("Listing commands...Done")); 51 log(_T("| ") + *cit + _T(": ") + core_->describeCommand(*cit)); 53 52 } else if (s == _T("debug off")) { 54 53 log(_T("Setting debug log off...")); -
tools/error_reporter/CMakeLists.txt
rd66ccee r04ef932 3 3 SET(TARGET reporter) 4 4 5 PROJECT(reporter) 5 IF(BREAKPAD_FOUND) 6 PROJECT(reporter) 6 7 7 ADD_DEFINITIONS(${NSCP_GLOBAL_DEFINES})8 ADD_DEFINITIONS(${NSCP_GLOBAL_DEFINES}) 8 9 9 SET(reporter_SRCS10 StdAfx.cpp11 reporter.cpp12 )10 SET(reporter_SRCS 11 StdAfx.cpp 12 reporter.cpp 13 ) 13 14 14 IF(WIN32)15 SET(reporter_SRCS ${reporter_SRCS}16 ${NSCP_INCLUDEDIR}/ServiceCmd.cpp17 18 # /breakpad//common19 # /breakpad//crash_report_sender15 IF(WIN32) 16 SET(reporter_SRCS ${reporter_SRCS} 17 ${NSCP_INCLUDEDIR}/ServiceCmd.cpp 18 19 # /breakpad//common 20 # /breakpad//crash_report_sender 20 21 21 reporter.h 22 StdAfx.h 22 reporter.h 23 StdAfx.h 24 ) 25 SET(EXTRA_LIBS Wininet.lib) 26 ENDIF(WIN32) 27 28 add_executable (${TARGET} ${reporter_SRCS}) 29 target_link_libraries(${TARGET} 30 ${Boost_FILESYSTEM_LIBRARY} 31 ${Boost_SYSTEM_LIBRARY} 32 # ${NSCP_DEF_PLUGIN_LIB} 33 ${BREAKPAD_COMMON_LIBRARY} 34 ${BREAKPAD_CRASH_REPORT_SENDER_LIBRARY} 35 ${EXTRA_LIBS} 23 36 ) 24 SET(EXTRA_LIBS Wininet.lib) 25 ENDIF(WIN32) 37 SET_TARGET_PROPERTIES(${TARGET} PROPERTIES FOLDER "tools") 26 38 27 add_executable (${TARGET} ${reporter_SRCS}) 28 target_link_libraries(${TARGET} 29 ${Boost_FILESYSTEM_LIBRARY} 30 ${Boost_SYSTEM_LIBRARY} 31 # ${NSCP_DEF_PLUGIN_LIB} 32 ${BREAKPAD_COMMON_LIBRARY} 33 ${BREAKPAD_CRASH_REPORT_SENDER_LIBRARY} 34 ${EXTRA_LIBS} 35 ) 36 SET_TARGET_PROPERTIES(${TARGET} PROPERTIES FOLDER "tools") 39 SOURCE_GROUP("Common Files" REGULAR_EXPRESSION .*include/.*) 40 SOURCE_GROUP("Parser" REGULAR_EXPRESSION .*include/parser/.*) 41 SOURCE_GROUP("NSCP API" REGULAR_EXPRESSION .*include/nscapi/.*) 42 SOURCE_GROUP("Settings" REGULAR_EXPRESSION .*include/settings/.*) 37 43 38 SOURCE_GROUP("Common Files" REGULAR_EXPRESSION .*include/.*) 39 SOURCE_GROUP("Parser" REGULAR_EXPRESSION .*include/parser/.*) 40 SOURCE_GROUP("NSCP API" REGULAR_EXPRESSION .*include/nscapi/.*) 41 SOURCE_GROUP("Settings" REGULAR_EXPRESSION .*include/settings/.*) 42 43 INSTALL(TARGETS ${TARGET} RUNTIME DESTINATION .) 44 INSTALL(CODE "SET(PDB_FULL_PATH ${BUILD_TARGET_EXE_PATH}/${TARGET}.pdb)") 45 INSTALL(CODE "FILE(INSTALL DESTINATION \${CMAKE_INSTALL_PREFIX} TYPE EXECUTABLE FILES \${PDB_FULL_PATH})") 44 INSTALL(TARGETS ${TARGET} RUNTIME DESTINATION .) 45 INSTALL(CODE "SET(PDB_FULL_PATH ${BUILD_TARGET_EXE_PATH}/${TARGET}.pdb)") 46 INSTALL(CODE "FILE(INSTALL DESTINATION \${CMAKE_INSTALL_PREFIX} TYPE EXECUTABLE FILES \${PDB_FULL_PATH})") 47 ENDIF(BREAKPAD_FOUND) -
version.hpp
re11d494 r04ef932 1 1 #ifndef VERSION_HPP 2 2 #define VERSION_HPP 3 #define PRODUCTVER 0,4,0, 774 #define STRPRODUCTVER "0,4,0, 77"5 #define STRPRODUCTDATE "2011-0 7-06"3 #define PRODUCTVER 0,4,0,83 4 #define STRPRODUCTVER "0,4,0,83" 5 #define STRPRODUCTDATE "2011-08-07" 6 6 #endif // VERSION_HPP -
version.txt
re11d494 r04ef932 1 1 version=0.4.0 2 build= 773 date=2011-0 7-062 build=83 3 date=2011-08-07
Note: See TracChangeset
for help on using the changeset viewer.








