tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

convert_plist.gni (1243B)


      1 # Copyright 2021 The Chromium Authors
      2 # Use of this source code is governed by a BSD-style license that can be
      3 # found in the LICENSE file.
      4 
      5 # Convert plist file to given format.
      6 #
      7 # Arguments
      8 #
      9 #   source:
     10 #     string, path to the plist file to convert
     11 #
     12 #   output:
     13 #     string, path to the converted plist, must be under $root_build_dir
     14 #
     15 #   format:
     16 #     string, the format to convert the plist to. Either "binary1" or "xml1".
     17 template("convert_plist") {
     18   assert(defined(invoker.source), "source must be defined for $target_name")
     19   assert(defined(invoker.output), "output must be defined for $target_name")
     20   assert(defined(invoker.format), "format must be defined for $target_name")
     21 
     22   action(target_name) {
     23     forward_variables_from(invoker,
     24                            [
     25                              "visibility",
     26                              "testonly",
     27                              "deps",
     28                            ])
     29 
     30     script = "//chromium/build/apple/plist_util.py"
     31     sources = [ invoker.source ]
     32     outputs = [ invoker.output ]
     33     args = [
     34       "merge",
     35       "--format=${invoker.format}",
     36       "-o",
     37       rebase_path(invoker.output, root_build_dir),
     38       rebase_path(invoker.source, root_build_dir),
     39     ]
     40   }
     41 }