Home | History | Annotate | Download | only in app
      1 # Copyright 2014 The Chromium Authors. 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 import("//tools/grit/grit_rule.gni")
      6 
      7 # GYP version: chrome/chrome_resources.gyp:chrome_strings
      8 #              (generate_generated_resources action)
      9 grit("generated_resources") {
     10   source = "generated_resources.grd"
     11   output_dir = "$root_gen_dir/chrome"
     12   use_qualified_include = true
     13   outputs = [
     14     "grit/generated_resources.h",
     15     "generated_resources_am.pak",
     16     "generated_resources_ar.pak",
     17     "generated_resources_bg.pak",
     18     "generated_resources_bn.pak",
     19     "generated_resources_ca.pak",
     20     "generated_resources_cs.pak",
     21     "generated_resources_da.pak",
     22     "generated_resources_de.pak",
     23     "generated_resources_el.pak",
     24     "generated_resources_en-GB.pak",
     25     "generated_resources_en-US.pak",
     26     "generated_resources_es.pak",
     27     "generated_resources_es-419.pak",
     28     "generated_resources_et.pak",
     29     "generated_resources_fa.pak",
     30     "generated_resources_fake-bidi.pak",
     31     "generated_resources_fi.pak",
     32     "generated_resources_fil.pak",
     33     "generated_resources_fr.pak",
     34     "generated_resources_gu.pak",
     35     "generated_resources_he.pak",
     36     "generated_resources_hi.pak",
     37     "generated_resources_hr.pak",
     38     "generated_resources_hu.pak",
     39     "generated_resources_id.pak",
     40     "generated_resources_it.pak",
     41     "generated_resources_ja.pak",
     42     "generated_resources_kn.pak",
     43     "generated_resources_ko.pak",
     44     "generated_resources_lt.pak",
     45     "generated_resources_lv.pak",
     46     "generated_resources_ml.pak",
     47     "generated_resources_mr.pak",
     48     "generated_resources_ms.pak",
     49     "generated_resources_nl.pak",
     50     "generated_resources_nb.pak",
     51     "generated_resources_pl.pak",
     52     "generated_resources_pt-BR.pak",
     53     "generated_resources_pt-PT.pak",
     54     "generated_resources_ro.pak",
     55     "generated_resources_ru.pak",
     56     "generated_resources_sk.pak",
     57     "generated_resources_sl.pak",
     58     "generated_resources_sr.pak",
     59     "generated_resources_sv.pak",
     60     "generated_resources_sw.pak",
     61     "generated_resources_ta.pak",
     62     "generated_resources_te.pak",
     63     "generated_resources_th.pak",
     64     "generated_resources_tr.pak",
     65     "generated_resources_uk.pak",
     66     "generated_resources_vi.pak",
     67     "generated_resources_zh-CN.pak",
     68     "generated_resources_zh-TW.pak",
     69   ]
     70 }
     71 
     72 # GYP version: chrome/chrome_resources.gyp:chrome_strings_map
     73 action("make_generated_resources_map") {
     74   # Targets should depend on generated_resources_map instead.
     75   visibility = [ ":generated_resources_map" ]
     76 
     77   script = "//chrome/browser/metrics/variations/generate_resources_map.py"
     78 
     79   inputs = [ "$root_gen_dir/chrome/grit/generated_resources.h" ]
     80   outputs = [ "$root_gen_dir/chrome/generated_resources_map.cc" ]
     81 
     82   args = rebase_path(inputs, root_build_dir) +
     83       rebase_path(outputs, root_build_dir)
     84 
     85   deps = [ ":generated_resources" ]
     86 }
     87 
     88 # Collect the generated .cc file from make_generated_resources_map and put it
     89 # in a source set so targets that depend on it will link the source rather than
     90 # specifying it manually. This doesn't happen in the GYP build.
     91 source_set("generated_resources_map") {
     92   sources = get_target_outputs(":make_generated_resources_map")
     93 }
     94 
     95 # GYP version: chrome/chrome_resources.gyp:chrome_strings
     96 #              (generate_google_chrome_strings action)
     97 grit("google_chrome_strings") {
     98   source = "google_chrome_strings.grd"
     99   output_dir = "$root_gen_dir/chrome"
    100   use_qualified_include = true
    101   outputs = [
    102     "grit/google_chrome_strings.h",
    103     "google_chrome_strings_am.pak",
    104     "google_chrome_strings_ar.pak",
    105     "google_chrome_strings_bg.pak",
    106     "google_chrome_strings_bn.pak",
    107     "google_chrome_strings_ca.pak",
    108     "google_chrome_strings_cs.pak",
    109     "google_chrome_strings_da.pak",
    110     "google_chrome_strings_de.pak",
    111     "google_chrome_strings_el.pak",
    112     "google_chrome_strings_en-GB.pak",
    113     "google_chrome_strings_en-US.pak",
    114     "google_chrome_strings_es.pak",
    115     "google_chrome_strings_es-419.pak",
    116     "google_chrome_strings_et.pak",
    117     "google_chrome_strings_fa.pak",
    118     "google_chrome_strings_fi.pak",
    119     "google_chrome_strings_fil.pak",
    120     "google_chrome_strings_fr.pak",
    121     "google_chrome_strings_gu.pak",
    122     "google_chrome_strings_he.pak",
    123     "google_chrome_strings_hi.pak",
    124     "google_chrome_strings_hr.pak",
    125     "google_chrome_strings_hu.pak",
    126     "google_chrome_strings_id.pak",
    127     "google_chrome_strings_it.pak",
    128     "google_chrome_strings_ja.pak",
    129     "google_chrome_strings_kn.pak",
    130     "google_chrome_strings_ko.pak",
    131     "google_chrome_strings_lt.pak",
    132     "google_chrome_strings_lv.pak",
    133     "google_chrome_strings_ml.pak",
    134     "google_chrome_strings_mr.pak",
    135     "google_chrome_strings_ms.pak",
    136     "google_chrome_strings_nl.pak",
    137     "google_chrome_strings_nb.pak",
    138     "google_chrome_strings_pl.pak",
    139     "google_chrome_strings_pt-BR.pak",
    140     "google_chrome_strings_pt-PT.pak",
    141     "google_chrome_strings_ro.pak",
    142     "google_chrome_strings_ru.pak",
    143     "google_chrome_strings_sk.pak",
    144     "google_chrome_strings_sl.pak",
    145     "google_chrome_strings_sr.pak",
    146     "google_chrome_strings_sv.pak",
    147     "google_chrome_strings_sw.pak",
    148     "google_chrome_strings_ta.pak",
    149     "google_chrome_strings_te.pak",
    150     "google_chrome_strings_th.pak",
    151     "google_chrome_strings_tr.pak",
    152     "google_chrome_strings_uk.pak",
    153     "google_chrome_strings_vi.pak",
    154     "google_chrome_strings_zh-CN.pak",
    155     "google_chrome_strings_zh-TW.pak",
    156     "google_chrome_strings_fake-bidi.pak",
    157   ]
    158 }
    159 
    160 # GYP version: chrome/chrome_resources.gyp:chrome_strings
    161 #              (generate_chromium_strings action)
    162 grit("chromium_strings") {
    163   source = "chromium_strings.grd"
    164   output_dir = "$root_gen_dir/chrome"
    165   use_qualified_include = true
    166   outputs = [
    167     "grit/chromium_strings.h",
    168     "chromium_strings_am.pak",
    169     "chromium_strings_ar.pak",
    170     "chromium_strings_bg.pak",
    171     "chromium_strings_bn.pak",
    172     "chromium_strings_ca.pak",
    173     "chromium_strings_cs.pak",
    174     "chromium_strings_da.pak",
    175     "chromium_strings_de.pak",
    176     "chromium_strings_el.pak",
    177     "chromium_strings_en-GB.pak",
    178     "chromium_strings_en-US.pak",
    179     "chromium_strings_es.pak",
    180     "chromium_strings_es-419.pak",
    181     "chromium_strings_et.pak",
    182     "chromium_strings_fa.pak",
    183     "chromium_strings_fake-bidi.pak",
    184     "chromium_strings_fi.pak",
    185     "chromium_strings_fil.pak",
    186     "chromium_strings_fr.pak",
    187     "chromium_strings_gu.pak",
    188     "chromium_strings_he.pak",
    189     "chromium_strings_hi.pak",
    190     "chromium_strings_hr.pak",
    191     "chromium_strings_hu.pak",
    192     "chromium_strings_id.pak",
    193     "chromium_strings_it.pak",
    194     "chromium_strings_ja.pak",
    195     "chromium_strings_kn.pak",
    196     "chromium_strings_ko.pak",
    197     "chromium_strings_lt.pak",
    198     "chromium_strings_lv.pak",
    199     "chromium_strings_ml.pak",
    200     "chromium_strings_mr.pak",
    201     "chromium_strings_ms.pak",
    202     "chromium_strings_nl.pak",
    203     "chromium_strings_nb.pak",
    204     "chromium_strings_pl.pak",
    205     "chromium_strings_pt-BR.pak",
    206     "chromium_strings_pt-PT.pak",
    207     "chromium_strings_ro.pak",
    208     "chromium_strings_ru.pak",
    209     "chromium_strings_sk.pak",
    210     "chromium_strings_sl.pak",
    211     "chromium_strings_sr.pak",
    212     "chromium_strings_sv.pak",
    213     "chromium_strings_sw.pak",
    214     "chromium_strings_ta.pak",
    215     "chromium_strings_te.pak",
    216     "chromium_strings_th.pak",
    217     "chromium_strings_tr.pak",
    218     "chromium_strings_uk.pak",
    219     "chromium_strings_vi.pak",
    220     "chromium_strings_zh-CN.pak",
    221     "chromium_strings_zh-TW.pak",
    222   ]
    223 }
    224 
    225 source_set("test_support") {
    226   testonly = true
    227   visibility = [ "//chrome/test:test_support" ]
    228 
    229   sources = [
    230     "chrome_main_delegate.cc",
    231     "chrome_main_delegate.h",
    232     "close_handle_hook_win.cc",
    233     "close_handle_hook_win.h",
    234   ]
    235 
    236   deps = [
    237     "//base",
    238     "//chrome/browser",
    239     "//chrome/common",
    240     "//chrome/plugin",
    241     "//chrome/renderer",
    242     "//chrome/utility",
    243     "//content/public/app:both",
    244     "//content/public/common",
    245     "//ui/base",
    246   ]
    247 
    248   if (is_mac) {
    249     sources += [
    250       "chrome_breakpad_client.cc",
    251       "chrome_breakpad_client_mac.mm",
    252       "chrome_main_mac.mm",
    253     ]
    254   }
    255 }
    256