summaryrefslogtreecommitdiffstats
path: root/Utilities
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2006-05-11 20:07:42 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2006-05-11 20:07:42 (GMT)
commit221a169cb90adee5d4c74408f501ad282ecebc2c (patch)
treea79b9dbf9e69fcfcff2cb60e59134a4f1f5f2b77 /Utilities
parentd3691460f54b79fb1929f084f5f784695ad2e6da (diff)
downloadCMake-221a169cb90adee5d4c74408f501ad282ecebc2c.zip
CMake-221a169cb90adee5d4c74408f501ad282ecebc2c.tar.gz
CMake-221a169cb90adee5d4c74408f501ad282ecebc2c.tar.bz2
ENH: working package creator
Diffstat (limited to 'Utilities')
-rw-r--r--Utilities/Release/dashmacmini2_release.cmake3
-rw-r--r--Utilities/Release/destiny_release.cmake2
-rw-r--r--Utilities/Release/release_cmake.cmake54
-rwxr-xr-xUtilities/Release/release_cmake.sh.in22
-rw-r--r--Utilities/Release/vogon_release.cmake3
5 files changed, 62 insertions, 22 deletions
diff --git a/Utilities/Release/dashmacmini2_release.cmake b/Utilities/Release/dashmacmini2_release.cmake
index db11a77..b4b4d74 100644
--- a/Utilities/Release/dashmacmini2_release.cmake
+++ b/Utilities/Release/dashmacmini2_release.cmake
@@ -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)
diff --git a/Utilities/Release/destiny_release.cmake b/Utilities/Release/destiny_release.cmake
index 4e523d4..886909f 100644
--- a/Utilities/Release/destiny_release.cmake
+++ b/Utilities/Release/destiny_release.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")
diff --git a/Utilities/Release/release_cmake.cmake b/Utilities/Release/release_cmake.cmake
index 2080946..20a6c3d 100644
--- a/Utilities/Release/release_cmake.cmake
+++ b/Utilities/Release/release_cmake.cmake
@@ -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)
diff --git a/Utilities/Release/release_cmake.sh.in b/Utilities/Release/release_cmake.sh.in
index b797ed7..f9ea95e 100755
--- a/Utilities/Release/release_cmake.sh.in
+++ b/Utilities/Release/release_cmake.sh.in
@@ -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
diff --git a/Utilities/Release/vogon_release.cmake b/Utilities/Release/vogon_release.cmake
index 593d6e3..48da7b7 100644
--- a/Utilities/Release/vogon_release.cmake
+++ b/Utilities/Release/vogon_release.cmake
@@ -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