Skip to content

Commit

Permalink
Mac Installer Tweaks
Browse files Browse the repository at this point in the history
Improved display messages.
Fixed "usage" size information.
Generalised known executable list.
Add version information to client tools install folder.
Only fixes rpath for "make install" and "make package"

Signed-off-by: Gordon Smith <[email protected]>
  • Loading branch information
GordonSmith committed Jun 22, 2012
1 parent 38ae22c commit 2ceb50a
Show file tree
Hide file tree
Showing 75 changed files with 152 additions and 125 deletions.
13 changes: 13 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ if ( NOT MAKE_DOCS_ONLY )
HPCC_ADD_SUBDIRECTORY (thorlcr "PLATFORM")
endif()
HPCC_ADD_SUBDIRECTORY (docs "PLATFORM")
HPCC_ADD_SUBDIRECTORY (lib2)

###
## CPack install and packaging setup.
Expand Down Expand Up @@ -279,6 +280,18 @@ else()
message("WARNING: CMAKE 2.8.1 or later required to create RPMs from this project")
endif()

if (APPLE)
set ( CPACK_MONOLITHIC_INSTALL TRUE )
set ( CPACK_PACKAGE_VENDOR "HPCC Systems" )
file(WRITE "${PROJECT_BINARY_DIR}/welcome.txt"
"HPCC Systems - Client Tools\r"
"===========================\r\r"
"This installer will install the HPCC Systems Client Tools.")
set ( CPACK_RESOURCE_FILE_README "${PROJECT_BINARY_DIR}/welcome.txt" )
set ( CPACK_RESOURCE_FILE_LICENSE "${HPCC_SOURCE_DIR}/${LICENSE_FILE}" )
set ( CPACK_PACKAGE_DESCRIPTION_SUMMARY "HPCC Systems Client Tools." )
endif()

###
## Below are the non-compile based install scripts required for
## the hpcc platform.
Expand Down
64 changes: 12 additions & 52 deletions cmake_modules/commonSetup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,11 @@ IF ("${COMMONSETUP_DONE}" STREQUAL "")
endif ()
endif ()

macro(HPCC_ADD_EXECUTABLE target)
add_executable(${target} ${ARGN})
set (executables ${executables} ${target} CACHE INTERNAL "")
endmacro(HPCC_ADD_EXECUTABLE target)

macro(HPCC_ADD_LIBRARY target)
add_library(${target} ${ARGN})
endmacro(HPCC_ADD_LIBRARY target)
Expand Down Expand Up @@ -473,68 +478,23 @@ IF ("${COMMONSETUP_DONE}" STREQUAL "")
###
## The following sets the install directories and names.
###
set ( OSSDIR "${DIR_NAME}" )
if ( PLATFORM )
set ( OSSDIR "${DIR_NAME}" )
else()
set ( OSSDIR "${DIR_NAME}/${version}/clienttools" )
endif()
set ( CPACK_INSTALL_PREFIX "${PREFIX}" )
set ( CPACK_PACKAGING_INSTALL_PREFIX "${PREFIX}" )
set ( CMAKE_INSTALL_PREFIX "${PREFIX}" )
SET(CMAKE_SKIP_BUILD_RPATH FALSE)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${OSSDIR}/lib")
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

MACRO (FIXUP_MACPORTS apps dylibs)
foreach(dylib ${dylibs})
get_filename_component(dylib_path ${dylib} REALPATH)
install(PROGRAMS "${dylib_path}" DESTINATION "${OSSDIR}/lib2")
endforeach(dylib)
foreach(dylib ${dylibs})
get_filename_component(dylib_path ${dylib} REALPATH)
get_filename_component(dylib_name_ext ${dylib_path} NAME)
install(CODE "
execute_process(COMMAND install_name_tool -id \"@loader_path/../lib2/${dylib_name_ext}\" ${CMAKE_INSTALL_PREFIX}/${OSSDIR}/lib2/${dylib_name_ext})
" )
foreach(app ${apps})
#HACK HACK - Could be done generically with some REGEX?
string(REPLACE ".28.0.dylib" ".28.dylib" dylib_28_path "${dylib_path}")
string(REPLACE ".48.1.dylib" ".48.dylib" dylib_48_path "${dylib_path}")
install(CODE "
execute_process(COMMAND install_name_tool -change \"${dylib_path}\" \"@loader_path/../lib2/${dylib_name_ext}\" ${EXECUTABLE_OUTPUT_PATH}/${app})
execute_process(COMMAND install_name_tool -change \"${dylib_28_path}\" \"@loader_path/../lib2/${dylib_name_ext}\" ${EXECUTABLE_OUTPUT_PATH}/${app})
execute_process(COMMAND install_name_tool -change \"${dylib_48_path}\" \"@loader_path/../lib2/${dylib_name_ext}\" ${EXECUTABLE_OUTPUT_PATH}/${app})
" )
endforeach(app)
endforeach(dylib)
ENDMACRO()

if (APPLE)
SET(CMAKE_INSTALL_RPATH "@loader_path/../lib")
set(CMAKE_INSTALL_RPATH "@loader_path/../lib")
set(CMAKE_INSTALL_NAME_DIR "@loader_path/../lib")
set(APPS
"dafilesrv"
"dfuplus"
"ecl"
"ecl-package"
"ecl-queries"
"eclcc"
"eclplus"
"wuget"
)
set(DYLIBS)
if (USE_ICU)
set(DYLIBS ${DYLIBS} ${ICU_LIBRARIES})
endif ()
if (USE_BOOST_REGEX)
set(DYLIBS ${DYLIBS} ${BOOST_REGEX_LIBRARIES})
endif ()
if (USE_XALAN)
set(DYLIBS ${DYLIBS} ${XALAN_LIBRARIES})
endif ()
if (USE_XERCES)
set(DYLIBS ${DYLIBS} ${XERCES_LIBRARIES})
endif ()
FIXUP_MACPORTS("${APPS}" "${DYLIBS}")
endif()

MACRO (FETCH_GIT_TAG workdir edition result)
execute_process(COMMAND "${GIT_COMMAND}" describe --tags --dirty --abbrev=6 --match ${edition}*
WORKING_DIRECTORY "${workdir}"
Expand Down
2 changes: 1 addition & 1 deletion common/fileview2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ set ( SRCS
ADD_DEFINITIONS ( -D_CONSOLE )

if( PLATFORM )
add_executable ( fvserver ${SRCS} )
HPCC_ADD_EXECUTABLE ( fvserver ${SRCS} )
set_target_properties(fvserver PROPERTIES
COMPILE_FLAGS -D_CONSOLE
)
Expand Down
2 changes: 1 addition & 1 deletion common/monitoring/prosysinfo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ set ( SRCS
main.cpp
)

add_executable ( prosysinfo ${SRCS} )
HPCC_ADD_EXECUTABLE ( prosysinfo ${SRCS} )
install ( TARGETS prosysinfo DESTINATION ${OSSDIR}/bin )
2 changes: 1 addition & 1 deletion dali/dafilesrv/dafilesrv.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ if (WIN32)
set (CMAKE_EXE_LINKER_FLAGS "/STACK:65536 ${CMAKE_EXE_LINKER_FLAGS}")
endif()

add_executable ( dafilesrv ${SRCS} )
HPCC_ADD_EXECUTABLE ( dafilesrv ${SRCS} )
set_target_properties (dafilesrv PROPERTIES COMPILE_FLAGS -D_CONSOLE)
install ( TARGETS dafilesrv DESTINATION ${OSSDIR}/bin )
target_link_libraries ( dafilesrv
Expand Down
2 changes: 1 addition & 1 deletion dali/dafilesrv/dafscontrol.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ include_directories (
./../../common/environment
)

add_executable ( dafscontrol ${SRCS} )
HPCC_ADD_EXECUTABLE ( dafscontrol ${SRCS} )
set_target_properties (dafscontrol PROPERTIES COMPILE_FLAGS -D_CONSOLE)
install ( TARGETS dafscontrol DESTINATION ${OSSDIR}/bin )
target_link_libraries ( dafscontrol
Expand Down
2 changes: 1 addition & 1 deletion dali/daliadmin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ include_directories (

ADD_DEFINITIONS( -D_CONSOLE )

add_executable ( daliadmin ${SRCS} )
HPCC_ADD_EXECUTABLE ( daliadmin ${SRCS} )
install ( TARGETS daliadmin DESTINATION ${OSSDIR}/bin )
target_link_libraries ( daliadmin
jlib
Expand Down
2 changes: 1 addition & 1 deletion dali/dalidiag/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ include_directories (

ADD_DEFINITIONS( -D_CONSOLE )

add_executable ( dalidiag ${SRCS} )
HPCC_ADD_EXECUTABLE ( dalidiag ${SRCS} )
install ( TARGETS dalidiag DESTINATION ${OSSDIR}/bin )
target_link_libraries ( dalidiag
jlib
Expand Down
2 changes: 1 addition & 1 deletion dali/dalistop/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ include_directories (

ADD_DEFINITIONS( -D_CONSOLE )

add_executable ( dalistop ${SRCS} )
HPCC_ADD_EXECUTABLE ( dalistop ${SRCS} )
install ( TARGETS dalistop DESTINATION ${OSSDIR}/bin )
target_link_libraries ( dalistop
jlib
Expand Down
2 changes: 1 addition & 1 deletion dali/datest/datest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ include_directories (
./../../system/jlib
)

add_executable ( datest ${SRCS} )
HPCC_ADD_EXECUTABLE ( datest ${SRCS} )
set_target_properties (datest PROPERTIES COMPILE_FLAGS -D_CONSOLE)
target_link_libraries ( datest
jlib
Expand Down
2 changes: 1 addition & 1 deletion dali/datest/dfuwutest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ include_directories (
../../common/environment
)

add_executable ( dfuwutest ${SRCS} )
HPCC_ADD_EXECUTABLE ( dfuwutest ${SRCS} )
set_target_properties (dfuwutest PROPERTIES COMPILE_FLAGS -D_CONSOLE)
target_link_libraries ( dfuwutest
workunit
Expand Down
2 changes: 1 addition & 1 deletion dali/daunittest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ include_directories (

ADD_DEFINITIONS( -D_CONSOLE )

add_executable ( daunittest ${SRCS} )
HPCC_ADD_EXECUTABLE ( daunittest ${SRCS} )
target_link_libraries ( daunittest
jlib
mp
Expand Down
2 changes: 1 addition & 1 deletion dali/dfu/dfuserver.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ include_directories (
./../../common/workunit
)

add_executable ( dfuserver ${SRCS} )
HPCC_ADD_EXECUTABLE ( dfuserver ${SRCS} )
set_target_properties ( dfuserver PROPERTIES
COMPILE_FLAGS "-D_CONSOLE -D_DFUSERVER"
)
Expand Down
2 changes: 1 addition & 1 deletion dali/dfuplus/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ set_source_files_properties (dfuplus.cpp PROPERTIES COMPILE_FLAGS -DDAFILESRV_LO

ADD_DEFINITIONS( -D_CONSOLE )

add_executable ( dfuplus ${SRCS} )
HPCC_ADD_EXECUTABLE ( dfuplus ${SRCS} )
add_dependencies ( dfuplus espscm )
install ( TARGETS dfuplus DESTINATION ${OSSDIR}/bin )
target_link_libraries ( dfuplus
Expand Down
2 changes: 1 addition & 1 deletion dali/dfuxref/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ include_directories (

ADD_DEFINITIONS ( -D_CONSOLE -DMAIN_DFUXREF )

add_executable ( dfuxref ${SRCS} )
HPCC_ADD_EXECUTABLE ( dfuxref ${SRCS} )
install ( TARGETS dfuxref DESTINATION ${OSSDIR}/bin )
target_link_libraries ( dfuxref
jlib
Expand Down
2 changes: 1 addition & 1 deletion dali/ft/ftslave.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ include_directories (
./../../system/jlib
)

add_executable ( ftslave ${SRCS} )
HPCC_ADD_EXECUTABLE ( ftslave ${SRCS} )
set_target_properties (ftslave PROPERTIES COMPILE_FLAGS -D_CONSOLE)
install ( TARGETS ftslave DESTINATION ${OSSDIR}/bin )
target_link_libraries ( ftslave
Expand Down
2 changes: 1 addition & 1 deletion dali/hellodali/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ include_directories (

ADD_DEFINITIONS( -D_CONSOLE )

add_executable ( hellodali ${SRCS} )
HPCC_ADD_EXECUTABLE ( hellodali ${SRCS} )
install ( TARGETS hellodali DESTINATION ${OSSDIR}/bin )
target_link_libraries ( hellodali
jlib
Expand Down
2 changes: 1 addition & 1 deletion dali/regress/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ include_directories (

ADD_DEFINITIONS( -D_CONSOLE )

add_executable ( daregress ${SRCS} )
HPCC_ADD_EXECUTABLE ( daregress ${SRCS} )
install ( TARGETS daregress DESTINATION ${OSSDIR}/bin )
target_link_libraries ( daregress
jlib
Expand Down
4 changes: 2 additions & 2 deletions dali/sasha/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ if (WIN32)
endif ()
endif()

add_executable ( saserver ${SRCS} )
HPCC_ADD_EXECUTABLE ( saserver ${SRCS} )
install ( TARGETS saserver DESTINATION ${OSSDIR}/bin)


Expand Down Expand Up @@ -103,7 +103,7 @@ include_directories (

ADD_DEFINITIONS ( -D_CONSOLE )

add_executable ( sasha ${SRCS} )
HPCC_ADD_EXECUTABLE ( sasha ${SRCS} )
install ( TARGETS sasha DESTINATION ${OSSDIR}/bin)

target_link_libraries ( sasha
Expand Down
2 changes: 1 addition & 1 deletion dali/server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ if (WIN32)
endif ()
endif()

add_executable ( daserver ${SRCS} )
HPCC_ADD_EXECUTABLE ( daserver ${SRCS} )
install ( TARGETS daserver DESTINATION ${OSSDIR}/bin)
target_link_libraries ( daserver
jlib
Expand Down
2 changes: 1 addition & 1 deletion dali/treeview/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ if (WIN32)
)

add_definitions("-D_AFXDLL")
add_executable ( treeview WIN32 ${SRCS} )
HPCC_ADD_EXECUTABLE ( treeview WIN32 ${SRCS} )
install ( TARGETS treeview DESTINATION ${OSSDIR}/bin )
target_link_libraries ( treeview
jlib
Expand Down
2 changes: 1 addition & 1 deletion dali/updtdalienv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ include_directories (

ADD_DEFINITIONS( -D_CONSOLE )

add_executable ( updtdalienv ${SRCS} )
HPCC_ADD_EXECUTABLE ( updtdalienv ${SRCS} )
install ( TARGETS updtdalienv DESTINATION ${OSSDIR}/bin )
target_link_libraries ( updtdalienv
jlib
Expand Down
2 changes: 1 addition & 1 deletion deployment/configgen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ include_directories (

ADD_DEFINITIONS ( -D_CONSOLE )

add_executable ( configgen ${SRCS} )
HPCC_ADD_EXECUTABLE ( configgen ${SRCS} )
install ( TARGETS configgen DESTINATION ${OSSDIR}/sbin )
target_link_libraries ( configgen
deploy
Expand Down
2 changes: 1 addition & 1 deletion deployment/envgen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ include_directories (

ADD_DEFINITIONS ( -D_CONSOLE )

add_executable ( envgen ${SRCS} )
HPCC_ADD_EXECUTABLE ( envgen ${SRCS} )
install ( TARGETS envgen DESTINATION ${OSSDIR}/sbin )
target_link_libraries ( envgen
deploy
Expand Down
2 changes: 1 addition & 1 deletion ecl/agentexec/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ include_directories (

ADD_DEFINITIONS( -D_CONSOLE )

add_executable ( agentexec ${SRCS} )
HPCC_ADD_EXECUTABLE ( agentexec ${SRCS} )
install ( TARGETS agentexec DESTINATION ${OSSDIR}/bin )
target_link_libraries ( agentexec
jlib
Expand Down
2 changes: 1 addition & 1 deletion ecl/agentexec/agentexec.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ include_directories (

ADD_DEFINITIONS ( -D_CONSOLE )

add_executable ( agentexec ${SRCS} )
HPCC_ADD_EXECUTABLE ( agentexec ${SRCS} )
install ( TARGETS agentexec DESTINATION ${OSSDIR}/bin )

target_link_libraries ( agentexec
Expand Down
2 changes: 1 addition & 1 deletion ecl/ecl-package/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ include_directories (

ADD_DEFINITIONS( -D_CONSOLE )

add_executable ( ecl-package ${SRCS} )
HPCC_ADD_EXECUTABLE ( ecl-package ${SRCS} )
add_dependencies ( ecl-package espscm ws_packageprocess )
install ( TARGETS ecl-package DESTINATION ${DIR_NAME}/bin )
target_link_libraries ( ecl-package
Expand Down
2 changes: 1 addition & 1 deletion ecl/eclagent/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ include_directories (

ADD_DEFINITIONS( -DNO_SYBASE -D_CONSOLE )

add_executable ( eclagent ${SRCS} )
HPCC_ADD_EXECUTABLE ( eclagent ${SRCS} )
install ( TARGETS eclagent DESTINATION ${OSSDIR}/bin )
target_link_libraries ( eclagent
hthor
Expand Down
2 changes: 1 addition & 1 deletion ecl/eclcc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ if (WIN32)
set (CMAKE_EXE_LINKER_FLAGS "/STACK:10000000 ${CMAKE_EXE_LINKER_FLAGS}")
endif()

add_executable ( eclcc ${SRCS} )
HPCC_ADD_EXECUTABLE ( eclcc ${SRCS} )
install ( TARGETS eclcc DESTINATION ${OSSDIR}/bin )
target_link_libraries ( eclcc
jlib
Expand Down
2 changes: 1 addition & 1 deletion ecl/eclccserver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ include_directories (
./../../system/jlib
)

add_executable ( eclccserver ${SRCS} ${INCLUDES} )
HPCC_ADD_EXECUTABLE ( eclccserver ${SRCS} ${INCLUDES} )
install ( TARGETS eclccserver DESTINATION ${OSSDIR}/bin )

target_link_libraries ( eclccserver
Expand Down
2 changes: 1 addition & 1 deletion ecl/eclcmd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ include_directories (

ADD_DEFINITIONS( -D_CONSOLE )

add_executable ( ecl ${SRCS} )
HPCC_ADD_EXECUTABLE ( ecl ${SRCS} )
add_dependencies ( ecl espscm workunit ws_workunits )
install ( TARGETS ecl DESTINATION ${OSSDIR}/bin )
target_link_libraries ( ecl
Expand Down
2 changes: 1 addition & 1 deletion ecl/eclcmd/queries/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ include_directories (

ADD_DEFINITIONS( -D_CONSOLE )

add_executable ( ecl-queries ${SRCS} )
HPCC_ADD_EXECUTABLE ( ecl-queries ${SRCS} )
add_dependencies ( ecl-queries espscm ws_workunits )
install ( TARGETS ecl-queries DESTINATION ${DIR_NAME}/bin )
target_link_libraries ( ecl-queries
Expand Down
Loading

0 comments on commit 2ceb50a

Please sign in to comment.