Home | History | Annotate | Download | only in bundle-resources
      1 # Copyright (c) 2013 Google Inc. All rights reserved.
      2 # Use of this source code is governed by a BSD-style license that can be
      3 # found in the LICENSE file.
      4 {
      5   'targets': [
      6     {
      7       'target_name': 'resource',
      8       'type': 'executable',
      9       'mac_bundle': 1,
     10       'mac_bundle_resources': [
     11         'secret.txt',
     12         'executable-file.sh',
     13       ],
     14     },
     15     # A rule with process_outputs_as_mac_bundle_resources should copy files
     16     # into the Resources folder.
     17     {
     18       'target_name': 'source_rule',
     19       'type': 'executable',
     20       'mac_bundle': 1,
     21       'sources': [
     22         'secret.txt',
     23       ],
     24       'rules': [
     25         {
     26           'rule_name': 'bundlerule',
     27           'extension': 'txt',
     28           'outputs': [
     29             '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).txt',
     30           ],
     31           'action': ['./change.sh', '<(RULE_INPUT_PATH)', '<@(_outputs)'],
     32           'message': 'Running rule on <(RULE_INPUT_PATH)',
     33           'process_outputs_as_mac_bundle_resources': 1,
     34         },
     35       ],
     36     },
     37     # So should an ordinary rule acting on mac_bundle_resources.
     38     {
     39       'target_name': 'resource_rule',
     40       'type': 'executable',
     41       'mac_bundle': 1,
     42       'mac_bundle_resources': [
     43         'secret.txt',
     44       ],
     45       'rules': [
     46         {
     47           'rule_name': 'bundlerule',
     48           'extension': 'txt',
     49           'outputs': [
     50             '<(INTERMEDIATE_DIR)/<(RULE_INPUT_ROOT).txt',
     51           ],
     52           'action': ['./change.sh', '<(RULE_INPUT_PATH)', '<@(_outputs)'],
     53           'message': 'Running rule on <(RULE_INPUT_PATH)',
     54         },
     55       ],
     56     },
     57   ],
     58 }
     59 
     60