Skip to contentSkip to conversation

Update system tray to populate Windows VPN flyout

PATCH New Kevin Kane 1 participant 1 message Jul 25, 2018 Kbuild

lore
Share & tools
lore

Kevin Kane

author
#0 lore raw

PATCH v2 1/1 Update system tray to populate Windows VPN flyout

Add a DLL to be wired in as a custom dialer, which introduces new build dependencies Add copyright notices as required where Microsoft has contributed code

---
 .gitignore   |   3 +
 BUILD.rst    |   1 +
 Makefile.am  |  10 ++-
 configure.ac |   4 ++
 dialer.c     | 171 +++++++++++++++++++++++++++++++++++++++++++++++++++
 tray.c       | 117 +++++++++++++++++++++++++++++++++++
 tray.h       |   2 +
 7 files changed, 307 insertions(+), 1 deletion(-)
 create mode 100644 dialer.c
.gitignore +3 -0
index ac37772..e36e0a6 100644
@@ -10,6 +10,8 @@
 *.log
 *.tar.gz
 *.bak
+*.lo
+*.la
 
 .deps
 Makefile
@@ -30,3 +32,4 @@ depcomp
 stamp-h1
 install-sh
 missing
+libtool
BUILD.rst +1 -0
index 9354784..3c70b52 100644
@@ -24,6 +24,7 @@ their dependencies. You can install these packages using the standard
 - mingw64-x86_64-gcc-core
 - mingw64-x86_64-g++
 - mingw64-x86_64-openssl
+- libtool
 
 
 Build
Makefile.am +9 -1
index 8301087..d8435ed 100644
@@ -2,6 +2,7 @@
 #
 #  Copyright (C) 2004 Mathias Sundman <[email protected]...>
 #                2010 Heiko Hund <[email protected]...>
+#  Portions Copyright (C) 2018 Microsoft Corporation
 #
 #  This program is free software; you can redistribute it and/or modify
 #  it under the terms of the GNU General Public License as published by
@@ -22,6 +23,7 @@ RCCOMPILE = $(WINDRES) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
     $(AM_CPPFLAGS) $(CPPFLAGS)
 
 AUTOMAKE_OPTIONS = foreign 1.9
+ACLOCAL_AMFLAGS = -I m4
 
 MAINTAINERCLEANFILES = \
 	config.log config.status \
@@ -106,7 +108,13 @@ openvpn_gui_LDADD = \
 	-lnetapi32 \
 	-lole32 \
 	-lshlwapi \
-	-lsecur32
+	-lsecur32 \
+	-lrasapi32
 
 openvpn-gui-res.o: $(openvpn_gui_RESOURCES) $(srcdir)/openvpn-gui-res.h
 	$(RCCOMPILE) -i $< -o $@
+
+lib_LTLIBRARIES              = libopenvpndialer.la
+libopenvpndialer_la_SOURCES  = dialer.c
+libopenvpndialer_la_LDFLAGS  = -no-undefined
+libopenvpndialer_la_LIBADD   = -lrasapi32
\ No newline at end of file
configure.ac +4 -0
index 9a2ba75..4fe6b81 100644
@@ -2,6 +2,7 @@ dnl  OpenVPN-GUI -- A Windows GUI for OpenVPN.
 dnl
 dnl  Copyright (C) 2004 Mathias Sundman <[email protected]...>
 dnl                2010 Heiko Hund <[email protected]...>
+dnl  Portions Copyright (C) 2018 Microsoft Corporation
 dnl
 dnl  This program is free software; you can redistribute it and/or modify
 dnl  it under the terms of the GNU General Public License as published by
@@ -29,10 +30,13 @@ AC_DEFINE([CORE_COPYRIGHT_YEAR_END], ["2018"], [Last copyright year for daemon i
 AC_CONFIG_AUX_DIR([.])
 AM_CONFIG_HEADER([config.h])
 AC_CONFIG_SRCDIR([main.h])
+AC_CONFIG_MACRO_DIRS([m4])
 AM_INIT_AUTOMAKE
 AC_CANONICAL_HOST
 AC_USE_SYSTEM_EXTENSIONS
 AC_PROG_CC_C99
+LT_INIT([win32-dll])
+AC_LIBTOOL_WIN32_DLL
 AC_CHECK_TOOL([WINDRES], [windres])
 
 AC_ARG_ENABLE(
dialer.c new file +171 -0

171 lines not on this page · raw message

tray.c +117 -0

159 lines not on this page · raw message

tray.h +2 -0
index 1ce5e07..f5a9ff4 100644
@@ -3,6 +3,7 @@
  *
  *  Copyright (C) 2004 Mathias Sundman <[email protected]...>
  *                2010 Heiko Hund <[email protected]...>
+ *  Portions Copyright (C) 2018 Microsoft Corporation
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -51,5 +52,6 @@ void SetMenuStatus(connection_t *, conn_state_t);
 void SetServiceMenuStatus();
 void ShowTrayBalloon(TCHAR *, TCHAR *);
 void CheckAndSetTrayIcon();
+void ClearNetworkFlyout();
 
 #endif
Signature · 1 line
2.17.1.windows.2