[ 
https://issues.apache.org/jira/browse/DRILL-5584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16500974#comment-16500974
 ] 

ASF GitHub Bot commented on DRILL-5584:
---------------------------------------

parthchandra closed pull request #1039: DRILL-5584: Add branding and versioning 
information for windows C++ C…
URL: https://github.com/apache/drill/pull/1039
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/contrib/native/client/src/clientlib/CMakeLists.txt 
b/contrib/native/client/src/clientlib/CMakeLists.txt
index 7b9ecc3c0f..c2bb0b738c 100644
--- a/contrib/native/client/src/clientlib/CMakeLists.txt
+++ b/contrib/native/client/src/clientlib/CMakeLists.txt
@@ -16,6 +16,13 @@
 # limitations under the License.
 #
 
+if(MSVC)
+    configure_file(
+      ${CMAKE_CURRENT_SOURCE_DIR}/version.rc.in
+      ${CMAKE_CURRENT_BINARY_DIR}/version.rc
+      @ONLY)
+endif()
+
 # Drill Client library
 
 set (CLIENTLIB_SRC_FILES
@@ -52,7 +59,9 @@ set_property(
 if(MSVC)
     set(CMAKE_CXX_FLAGS "/EHsc")
     add_definitions(-DDRILL_CLIENT_EXPORTS -D_SCL_SECURE_NO_WARNINGS)
+    add_library(drillClient SHARED ${CLIENTLIB_SRC_FILES} 
${CMAKE_CURRENT_BINARY_DIR}/version.rc)
+else()
+    add_library(drillClient SHARED ${CLIENTLIB_SRC_FILES})
 endif()
 
-add_library(drillClient SHARED ${CLIENTLIB_SRC_FILES} )
 target_link_libraries(drillClient ${Boost_LIBRARIES} ${PROTOBUF_LIBRARY} 
${Zookeeper_LIBRARIES} ${SASL_LIBRARIES} ${OPENSSL_LIBRARIES} protomsgs y2038)
diff --git a/contrib/native/client/src/clientlib/env.h.in 
b/contrib/native/client/src/clientlib/env.h.in
index 746a500a42..85cc778420 100644
--- a/contrib/native/client/src/clientlib/env.h.in
+++ b/contrib/native/client/src/clientlib/env.h.in
@@ -20,7 +20,7 @@
 #define ENV_H
 
 #define DRILL_NAME              "Apache Drill"
-#define DRILL_CONNECTOR_NAME    "Apache Drill C++ client"
+#define DRILL_CONNECTOR_NAME    "Apache Drill C++ Client"
 #define DRILL_VERSION_STRING    "@PROJECT_VERSION@"
 
 #define DRILL_VERSION_MAJOR @PROJECT_VERSION_MAJOR@
@@ -30,6 +30,11 @@
 #define GIT_SHA_PROP  @GIT_SHA_PROP@
 #define GIT_COMMIT_PROP @GIT_COMMIT_PROP@
 
+#define DRILL_LEGALCOPYRIGHT_STR    "Copyright (c) 2013-2017 The Apache 
Software Foundation\0"
+#define DRILL_PRODUCTNAME_STR       DRILL_CONNECTOR_NAME "\0"
+#define DRILL_PRODUCTVERSION_STR    DRILL_VERSION_STRING ".0\0"
+#define DRILL_INTERNALNAME_STR      "drillClient.dll\0"
+
 #endif
 
 
diff --git a/contrib/native/client/src/clientlib/version.rc.in 
b/contrib/native/client/src/clientlib/version.rc.in
new file mode 100644
index 0000000000..c013261cc6
--- /dev/null
+++ b/contrib/native/client/src/clientlib/version.rc.in
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+ #include "env.h"
+ 
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (US) resources.
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 
@PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,0
+ PRODUCTVERSION 
@PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,0
+ FILEFLAGSMASK 0x3fL 
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x0L
+ FILESUBTYPE 0x0L
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "040904b0"
+        BEGIN
+            VALUE "CompanyName", "\0"
+            VALUE "FileDescription", DRILL_PRODUCTNAME_STR
+            VALUE "FileVersion", DRILL_PRODUCTVERSION_STR
+            VALUE "LegalCopyright", DRILL_LEGALCOPYRIGHT_STR
+            VALUE "ProductName", DRILL_PRODUCTNAME_STR
+            VALUE "ProductVersion", DRILL_PRODUCTVERSION_STR
+            VALUE "InternalName", DRILL_INTERNALNAME_STR
+            VALUE "OriginalFilename", DRILL_INTERNALNAME_STR
+            VALUE "LegalTrademarks", "\0"
+        END
+    END
+    BLOCK "VarFileInfo"
+    BEGIN
+        VALUE "Translation", 0x409, 1200
+    END
+END
\ No newline at end of file


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> When Compiling Apache Drill C++ Client, versioning information are not 
> present in the binary
> --------------------------------------------------------------------------------------------
>
>                 Key: DRILL-5584
>                 URL: https://issues.apache.org/jira/browse/DRILL-5584
>             Project: Apache Drill
>          Issue Type: Improvement
>          Components: Client - C++
>    Affects Versions: 1.10.0
>            Reporter: Rob Wu
>            Priority: Minor
>
> We should add support for generating an RC file containing the versioning 
> information so this manual task can be automated.
> Current workaround:
> Compile the C++ Client DLL.
> Open the DLL and manually add a Version Resource with the following 
> information:
> FILEVERSION           1,10,0,0
> PRODUCTVERSION 1,10,0,0
> CompanyName
> FileDescription             Apache Drill C++ Client
> FileVersion                   1.10.0.0
> InternalName                drillClient.dll
> LegalCopyright             Copyright (c) 2013-2017 The Apache Software 
> Foundation
> OriginalFilename          drillClient.dll
> ProductName               Apache Drill C++ Client
> ProductVersion             1.10.0.0



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to