[Openvpn-devel,1/5] Set output name to libopenvpnmsica.dll in MSVC builds too

Message ID 20181016102627.18676-1-simon@rozman.si
State Accepted
Headers show
Series [Openvpn-devel,1/5] Set output name to libopenvpnmsica.dll in MSVC builds too | expand

Commit Message

Simon Rozman Oct. 15, 2018, 11:26 p.m. UTC
On MinGW builds, the Libtool produces libopenvpnmsica.dll. The MSVC
properties were updated to match this.
---
 src/openvpnmsica/openvpnmsica.props        | 4 +++-
 src/openvpnmsica/openvpnmsica_resources.rc | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

Comments

Samuli Seppänen Oct. 30, 2018, 1:24 a.m. UTC | #1
Hi,

I build-tested with all of these patches using the openvpn-build VM in
Vagrant[1]. After the build libopenvpnmsica.dll and tapctl.exe show up
under tmp/installer/<arch>. So the build part is definitely working
correctly.

How would I test that both of the above are operating as intended?

Also, could a (Windows-oriented) person do a code review?
Simon Rozman Nov. 1, 2018, 12:54 a.m. UTC | #2
Hi,

> I build-tested with all of these patches using the openvpn-build VM in
> Vagrant[1]. After the build libopenvpnmsica.dll and tapctl.exe show up
> under tmp/installer/<arch>. So the build part is definitely working
> correctly.
>
> How would I test that both of the above are operating as intended?

For the libopenvpnmsica.dll, testing could have been introduced using some 
unit test suite. Unfortunately, it so tightly integrates with Microsoft 
Installer, I see no feasible way of mocking it. The way I test is to use debug 
version inside MSI package. The debug version raises MessageBox() on each 
custom action function invocation. This allows me to use elevated Visual 
Studio, locate the msiexec.exe process, attach on it using remote debugging, 
set breakpoints, then click "Ok" in the MessageBox() pop-up to let it run up 
to the first breakpoint. If somebody knows of a better way to test and debug 
MSI custom actions I would be most happy to learn it.

As for the tapctl.exe: this utility is already usable with existing 
TAP-Windows 9.21.2. Just open an elevated command line and play with it on a 
Windows computer that has TAP drivers installed.

Best regards,
Simon
Kristof Provost via Openvpn-devel Nov. 8, 2018, 11:34 a.m. UTC | #3
This looks pretty straightforward to me.

-----Original Message-----
From: Simon Rozman <simon@rozman.si> 

Sent: Tuesday, October 16, 2018 3:26 AM
To: openvpn-devel@lists.sourceforge.net
Subject: [Openvpn-devel] [PATCH 1/5] Set output name to libopenvpnmsica.dll in MSVC builds too

On MinGW builds, the Libtool produces libopenvpnmsica.dll. The MSVC
properties were updated to match this.
---
 src/openvpnmsica/openvpnmsica.props        | 4 +++-
 src/openvpnmsica/openvpnmsica_resources.rc | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/openvpnmsica/openvpnmsica.props b/src/openvpnmsica/openvpnmsica.props
index 0e31bc4f..fa408296 100644
--- a/src/openvpnmsica/openvpnmsica.props
+++ b/src/openvpnmsica/openvpnmsica.props
@@ -2,7 +2,9 @@
 <Project ToolsVersion="4.0" xmlns="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fschemas.microsoft.com%2Fdeveloper%2Fmsbuild%2F2003&amp;data=02%7C01%7Cjkunkee%40microsoft.com%7C6dd3259ae2044b779b9a08d63351edc6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636752824311161400&amp;sdata=grtBK2tQpY7ZYBNWI%2FaHTJj7RP8JHQ0v%2BaoX1YwLi6o%3D&amp;reserved=0">
   <ImportGroup Label="PropertySheets" />
   <PropertyGroup Label="UserMacros" />
-  <PropertyGroup />
+  <PropertyGroup>
+    <TargetName>lib$(ProjectName)</TargetName>
+  </PropertyGroup>
   <ItemDefinitionGroup>
     <ClCompile>
       <AdditionalIncludeDirectories>..\compat;$(TAP_WINDOWS_HOME)/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
diff --git a/src/openvpnmsica/openvpnmsica_resources.rc b/src/openvpnmsica/openvpnmsica_resources.rc
index ce60b4a1..9e8069f4 100644
--- a/src/openvpnmsica/openvpnmsica_resources.rc
+++ b/src/openvpnmsica/openvpnmsica_resources.rc
@@ -50,7 +50,7 @@ BEGIN
             VALUE "FileVersion", PACKAGE_VERSION ".0"
             VALUE "InternalName", "OpenVPN"
             VALUE "LegalCopyright", "Copyright © The OpenVPN Project" 
-            VALUE "OriginalFilename", "openvpnmsica.dll"
+            VALUE "OriginalFilename", "libopenvpnmsica.dll"
             VALUE "ProductName", "OpenVPN"
             VALUE "ProductVersion", PACKAGE_VERSION ".0"
         END
-- 
2.19.0.windows.1



_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fopenvpn-devel&amp;data=02%7C01%7Cjkunkee%40microsoft.com%7C6dd3259ae2044b779b9a08d63351edc6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636752824311161400&amp;sdata=6w%2FKO94p9LAx0%2FlamH4McJrCbJnDPwi%2F%2B6PDA6Ax4vY%3D&amp;reserved=0
Gert Doering Jan. 17, 2019, 5:02 a.m. UTC | #4
Taking Jon's "this looks pretty straightforward to me" as an ACK (plus,
it really is, and Samuli has also tested this already :-) ).

Your patch has been applied to the master branch.

commit 864f95c371813a2cd07b886cdc8696cc8b732ee0
Author: Simon Rozman
Date:   Tue Oct 16 12:26:23 2018 +0200

     Set output name to libopenvpnmsica.dll in MSVC builds too

Acked-by: Jon Kunkee <jkunkee@microsoft.com>
     Message-Id: <20181016102627.18676-1-simon@rozman.si>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg17766.html
     Signed-off-by: Gert Doering <gert@greenie.muc.de>


--
kind regards,

Gert Doering

Patch

diff --git a/src/openvpnmsica/openvpnmsica.props b/src/openvpnmsica/openvpnmsica.props
index 0e31bc4f..fa408296 100644
--- a/src/openvpnmsica/openvpnmsica.props
+++ b/src/openvpnmsica/openvpnmsica.props
@@ -2,7 +2,9 @@ 
 <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ImportGroup Label="PropertySheets" />
   <PropertyGroup Label="UserMacros" />
-  <PropertyGroup />
+  <PropertyGroup>
+    <TargetName>lib$(ProjectName)</TargetName>
+  </PropertyGroup>
   <ItemDefinitionGroup>
     <ClCompile>
       <AdditionalIncludeDirectories>..\compat;$(TAP_WINDOWS_HOME)/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
diff --git a/src/openvpnmsica/openvpnmsica_resources.rc b/src/openvpnmsica/openvpnmsica_resources.rc
index ce60b4a1..9e8069f4 100644
--- a/src/openvpnmsica/openvpnmsica_resources.rc
+++ b/src/openvpnmsica/openvpnmsica_resources.rc
@@ -50,7 +50,7 @@  BEGIN
             VALUE "FileVersion", PACKAGE_VERSION ".0"
             VALUE "InternalName", "OpenVPN"
             VALUE "LegalCopyright", "Copyright © The OpenVPN Project" 
-            VALUE "OriginalFilename", "openvpnmsica.dll"
+            VALUE "OriginalFilename", "libopenvpnmsica.dll"
             VALUE "ProductName", "OpenVPN"
             VALUE "ProductVersion", PACKAGE_VERSION ".0"
         END