working with fixup bundle and incrementals of 1s
This commit is contained in:
@@ -88,8 +88,3 @@ if(LY_TIMESTAMP_REFERENCE)
|
||||
# Touch the timestamp file
|
||||
file(TOUCH ${LY_TIMESTAMP_FILE})
|
||||
endif()
|
||||
|
||||
if(LY_LOCK_FILE)
|
||||
file(LOCK ${LY_LOCK_FILE} RELEASE)
|
||||
file(REMOVE ${LY_LOCK_FILE})
|
||||
endif()
|
||||
@@ -9,4 +9,19 @@
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
#
|
||||
|
||||
set(LY_RUNTIME_DEPENDENCIES_HEADER
|
||||
"function(ly_copy source_file target_directory)
|
||||
get_filename_component(target_filename \"\${source_file}\" NAME)
|
||||
if(NOT \"\${source_file}\" STREQUAL \"\${target_directory}/\${target_filename}\")
|
||||
if(NOT EXISTS \"\${target_directory}\")
|
||||
file(MAKE_DIRECTORY \"\${target_directory}\")
|
||||
endif()
|
||||
if(\"\${source_file}\" IS_NEWER_THAN \"\${target_directory}/\${target_filename}\")
|
||||
file(LOCK \"\${CMAKE_BINARY_DIR}/runtimedependencies.lock\" GUARD FUNCTION TIMEOUT 30)
|
||||
file(COPY \"\${source_file}\" DESTINATION \"\${target_directory}\" FILE_PERMISSIONS ${LY_COPY_PERMISSIONS})
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
\n")
|
||||
|
||||
include(cmake/Platform/Common/RuntimeDependencies_common.cmake)
|
||||
@@ -247,22 +247,7 @@ function(ly_delayed_generate_runtime_dependencies)
|
||||
endif()
|
||||
|
||||
unset(runtime_dependencies)
|
||||
set(runtime_commands "
|
||||
function(ly_copy source_file target_directory)
|
||||
get_filename_component(target_filename \"\${source_file}\" NAME)
|
||||
if(NOT \"\${source_file}\" STREQUAL \"\${target_directory}/\${target_filename}\")
|
||||
if(NOT EXISTS \"\${target_directory}\")
|
||||
file(MAKE_DIRECTORY \"\${target_directory}\")
|
||||
endif()
|
||||
if(\"\${source_file}\" IS_NEWER_THAN \"\${target_directory}/\${target_filename}\")
|
||||
file(LOCK \"\${target_directory}/\${target_filename}.lock\" GUARD FUNCTION TIMEOUT 30)
|
||||
file(COPY \"\${source_file}\" DESTINATION \"\${target_directory}\" FILE_PERMISSIONS ${LY_COPY_PERMISSIONS})
|
||||
file(LOCK \"\${target_directory}/\${target_filename}.lock\" RELEASE)
|
||||
file(REMOVE \"\${target_directory}/\${target_filename}.lock\")
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
\n")
|
||||
set(runtime_commands ${LY_RUNTIME_DEPENDENCIES_HEADER})
|
||||
|
||||
ly_get_runtime_dependencies(runtime_dependencies ${target})
|
||||
foreach(runtime_dependency ${runtime_dependencies})
|
||||
@@ -270,6 +255,8 @@ endfunction()
|
||||
ly_get_runtime_dependency_command(runtime_command ${runtime_dependency})
|
||||
string(APPEND runtime_commands ${runtime_command})
|
||||
endforeach()
|
||||
|
||||
string(APPEND runtime_commands ${LY_RUNTIME_DEPENDENCIES_FOOTER})
|
||||
|
||||
# Generate the output file
|
||||
set(target_file_dir "$<TARGET_FILE_DIR:${target}>")
|
||||
|
||||
@@ -9,4 +9,19 @@
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
#
|
||||
|
||||
set(LY_RUNTIME_DEPENDENCIES_HEADER
|
||||
"function(ly_copy source_file target_directory)
|
||||
get_filename_component(target_filename \"\${source_file}\" NAME)
|
||||
if(NOT \"\${source_file}\" STREQUAL \"\${target_directory}/\${target_filename}\")
|
||||
if(NOT EXISTS \"\${target_directory}\")
|
||||
file(MAKE_DIRECTORY \"\${target_directory}\")
|
||||
endif()
|
||||
if(\"\${source_file}\" IS_NEWER_THAN \"\${target_directory}/\${target_filename}\")
|
||||
file(LOCK \"\${CMAKE_BINARY_DIR}/runtimedependencies.lock\" GUARD FUNCTION TIMEOUT 30)
|
||||
file(COPY \"\${source_file}\" DESTINATION \"\${target_directory}\" FILE_PERMISSIONS ${LY_COPY_PERMISSIONS} FOLLOW_SYMLINK_CHAIN)
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
\n")
|
||||
|
||||
include(cmake/Platform/Common/RuntimeDependencies_common.cmake)
|
||||
@@ -9,4 +9,61 @@
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
#
|
||||
|
||||
set(LY_RUNTIME_DEPENDENCIES_HEADER
|
||||
"
|
||||
set(anything_new FALSE)
|
||||
|
||||
function(ly_copy source_file target_directory)
|
||||
# If source_file is a Framework and target_directory is a bundle
|
||||
if(\"\${source_file}\" MATCHES \".[Ff]ramework\" AND \"\${target_directory}\" MATCHES \".app/Contents/MacOS\")
|
||||
return() # skip, it will be fixed with fixup_bundle
|
||||
elseif(\"\${source_file}\" MATCHES \"qt/plugins\" AND \"\${target_directory}\" MATCHES \".app/Contents/MacOS\")
|
||||
# fixup the destination so it ends up in Contents/Plugins
|
||||
string(REGEX REPLACE \"(.*.app/Contents)/MacOS(.*)\" \"\\\\1/plugins\\\\2\" target_directory \"\${target_directory}\")
|
||||
elseif(\"\${source_file}\" MATCHES \"qt/translations\" AND \"\${target_directory}\" MATCHES \".app/Contents/MacOS\")
|
||||
return() # skip
|
||||
endif()
|
||||
get_filename_component(target_filename \"\${source_file}\" NAME)
|
||||
if(NOT \"\${source_file}\" STREQUAL \"\${target_directory}/\${target_filename}\")
|
||||
if(NOT EXISTS \"\${target_directory}\")
|
||||
file(MAKE_DIRECTORY \"\${target_directory}\")
|
||||
endif()
|
||||
if(\"\${source_file}\" IS_NEWER_THAN \"\${target_directory}/\${target_filename}\")
|
||||
file(LOCK \"\${CMAKE_BINARY_DIR}/runtimedependencies.lock\" GUARD FUNCTION TIMEOUT 30)
|
||||
file(COPY \"\${source_file}\" DESTINATION \"\${target_directory}\" FILE_PERMISSIONS ${LY_COPY_PERMISSIONS} FOLLOW_SYMLINK_CHAIN)
|
||||
set(anything_new TRUE)
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
\n")
|
||||
|
||||
set(LY_RUNTIME_DEPENDENCIES_FOOTER
|
||||
"
|
||||
if(@target_file_dir@ MATCHES \".app/Contents/MacOS\")
|
||||
if(NOT anything_new)
|
||||
string(REGEX REPLACE \"(.*.app)/Contents/MacOS.*\" \"\\\\1\" bundle_path \"@target_file_dir@\")
|
||||
set(timestamp_file \"\${bundle_path}.fixup.stamp\")
|
||||
if(NOT EXISTS \"\${timestamp_file}\")
|
||||
set(anything_new TRUE)
|
||||
else()
|
||||
file(GLOB_RECURSE files_in_bundle FOLLOW_SYMLINKS \"\${bundle_path}\")
|
||||
foreach(file \${files_in_bundle})
|
||||
if(\${file} IS_NEWER_THAN \"\${timestamp_file}\")
|
||||
set(anything_new TRUE)
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
endif()
|
||||
if(anything_new)
|
||||
include(BundleUtilities)
|
||||
fixup_bundle(\"\${bundle_path}\" \"\" \"\")
|
||||
file(TOUCH \"\${timestamp_file}\")
|
||||
endif()
|
||||
endif()
|
||||
")
|
||||
|
||||
|
||||
|
||||
|
||||
include(cmake/Platform/Common/RuntimeDependencies_common.cmake)
|
||||
@@ -9,4 +9,19 @@
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
#
|
||||
|
||||
set(LY_RUNTIME_DEPENDENCIES_HEADER
|
||||
"function(ly_copy source_file target_directory)
|
||||
get_filename_component(target_filename \"\${source_file}\" NAME)
|
||||
if(NOT \"\${source_file}\" STREQUAL \"\${target_directory}/\${target_filename}\")
|
||||
if(NOT EXISTS \"\${target_directory}\")
|
||||
file(MAKE_DIRECTORY \"\${target_directory}\")
|
||||
endif()
|
||||
if(\"\${source_file}\" IS_NEWER_THAN \"\${target_directory}/\${target_filename}\")
|
||||
file(LOCK \"\${CMAKE_BINARY_DIR}/runtimedependencies.lock\" GUARD FUNCTION TIMEOUT 30)
|
||||
file(COPY \"\${source_file}\" DESTINATION \"\${target_directory}\" FILE_PERMISSIONS ${LY_COPY_PERMISSIONS})
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
\n")
|
||||
|
||||
include(cmake/Platform/Common/RuntimeDependencies_common.cmake)
|
||||
Reference in New Issue
Block a user