diff options
Diffstat (limited to 'Packaging')
-rw-r--r-- | Packaging/CMakeDMGBackground.tif | bin | 0 -> 95690 bytes | |||
-rw-r--r-- | Packaging/CMakeDMGSetup.scpt | 57 | ||||
-rw-r--r-- | Packaging/QtSDK/ToolsCMakeXX.cmake | 45 | ||||
-rw-r--r-- | Packaging/QtSDK/qt.tools.cmake.xx.qs.in | 46 |
4 files changed, 148 insertions, 0 deletions
diff --git a/Packaging/CMakeDMGBackground.tif b/Packaging/CMakeDMGBackground.tif Binary files differnew file mode 100644 index 0000000..91c4b13 --- /dev/null +++ b/Packaging/CMakeDMGBackground.tif diff --git a/Packaging/CMakeDMGSetup.scpt b/Packaging/CMakeDMGSetup.scpt new file mode 100644 index 0000000..37e7bd1 --- /dev/null +++ b/Packaging/CMakeDMGSetup.scpt @@ -0,0 +1,57 @@ +on run argv + set image_name to item 1 of argv + + tell application "Finder" + tell disk image_name + + -- wait for the image to finish mounting + set open_attempts to 0 + repeat while open_attempts < 4 + try + open + delay 1 + set open_attempts to 5 + close + on error errStr number errorNumber + set open_attempts to open_attempts + 1 + delay 10 + end try + end repeat + delay 5 + + -- open the image the first time and save a DS_Store with just + -- background and icon setup + open + set current view of container window to icon view + set theViewOptions to the icon view options of container window + set background picture of theViewOptions to file ".background:background.tif" + set arrangement of theViewOptions to not arranged + set icon size of theViewOptions to 128 + delay 5 + close + + -- next setup the position of the app and Applications symlink + -- plus hide all the window decoration + open + update without registering applications + tell container window + set sidebar width to 0 + set statusbar visible to false + set toolbar visible to false + set the bounds to { 400, 100, 900, 465 } + set position of item "CMake.app" to { 133, 200 } + set position of item "Applications" to { 378, 200 } + end tell + update without registering applications + delay 5 + close + + -- one last open and close so you can see everything looks correct + open + delay 5 + close + + end tell + delay 1 +end tell +end run diff --git a/Packaging/QtSDK/ToolsCMakeXX.cmake b/Packaging/QtSDK/ToolsCMakeXX.cmake new file mode 100644 index 0000000..99731fb --- /dev/null +++ b/Packaging/QtSDK/ToolsCMakeXX.cmake @@ -0,0 +1,45 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +# CMake version +include("${CMAKE_CURRENT_LIST_DIR}/../../Source/CMakeVersion.cmake") + +# Install destinations +set(CMake_INSTALL_INFIX "Tools/CMake/${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}/" + CACHE STRING "Location under install CMake tools") + +# Package +set(CMake_IFW_ROOT_COMPONENT_NAME + "qt.tools.cmake.${CMake_VERSION_MAJOR}${CMake_VERSION_MINOR}" + CACHE STRING "QtSDK CMake tools component name") +set(CMake_IFW_ROOT_COMPONENT_DISPLAY_NAME + "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATCH}" + CACHE STRING "QtSDK CMake tools component display name") +set(CMake_IFW_ROOT_COMPONENT_DESCRIPTION + "CMake Build Tools ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATH}" + CACHE STRING "QtSDK CMake tools component description") +set(CMake_IFW_ROOT_COMPONENT_SCRIPT_TEMPLATE + "${CMAKE_CURRENT_LIST_DIR}/qt.tools.cmake.xx.qs.in" + CACHE FILEPATH "QtSDK CMake tools script template") +set(CMake_IFW_ROOT_COMPONENT_SCRIPT_GENERATED + "${CMAKE_CURRENT_BINARY_DIR}/qt.tools.cmake.${CMake_VERSION_MAJOR}${CMake_VERSION_MINOR}.qs" + CACHE FILEPATH "QtSDK CMake tools script generated") +set(CMake_IFW_ROOT_COMPONENT_PRIORITY + "${CMake_VERSION_MAJOR}${CMake_VERSION_MINOR}" + CACHE STRING "QtSDK CMake tools component sorting priority") +set(CMake_IFW_ROOT_COMPONENT_DEFAULT "" + CACHE STRING "QtSDK CMake tools component default") +set(CMake_IFW_ROOT_COMPONENT_FORCED_INSTALLATION "" + CACHE STRING "QtSDK CMake tools component forsed installation") + +# CPack +set(CPACK_GENERATOR "IFW" + CACHE STRING "Generator to build QtSDK CMake package") +set(CPACK_PACKAGE_FILE_NAME "CMake" + CACHE STRING "Short package name") +set(CPACK_TOPLEVEL_TAG "../QtSDK" + CACHE STRING "QtSDK packages dir") +set(CPACK_IFW_DOWNLOAD_ALL "TRUE" + CACHE STRING "All QtSDK components is downloaded") +set(CPACK_DOWNLOAD_SITE "file:///${CMAKE_CURRENT_BINARY_DIR}/QtSDK/IFW/CMake/repository" + CACHE STRING "Local repository for testing") diff --git a/Packaging/QtSDK/qt.tools.cmake.xx.qs.in b/Packaging/QtSDK/qt.tools.cmake.xx.qs.in new file mode 100644 index 0000000..e806dd7 --- /dev/null +++ b/Packaging/QtSDK/qt.tools.cmake.xx.qs.in @@ -0,0 +1,46 @@ +/**************************************************************************** +** +** Distributed under the OSI-approved BSD 3-Clause License. See accompanying +** file Copyright.txt or https://cmake.org/licensing for details. +** +****************************************************************************/ + +// constructor +function Component() +{ + installer.valueChanged.connect( this, Component.prototype.reactOnTargetDirChange ); + // set the default values to CMAKE%CMake_VERSION_MAJOR%%CMake_VERSION_MINOR%_BIN_DIR + Component.prototype.reactOnTargetDirChange("TargetDir", installer.value("TargetDir")); +} + +Component.prototype.reactOnTargetDirChange = function(key, value) +{ + if (key == "TargetDir") { + var path = value + "/%CMAKE_BIN_DIR%"; + installer.setValue("CMAKE%CMake_VERSION_MAJOR%%CMake_VERSION_MINOR%_BIN_DIR", path.replace(/\\/g, "/")); + } +} + +Component.prototype.createOperations = function() +{ + component.createOperations(); + + try { + if (installer.value("SDKToolBinary") == "") + return; + + var cmId = component.name; + installer.setValue("CMAKE%CMake_VERSION_MAJOR%%CMake_VERSION_MINOR%_ID", cmId); + + component.addOperation("Execute", + ["{0,2}", "@SDKToolBinary@", "addCMake", + "--id", cmId, + "--name", "%CMake_IFW_ROOT_COMPONENT_DISPLAY_NAME%", + "--path", "@CMAKE%CMake_VERSION_MAJOR%%CMake_VERSION_MINOR%_BIN_DIR@/cmake%CMAKE_EXECUTABLE_SUFFIX%", + "UNDOEXECUTE", + "@SDKToolBinary@", "rmCMake", "--id", cmId]); + + } catch( e ) { + print( e ); + } +} |