diff options
Diffstat (limited to 'Utilities/Release')
22 files changed, 334 insertions, 51 deletions
diff --git a/Utilities/Release/WiX/CMakeLists.txt b/Utilities/Release/WiX/CMakeLists.txt new file mode 100644 index 0000000..cc0dbe1 --- /dev/null +++ b/Utilities/Release/WiX/CMakeLists.txt @@ -0,0 +1,12 @@ +add_subdirectory(CustomAction) + +if(CMAKE_CONFIGURATION_TYPES) + set(CUSTOM_ACTION_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/custom_action_dll-$<CONFIG>.wxs") +else() + set(CUSTOM_ACTION_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/custom_action_dll.wxs") +endif() + +file(GENERATE + OUTPUT "${CUSTOM_ACTION_OUTPUT}" + INPUT "${CMAKE_CURRENT_SOURCE_DIR}/custom_action_dll.wxs.in" + ) diff --git a/Utilities/Release/WiX/CustomAction/CMakeLists.txt b/Utilities/Release/WiX/CustomAction/CMakeLists.txt new file mode 100644 index 0000000..7efd01e --- /dev/null +++ b/Utilities/Release/WiX/CustomAction/CMakeLists.txt @@ -0,0 +1,13 @@ +foreach(CONFIG DEBUG MINSIZEREL RELEASE RELWITHDEBINFO) + string(REPLACE "/MD" "/MT" + "CMAKE_CXX_FLAGS_${CONFIG}" + "${CMAKE_CXX_FLAGS_${CONFIG}}" + ) +endforeach() + +add_library(CMakeWiXCustomActions MODULE + detect_nsis_overwrite.cpp + exports.def +) + +target_link_libraries(CMakeWiXCustomActions PRIVATE msi) diff --git a/Utilities/Release/WiX/CustomAction/detect_nsis_overwrite.cpp b/Utilities/Release/WiX/CustomAction/detect_nsis_overwrite.cpp new file mode 100644 index 0000000..dad1ae5 --- /dev/null +++ b/Utilities/Release/WiX/CustomAction/detect_nsis_overwrite.cpp @@ -0,0 +1,45 @@ +#include <windows.h> +#include <msi.h> +#include <msiquery.h> + +#include <string> +#include <vector> + +std::wstring get_property(MSIHANDLE msi_handle, std::wstring const& name) +{ + DWORD size = 0; + + UINT status = MsiGetPropertyW(msi_handle, name.c_str(), L"", &size); + + if(status == ERROR_MORE_DATA) + { + std::vector<wchar_t> buffer(size + 1); + MsiGetPropertyW(msi_handle, name.c_str(), &buffer[0], &size); + return std::wstring(&buffer[0]); + } + else + { + return std::wstring(); + } +} + +void set_property(MSIHANDLE msi_handle, + std::wstring const& name, std::wstring const& value) +{ + MsiSetPropertyW(msi_handle, name.c_str(), value.c_str()); +} + +extern "C" UINT __stdcall DetectNsisOverwrite(MSIHANDLE msi_handle) +{ + std::wstring install_root = get_property(msi_handle, L"INSTALL_ROOT"); + + std::wstring uninstall_exe = install_root + L"\\uninstall.exe"; + + bool uninstall_exe_exists = + GetFileAttributesW(uninstall_exe.c_str()) != INVALID_FILE_ATTRIBUTES; + + set_property(msi_handle, L"CMAKE_NSIS_OVERWRITE_DETECTED", + uninstall_exe_exists ? L"1" : L"0"); + + return ERROR_SUCCESS; +} diff --git a/Utilities/Release/WiX/CustomAction/exports.def b/Utilities/Release/WiX/CustomAction/exports.def new file mode 100644 index 0000000..0e448b2 --- /dev/null +++ b/Utilities/Release/WiX/CustomAction/exports.def @@ -0,0 +1,2 @@ +EXPORTS + DetectNsisOverwrite=DetectNsisOverwrite diff --git a/Utilities/Release/WiX/WIX.template.in b/Utilities/Release/WiX/WIX.template.in new file mode 100644 index 0000000..094999f --- /dev/null +++ b/Utilities/Release/WiX/WIX.template.in @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<?include "cpack_variables.wxi"?> + +<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" + RequiredVersion="3.6.3303.0"> + + <Product Id="$(var.CPACK_WIX_PRODUCT_GUID)" + Name="$(var.CPACK_PACKAGE_NAME)" + Language="1033" + Version="$(var.CPACK_PACKAGE_VERSION)" + Manufacturer="$(var.CPACK_PACKAGE_VENDOR)" + UpgradeCode="$(var.CPACK_WIX_UPGRADE_GUID)"> + + <Package InstallerVersion="301" Compressed="yes" InstallScope="perMachine"/> + + <Media Id="1" Cabinet="media1.cab" EmbedCab="yes"/> + + <MajorUpgrade + Schedule="afterInstallInitialize" + AllowDowngrades="yes"/> + + <WixVariable Id="WixUILicenseRtf" Value="$(var.CPACK_WIX_LICENSE_RTF)"/> + <Property Id="WIXUI_INSTALLDIR" Value="INSTALL_ROOT"/> + + <?ifdef CPACK_WIX_PRODUCT_ICON?> + <Property Id="ARPPRODUCTICON">ProductIcon.ico</Property> + <Icon Id="ProductIcon.ico" SourceFile="$(var.CPACK_WIX_PRODUCT_ICON)"/> + <?endif?> + + <?ifdef CPACK_WIX_UI_BANNER?> + <WixVariable Id="WixUIBannerBmp" Value="$(var.CPACK_WIX_UI_BANNER)"/> + <?endif?> + + <?ifdef CPACK_WIX_UI_DIALOG?> + <WixVariable Id="WixUIDialogBmp" Value="$(var.CPACK_WIX_UI_DIALOG)"/> + <?endif?> + + <FeatureRef Id="ProductFeature"/> + + <UIRef Id="$(var.CPACK_WIX_UI_REF)" /> + + <?include "properties.wxi"?> + <?include "product_fragment.wxi"?> + </Product> +</Wix> diff --git a/Utilities/Release/WiX/cmake_extra_dialog.wxs b/Utilities/Release/WiX/cmake_extra_dialog.wxs new file mode 100644 index 0000000..0ee3d99 --- /dev/null +++ b/Utilities/Release/WiX/cmake_extra_dialog.wxs @@ -0,0 +1,36 @@ +<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> + <Fragment> + <UI> + <Property Id="ADD_CMAKE_TO_PATH" Value="None"/> + <Dialog Id="CMakeExtraDialog" Width="370" Height="270" Title="Install Options"> + + <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUINext)"/> + <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)"/> + + <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)"> + <Publish Event="SpawnDialog" Value="CancelDlg">1</Publish> + </Control> + + <Control Id="Description" Type="Text" X="25" Y="23" Width="280" Height="15" Transparent="yes" NoPrefix="yes" Text="Choose options for installing CMake [ProductVersion]"/> + <Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes" Text="Install Options"/> + <Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.InstallDirDlgBannerBitmap)"/> + <Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0"/> + <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0"/> + + <Control Id="Hint" Type="Text" X="26" Y="60" Width="250" Height="16" Transparent="yes" Text="By default CMake does not add its directory to the system PATH."/> + + <Control Id="ADD_CMAKE_TO_PATHOption" Type="RadioButtonGroup" X="26" Y="100" Width="305" Height="65" Property="ADD_CMAKE_TO_PATH"> + <RadioButtonGroup Property="ADD_CMAKE_TO_PATH"> + <RadioButton Value="None" X="0" Y="0" Width="295" Height="16" Text="Do not add CMake to the system PATH"/> + <RadioButton Value="System" X="0" Y="20" Width="295" Height="16" Text="Add CMake to the system PATH for all users"/> + <RadioButton Value="User" X="0" Y="40" Width="295" Height="16" Text="Add CMake to the system PATH for the current user"/> + </RadioButtonGroup> + </Control> + + <?ifdef BUILD_QtDialog ?> + <Control Id="DesktopShortcutCheckBox" Type="CheckBox" X="20" Y="170" Width="330" Height="18" CheckBoxValue="1" Property="DESKTOP_SHORTCUT_REQUESTED" Text="Create CMake Desktop Icon"/> + <?endif ?> + </Dialog> + </UI> + </Fragment> +</Wix> diff --git a/Utilities/Release/WiX/cmake_nsis_overwrite_dialog.wxs b/Utilities/Release/WiX/cmake_nsis_overwrite_dialog.wxs new file mode 100644 index 0000000..8fe60f2 --- /dev/null +++ b/Utilities/Release/WiX/cmake_nsis_overwrite_dialog.wxs @@ -0,0 +1,21 @@ +<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> + <Fragment> + <UI> + <Dialog Id="CMakeNsisOverwriteDialog" Width="310" Height="120" Title="NSIS Installation Conflict"> + <Control Id="OK" Type="PushButton" X="122" Y="90" Width="56" Height="17" Default="yes" Cancel="yes" Text="!(loc.WixUIOK)"> + <Publish Event="EndDialog" Value="Return">1</Publish> + </Control> + <Control Id="Text" Type="Text" X="48" Y="22" Width="260" Height="60"> + <Text> + Uninstall.exe was detected in your chosen installation prefix. + This indicates a conflicting NSIS based installation of CMake. + + Please uninstall your old CMake installation or choose a different + installation directory. + </Text> + </Control> + <Control Id="Icon" Type="Icon" X="15" Y="15" Width="24" Height="24" ToolTip="!(loc.InvalidDirDlgIconTooltip)" FixedSize="yes" IconSize="32" Text="!(loc.InvalidDirDlgIcon)" /> + </Dialog> + </UI> + </Fragment> +</Wix> diff --git a/Utilities/Release/WiX/custom_action_dll.wxs.in b/Utilities/Release/WiX/custom_action_dll.wxs.in new file mode 100644 index 0000000..021e63c --- /dev/null +++ b/Utilities/Release/WiX/custom_action_dll.wxs.in @@ -0,0 +1,6 @@ +<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> + <Fragment> + <Binary Id="CMakeCustomActionsDll" + SourceFile="$<TARGET_FILE:CMakeWiXCustomActions>"/> + </Fragment> +</Wix> diff --git a/Utilities/Release/WiX/install_dir.wxs b/Utilities/Release/WiX/install_dir.wxs new file mode 100644 index 0000000..49b74e3 --- /dev/null +++ b/Utilities/Release/WiX/install_dir.wxs @@ -0,0 +1,72 @@ +<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> + <Fragment> + <UI Id="CMakeUI_InstallDir"> + <TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" /> + <TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12" /> + <TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" /> + + <Property Id="DefaultUIFont" Value="WixUI_Font_Normal" /> + <Property Id="WixUI_Mode" Value="InstallDir" /> + + <DialogRef Id="CMakeExtraDialog" /> + <?ifdef CHECK_NSIS ?> + <DialogRef Id="CMakeNsisOverwriteDialog" /> + <?endif ?> + + <DialogRef Id="BrowseDlg" /> + <DialogRef Id="DiskCostDlg" /> + <DialogRef Id="ErrorDlg" /> + <DialogRef Id="FatalError" /> + <DialogRef Id="FilesInUse" /> + <DialogRef Id="MsiRMFilesInUse" /> + <DialogRef Id="PrepareDlg" /> + <DialogRef Id="ProgressDlg" /> + <DialogRef Id="ResumeDlg" /> + <DialogRef Id="UserExit" /> + + <Publish Dialog="BrowseDlg" Control="OK" Event="DoAction" Value="WixUIValidatePath" Order="3">1</Publish> + <Publish Dialog="BrowseDlg" Control="OK" Event="SpawnDialog" Value="InvalidDirDlg" Order="4"><![CDATA[WIXUI_INSTALLDIR_VALID<>"1"]]></Publish> + + <Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish> + + <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="LicenseAgreementDlg">NOT Installed</Publish> + <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg">Installed AND PATCH</Publish> + + <Publish Dialog="LicenseAgreementDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish> + <Publish Dialog="LicenseAgreementDlg" Control="Next" Event="NewDialog" Value="CMakeExtraDialog">LicenseAccepted = "1"</Publish> + + <Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="CMakeExtraDialog">1</Publish> + <Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish> + <Publish Dialog="InstallDirDlg" Control="Next" Event="DoAction" Value="WixUIValidatePath" Order="2">NOT WIXUI_DONTVALIDATEPATH</Publish> + <Publish Dialog="InstallDirDlg" Control="Next" Event="SpawnDialog" Value="InvalidDirDlg" Order="3"><![CDATA[NOT WIXUI_DONTVALIDATEPATH AND WIXUI_INSTALLDIR_VALID<>"1"]]></Publish> + <?ifdef CHECK_NSIS ?> + <Publish Dialog="InstallDirDlg" Control="Next" Event="DoAction" Value="CMakeDetectNsisOverwrite" Order="4">1</Publish> + <Publish Dialog="InstallDirDlg" Control="Next" Event="SpawnDialog" Value="CMakeNsisOverwriteDialog" Order="5">CMAKE_NSIS_OVERWRITE_DETECTED="1"</Publish> + <?endif ?> + <Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="6"><![CDATA[(WIXUI_DONTVALIDATEPATH OR WIXUI_INSTALLDIR_VALID="1") AND CMAKE_NSIS_OVERWRITE_DETECTED<>1]]></Publish> + <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish> + <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2">1</Publish> + + <Publish Dialog="CMakeExtraDialog" Control="Back" Event="NewDialog" Value="LicenseAgreementDlg">1</Publish> + <Publish Dialog="CMakeExtraDialog" Control="Next" Event="NewDialog" Value="InstallDirDlg">1</Publish> + + <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="InstallDirDlg" Order="1">NOT Installed</Publish> + <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2">Installed AND NOT PATCH</Publish> + <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="2">Installed AND PATCH</Publish> + + <Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg">1</Publish> + + <Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish> + <Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish> + <Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg">1</Publish> + + <Property Id="ARPNOMODIFY" Value="1" /> + </UI> + + <UIRef Id="WixUI_Common" /> + + <?ifdef CHECK_NSIS ?> + <CustomAction Id="CMakeDetectNsisOverwrite" BinaryKey="CMakeCustomActionsDll" DllEntry="DetectNsisOverwrite"/> + <?endif ?> + </Fragment> +</Wix> diff --git a/Utilities/Release/WiX/patch_desktop_shortcut.xml b/Utilities/Release/WiX/patch_desktop_shortcut.xml new file mode 100644 index 0000000..d30705d --- /dev/null +++ b/Utilities/Release/WiX/patch_desktop_shortcut.xml @@ -0,0 +1,5 @@ +<CPackWiXPatch> + <CPackWiXFragment Id="CM_SHORTCUT_DESKTOP"> + <Condition>DESKTOP_SHORTCUT_REQUESTED = 1</Condition> + </CPackWiXFragment> +</CPackWiXPatch> diff --git a/Utilities/Release/WiX/patch_path_env.xml b/Utilities/Release/WiX/patch_path_env.xml new file mode 100644 index 0000000..0e335c4 --- /dev/null +++ b/Utilities/Release/WiX/patch_path_env.xml @@ -0,0 +1,26 @@ +<CPackWiXPatch> + <CPackWiXFragment Id="CM_DP_bin"> + <Component Id="CMakeSystemPathEntryCMP" KeyPath="yes" Guid="0E782367-5D68-4539-81D1-B9757AE496A1"> + + <Condition>ADD_CMAKE_TO_PATH = "System"</Condition> + + <Environment Id="CMakeSystemPathEntryENV" Action="set" Part="last" + Name="PATH" Value="[INSTALL_ROOT]bin" + System="yes"/> + </Component> + + <Component Id="CMakeUserPathEntryCMP" KeyPath="yes" Guid="392E524D-D5BF-4F16-A7AF-A82B07482CB9"> + + <Condition>ADD_CMAKE_TO_PATH = "User"</Condition> + + <Environment Id="CMakeUserPathEntryENV" Action="set" Part="last" + Name="PATH" Value="[INSTALL_ROOT]bin" + System="no"/> + </Component> + </CPackWiXFragment> + + <CPackWiXFragment Id="#PRODUCTFEATURE"> + <ComponentRef Id="CMakeSystemPathEntryCMP"/> + <ComponentRef Id="CMakeUserPathEntryCMP"/> + </CPackWiXFragment> +</CPackWiXPatch> diff --git a/Utilities/Release/cpack_wix_ui_banner.jpg b/Utilities/Release/WiX/ui_banner.jpg Binary files differindex 8d950a6..8d950a6 100644 --- a/Utilities/Release/cpack_wix_ui_banner.jpg +++ b/Utilities/Release/WiX/ui_banner.jpg diff --git a/Utilities/Release/cpack_wix_ui_dialog.jpg b/Utilities/Release/WiX/ui_dialog.jpg Binary files differindex bb6fa5b..bb6fa5b 100644 --- a/Utilities/Release/cpack_wix_ui_dialog.jpg +++ b/Utilities/Release/WiX/ui_dialog.jpg diff --git a/Utilities/Release/create-cmake-release.cmake b/Utilities/Release/create-cmake-release.cmake index 4cfa2ed..d41c4ec 100644 --- a/Utilities/Release/create-cmake-release.cmake +++ b/Utilities/Release/create-cmake-release.cmake @@ -6,9 +6,8 @@ endif() file(MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/logs) set(RELEASE_SCRIPTS_BATCH_1 - dash2win64_release.cmake # Windows - dashmacmini2_release.cmake # Mac Darwin universal ppc;i386 - dashmacmini5_release.cmake # Mac Darwin64 universal x86_64;i386 + 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_cygwin.cmake b/Utilities/Release/dash2win64_cygwin.cmake index c0cd761..ca590ed 100644 --- a/Utilities/Release/dash2win64_cygwin.cmake +++ b/Utilities/Release/dash2win64_cygwin.cmake @@ -28,4 +28,6 @@ get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) # allows us to produce cygwin builds in the short term. set(EXTRA_CTEST_ARGS "-E ExternalProject") +set(LOCAL_DIR cygwin) + include(${path}/release_cmake.cmake) diff --git a/Utilities/Release/dash2win64_release.cmake b/Utilities/Release/dash3win7_release.cmake index ecfd7c5..f25d638 100644 --- a/Utilities/Release/dash2win64_release.cmake +++ b/Utilities/Release/dash3win7_release.cmake @@ -1,23 +1,28 @@ -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 +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") include(${path}/release_cmake.cmake) diff --git a/Utilities/Release/dashmacmini2_release.cmake b/Utilities/Release/dashmacmini2_release.cmake deleted file mode 100644 index cd4c5a1..0000000 --- a/Utilities/Release/dashmacmini2_release.cmake +++ /dev/null @@ -1,25 +0,0 @@ -set(PROCESSORS 2) -set(CMAKE_RELEASE_DIRECTORY /Users/kitware/CMakeReleaseDirectory) -set(USER_OVERRIDE "set(CMAKE_CXX_LINK_EXECUTABLE \\\"gcc <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES> -shared-libgcc -lstdc++-static\\\")") -set(BOOTSTRAP_ARGS "--prefix=/ --docdir=doc/cmake") -set(HOST dashmacmini2) -set(MAKE_PROGRAM "make") -set(MAKE "${MAKE_PROGRAM} -j2") -set(CPACK_BINARY_GENERATORS "DragNDrop TGZ TZ") -set(CPACK_DMG_FORMAT "UDBZ") #build using bzip2 for smaller package size -set(INITIAL_CACHE " -CMAKE_BUILD_TYPE:STRING=Release -CMAKE_OSX_ARCHITECTURES:STRING=ppc;i386 -CMAKE_USE_OPENSSL:BOOL=ON -OPENSSL_CRYPTO_LIBRARY:FILEPATH=/Users/kitware/openssl-1.0.1g-install/lib/libcrypto.a -OPENSSL_INCLUDE_DIR:PATH=/Users/kitware/openssl-1.0.1g-install/include -OPENSSL_SSL_LIBRARY:FILEPATH=/Users/kitware/openssl-1.0.1g-install/lib/libssl.a -CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE -CPACK_SYSTEM_NAME:STRING=Darwin-universal -BUILD_QtDialog:BOOL=TRUE -CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL:BOOL=TRUE -CMake_INSTALL_DEPENDENCIES:BOOL=ON -QT_QMAKE_EXECUTABLE:FILEPATH=/Users/kitware/Support/qt-4.8.0/install/bin/qmake -") -get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) -include(${path}/release_cmake.cmake) diff --git a/Utilities/Release/linux64_release.cmake b/Utilities/Release/linux64_release.cmake index 81442e7..4787d69 100644 --- a/Utilities/Release/linux64_release.cmake +++ b/Utilities/Release/linux64_release.cmake @@ -12,9 +12,9 @@ CURSES_LIBRARY:FILEPATH=/home/kitware/ncurses-5.9/lib/libncurses.a CURSES_INCLUDE_PATH:PATH=/home/kitware/ncurses-5.9/include FORM_LIBRARY:FILEPATH=/home/kitware/ncurses-5.9/lib/libform.a CMAKE_USE_OPENSSL:BOOL=ON -OPENSSL_CRYPTO_LIBRARY:FILEPATH=/home/kitware/openssl-1.0.2d/lib/libcrypto.a -OPENSSL_INCLUDE_DIR:PATH=/home/kitware/openssl-1.0.2d/include -OPENSSL_SSL_LIBRARY:FILEPATH=/home/kitware/openssl-1.0.2d/lib/libssl.a +OPENSSL_CRYPTO_LIBRARY:FILEPATH=/home/kitware/openssl-1.0.2f/lib/libcrypto.a +OPENSSL_INCLUDE_DIR:PATH=/home/kitware/openssl-1.0.2f/include +OPENSSL_SSL_LIBRARY:FILEPATH=/home/kitware/openssl-1.0.2f/lib/libssl.a CPACK_SYSTEM_NAME:STRING=Linux-x86_64 BUILD_QtDialog:BOOL:=TRUE CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL:BOOL=TRUE diff --git a/Utilities/Release/magrathea_release.cmake b/Utilities/Release/magrathea_release.cmake index 0634dda..00abcc1 100644 --- a/Utilities/Release/magrathea_release.cmake +++ b/Utilities/Release/magrathea_release.cmake @@ -12,9 +12,9 @@ CURSES_LIBRARY:FILEPATH=/usr/i686-gcc-332s/lib/libncurses.a CURSES_INCLUDE_PATH:PATH=/usr/i686-gcc-332s/include/ncurses FORM_LIBRARY:FILEPATH=/usr/i686-gcc-332s/lib/libform.a CMAKE_USE_OPENSSL:BOOL=ON -OPENSSL_CRYPTO_LIBRARY:FILEPATH=/home/kitware/openssl-1.0.2d/lib/libcrypto.a -OPENSSL_INCLUDE_DIR:PATH=/home/kitware/openssl-1.0.2d/include -OPENSSL_SSL_LIBRARY:FILEPATH=/home/kitware/openssl-1.0.2d/lib/libssl.a +OPENSSL_CRYPTO_LIBRARY:FILEPATH=/home/kitware/openssl-1.0.2f/lib/libcrypto.a +OPENSSL_INCLUDE_DIR:PATH=/home/kitware/openssl-1.0.2f/include +OPENSSL_SSL_LIBRARY:FILEPATH=/home/kitware/openssl-1.0.2f/lib/libssl.a CPACK_SYSTEM_NAME:STRING=Linux-i386 BUILD_QtDialog:BOOL:=TRUE CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL:BOOL=TRUE diff --git a/Utilities/Release/release_cmake.cmake b/Utilities/Release/release_cmake.cmake index 4c4dd8a..0d9c784 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}") @@ -112,6 +115,9 @@ foreach(gen ${generators}) if("${gen}" STREQUAL "TZ") set(SUFFIXES ${SUFFIXES} "*.tar.Z") endif() + if("${gen}" STREQUAL "WIX") + set(SUFFIXES ${SUFFIXES} "*.msi") + endif() if("${gen}" STREQUAL "ZIP") set(SUFFIXES ${SUFFIXES} "*.zip") endif() @@ -119,27 +125,38 @@ foreach(gen ${generators}) set(SUFFIXES ${SUFFIXES} "*.exe") endif() endforeach() + +if(SUFFIXES) + list(REMOVE_DUPLICATES SUFFIXES) +endif() + +if(LOCAL_DIR) + file(MAKE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${LOCAL_DIR}") +else() + set(LOCAL_DIR .) +endif() + # copy all the files over from the remote machine set(PROJECT_PREFIX cmake-) foreach(suffix ${SUFFIXES}) - message("scp ${HOST}:${FINAL_PATH}/${PROJECT_PREFIX}${suffix} .") + message("scp ${HOST}:${FINAL_PATH}/${PROJECT_PREFIX}${suffix} ${LOCAL_DIR}") execute_process(COMMAND - scp ${HOST}:${FINAL_PATH}/${PROJECT_PREFIX}${suffix} . + scp ${HOST}:${FINAL_PATH}/${PROJECT_PREFIX}${suffix} ${LOCAL_DIR} RESULT_VARIABLE result) if(${result} GREATER 0) - message("error getting file back scp ${HOST}:${FINAL_PATH}/${PROJECT_PREFIX}${suffix} .") + message("error getting file back scp ${HOST}:${FINAL_PATH}/${PROJECT_PREFIX}${suffix} ${LOCAL_DIR}") endif() endforeach() # if there are extra files to copy get them as well if(extra_files) foreach(f ${extra_files}) - message("scp ${HOST}:${FINAL_PATH}/${f} .") + message("scp ${HOST}:${FINAL_PATH}/${f} ${LOCAL_DIR}") execute_process(COMMAND - scp ${HOST}:${FINAL_PATH}/${f} . + scp ${HOST}:${FINAL_PATH}/${f} ${LOCAL_DIR} RESULT_VARIABLE result) if(${result} GREATER 0) - message("error getting file back scp ${HOST}:${FINAL_PATH}/${f} .") + message("error getting file back scp ${HOST}:${FINAL_PATH}/${f} ${LOCAL_DIR}") endif() endforeach() endif() diff --git a/Utilities/Release/release_cmake.sh.in b/Utilities/Release/release_cmake.sh.in index 06e720f..1465129 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() { diff --git a/Utilities/Release/upload_release.cmake b/Utilities/Release/upload_release.cmake index 171811a..f5e325e 100644 --- a/Utilities/Release/upload_release.cmake +++ b/Utilities/Release/upload_release.cmake @@ -1,6 +1,6 @@ set(CTEST_RUN_CURRENT_SCRIPT 0) if(NOT VERSION) - set(VERSION 3.4) + set(VERSION 3.5) endif() if(NOT DEFINED PROJECT_PREFIX) set(PROJECT_PREFIX cmake-${VERSION}) |