From: "cron2 (Code Review)" Date: Thu, 18 Sep 2025 07:27:23 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <1a21ccffd691a994c3b7cbd213036b15d56c2a52-EmailReplacePatchSet-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="hvsFcMAsY6k="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[master]: add building of openvpnsrvmsg.dll from eventmsg.mc to autoconf/mingw ... List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos , flichtenheld Cc: openvpn-devel --hvsFcMAsY6k= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld, plaisthos. Hello flichtenheld, plaisthos, I'd like you to reexamine a change. Please visit http://gerrit.openvpn.net/c/openvpn/+/1197?usp=3Demail to look at the new patch set (#2). Change subject: add building of openvpnsrvmsg.dll from eventmsg.mc to autoc= onf/mingw builds ...................................................................... add building of openvpnsrvmsg.dll from eventmsg.mc to autoconf/mingw builds commit 06919a60ae61 introduces .mc files that need to be compiled to .h and .bin by the windows "mc.exe" tool, and from there into a new .dll Add logic to configure.ac to find the "windmc" binary in the linux or mingw variants, add rules to src/openvpnserv/Makefile.am so make knows what to do. Libtool is getting in the way when "openvpnsrvmsg.dll" is created as anything listed in ...BIN or ...LIB, so decare it as "DATA" and make the necessary rules explicit. See also: https://learn.microsoft.com/en-us/cpp/build/creating-a-resource-only-dll?vi= ew=3Dmsvc-170 Change-Id: I071e8190dac28f429257b8af1c6f9e68f8896bc0 Signed-off-by: Gert Doering --- M configure.ac M src/openvpnserv/Makefile.am 2 files changed, 13 insertions(+), 0 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/97/1197/2 diff --git a/configure.ac b/configure.ac index 7059871..38b14a1 100644 --- a/configure.ac +++ b/configure.ac @@ -441,6 +441,7 @@ AC_DEFINE_UNQUOTED([IPROUTE_PATH], ["$IPROUTE"], [Path to iproute tool]) AC_DEFINE_UNQUOTED([ROUTE_PATH], ["$ROUTE"], [Path to route tool]) AC_DEFINE_UNQUOTED([SYSTEMD_ASK_PASSWORD_PATH], ["$SYSTEMD_ASK_PASSWORD"],= [Path to systemd-ask-password tool]) +AC_CHECK_TOOLS([WINDMC], [windmc mc.exe],[no]) # # man page generation - based on python-docutils diff --git a/src/openvpnserv/Makefile.am b/src/openvpnserv/Makefile.am index ef5f3f3..d475186 100644 --- a/src/openvpnserv/Makefile.am +++ b/src/openvpnserv/Makefile.am @@ -28,6 +28,10 @@ openvpnserv_LDADD =3D \ -ladvapi32 -luserenv -liphlpapi -lfwpuclnt -lrpcrt4 \ -lshlwapi -lnetapi32 -lws2_32 -lntdll -lole32 +noinst_DATA =3D \ + MSG00409.bin eventmsg.h eventmsg.rc openvpnservmsg.dll +BUILT_SOURCES =3D \ + eventmsg.h endif openvpnserv_SOURCES =3D \ @@ -37,3 +41,11 @@ validate.c validate.h \ $(top_srcdir)/src/openvpn/wfp_block.c $(top_srcdir)/src/openvpn/wfp_block= .h \ openvpnserv_resources.rc + +openvpnservmsg.dll: eventmsg.o + $(CC) -shared -Wl,--entry=3D0 -nostdlib -nostartfiles -o openvpnservmsg.d= ll eventmsg.o + +eventmsg.o: eventmsg.rc + +eventmsg.h: eventmsg.mc + $(WINDMC) -U eventmsg.mc -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1197?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I071e8190dac28f429257b8af1c6f9e68f8896bc0 Gerrit-Change-Number: 1197 Gerrit-PatchSet: 2 Gerrit-Owner: cron2 Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: flichtenheld Gerrit-MessageType: newpatchset --hvsFcMAsY6k= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: flichtenheld, plaisthos.

cron2 uploaded patch set #2 to this change.

View Change

add building of openvpnsrvmsg.dll from eventmsg.mc to autoconf/mingw bui=
lds

commit 06919a60ae61 introduces .mc files that need to be compile= d to
.h and .bin by the windows "mc.exe" tool, and from there = into a new
.dll

Add logic to configure.ac to find the "windm= c" binary in the linux or
mingw variants, add rules to src/openvpns= erv/Makefile.am so make knows
what to do.

Libtool is getting in t= he way when "openvpnsrvmsg.dll" is created as
anything listed = in ...BIN or ...LIB, so decare it as "DATA" and make
the neces= sary rules explicit.

See also:
https://learn.microsoft.com/en-us/= cpp/build/creating-a-resource-only-dll?view=3Dmsvc-170

Change-Id: I0= 71e8190dac28f429257b8af1c6f9e68f8896bc0
Signed-off-by: Gert Doering <= gert@...1296...>
---
M configure.ac
M src/openvpnserv/Makefile.= am
2 files changed, 13 insertions(+), 0 deletions(-)

git pull =
ssh://gerrit.openvpn.net:29418/openvpn refs/changes/97/1197/2
diff =
--git a/configure.ac b/configure.ac
index 7059871..38b14a1 = 100644
--- a/configure.ac
+++ b/configure.a= c
@@ -441,6 +441,7 @@
AC_DEFINE_UNQUOTED([= IPROUTE_PATH], ["$IPROUTE"], [Path to iproute tool])
AC_DEFINE_UNQUOTED([ROUTE_PATH], ["$ROUTE"], [Path to route = tool])
AC_DEFINE_UNQUOTED([SYSTEMD_ASK_PASSWORD_PATH], [&q= uot;$SYSTEMD_ASK_PASSWORD"], [Path to systemd-ask-password tool])
+AC_CHECK_TOOLS([WINDMC],= [windmc mc.exe],[no])

#
# man page generation - based on python-docutils

diff --= git a/src/openvpnserv/Makefile.am b/src/openvpnserv/Makefile.am
<= span>index ef5f3f3..d475186 100644
--- a/src/openvpnserv/Ma= kefile.am
+++ b/src/openvpnserv/Makefile.am
@@ -28,6 +28,10 @@
openvpnserv_LDADD =3D \
-ladvapi32 -luserenv -liphlpapi -lfwpuclnt -lrpcrt4 \
= -lshlwapi -lnetapi32 -lws2_32 -lntdll -lole32
+noinst_DATA =3D \
+ MSG00409.bin eventmsg.h eventmsg.rc openvpnservms= g.dll
+BUILT_SOURCES = =3D \
+ eventmsg.h

endif

openvpnserv_SOURCES= =3D \
@@ -37,3 +41,11 @@
validate.c vali= date.h \
$(top_srcdir)/src/openvpn/wfp_block.c $(top_srcd= ir)/src/openvpn/wfp_block.h \
openvpnserv_resources.rc
+
+openvpnservmsg.dll: eventmsg.o
= + $(CC) -shared -Wl,--entry=3D0= -nostdlib -nostartfiles -o openvpnservmsg.dll eventmsg.o
+
+eventmsg.o: eventmsg.rc
+
+eventmsg.h: eventmsg.mc
+ $(WINDMC) -U eventmsg.mc

To vi= ew, visit change 1197. To unsubscribe, or for help writing mail filters, visit = settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I071e8190dac28f429257b8af1c6= f9e68f8896bc0
Gerrit-Change-Number: 1197
Gerrit-PatchSet: 2
Gerrit-Owner: cron2 <gert@...1296...>
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
Gerrit-Attention: flichtenheld <frank@...2375...= 41...>
Gerrit-MessageType: newpatchset
--hvsFcMAsY6k=--