Creates a deb package (#5567)
* configure/generation working
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* Generates deb package forLinux
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* Fixes to EngineFinder
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* changes the owner of the installed folder so it is writable by the user
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* jenkins scripts
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* Fixes execution permission for scripts
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* Fixes wrong parameter to build for linux
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* removal of clang parameters in build_config.json
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* Simplifies and fixes build configs
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* fixes to EngineFinder
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* Adds linux deb package upload and small fixes/organization cleanup
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* fixes checksum generation
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* Some more small fixes for reviewing
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* Test if this space is necessary for cpack
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* More fixes for installer jobs
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* Adding eval to variables that need to double-expand
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* Removing unused variables being passed
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* Do not remove symlink
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* Use cmake_path for concatenating paths
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* removing quotes so the variable expands
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* cleaned up some variables that have way too many ways to be passed
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* Multiple fixes for Jenkins
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* Cleanup/re-organization
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* fixes some temp variables so we can run cpack jenkins jobs locally
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* Delays cmake download to install step
Cleanup on installer_windows.cmd, we already have the path to cpack (same as cmake, which is added to the path)
Some simplification in the windows installer generation, we now generate the same even if we dont upload
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* Fixes mac install
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* CPack can generate hashes for us
Defiine CPACK_OUTPUT_FILE_PREFIX to prevent the exe/msi from ending in the bin dir
Remove unnecessary generation of folder from 3rdPartyPacakges which fails when including from cpack
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* multiple fixes
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* fixes typo
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* more fixes
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* Fixes for linux/mac/windows (fixing discrepancies with Jenkins)
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* uploads to S3 from the upload directory and fixes the latest upload
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* Adds ERROR_VARIABLE to S3 upload to find a Jenkins issue
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* printing command invocation to try to figure out the errors
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* Changes the hashing algorithm to sha256 and fixes the cmd used to call to pythojn
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* wrong path being passed in mac
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* removes compiler parameters from a config job (after rebase)
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* more fixes fro deb packaging job
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* small fix for fingerprint patching for latest
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* Changing extension of public key and leaving better TODO places for code signing
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* Removes sdl as a dependency, leaving it commented since it is needed for wwise
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* fixes runtime copy during install, makes it more consistent with regular runtime dependencies and optimizes copy when there is already an install
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* $ENV{DESTDIR} and CMAKE_INSTALL_PREFIX cannot be used in cmake_path because the CMAKE_INSTALL_PREFIX is absolute
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* Fixing some runtime_dependencies optimizations, we cannot take size of a bundle
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* Fixes warning in mac for an unused variable
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* Fixes a variable that was being passed to fix qt frameworks
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* More fixes for Jenkins
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* Updates email to use for maintainer to match certificate
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* make directory because in some cases the dependency is copied before the actual library and the directory has to be created
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* Fix for a new warning/error in linux
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* The sha file is created after the upload happens, so creating it
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* remove the size comparison for install since it stomps over the copy from the target and doesnt trigger stripping
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
monroegm-disable-blank-issue-2
parent
ed40ed201a
commit
49e8f35858
@ -0,0 +1,13 @@
|
||||
#
|
||||
# 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 to tweak compiler settings before compiler detection happens (before project() is called)
|
||||
# We dont have PAL enabled at this point, so we can only use pure-CMake variables
|
||||
if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Linux")
|
||||
include(cmake/Platform/Linux/CompilerSettings_linux.cmake)
|
||||
endif()
|
||||
@ -0,0 +1,54 @@
|
||||
#
|
||||
# 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
|
||||
#
|
||||
#
|
||||
|
||||
set(LY_ROOT_FOLDER "@LY_ROOT_FOLDER@")
|
||||
set(CMAKE_SCRIPT_MODE_FILE TRUE)
|
||||
include(@LY_ROOT_FOLDER@/cmake/3rdPartyPackages.cmake)
|
||||
|
||||
if(EXISTS "@LY_CMAKE_PACKAGE_DOWNLOAD_PATH@")
|
||||
file(SHA256 "@LY_CMAKE_PACKAGE_DOWNLOAD_PATH@" hash_of_downloaded_file)
|
||||
if (NOT "${hash_of_downloaded_file}" STREQUAL "@CPACK_CMAKE_PACKAGE_HASH@")
|
||||
message(STATUS "CMake @CPACK_DESIRED_CMAKE_VERSION@ found at @LY_CMAKE_PACKAGE_DOWNLOAD_PATH@ but expected hash missmatches, re-downloading...")
|
||||
file(REMOVE "@LY_CMAKE_PACKAGE_DOWNLOAD_PATH@")
|
||||
else()
|
||||
message(STATUS "CMake @CPACK_DESIRED_CMAKE_VERSION@ found")
|
||||
endif()
|
||||
endif()
|
||||
if(NOT EXISTS "@LY_CMAKE_PACKAGE_DOWNLOAD_PATH@")
|
||||
# download it
|
||||
string(REPLACE "." ";" _version_components "@CPACK_DESIRED_CMAKE_VERSION@")
|
||||
list(GET _version_components 0 _major_version)
|
||||
list(GET _version_components 1 _minor_version)
|
||||
|
||||
set(_url_version_tag "v${_major_version}.${_minor_version}")
|
||||
set(_package_url "https://cmake.org/files/${_url_version_tag}/@CPACK_CMAKE_PACKAGE_FILE@")
|
||||
|
||||
message(STATUS "Downloading CMake @CPACK_DESIRED_CMAKE_VERSION@ for packaging...")
|
||||
download_file(
|
||||
URL ${_package_url}
|
||||
TARGET_FILE @LY_CMAKE_PACKAGE_DOWNLOAD_PATH@
|
||||
EXPECTED_HASH @CPACK_CMAKE_PACKAGE_HASH@
|
||||
RESULTS _results
|
||||
)
|
||||
list(GET _results 0 _status_code)
|
||||
|
||||
if (${_status_code} EQUAL 0 AND EXISTS "@LY_CMAKE_PACKAGE_DOWNLOAD_PATH@")
|
||||
message(STATUS "CMake @CPACK_DESIRED_CMAKE_VERSION@ found")
|
||||
else()
|
||||
file(REMOVE "@LY_CMAKE_PACKAGE_DOWNLOAD_PATH@")
|
||||
list(REMOVE_AT _results 0)
|
||||
|
||||
set(_error_message "An error occurred, code ${_status_code}. URL ${_package_url} - ${_results}")
|
||||
if(${_status_code} EQUAL 1)
|
||||
string(APPEND _error_message
|
||||
" Please double check the CPACK_CMAKE_PACKAGE_FILE and "
|
||||
"CPACK_CMAKE_PACKAGE_HASH properties before trying again.")
|
||||
endif()
|
||||
message(FATAL_ERROR ${_error_message})
|
||||
endif()
|
||||
endif()
|
||||
@ -0,0 +1,114 @@
|
||||
#
|
||||
# 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
|
||||
#
|
||||
#
|
||||
|
||||
message(STATUS "Executing packaging postbuild...")
|
||||
|
||||
# ly_is_s3_url
|
||||
# if the given URL is a s3 url of thr form "s3://(stuff)" then sets
|
||||
# the output_variable_name to TRUE otherwise unsets it.
|
||||
function (ly_is_s3_url download_url output_variable_name)
|
||||
if ("${download_url}" MATCHES "s3://.*")
|
||||
set(${output_variable_name} TRUE PARENT_SCOPE)
|
||||
else()
|
||||
unset(${output_variable_name} PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(ly_upload_to_url in_url in_local_path in_file_regex)
|
||||
|
||||
message(STATUS "Uploading ${in_local_path}/${in_file_regex} artifacts to ${CPACK_UPLOAD_URL}")
|
||||
ly_is_s3_url(${in_url} _is_s3_bucket)
|
||||
if(NOT _is_s3_bucket)
|
||||
message(FATAL_ERROR "Only S3 installer uploading is supported at this time")
|
||||
endif()
|
||||
|
||||
# strip the scheme and extract the bucket/key prefix from the URL
|
||||
string(REPLACE "s3://" "" _stripped_url ${in_url})
|
||||
string(REPLACE "/" ";" _tokens ${_stripped_url})
|
||||
|
||||
list(POP_FRONT _tokens _bucket)
|
||||
string(JOIN "/" _prefix ${_tokens})
|
||||
|
||||
set(_extra_args [[{"ACL":"bucket-owner-full-control"}]])
|
||||
|
||||
file(TO_NATIVE_PATH "${LY_ROOT_FOLDER}/scripts/build/tools/upload_to_s3.py" _upload_script)
|
||||
|
||||
set(_upload_command
|
||||
${CPACK_LY_PYTHON_CMD} -s
|
||||
-u ${_upload_script}
|
||||
--base_dir ${in_local_path}
|
||||
--file_regex="${in_file_regex}"
|
||||
--bucket ${_bucket}
|
||||
--key_prefix ${_prefix}
|
||||
--extra_args ${_extra_args}
|
||||
)
|
||||
|
||||
if(CPACK_AWS_PROFILE)
|
||||
list(APPEND _upload_command --profile ${CPACK_AWS_PROFILE})
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND ${_upload_command}
|
||||
RESULT_VARIABLE _upload_result
|
||||
OUTPUT_VARIABLE _upload_output
|
||||
ERROR_VARIABLE _upload_error
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
if (${_upload_result} EQUAL 0)
|
||||
message(STATUS "Artifact uploading complete!")
|
||||
else()
|
||||
message(FATAL_ERROR "An error occurred uploading to s3.\n Output: ${_upload_output}\n\ Error: ${_upload_error}")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
function(ly_upload_to_latest in_url in_path)
|
||||
|
||||
message(STATUS "Updating latest tagged build")
|
||||
|
||||
# make sure we can extra the commit info from the URL first
|
||||
string(REGEX MATCH "([0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]-[0-9a-zA-Z]+)"
|
||||
commit_info ${in_url}
|
||||
)
|
||||
if(NOT commit_info)
|
||||
message(FATAL_ERROR "Failed to extract the build tag")
|
||||
endif()
|
||||
|
||||
# Create a temp directory where we are going to rename the file to take out the version
|
||||
# and then upload it
|
||||
set(temp_dir ${CPACK_BINARY_DIR}/temp)
|
||||
if(NOT EXISTS ${temp_dir})
|
||||
file(MAKE_DIRECTORY ${temp_dir})
|
||||
endif()
|
||||
file(COPY ${in_path} DESTINATION ${temp_dir})
|
||||
|
||||
cmake_path(GET in_path FILENAME in_path_filename)
|
||||
string(REPLACE "_${CPACK_PACKAGE_VERSION}" "" non_versioned_in_path_filename ${in_path_filename})
|
||||
file(RENAME "${temp_dir}/${in_path_filename}" "${temp_dir}/${non_versioned_in_path_filename}")
|
||||
|
||||
# include the commit info in a text file that will live next to the exe
|
||||
set(_temp_info_file ${temp_dir}/build_tag.txt)
|
||||
file(WRITE ${_temp_info_file} ${commit_info})
|
||||
|
||||
# update the URL and upload
|
||||
string(REPLACE
|
||||
${commit_info} "Latest"
|
||||
latest_upload_url ${in_url}
|
||||
)
|
||||
|
||||
ly_upload_to_url(
|
||||
${latest_upload_url}
|
||||
${temp_dir}
|
||||
".*(${non_versioned_in_path_filename}|build_tag.txt)$"
|
||||
)
|
||||
|
||||
# cleanup the temp files
|
||||
file(REMOVE_RECURSE ${temp_dir})
|
||||
message(STATUS "Latest build update complete!")
|
||||
|
||||
endfunction()
|
||||
@ -0,0 +1,5 @@
|
||||
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
#
|
||||
#
|
||||
@ -0,0 +1,34 @@
|
||||
#
|
||||
# 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
|
||||
#
|
||||
#
|
||||
|
||||
if(NOT CMAKE_C_COMPILER AND NOT CMAKE_CXX_COMPILER AND NOT "$ENV{CC}" AND NOT "$ENV{CXX}")
|
||||
set(path_search
|
||||
/bin
|
||||
/usr/bin
|
||||
/usr/local/bin
|
||||
/sbin
|
||||
/usr/sbin
|
||||
/usr/local/sbin
|
||||
)
|
||||
list(TRANSFORM path_search APPEND "/clang-[0-9]*")
|
||||
file(GLOB clang_versions ${path_search})
|
||||
if(clang_versions)
|
||||
# Find and pick the highest installed version
|
||||
list(SORT clang_versions COMPARE NATURAL)
|
||||
list(GET clang_versions 0 clang_higher_version_path)
|
||||
string(REGEX MATCH "clang-([0-9.]*)" clang_higher_version ${clang_higher_version_path})
|
||||
if(CMAKE_MATCH_1)
|
||||
set(CMAKE_C_COMPILER clang-${CMAKE_MATCH_1})
|
||||
set(CMAKE_CXX_COMPILER clang++-${CMAKE_MATCH_1})
|
||||
else()
|
||||
message(FATAL_ERROR "Clang not found, please install clang")
|
||||
endif()
|
||||
else()
|
||||
message(FATAL_ERROR "Clang not found, please install clang")
|
||||
endif()
|
||||
endif()
|
||||
@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# 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
|
||||
#
|
||||
#
|
||||
|
||||
set -o errexit # exit on the first failure encountered
|
||||
|
||||
{
|
||||
if [[ ! -f "/usr/lib/x86_64-linux-gnu/libffi.so.6" ]]; then
|
||||
sudo ln -s /usr/lib/x86_64-linux-gnu/libffi.so.7 /usr/lib/x86_64-linux-gnu/libffi.so.6
|
||||
fi
|
||||
|
||||
pushd @CPACK_PACKAGING_INSTALL_PREFIX@
|
||||
python/get_python.sh
|
||||
chown -R $SUDO_USER .
|
||||
popd
|
||||
} &> /dev/null # hide output
|
||||
@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# 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
|
||||
#
|
||||
#
|
||||
|
||||
set -o errexit # exit on the first failure encountered
|
||||
|
||||
{
|
||||
pushd @CPACK_PACKAGING_INSTALL_PREFIX@
|
||||
popd
|
||||
} &> /dev/null # hide output
|
||||
@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# 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
|
||||
#
|
||||
#
|
||||
|
||||
set -o errexit # exit on the first failure encountered
|
||||
|
||||
{
|
||||
# We dont remove this symlink that we potentially created because the user could have
|
||||
# installed themselves.
|
||||
#if [[ -L "/usr/lib/x86_64-linux-gnu/libffi.so.6" ]]; then
|
||||
# sudo rm /usr/lib/x86_64-linux-gnu/libffi.so.6
|
||||
#fi
|
||||
|
||||
pushd @CPACK_PACKAGING_INSTALL_PREFIX@
|
||||
# delete python downloads
|
||||
rm -rf python/downloaded_packages python/runtime
|
||||
popd
|
||||
} &> /dev/null # hide output
|
||||
@ -0,0 +1,62 @@
|
||||
#
|
||||
# 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()
|
||||
@ -0,0 +1,16 @@
|
||||
#
|
||||
# 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/PackagingPreBuild_common.cmake)
|
||||
|
||||
if(NOT CPACK_UPLOAD_URL) # Skip signing if we are not uploading the package
|
||||
return()
|
||||
endif()
|
||||
|
||||
# TODO: do signing
|
||||
@ -0,0 +1,56 @@
|
||||
#
|
||||
# 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
|
||||
#
|
||||
#
|
||||
|
||||
set(CPACK_GENERATOR DEB)
|
||||
|
||||
set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/${CPACK_PACKAGE_NAME}/${LY_VERSION_STRING}")
|
||||
|
||||
set(_cmake_package_name "cmake-${CPACK_DESIRED_CMAKE_VERSION}-linux-x86_64")
|
||||
set(CPACK_CMAKE_PACKAGE_FILE "${_cmake_package_name}.tar.gz")
|
||||
set(CPACK_CMAKE_PACKAGE_HASH "3f827544f9c82e74ddf5016461fdfcfea4ede58a26f82612f473bf6bfad8bfc2")
|
||||
|
||||
# get all the package dependencies, extracted from scripts\build\build_node\Platform\Linux\package-list.ubuntu-focal.txt
|
||||
set(package_dependencies
|
||||
libffi7
|
||||
clang-12
|
||||
ninja-build
|
||||
# Build Libraries
|
||||
libglu1-mesa-dev # For Qt (GL dependency)
|
||||
libxcb-xinerama0 # For Qt plugins at runtime
|
||||
libxcb-xinput0 # For Qt plugins at runtime
|
||||
libfontconfig1-dev # For Qt plugins at runtime
|
||||
libcurl4-openssl-dev # For HttpRequestor
|
||||
# libsdl2-dev # for WWise/Audio
|
||||
libxcb-xkb-dev # For xcb keyboard input
|
||||
libxkbcommon-x11-dev # For xcb keyboard input
|
||||
libxkbcommon-dev # For xcb keyboard input
|
||||
libxcb-xfixes0-dev # For mouse input
|
||||
libxcb-xinput-dev # For mouse input
|
||||
zlib1g-dev
|
||||
mesa-common-dev
|
||||
)
|
||||
list(JOIN package_dependencies "," CPACK_DEBIAN_PACKAGE_DEPENDS)
|
||||
|
||||
# Post-installation and pre/post removal scripts
|
||||
configure_file("${LY_ROOT_FOLDER}/cmake/Platform/${PAL_PLATFORM_NAME}/Packaging/postinst.in"
|
||||
"${CMAKE_BINARY_DIR}/cmake/Platform/${PAL_PLATFORM_NAME}/Packaging/postinst"
|
||||
@ONLY
|
||||
)
|
||||
configure_file("${LY_ROOT_FOLDER}/cmake/Platform/${PAL_PLATFORM_NAME}/Packaging/prerm.in"
|
||||
"${CMAKE_BINARY_DIR}/cmake/Platform/${PAL_PLATFORM_NAME}/Packaging/prerm"
|
||||
@ONLY
|
||||
)
|
||||
configure_file("${LY_ROOT_FOLDER}/cmake/Platform/${PAL_PLATFORM_NAME}/Packaging/postrm.in"
|
||||
"${CMAKE_BINARY_DIR}/cmake/Platform/${PAL_PLATFORM_NAME}/Packaging/postrm"
|
||||
@ONLY
|
||||
)
|
||||
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
|
||||
${CMAKE_BINARY_DIR}/cmake/Platform/Linux/Packaging/postinst
|
||||
${CMAKE_BINARY_DIR}/cmake/Platform/Linux/Packaging/prerm
|
||||
${CMAKE_BINARY_DIR}/cmake/Platform/Linux/Packaging/postrm
|
||||
)
|
||||
@ -0,0 +1,10 @@
|
||||
#
|
||||
# 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)
|
||||
@ -0,0 +1,10 @@
|
||||
#
|
||||
# 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/PackagingPreBuild_common.cmake)
|
||||
@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# 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
|
||||
#
|
||||
#
|
||||
|
||||
set -o errexit # exit on the first failure encountered
|
||||
|
||||
BASEDIR=$(dirname "$0")
|
||||
source $BASEDIR/build_linux.sh
|
||||
|
||||
source $BASEDIR/installer_linux.sh
|
||||
@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# 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
|
||||
#
|
||||
#
|
||||
|
||||
set -o errexit # exit on the first failure encountered
|
||||
|
||||
BASEDIR=$(dirname "$0")
|
||||
source $BASEDIR/env_linux.sh
|
||||
|
||||
mkdir -p ${OUTPUT_DIRECTORY}
|
||||
SOURCE_DIRECTORY=${PWD}
|
||||
pushd $OUTPUT_DIRECTORY
|
||||
|
||||
if ! command -v cpack &> /dev/null; then
|
||||
echo "[ci_build] CPack not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo [ci_build] cpack --version
|
||||
cpack --version
|
||||
|
||||
eval echo [ci_build] cpack -C ${CONFIGURATION} ${CPACK_OPTIONS}
|
||||
eval cpack -C ${CONFIGURATION} ${CPACK_OPTIONS}
|
||||
|
||||
popd
|
||||
Loading…
Reference in New Issue