summaryrefslogtreecommitdiffstats
path: root/chrome/app/chrome_resources.scons
blob: 6d0d32cec910c71b69863f9a9d5c0446ad5eb2ce (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
# Copyright (c) 2009 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 os

Import('env')

env = env.Clone()

grd_files = [
    '$CHROME_SRC_DIR/chrome/browser/browser_resources.grd',
    '$CHROME_SRC_DIR/chrome/browser/debugger/resources/debugger_resources.grd',
    '$CHROME_SRC_DIR/chrome/common/common_resources.grd',
    '$CHROME_SRC_DIR/chrome/renderer/renderer_resources.grd',
]

for grd_file in grd_files:
  # The fake target gets replaced with real targets when the GRIT Builder
  # runs.
  generated = env.GRIT(
      '$TARGET_ROOT/grit_derived_sources/fake_' + os.path.basename(grd_file),
      grd_file)

if env.Bit('linux'):
  chrome_pak = env.Repack('$TARGET_ROOT/chrome.pak',
      ['$TARGET_ROOT/grit_derived_sources/browser_resources.pak',
       '$TARGET_ROOT/grit_derived_sources/debugger_resources.pak',
       '$TARGET_ROOT/grit_derived_sources/common_resources.pak',
       '$TARGET_ROOT/grit_derived_sources/renderer_resources.pak',
      ]
  )
  i = env.Install('$DESTINATION_ROOT', chrome_pak)
  env.Requires('$DESTINATION_ROOT/chrome', i)