You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2019/12/10 18:01:41 UTC

[GitHub] [nifi-minifi-cpp] bakaid commented on a change in pull request #692: MINIFICPP-1099 - Fix Windows MSI build

bakaid commented on a change in pull request #692: MINIFICPP-1099 - Fix Windows MSI build
URL: https://github.com/apache/nifi-minifi-cpp/pull/692#discussion_r356191795
 
 

 ##########
 File path: CMakeLists.txt
 ##########
 @@ -661,27 +661,54 @@ endif()
 # Generate source assembly
 set(ASSEMBLY_BASE_NAME "${CMAKE_PROJECT_NAME}-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
 if(WIN32)
-set(CPACK_ALL_INSTALL_TYPES Full Developer)
-set(CPACK_COMPONENT_LIBRARIES_INSTALL_TYPES Developer Full)
-set(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Developer Full)
-set(CPACK_COMPONENT_APPLICATIONS_INSTALL_TYPES Full)
-set(CPACK_WIX_UI_BANNER "${CMAKE_CURRENT_SOURCE_DIR}/msi/minifi-logo-png-banner.png")
-set(CPACK_WIX_UI_DIALOG "${CMAKE_CURRENT_SOURCE_DIR}/msi/bgr.png")
-
-file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/conf/" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/conf/")
-file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
-file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/README.md" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
-file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/NOTICE" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
-
-if(CMAKE_SIZEOF_VOID_P EQUAL 8)
-    set(CPACK_WIX_EXTRA_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/msi/x64.wsi")
-elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
-set(CPACK_WIX_EXTRA_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/msi/x86.wsi")
-endif()
-    set(CPACK_WIX_TEMPLATE "${CMAKE_CURRENT_SOURCE_DIR}/msi/WixWin.wsi")
+	set(CPACK_ALL_INSTALL_TYPES Full Developer)
+	set(CPACK_COMPONENT_LIBRARIES_INSTALL_TYPES Developer Full)
+	set(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Developer Full)
+	set(CPACK_COMPONENT_APPLICATIONS_INSTALL_TYPES Full)
+	set(CPACK_WIX_UI_BANNER "${CMAKE_CURRENT_SOURCE_DIR}/msi/minifi-logo-png-banner.png")
+	set(CPACK_WIX_UI_DIALOG "${CMAKE_CURRENT_SOURCE_DIR}/msi/bgr.png")
+
+	file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/conf/" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/conf/")
+	file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
+	file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/README.md" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
+	file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/NOTICE" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
+
+	# Determine the path of the VC Redistributable Merge Modules
+	if (DEFINED ENV{VCToolsRedistDir})
+		# Just get the redist dir that has been set by the build environment
+		set(VCRUNTIME_REDIST_DIR $ENV{VCToolsRedistDir})
 
 Review comment:
   This seems like a pretty reliable method with 2017, it is both defined when building directly from Visual Studio, and when using a terminal vcvarsall.bat, but I included the backup method because I am not sure how reliable it is across VS versions.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services