blob: 30696756b36a81d624a68e4cdf0ab0cde94600e1 [file] [log] [blame]
# Copyright 2018 The Cobalt Authors. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# See the License for the specific language governing permissions and
# limitations under the License.
# This file is meant to be included into a platform deploy gypi to provide an
# action to collect static content that should be deployed with a given target.
# The action builds a symlink farm in the content/deploy/<executable_name>
# directory, pointing to the subset of data in content/data that was populated
# by some dependency of the target being deployed.
'variables': {
# Root of the content tree that should be deployed with a given target.
'content_deploy_dir': '<(sb_static_contents_output_base_dir)/deploy/<(executable_name)',
# Stamp file that will be updated after the symlink farm is built.
'content_deploy_stamp_file': '<(content_deploy_dir).stamp',
# This is a list of relative paths within both input_dir and output_dir,
# and is named such that GYP does not relativize it. Values are merged in
# from the all_dependent_settings blocks of gypi files that copy static data
# into content/data.
'content_deploy_subdirs': [],
# Some platforms will symlink to a folder containing relative symlinks,
# and this will cause an invalid path. To get around this these platforms
# should set |content_deploy_use_absolute_symlinks| to 1.
'content_deploy_use_absolute_symlinks%': 0,
# Implementation detail to add conditional args.
'collect_deploy_content_extra_args': [],
'conditions': [
['content_deploy_use_absolute_symlinks == 1', {
'variables': {
'collect_deploy_content_extra_args': [ '--use_absolute_symlinks' ],
'actions': [{
'action_name': 'collect_deploy_content',
'variables': {
'input_dir': '<(sb_static_contents_output_data_dir)',
'output_dir': '<(content_deploy_dir)',
# Re-collect the content whenever the executable is rebuilt.
'inputs': [ '<(executable_file)'],
'outputs': [ '<(content_deploy_stamp_file)' ],
'action': [
'-i', '<(input_dir)',
'-o', '<(output_dir)',
'-s', '<(content_deploy_stamp_file)',
'message': 'Collect content: <(executable_name)',