ENH: working package creator
This commit is contained in:
parent
d3691460f5
commit
221a169cb9
|
@ -2,11 +2,12 @@ set(PROCESSORS 2)
|
|||
set(HOST dashmacmini2)
|
||||
set(MAKE_PROGRAM "make")
|
||||
set(MAKE "${MAKE_PROGRAM} -j2")
|
||||
set(CPACK_BINARY_GENERATORS "PackageMaker TGZ TZ")
|
||||
set(CPACK_SOURCE_GENERATORS "TGZ TZ")
|
||||
set(INITIAL_CACHE "
|
||||
CMAKE_BUILD_TYPE:STRING=Release
|
||||
CMAKE_OSX_ARCHITECTURES:STRING=ppc\;i386
|
||||
CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE
|
||||
")
|
||||
set(INSTALLER_SUFFIX "*.dmg")
|
||||
get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||
include(${path}/release_cmake.cmake)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
set(PROCESSORS 1)
|
||||
set(RUN_SHELL "/usr/local/bin/zsh -l")
|
||||
set(RUN_SHELL "/usr/local/bin/zsh -l -c /bin/sh")
|
||||
set(CVS_COMMAND "/usr/local/bin/cvs")
|
||||
set(HOST destiny)
|
||||
set(MAKE_PROGRAM "/usr/local/bin/gmake")
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
set(CVSROOT ":pserver:anonymous@www.cmake.org:/cvsroot/CMake")
|
||||
get_filename_component(SCRIPT_PATH "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||
|
||||
# default to self extracting tgz, tgz, and tar.Z
|
||||
if(NOT DEFINED CPACK_BINARY_GENERATORS)
|
||||
set(CPACK_BINARY_GENERATORS "STGZ TGZ TZ")
|
||||
endif(NOT DEFINED CPACK_BINARY_GENERATORS)
|
||||
if(DEFINED EXTRA_COPY)
|
||||
set(HAS_EXTRA_COPY 1)
|
||||
endif(DEFINED EXTRA_COPY)
|
||||
|
@ -22,9 +26,6 @@ endif(NOT DEFINED MAKE)
|
|||
if(NOT DEFINED RUN_SHELL)
|
||||
set(RUN_SHELL "/bin/sh")
|
||||
endif(NOT DEFINED RUN_SHELL)
|
||||
if(NOT DEFINED INSTALLER_SUFFIX)
|
||||
set(INSTALLER_SUFFIX "*.sh")
|
||||
endif(NOT DEFINED INSTALLER_SUFFIX)
|
||||
if(NOT DEFINED PROCESSORS)
|
||||
set(PROCESSORS 1)
|
||||
endif(NOT DEFINED PROCESSORS)
|
||||
|
@ -77,13 +78,40 @@ configure_file(${SCRIPT_PATH}/release_cmake.sh.in ${SCRIPT_FILE} @ONLY)
|
|||
remote_command("run release_cmake-${HOST}.sh on server"
|
||||
"${RUN_SHELL}" ${SCRIPT_FILE})
|
||||
|
||||
message("copy the .gz file back from the machine")
|
||||
message("scp ${HOST}:${FINAL_PATH}/*.gz .")
|
||||
execute_process(COMMAND scp ${HOST}:${FINAL_PATH}/*.gz .
|
||||
RESULT_VARIABLE result)
|
||||
|
||||
message("copy the ${INSTALLER_SUFFIX} file back from the machine")
|
||||
message("scp ${HOST}:${FINAL_PATH}/${INSTALLER_SUFFIX} .")
|
||||
execute_process(COMMAND scp ${HOST}:${FINAL_PATH}/${INSTALLER_SUFFIX} .
|
||||
RESULT_VARIABLE result)
|
||||
|
||||
# now figure out which types of packages were created
|
||||
set(generators ${CPACK_BINARY_GENERATORS} ${CPACK_SOURCE_GENERATORS})
|
||||
separate_arguments(generators)
|
||||
foreach(gen ${generators})
|
||||
if("${gen}" STREQUAL "TGZ")
|
||||
set(SUFFIXES ${SUFFIXES} "*.tar.gz")
|
||||
endif("${gen}" STREQUAL "TGZ")
|
||||
if("${gen}" STREQUAL "STGZ")
|
||||
set(SUFFIXES ${SUFFIXES} "*.sh")
|
||||
endif("${gen}" STREQUAL "STGZ")
|
||||
if("${gen}" STREQUAL "PackageMaker")
|
||||
set(SUFFIXES ${SUFFIXES} "*.dmg")
|
||||
endif("${gen}" STREQUAL "PackageMaker")
|
||||
if("${gen}" STREQUAL "TBZ2")
|
||||
set(SUFFIXES ${SUFFIXES} "*.tar.bz2")
|
||||
endif("${gen}" STREQUAL "TBZ2")
|
||||
if("${gen}" STREQUAL "TZ")
|
||||
set(SUFFIXES ${SUFFIXES} "*.tar.Z")
|
||||
endif("${gen}" STREQUAL "TZ")
|
||||
if("${gen}" STREQUAL "ZIP")
|
||||
set(SUFFIXES ${SUFFIXES} "*.zip")
|
||||
endif("${gen}" STREQUAL "ZIP")
|
||||
if("${gen}" STREQUAL "NSIS")
|
||||
set(SUFFIXES ${SUFFIXES} "*.exe")
|
||||
endif("${gen}" STREQUAL "NSIS")
|
||||
endforeach(gen)
|
||||
# copy all the files over from the remote machine
|
||||
set(PROJECT_PREFIX cmake-)
|
||||
foreach(suffix ${SUFFIXES})
|
||||
message("scp ${HOST}:${FINAL_PATH}/${PROJECT_PREFIX}${suffix} .")
|
||||
execute_process(COMMAND
|
||||
scp ${HOST}:${FINAL_PATH}/${PROJECT_PREFIX}${suffix} .
|
||||
RESULT_VARIABLE result)
|
||||
if(${result} GREATER 0)
|
||||
message("error getting file back scp ${HOST}:${FINAL_PATH}/${PROJECT_PREFIX}${suffix} .")
|
||||
endif(${result} GREATER 0)
|
||||
endforeach(suffix)
|
||||
|
|
|
@ -89,13 +89,23 @@ if [ -z "@SKIP_TESTS@" ]; then
|
|||
check_exit_value $? "Test cmake" || exit 1
|
||||
fi
|
||||
|
||||
echo "Run package"
|
||||
./bin/cpack -D CMAKE_MAKE_PROGRAM=@MAKE_PROGRAM@
|
||||
check_exit_value $? "Package cmake" || exit 1
|
||||
# loop over binary generators
|
||||
generators="@CPACK_BINARY_GENERATORS@"
|
||||
for GEN in $generators; do
|
||||
echo "Create $GEN package"
|
||||
./bin/cpack -D CMAKE_MAKE_PROGRAM=@MAKE_PROGRAM@ -G $GEN
|
||||
check_exit_value $? "Create $GEN package" || exit 1
|
||||
done
|
||||
|
||||
# loop over source generators
|
||||
generators="@CPACK_SOURCE_GENERATORS@"
|
||||
for GEN in $generators; do
|
||||
echo "Create $GEN package"
|
||||
./bin/cpack -D CMAKE_MAKE_PROGRAM=@MAKE_PROGRAM@ -G $GEN --config CPackSourceConfig.cmake
|
||||
check_exit_value $? "Create $GEN package" || exit 1
|
||||
done
|
||||
|
||||
|
||||
echo "Create Tar.gz"
|
||||
./bin/cpack -D CMAKE_MAKE_PROGRAM=@MAKE_PROGRAM@ -G TGZ
|
||||
check_exit_value $? "Create TGZ" || exit 1
|
||||
|
||||
# need to add an extra copy thing here
|
||||
if [ ! -z "@EXTRA_COPY@" ]; then
|
||||
|
|
|
@ -3,7 +3,8 @@ set(CONFIGURE_WITH_CMAKE TRUE)
|
|||
set(CMAKE_CONFIGURE_PATH "c:/Hoffman/My\\ Builds/CMakeVSNMake71Dev/bin/cmake.exe")
|
||||
set(PROCESSORS 1)
|
||||
set(HOST vogon)
|
||||
set(INSTALLER_SUFFIX "*.exe")
|
||||
set(CPACK_BINARY_GENERATORS "NSIS ZIP")
|
||||
set(CPACK_SOURCE_GENERATORS "ZIP")
|
||||
set(MAKE_PROGRAM "nmake")
|
||||
set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release
|
||||
CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE
|
||||
|
|
Loading…
Reference in New Issue