diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
commit | 2aa4a82499d4becd2284cdb482213d541b8804dd (patch) | |
tree | b80bf8bf13c3766139fbacc530efd0dd9d54394c /third_party/python/gyp/test/mac/bundle-resources | |
parent | Initial commit. (diff) | |
download | firefox-upstream.tar.xz firefox-upstream.zip |
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/python/gyp/test/mac/bundle-resources')
4 files changed, 66 insertions, 0 deletions
diff --git a/third_party/python/gyp/test/mac/bundle-resources/change.sh b/third_party/python/gyp/test/mac/bundle-resources/change.sh new file mode 100755 index 0000000000..6d0fe6c7c2 --- /dev/null +++ b/third_party/python/gyp/test/mac/bundle-resources/change.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +tr a-z A-Z < "${1}" > "${2}" diff --git a/third_party/python/gyp/test/mac/bundle-resources/executable-file.sh b/third_party/python/gyp/test/mac/bundle-resources/executable-file.sh new file mode 100755 index 0000000000..796953a1a2 --- /dev/null +++ b/third_party/python/gyp/test/mac/bundle-resources/executable-file.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +echo echo echo echo cho ho o o diff --git a/third_party/python/gyp/test/mac/bundle-resources/secret.txt b/third_party/python/gyp/test/mac/bundle-resources/secret.txt new file mode 100644 index 0000000000..8baef1b4ab --- /dev/null +++ b/third_party/python/gyp/test/mac/bundle-resources/secret.txt @@ -0,0 +1 @@ +abc diff --git a/third_party/python/gyp/test/mac/bundle-resources/test.gyp b/third_party/python/gyp/test/mac/bundle-resources/test.gyp new file mode 100644 index 0000000000..af034ce3f4 --- /dev/null +++ b/third_party/python/gyp/test/mac/bundle-resources/test.gyp @@ -0,0 +1,59 @@ +# Copyright (c) 2013 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +{ + 'targets': [ + { + 'target_name': 'resource', + 'type': 'executable', + 'mac_bundle': 1, + 'mac_bundle_resources': [ + 'secret.txt', + 'executable-file.sh', + ], + }, + # A rule with process_outputs_as_mac_bundle_resources should copy files + # into the Resources folder. + { + 'target_name': 'source_rule', + 'type': 'executable', + 'mac_bundle': 1, + 'sources': [ + 'secret.txt', + ], + 'rules': [ + { + 'rule_name': 'bundlerule', + 'extension': 'txt', + 'outputs': [ + '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).txt', + ], + 'action': ['./change.sh', '<(RULE_INPUT_PATH)', '<@(_outputs)'], + 'message': 'Running rule on <(RULE_INPUT_PATH)', + 'process_outputs_as_mac_bundle_resources': 1, + }, + ], + }, + # So should an ordinary rule acting on mac_bundle_resources. + { + 'target_name': 'resource_rule', + 'type': 'executable', + 'mac_bundle': 1, + 'mac_bundle_resources': [ + 'secret.txt', + ], + 'rules': [ + { + 'rule_name': 'bundlerule', + 'extension': 'txt', + 'outputs': [ + '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).txt', + ], + 'action': ['./change.sh', '<(RULE_INPUT_PATH)', '<@(_outputs)'], + 'message': 'Running rule on <(RULE_INPUT_PATH)', + }, + ], + }, + ], +} + |