Cherry-pick of Linux deb package to stabilization (#5778)

* 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>
This commit is contained in:
Esteban Papp
2021-11-19 14:07:25 -08:00
committed by GitHub
parent 3cf3e45b38
commit dbc5d7a8bc
67 changed files with 1475 additions and 743 deletions
+23 -14
View File
@@ -130,27 +130,36 @@ endfunction()
function(ly_copy source_file target_directory)
if("${source_file}" MATCHES "\\.[Ff]ramework[^\\.]")
if("${source_file}" MATCHES "\\.[Ff]ramework")
# fixup origin to copy the whole Framework folder
string(REGEX REPLACE "(.*\\.[Ff]ramework).*" "\\1" source_file "${source_file}")
endif()
get_filename_component(target_filename "${source_file}" NAME)
file(COPY "${source_file}" DESTINATION "${target_directory}" FILE_PERMISSIONS @LY_COPY_PERMISSIONS@ FOLLOW_SYMLINK_CHAIN)
# Our Qt and Python frameworks aren't in the correct bundle format to be codesigned.
if("${target_filename}" MATCHES "(Qt[^.]+)\\.[Ff]ramework")
fixup_qt_framework(${CMAKE_MATCH_1} "${target_directory}/${target_filename}")
# For some Qt frameworks(QtCore), signing the bundle doesn't work because of bundle
# format issues(despite the fixes above). But once we've patched the framework above, there's
# only one executable that we need to sign so we can do it directly.
set(target_filename "${target_filename}/Versions/5/${CMAKE_MATCH_1}")
elseif("${target_filename}" MATCHES "Python.framework")
fixup_python_framework("${target_directory}/${target_filename}")
codesign_python_framework_binaries("${target_directory}/${target_filename}")
cmake_path(GET source_file FILENAME target_filename)
cmake_path(APPEND full_target_directory "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}" "${target_directory}")
cmake_path(APPEND target_file "${full_target_directory}" "${target_filename}")
if("${source_file}" IS_NEWER_THAN "${target_file}")
message(STATUS "Copying ${source_file} to ${full_target_directory}...")
file(MAKE_DIRECTORY "${full_target_directory}")
file(COPY "${source_file}" DESTINATION "${full_target_directory}" FILE_PERMISSIONS @LY_COPY_PERMISSIONS@ FOLLOW_SYMLINK_CHAIN)
file(TOUCH_NOCREATE "${target_file}")
# Our Qt and Python frameworks aren't in the correct bundle format to be codesigned.
if("${target_filename}" MATCHES "(Qt[^.]+)\\.[Ff]ramework")
fixup_qt_framework(${CMAKE_MATCH_1} "${target_file}")
# For some Qt frameworks(QtCore), signing the bundle doesn't work because of bundle
# format issues(despite the fixes above). But once we've patched the framework above, there's
# only one executable that we need to sign so we can do it directly.
set(target_filename "${target_filename}/Versions/5/${CMAKE_MATCH_1}")
elseif("${target_filename}" MATCHES "Python.framework")
fixup_python_framework("${target_file}")
codesign_python_framework_binaries("${target_file}")
endif()
codesign_file("${target_file}" "none")
endif()
codesign_file("${target_directory}/${target_filename}" "none")
endfunction()