summaryrefslogtreecommitdiff
path: root/chromium/remoting/ios/app/resources/BUILD.gn
blob: 0e1d763be0b6ecd2f40f906d139fb818b4baf434 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/config/chrome_build.gni")
import("//build/config/ios/asset_catalog.gni")
import("//build/config/ios/rules.gni")
import("//remoting/build/config/remoting_build.gni")
import("//remoting/remoting_locales.gni")

group("assets") {
  public_deps = [
    ":Background",
    "//third_party/material_design_icons:ic_arrow_forward_white",
    "//third_party/material_design_icons:ic_check_box_outline_blank_white",
    "//third_party/material_design_icons:ic_check_box_white",
    "//third_party/material_design_icons:ic_chevron_left_white_36pt",
    "//third_party/material_design_icons:ic_close_white",
    "//third_party/material_design_icons:ic_desktop_windows_white",
    "//third_party/material_design_icons:ic_feedback",
    "//third_party/material_design_icons:ic_help",
    "//third_party/material_design_icons:ic_menu_white",
    "//third_party/material_design_icons:ic_radio_button_checked_white",
    "//third_party/material_design_icons:ic_radio_button_unchecked_white",
    "//third_party/material_design_icons:ic_refresh_white",
    "//third_party/material_design_icons:ic_settings_white",

    # Note: those assets seems to be unreferenced by the code, according to
    # grep. Maybe they are in downstream repository, so leaving them for now.
    "//third_party/material_design_icons:ic_desktop_windows",
    "//third_party/material_design_icons:ic_fullscreen",
    "//third_party/material_design_icons:ic_fullscreen_exit",
    "//third_party/material_design_icons:ic_mouse",
    "//third_party/material_design_icons:ic_touch_app",
  ]
}

imageset("Background") {
  sources = [
    "Assets.xcassets/Background.imageset/Contents.json",
    "Assets.xcassets/Background.imageset/bkg1.jpg",
    "Assets.xcassets/Background.imageset/bkg1_2x.jpg",
  ]
}

group("launchscreen_assets") {
  public_deps = [
    ":launchscreen_app_logo",
    ":launchscreen_brand_name",
  ]
}

imageset("launchscreen_app_logo") {
  sources = [
    "launchscreen_images.xcassets/launchscreen_app_logo.imageset/Contents.json",
    "launchscreen_images.xcassets/launchscreen_app_logo.imageset/launchscreen_app_logo.png",
    "launchscreen_images.xcassets/launchscreen_app_logo.imageset/launchscreen_app_logo@2x.png",
    "launchscreen_images.xcassets/launchscreen_app_logo.imageset/launchscreen_app_logo@3x.png",
  ]
}

imageset("launchscreen_brand_name") {
  sources = [
    "launchscreen_images.xcassets/launchscreen_brand_name.imageset/Contents.json",
    "launchscreen_images.xcassets/launchscreen_brand_name.imageset/launchscreen_brand_name.png",
    "launchscreen_images.xcassets/launchscreen_brand_name.imageset/launchscreen_brand_name@2x.png",
    "launchscreen_images.xcassets/launchscreen_brand_name.imageset/launchscreen_brand_name@3x.png",
  ]
}

appiconset("remoting_icons") {
  sources = [
    "chromium/AppIcon.appiconset/Contents.json",
    "chromium/AppIcon.appiconset/Icon-1024.png",
    "chromium/AppIcon.appiconset/Icon-120.png",
    "chromium/AppIcon.appiconset/Icon-152.png",
    "chromium/AppIcon.appiconset/Icon-167.png",
    "chromium/AppIcon.appiconset/Icon-180.png",
    "chromium/AppIcon.appiconset/Icon-29.png",
    "chromium/AppIcon.appiconset/Icon-40.png",
    "chromium/AppIcon.appiconset/Icon-58.png",
    "chromium/AppIcon.appiconset/Icon-76.png",
    "chromium/AppIcon.appiconset/Icon-80.png",
    "chromium/AppIcon.appiconset/Icon-87.png",
  ]
}

# i18n

action("infoplist_strings") {
  _source = "InfoPlist.strings.jinja2"
  sources = [ _source ]

  script = "//remoting/tools/build/remoting_localize.py"
  args = [
           "--locale_dir",
           rebase_path(resources_locale_dir, root_build_dir),
           "--variables",
           rebase_path(branding_path, root_build_dir),
           "--template",
           rebase_path(_source, root_build_dir),
           "--locale_output",
           rebase_path(
               "$root_gen_dir/remoting/ios/app/InfoPlist_Strings/@{json_suffix}.lproj/InfoPlist.strings",
               root_build_dir),
         ] + remoting_locales_with_underscores

  outputs = []
  foreach(locale, remoting_locales_with_underscores) {
    outputs += [ "$root_gen_dir/remoting/ios/app/InfoPlist_Strings/$locale.lproj/InfoPlist.strings" ]
  }

  deps = [
    "//remoting/resources",
    "//remoting/resources:strings",
  ]
}

foreach(locale, remoting_locales_with_underscores) {
  bundle_data("locale_${locale}_bundle_data") {
    sources = [
      "$root_gen_dir/remoting/ios/app/InfoPlist_Strings/$locale.lproj/InfoPlist.strings",
      "$root_out_dir/remoting/resources/$locale.lproj/locale.pak",
    ]
    outputs = [ "{{bundle_resources_dir}}/$locale.lproj/{{source_file_part}}" ]
    public_deps = [
      ":infoplist_strings",
      "//remoting/resources:copy_locales",
    ]
  }
}