Revision: 77038
http://sourceforge.net/p/brlcad/code/77038
Author: starseeker
Date: 2020-09-03 17:09:04 +0000 (Thu, 03 Sep 2020)
Log Message:
-----------
Untested as yet, but see if we can key CPack setup on Windows off of what
installer generators we have available.
Modified Paths:
--------------
brlcad/trunk/CMakeLists.txt
brlcad/trunk/misc/CMake/CMakeLists.txt
Added Paths:
-----------
brlcad/trunk/misc/CMake/FindNSIS.cmake
brlcad/trunk/misc/CMake/FindWix.cmake
Modified: brlcad/trunk/CMakeLists.txt
===================================================================
--- brlcad/trunk/CMakeLists.txt 2020-09-03 13:52:11 UTC (rev 77037)
+++ brlcad/trunk/CMakeLists.txt 2020-09-03 17:09:04 UTC (rev 77038)
@@ -3570,20 +3570,24 @@
endif(CPACK_RPM_PACKAGE_RELEASE)
if(WIN32)
- set(CPACK_GENERATOR NSIS)
- set(CPACK_NSIS_PACKAGE_NAME "BRL-CAD")
- set(CPACK_NSIS_INSTALL_DIRECTORY "BRL-CAD ${BRLCAD_VERSION}")
- set(CPACK_SOURCE_DIR "${CMAKE_SOURCE_DIR}")
- set(CPACK_DATA_DIR "${DATA_DIR}")
- set(CPACK_DOC_DIR "${DOC_DIR}")
- # There is a bug in NSI that does not handle full unix paths properly. Make
- # sure there is at least one set of four (4) backslashes.
- set(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/misc/nsis\\\\brlcad.ico")
- set(CPACK_NSIS_MUI_UNIICON
"${CMAKE_SOURCE_DIR}/misc/nsis\\\\uninstall.ico")
- set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
- set(CPACK_NSIS_DISPLAY_NAME "BRL-CAD")
- set(CPACK_NSIS_MODIFY_PATH ON)
- if(BRLCAD_ENABLE_WIX)
+ find_package(NSIS)
+ if (NSIS_FOUND)
+ set(CPACK_GENERATOR ${CPACK_GENERATOR} NSIS)
+ set(CPACK_NSIS_PACKAGE_NAME "BRL-CAD")
+ set(CPACK_NSIS_INSTALL_DIRECTORY "BRL-CAD ${BRLCAD_VERSION}")
+ set(CPACK_SOURCE_DIR "${CMAKE_SOURCE_DIR}")
+ set(CPACK_DATA_DIR "${DATA_DIR}")
+ set(CPACK_DOC_DIR "${DOC_DIR}")
+ # There is a bug in NSI that does not handle full unix paths properly.
Make
+ # sure there is at least one set of four (4) backslashes.
+ set(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/misc/nsis\\\\brlcad.ico")
+ set(CPACK_NSIS_MUI_UNIICON
"${CMAKE_SOURCE_DIR}/misc/nsis\\\\uninstall.ico")
+ set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
+ set(CPACK_NSIS_DISPLAY_NAME "BRL-CAD")
+ set(CPACK_NSIS_MODIFY_PATH ON)
+ endif (NSIS_FOUND)
+ find_package(Wix)
+ if (Wix_FOUND)
# TODO - user report that this version of the installer also supports
# non-graphical installation with the /passive option - need to explore
# custom WiX template option CPACK_WIX_TEMPLATE to match features with
@@ -3593,7 +3597,11 @@
set(CPACK_WIX_PRODUCT_ICON
"${CMAKE_SOURCE_DIR}/misc/wix/brlcad_product.ico")
set(CPACK_WIX_UI_BANNER "${CMAKE_SOURCE_DIR}/misc/wix/brlcad_banner.bmp")
set(CPACK_WIX_UI_DIALOG "${CMAKE_SOURCE_DIR}/misc/wix/brlcad_dialog.bmp")
- endif(BRLCAD_ENABLE_WIX)
+ endif (Wix_FOUND)
+ if (NOT CPACK_GENERATOR)
+ # If nothing else, make a zip file
+ set(CPACK_GENERATOR ZIP)
+ endif (NOT CPACK_GENERATOR)
if(CMAKE_CL_64)
set(CPACK_PACKAGE_FILE_NAME "BRL-CAD_${BRLCAD_VERSION}_win64")
set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "BRL-CAD ${BRLCAD_VERSION} win64")
Modified: brlcad/trunk/misc/CMake/CMakeLists.txt
===================================================================
--- brlcad/trunk/misc/CMake/CMakeLists.txt 2020-09-03 13:52:11 UTC (rev
77037)
+++ brlcad/trunk/misc/CMake/CMakeLists.txt 2020-09-03 17:09:04 UTC (rev
77038)
@@ -28,6 +28,7 @@
FindIlmBase.cmake
FindLEMON.cmake
FindNETPBM.cmake
+ FindNSIS.cmake
FindOPENNURBS.cmake
FindOSL.cmake
FindOpenCL.cmake
@@ -46,6 +47,7 @@
FindUTAHRLE.cmake
FindUUID.cmake
FindVDS.cmake
+ FindWIX.cmake
FindX11.cmake
FindXMLLINT.cmake
FindXSLTPROC.cmake
Added: brlcad/trunk/misc/CMake/FindNSIS.cmake
===================================================================
--- brlcad/trunk/misc/CMake/FindNSIS.cmake (rev 0)
+++ brlcad/trunk/misc/CMake/FindNSIS.cmake 2020-09-03 17:09:04 UTC (rev
77038)
@@ -0,0 +1,32 @@
+#-------------------------------------------------------------------
+# This file is based on the Wix module from the CMake build system
+# for OGRE (Object-oriented Graphics Rendering Engine)
+# For the latest info, see http://www.ogre3d.org/
+#
+# The contents of this file are placed in the public domain. Feel
+# free to make use of it in any way you like.
+#-------------------------------------------------------------------
+
+# - Try to find Nullsoft Scriptable Install System (NSIS)
+# You can help this by defining NSIS_HOME in the environment / CMake
+# Once done, this will define
+#
+# NSIS_FOUND - system has NSIS
+# NSIS_BINARY_DIR - location of the NSIS binaries
+
+include(FindPkgMacros)
+
+# Get path, convert backslashes as ${ENV_${var}}
+getenv_path(NSIS_HOME)
+
+# construct search paths
+set(NSIS_PREFIX_PATH ${NSIS_HOME} ${ENV_NSIS_HOME}
+ "C:/Program Files (x86)/NSIS"
+)
+find_path(NSIS_BINARY_DIR NAMES makensis.exe HINTS ${NSIS_PREFIX_PATH}
PATH_SUFFIXES bin)
+
+if(NSIS_BINARY_DIR)
+ set (NSIS_FOUND TRUE)
+endif()
+
+mark_as_advanced(NSIS_BINARY_DIR NSIS_FOUND)
Property changes on: brlcad/trunk/misc/CMake/FindNSIS.cmake
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: brlcad/trunk/misc/CMake/FindWix.cmake
===================================================================
--- brlcad/trunk/misc/CMake/FindWix.cmake (rev 0)
+++ brlcad/trunk/misc/CMake/FindWix.cmake 2020-09-03 17:09:04 UTC (rev
77038)
@@ -0,0 +1,32 @@
+#-------------------------------------------------------------------
+# This file is part of the CMake build system for OGRE
+# (Object-oriented Graphics Rendering Engine)
+# For the latest info, see http://www.ogre3d.org/
+#
+# The contents of this file are placed in the public domain. Feel
+# free to make use of it in any way you like.
+#-------------------------------------------------------------------
+
+# - Try to find Wix
+# You can help this by defining WIX_HOME in the environment / CMake
+# Once done, this will define
+#
+# Wix_FOUND - system has Wix
+# Wix_BINARY_DIR - location of the Wix binaries
+
+include(FindPkgMacros)
+
+# Get path, convert backslashes as ${ENV_${var}}
+getenv_path(WIX_HOME)
+
+# construct search paths
+set(WIX_PREFIX_PATH ${WIX_HOME} ${ENV_WIX_HOME}
+ "C:/Program Files/Windows Installer XML Toolset 3.0"
+)
+find_path(Wix_BINARY_DIR NAMES candle.exe HINTS ${WIX_PREFIX_PATH}
PATH_SUFFIXES bin)
+
+if(Wix_BINARY_DIR)
+ set (Wix_FOUND TRUE)
+endif()
+
+mark_as_advanced(Wix_BINARY_DIR Wix_FOUND)
\ No newline at end of file
Property changes on: brlcad/trunk/misc/CMake/FindWix.cmake
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits