Skip to content

Commit

Permalink
Port exec plugin to Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanCampbell committed Apr 24, 2020
1 parent 601f72b commit d7ce92c
Show file tree
Hide file tree
Showing 4 changed files with 358 additions and 34 deletions.
5 changes: 5 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -920,6 +920,11 @@ pkglib_LTLIBRARIES += exec.la
exec_la_SOURCES = src/exec.c
exec_la_LDFLAGS = $(PLUGIN_LDFLAGS)
exec_la_LIBADD = libcmds.la
if BUILD_WIN32
exec_la_LDFLAGS += -L.
exec_la_LIBADD += -loleaut32 -lole32 -luuid libcollectd.la
exec_la_DEPENDENCES = libuuid.dll
endif
endif

if BUILD_PLUGIN_ETHSTAT
Expand Down
6 changes: 3 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ build_windows ()
: ${LOCALSTATEDIR:="${INSTALL_DIR}"}
: ${DATAROOTDIR:="${INSTALL_DIR}"}
: ${DATADIR:="${INSTALL_DIR}"}

echo "Installing collectd to ${INSTALL_DIR}."
TOP_SRCDIR=$(pwd)
MINGW_ROOT="/usr/x86_64-w64-mingw32/sys-root/mingw"
Expand Down Expand Up @@ -123,7 +123,7 @@ build_windows ()

cd ${TOP_SRCDIR}/_build_aux/_gnulib
./configure --host="mingw32" LIBS="-lws2_32 -lpthread"
make
make
cd gllib

# We have to rebuild libgnu.a to get the list of *.o files to build a dll later
Expand Down Expand Up @@ -154,6 +154,7 @@ build_windows ()
--enable-logfile \
--enable-disk \
--enable-eventlog \
--enable-exec \
--enable-interface \
--enable-match_regex \
--enable-network \
Expand Down Expand Up @@ -185,4 +186,3 @@ if test "${OSTYPE}" = "cygwin"; then
else
build_linux
fi

2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -6249,6 +6249,7 @@ fi
if test "x$ac_system" = "xWindows"; then
plugin_disk="yes"
plugin_eventlog="yes"
plugin_exec="yes"
plugin_interface="yes"
plugin_wmi="yes"
fi
Expand Down Expand Up @@ -7131,4 +7132,3 @@ if test "x$dependency_warning" = "xyes"; then
fi
# vim: set fdm=marker sw=2 sts=2 ts=2 et :
Loading

0 comments on commit d7ce92c

Please sign in to comment.