From a95b47154ef0508cb30c82b79dab75526743498a Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 10 Dec 2015 14:57:22 -0500 Subject: [PATCH 1/4] Utilities/Release: Add optional remote launcher to ssh calls --- Utilities/Release/release_cmake.cmake | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Utilities/Release/release_cmake.cmake b/Utilities/Release/release_cmake.cmake index 0a3d324e7..0d9c78458 100644 --- a/Utilities/Release/release_cmake.cmake +++ b/Utilities/Release/release_cmake.cmake @@ -19,6 +19,9 @@ endif() if(NOT DEFINED RUN_SHELL) set(RUN_SHELL "/bin/sh") endif() +if(NOT DEFINED RUN_LAUNCHER) + set(RUN_LAUNCHER "") +endif() if(NOT DEFINED PROCESSORS) set(PROCESSORS 1) endif() @@ -52,11 +55,11 @@ message("Creating CMake release ${CMAKE_CREATE_VERSION} on ${HOST} with parallel macro(remote_command comment command) message("${comment}") if(${ARGC} GREATER 2) - message("ssh ${HOST} ${command}") - execute_process(COMMAND ssh ${HOST} ${command} RESULT_VARIABLE result INPUT_FILE ${ARGV2}) + message("ssh ${HOST} ${RUN_LAUNCHER} ${command}") + execute_process(COMMAND ssh ${HOST} ${RUN_LAUNCHER} ${command} RESULT_VARIABLE result INPUT_FILE ${ARGV2}) else() - message("ssh ${HOST} ${command}") - execute_process(COMMAND ssh ${HOST} ${command} RESULT_VARIABLE result) + message("ssh ${HOST} ${RUN_LAUNCHER} ${command}") + execute_process(COMMAND ssh ${HOST} ${RUN_LAUNCHER} ${command} RESULT_VARIABLE result) endif() if(${result} GREATER 0) message(FATAL_ERROR "Error running command: ${command}, return value = ${result}") From 240b065faa9bc3b1a8dcf073a94028cd473a8c62 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 10 Dec 2015 14:58:11 -0500 Subject: [PATCH 2/4] Utilities/Release: Optionally load environment on remote build server --- Utilities/Release/release_cmake.sh.in | 1 + 1 file changed, 1 insertion(+) diff --git a/Utilities/Release/release_cmake.sh.in b/Utilities/Release/release_cmake.sh.in index 06e720fe1..14651297b 100755 --- a/Utilities/Release/release_cmake.sh.in +++ b/Utilities/Release/release_cmake.sh.in @@ -5,6 +5,7 @@ echo "" echo "remove and create working directory @CMAKE_RELEASE_DIRECTORY@" rm -rf @CMAKE_RELEASE_DIRECTORY@ mkdir @CMAKE_RELEASE_DIRECTORY@ +@ENV@ check_exit_value() { From 083312a8fd39f6ff7a9abc79184e31eb233e8933 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 10 Dec 2015 14:59:09 -0500 Subject: [PATCH 3/4] Utilities/Release: Switch to .msi builder for Windows binary Use a new build machine to produce the Windows binary using the CPack WiX generator to produce a `.msi` installer. --- Help/release/dev/release-windows.rst | 7 +++++++ Tests/CMakeLists.txt | 2 +- Utilities/Release/create-cmake-release.cmake | 2 +- ...2win64_release.cmake => dash3win7_release.cmake} | 13 +++++++------ 4 files changed, 16 insertions(+), 8 deletions(-) create mode 100644 Help/release/dev/release-windows.rst rename Utilities/Release/{dash2win64_release.cmake => dash3win7_release.cmake} (70%) diff --git a/Help/release/dev/release-windows.rst b/Help/release/dev/release-windows.rst new file mode 100644 index 000000000..cc9f2d5a0 --- /dev/null +++ b/Help/release/dev/release-windows.rst @@ -0,0 +1,7 @@ +release-windows +--------------- + +* The precompiled Windows binary provided on ``cmake.org`` is now a + ``.msi`` package instead of an installer executable. One may need + to manually uninstall CMake versions lower than 3.5 before installing + the new package. diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 65bfb77d7..043b7570b 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -685,7 +685,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release endmacro() if(CMAKE_BUILD_NIGHTLY_RELEASES) ADD_NIGHTLY_BUILD_TEST(CMakeNightlyWindows - dash2win64_release.cmake) + dash3win7_release.cmake) ADD_NIGHTLY_BUILD_TEST(CMakeNightlyOSX dashmacmini5_release.cmake) ADD_NIGHTLY_BUILD_TEST(CMakeNightlyLinux32 diff --git a/Utilities/Release/create-cmake-release.cmake b/Utilities/Release/create-cmake-release.cmake index 76057d122..d41c4ecbc 100644 --- a/Utilities/Release/create-cmake-release.cmake +++ b/Utilities/Release/create-cmake-release.cmake @@ -6,7 +6,7 @@ endif() file(MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/logs) set(RELEASE_SCRIPTS_BATCH_1 - dash2win64_release.cmake # Windows + dash3win7_release.cmake # Windows dashmacmini5_release.cmake # OS X x86_64 magrathea_release.cmake # Linux linux64_release.cmake # Linux x86_64 diff --git a/Utilities/Release/dash2win64_release.cmake b/Utilities/Release/dash3win7_release.cmake similarity index 70% rename from Utilities/Release/dash2win64_release.cmake rename to Utilities/Release/dash3win7_release.cmake index ecfd7c55a..290b4736b 100644 --- a/Utilities/Release/dash2win64_release.cmake +++ b/Utilities/Release/dash3win7_release.cmake @@ -1,23 +1,24 @@ -set(CMAKE_RELEASE_DIRECTORY "c:/cygwin/home/dashboard/CMakeReleaseDirectory") +set(CMAKE_RELEASE_DIRECTORY "c:/msys64/home/dashboard/CMakeReleaseDirectory") set(CONFIGURE_WITH_CMAKE TRUE) set(CMAKE_CONFIGURE_PATH "c:/Program\\ Files\\ \\(x86\\)/CMake/bin/cmake.exe") set(PROCESSORS 8) -set(HOST dash2win64) -set(CPACK_BINARY_GENERATORS "NSIS ZIP") +set(HOST dash3win7) +set(RUN_LAUNCHER ~/rel/run) +set(CPACK_BINARY_GENERATORS "WIX ZIP") set(CPACK_SOURCE_GENERATORS "ZIP") -set(MAKE_PROGRAM "make") +set(MAKE_PROGRAM "ninja") set(MAKE "${MAKE_PROGRAM} -j8") set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release CMAKE_DOC_DIR:STRING=doc/cmake CMAKE_USE_OPENSSL:BOOL=OFF CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE CMAKE_Fortran_COMPILER:FILEPATH=FALSE -CMAKE_GENERATOR:INTERNAL=Unix Makefiles +CMAKE_GENERATOR:INTERNAL=Ninja BUILD_QtDialog:BOOL:=TRUE CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL:BOOL=TRUE CMake_INSTALL_DEPENDENCIES:BOOL=ON -QT_QMAKE_EXECUTABLE:FILEPATH=c:/Dashboards/Support/qt-build/Qt/bin/qmake.exe ") +set(ENV ". ~/rel/env") get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) set(GIT_EXTRA "git config core.autocrlf true") include(${path}/release_cmake.cmake) From fae4779864d1e5a93369b1ac7de9ee7428a28043 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 18 Dec 2015 14:35:34 -0500 Subject: [PATCH 4/4] Utilities/Release: Configure Windows binary to support Windows XP Compile with `-D_WIN32_WINNT=0x501` to use a WinXP-compatible API. Compile with `-D_USING_V110_SDK71_` to tell the VS standard library headers that we are building with a WinXP-compatible Windows SDK. Link executables with `-subsystem:console,5.01` to make them runnable on Windows XP. Ideally `cmake-gui` should instead be linked with `-subsystem:windows,5.01` but with the Ninja and Makefile generators CMake adds `-subsystem:windows` after our `-subsystem:console,5.01` flag and the linker seems to interpret this combination as we need. --- Utilities/Release/dash3win7_release.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Utilities/Release/dash3win7_release.cmake b/Utilities/Release/dash3win7_release.cmake index 290b4736b..f25d63897 100644 --- a/Utilities/Release/dash3win7_release.cmake +++ b/Utilities/Release/dash3win7_release.cmake @@ -17,7 +17,11 @@ CMAKE_GENERATOR:INTERNAL=Ninja BUILD_QtDialog:BOOL:=TRUE CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL:BOOL=TRUE CMake_INSTALL_DEPENDENCIES:BOOL=ON +CMAKE_EXE_LINKER_FLAGS:STRING=-machine:x86 -subsystem:console,5.01 ") +set(ppflags "-D_WIN32_WINNT=0x501 -D_USING_V110_SDK71_") +set(CFLAGS "${ppflags}") +set(CXXFLAGS "${ppflags}") set(ENV ". ~/rel/env") get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) set(GIT_EXTRA "git config core.autocrlf true")