dbc5d7a8bc
* Cherry-pick 49e8f35858
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* Merging differences from development of other changes that need to be there for deb packaging
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* Picks a needed change for the installer
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* Fixes warning in mac
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* Takes version from environment if defined
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* Do not pick up version if it is empty string since that will also break version comparison
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* creating temp directories if they dont exist
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* removing a dependency to itself (Multiplayer.Builders is an alias of Multiplayer.Editor)
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* Filters which runtime dependencies are passed from private build dependencies to only those that are actual targets.
This avoids something like a "d3d12" private build dependency from being passed to the runtime dependencies
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
63 lines
2.5 KiB
CMake
63 lines
2.5 KiB
CMake
#
|
|
# Copyright (c) Contributors to the Open 3D Engine Project.
|
|
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0 OR MIT
|
|
#
|
|
#
|
|
|
|
file(REAL_PATH "${CPACK_SOURCE_DIR}/.." LY_ROOT_FOLDER)
|
|
include(${LY_ROOT_FOLDER}/cmake/Platform/Common/PackagingPostBuild_common.cmake)
|
|
|
|
file(${CPACK_PACKAGE_CHECKSUM} ${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}.deb file_checksum)
|
|
file(WRITE ${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}.deb.sha256 "${file_checksum} ${CPACK_PACKAGE_FILE_NAME}.deb")
|
|
|
|
if(CPACK_UPLOAD_URL)
|
|
|
|
# use the internal default path if somehow not specified from cpack_configure_downloads
|
|
if(NOT CPACK_UPLOAD_DIRECTORY)
|
|
set(CPACK_UPLOAD_DIRECTORY ${CPACK_PACKAGE_DIRECTORY}/CPackUploads)
|
|
endif()
|
|
|
|
# Copy the artifacts intended to be uploaded to a remote server into the folder specified
|
|
# through CPACK_UPLOAD_DIRECTORY. This mimics the same process cpack does natively for
|
|
# some other frameworks that have built-in online installer support.
|
|
message(STATUS "Copying packaging artifacts to upload directory...")
|
|
file(REMOVE_RECURSE ${CPACK_UPLOAD_DIRECTORY})
|
|
file(GLOB _artifacts
|
|
"${CPACK_TOPLEVEL_DIRECTORY}/*.deb"
|
|
"${CPACK_TOPLEVEL_DIRECTORY}/*.sha256"
|
|
)
|
|
file(COPY ${_artifacts}
|
|
DESTINATION ${CPACK_UPLOAD_DIRECTORY}
|
|
)
|
|
message(STATUS "Artifacts copied to ${CPACK_UPLOAD_DIRECTORY}")
|
|
|
|
# TODO: copy gpg file to CPACK_UPLOAD_DIRECTORY
|
|
|
|
ly_upload_to_url(
|
|
${CPACK_UPLOAD_URL}
|
|
${CPACK_UPLOAD_DIRECTORY}
|
|
".*(.deb|.gpg|.sha256)$"
|
|
)
|
|
|
|
# for auto tagged builds, we will also upload a second copy of just the boostrapper
|
|
# to a special "Latest" folder under the branch in place of the commit date/hash
|
|
if(CPACK_AUTO_GEN_TAG)
|
|
|
|
set(latest_deb_package "${CPACK_UPLOAD_DIRECTORY}/${CPACK_PACKAGE_NAME}_latest.deb")
|
|
file(COPY_FILE
|
|
${CPACK_UPLOAD_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}.deb
|
|
${latest_deb_package}
|
|
)
|
|
ly_upload_to_latest(${CPACK_UPLOAD_URL} ${latest_deb_package})
|
|
|
|
# TODO: upload gpg file to latest
|
|
|
|
# Generate a checksum file for latest and upload it
|
|
set(latest_hash_file "${CPACK_UPLOAD_DIRECTORY}/${CPACK_PACKAGE_NAME}_latest.deb.sha256")
|
|
file(WRITE "${latest_hash_file}" "${file_checksum} ${CPACK_PACKAGE_NAME}_latest.deb")
|
|
ly_upload_to_latest(${CPACK_UPLOAD_URL} "${latest_hash_file}")
|
|
endif()
|
|
endif()
|