szaszm commented on a change in pull request #1203:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1203#discussion_r736429795



##########
File path: CMakeLists.txt
##########
@@ -808,14 +809,28 @@ else()
 endif()
 set(CPACK_PACKAGE_INSTALL_DIRECTORY "ApacheNiFiMiNiFi")
 set(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
-set(CPACK_RDKAFKA_COMPONENT_INSTALL ON)
-set(CPACK_MQTT_COMPONENT_INSTALL ON)
+
+
+# !WARNING! we need to manually add to CPACK_COMPONENTS_ALL otherwise
+# all components specified in "install" directives are added
+# (including thirdparties like range-v3)
+
+list(APPEND CPACK_COMPONENTS_ALL bin)
+cpack_add_component(bin REQUIRED)
 if(WIN32)
-       set(CPACK_COMPONENTS_ALL bin conf minifijni tzdata)
+       list(APPEND CPACK_COMPONENTS_ALL tzdata)
+       cpack_add_component(tzdata)
 else()
-       set(CPACK_COMPONENTS_ALL bin conf minifijni)
+       list(APPEND CPACK_COMPONENTS_ALL conf)
+       cpack_add_component(conf REQUIRED)
 endif()

Review comment:
       Could you add some display names? I think it would look nicer in the 
generated MSI.
   
   ```c++
   list(APPEND CPACK_COMPONENTS_ALL bin)
   cpack_add_component(bin DISPLAY_NAME "MiNiFi C++ executables" REQUIRED)
   if(WIN32)
        list(APPEND CPACK_COMPONENTS_ALL tzdata)
        cpack_add_component(tzdata DISPLAY_NAME "Timezone database for 
Expression Language")
   else()
        list(APPEND CPACK_COMPONENTS_ALL conf)
        cpack_add_component(conf REQUIRED DISPLAY_NAME "Default configuration 
files")
   endif()
   ```
   
   current screenshot of an MSI:
   
![2021-10-26-132251_496x387_scrot](https://user-images.githubusercontent.com/1170582/138869146-b2a8c846-0d51-4387-9ebe-575f5419656e.png)
   

##########
File path: CMakeLists.txt
##########
@@ -808,14 +809,28 @@ else()
 endif()
 set(CPACK_PACKAGE_INSTALL_DIRECTORY "ApacheNiFiMiNiFi")
 set(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
-set(CPACK_RDKAFKA_COMPONENT_INSTALL ON)
-set(CPACK_MQTT_COMPONENT_INSTALL ON)
+
+
+# !WARNING! we need to manually add to CPACK_COMPONENTS_ALL otherwise
+# all components specified in "install" directives are added
+# (including thirdparties like range-v3)
+
+list(APPEND CPACK_COMPONENTS_ALL bin)
+cpack_add_component(bin REQUIRED)
 if(WIN32)
-       set(CPACK_COMPONENTS_ALL bin conf minifijni tzdata)
+       list(APPEND CPACK_COMPONENTS_ALL tzdata)
+       cpack_add_component(tzdata)
 else()
-       set(CPACK_COMPONENTS_ALL bin conf minifijni)
+       list(APPEND CPACK_COMPONENTS_ALL conf)
+       cpack_add_component(conf REQUIRED)
 endif()

Review comment:
       Could you add some display names? I think it would look nicer in the 
generated MSI.
   
   ```c++
   list(APPEND CPACK_COMPONENTS_ALL bin)
   cpack_add_component(bin DISPLAY_NAME "MiNiFi C++ executables" REQUIRED)
   if(WIN32)
        list(APPEND CPACK_COMPONENTS_ALL tzdata)
        cpack_add_component(tzdata DISPLAY_NAME "Timezone database for 
Expression Language")
   else()
        list(APPEND CPACK_COMPONENTS_ALL conf)
        cpack_add_component(conf REQUIRED DISPLAY_NAME "Default configuration 
files")
   endif()
   ```
   
   current screenshot of an MSI GUI:
   
![2021-10-26-132251_496x387_scrot](https://user-images.githubusercontent.com/1170582/138869146-b2a8c846-0d51-4387-9ebe-575f5419656e.png)
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to