You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

125 lines
4.7KB

  1. # Create the version-related variables
  2. # These can optionally be overridden from the build enviroment.
  3. unset(CURA_MAJOR_VERSION CACHE)
  4. if(DEFINED ENV{CURA_MAJOR_VERSION})
  5. set(CURA_MAJOR_VERSION $ENV{CURA_MAJOR_VERSION} CACHE STRING "Cura Major Version" FORCE)
  6. else()
  7. set(CURA_MAJOR_VERSION "2" CACHE STRING "Cura Major Version")
  8. endif()
  9. unset(CURA_MINOR_VERSION CACHE)
  10. if(DEFINED ENV{CURA_MINOR_VERSION})
  11. set(CURA_MINOR_VERSION $ENV{CURA_MINOR_VERSION} CACHE STRING "Cura Minor Version" FORCE)
  12. else()
  13. set(CURA_MINOR_VERSION "5" CACHE STRING "Cura Minor Version")
  14. endif()
  15. unset(CURA_PATCH_VERSION CACHE)
  16. if(DEFINED ENV{CURA_PATCH_VERSION})
  17. set(CURA_PATCH_VERSION $ENV{CURA_PATCH_VERSION} CACHE STRING "Cura Patch Version" FORCE)
  18. else()
  19. set(CURA_PATCH_VERSION "10" CACHE STRING "Cura Patch Version")
  20. endif()
  21. unset(CURA_EXTRA_VERSION CACHE)
  22. if(DEFINED ENV{CURA_EXTRA_VERSION})
  23. set(CURA_EXTRA_VERSION $ENV{CURA_EXTRA_VERSION} CACHE STRING "Cura Extra Version Information" FORCE)
  24. else()
  25. set(CURA_EXTRA_VERSION "${CURA_TAG_OR_BRANCH}" CACHE STRING "Cura Extra Version Information")
  26. endif()
  27. set(CURA_VERSION "${CURA_MAJOR_VERSION}.${CURA_MINOR_VERSION}.${CURA_PATCH_VERSION}")
  28. if(NOT "${CURA_EXTRA_VERSION}" STREQUAL "")
  29. set(CURA_VERSION "${CURA_VERSION}-${CURA_EXTRA_VERSION}")
  30. endif()
  31. set(MINIMUM_ARCUS_VERSION "15.05.90" CACHE STRING "Minimum Arcus Version")
  32. set(MINIMUM_SAVITAR_VERSION "15.05.91" CACHE STRING "Minimum Savitar Version")
  33. set(MINIMUM_URANIUM_VERSION "15.05.93" CACHE STRING "Minimum Uranium Version")
  34. set(MINIMUM_CURAENGINE_VERSION "15.05.90" CACHE STRING "Minimum Cura Engine Version")
  35. set(DEB_PACKAGE_TARGET_PLATFORM "debian-stretch" CACHE STRING "Target Debian/Ubuntu platform")
  36. message("CPACK_PACKAGE_VERSION_MAJOR ${CURA_MAJOR_VERSION}")
  37. message("CPACK_PACKAGE_VERSION_MINOR ${CURA_MINOR_VERSION}")
  38. message("CPACK_PACKAGE_VERSION_PATCH ${CURA_PATCH_VERSION}")
  39. set(CPACK_PACKAGE_NAME "cura-lulzbot")
  40. set(CPACK_PACKAGE_VENDOR "Ultimaker")
  41. #set(CPACK_PACKAGE_VERSION_MAJOR ${CURA_MAJOR_VERSION})
  42. #set(CPACK_PACKAGE_VERSION_MINOR ${CURA_MINOR_VERSION})
  43. #set(CPACK_PACKAGE_VERSION_PATCH ${CURA_PATCH_VERSION})
  44. set(CPACK_PACKAGE_VERSION ${CURA_VERSION} CACHE STRING "Cura LulzBot Edition package version")
  45. set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Cura LulzBot Edition 3D Printing Software")
  46. set(CPACK_PACKAGE_CONTACT "LulzBot <info@lulzbot.com>")
  47. if(NOT BUILD_OS_OSX)
  48. set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/LICENSE)
  49. endif()
  50. set(CPACK_PACKAGE_EXECUTABLES cura-lulzbot "cura-lulzbot ${CURA_MAJOR_VERSION}.${CURA_MINOR_VERSION}.${CURA_PATCH_VERSION}")
  51. set(CPACK_PACKAGE_INSTALL_DIRECTORY "cura-lulzbot ${CURA_MAJOR_VERSION}.${CURA_MINOR_VERSION}")
  52. set(RPM_REQUIRES
  53. "python3 >= ${MINIMUM_PYTHON_VERSION}"
  54. "python3-qt5 >= 5.4.0"
  55. "python3-numpy >= 1.9.0"
  56. "qt5-qtquickcontrols >= 5.4.0"
  57. )
  58. string(REPLACE ";" "," RPM_REQUIRES "${RPM_REQUIRES}")
  59. set(CPACK_RPM_PACKAGE_REQUIRES ${RPM_REQUIRES})
  60. set(CPACK_RPM_PACKAGE_RELOCATABLE OFF)
  61. if(DEB_PACKAGE_TARGET_PLATFORM STREQUAL "ubuntu-xenial")
  62. set(DEB_DEPENDS
  63. "python3 (>= ${MINIMUM_PYTHON_VERSION})"
  64. "python3-numpy"
  65. "python3-scipy"
  66. "libgfortran3"
  67. "cura-lulzbot-python3.5-deps (>=0.1.0)"
  68. "arcus (>= ${MINIMUM_ARCUS_VERSION})"
  69. "savitar (>= ${MINIMUM_SAVITAR_VERSION})"
  70. "uranium (>= ${MINIMUM_URANIUM_VERSION})"
  71. "curaengine (>= ${MINIMUM_CURAENGINE_VERSION})"
  72. )
  73. else()
  74. set(DEB_DEPENDS
  75. "python3 (>= ${MINIMUM_PYTHON_VERSION})"
  76. "python3-numpy"
  77. "python3-scipy"
  78. "libgfortran3"
  79. "qml-module-qt-labs-folderlistmodel (>= 5.6.0)"
  80. "qml-module-qt-labs-settings (>= 5.6.0)"
  81. "arcus (>= ${MINIMUM_ARCUS_VERSION})"
  82. "savitar (>= ${MINIMUM_SAVITAR_VERSION})"
  83. "uranium (>= ${MINIMUM_URANIUM_VERSION})"
  84. "curaengine (>= ${MINIMUM_CURAENGINE_VERSION})"
  85. )
  86. endif()
  87. string(REPLACE ";" "," DEB_DEPENDS "${DEB_DEPENDS}")
  88. set(CPACK_DEBIAN_PACKAGE_DEPENDS ${DEB_DEPENDS})
  89. set(CPACK_DEBIAN_PACKAGE_RECOMMENDS
  90. "cura-binary-data-all (>=1.0.0)"
  91. "cura-binary-data-lulzbot (>=1.0.0)"
  92. "cura-binary-data-ultimaker (>=1.0.0)"
  93. "ultimaker (>=1.0.0)"
  94. "doodle3d (>=1.0.0)")
  95. string(REPLACE ";" "," CPACK_DEBIAN_PACKAGE_RECOMMENDS "${CPACK_DEBIAN_PACKAGE_RECOMMENDS}")
  96. set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE amd64)
  97. # Set the right epoch so Debian knows this is a more recent version
  98. #set(CPACK_DEBIAN_PACKAGE_VERSION "2:${CPACK_PACKAGE_VERSION}")
  99. set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
  100. set(CPACK_NSIS_EXECUTABLES_DIRECTORY ".")
  101. set(CPACK_NSIS_MUI_FINISHPAGE_RUN "cura-lulzbot.exe")
  102. set(CPACK_NSIS_MENU_LINKS
  103. "https://ultimaker.com/en/support/software" "Cura Online Documentation"
  104. "https://github.com/ultimaker/cura" "Cura Development Resources"
  105. )
  106. set(CPACK_NSIS_PACKAGE_ARCHITECTURE "64")
  107. set(CPACK_GENERATOR "DEB")
  108. include(CPack)