diff options
-rw-r--r-- | build/common.gypi | 11 | ||||
-rw-r--r-- | chrome/chrome.gyp | 24 | ||||
-rw-r--r-- | chrome/chrome_exe.gypi | 12 | ||||
-rw-r--r-- | chrome/chrome_installer.gypi | 45 |
4 files changed, 18 insertions, 74 deletions
diff --git a/build/common.gypi b/build/common.gypi index 694250f..c5a8fac 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -149,6 +149,7 @@ 'enable_hidpi%': '<(enable_hidpi)', 'buildtype%': '<(buildtype)', 'branding%': '<(branding)', + 'branding_path_component%': '<(branding)', 'host_arch%': '<(host_arch)', 'target_arch%': '<(target_arch)', @@ -188,6 +189,14 @@ 'mips_dsp_rev%': 0, 'conditions': [ + ['branding == "Chrome"', { + 'branding_path_component%': 'google_chrome', + }], + + ['branding == "Chromium"', { + 'branding_path_component%': 'chromium', + }], + # Ash needs Aura. ['use_aura==0', { 'use_ash%': 0, @@ -295,6 +304,7 @@ 'use_default_render_theme%': '<(use_default_render_theme)', 'buildtype%': '<(buildtype)', 'branding%': '<(branding)', + 'branding_path_component%': '<(branding_path_component)', 'arm_version%': '<(arm_version)', 'sysroot%': '<(sysroot)', 'chroot_cmd%': '<(chroot_cmd)', @@ -1066,6 +1076,7 @@ # Copy conditionally-set variables out one scope. 'branding%': '<(branding)', + 'branding_path_component%': '<(branding_path_component)', 'buildtype%': '<(buildtype)', 'target_arch%': '<(target_arch)', 'target_subarch%': '<(target_subarch)', diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp index 55d9dce..46108ee 100644 --- a/chrome/chrome.gyp +++ b/chrome/chrome.gyp @@ -411,20 +411,10 @@ { 'target_name': 'chrome_version_resources', 'type': 'none', - 'conditions': [ - ['branding == "Chrome"', { - 'variables': { - 'branding_path': 'app/theme/google_chrome/BRANDING', - }, - }, { # else branding!="Chrome" - 'variables': { - 'branding_path': 'app/theme/chromium/BRANDING', - }, - }], - ], 'variables': { 'output_dir': 'chrome_version', 'template_input_path': 'app/chrome_version.rc.version', + 'branding_path': 'app/theme/<(branding_path_component)/BRANDING', }, 'direct_dependent_settings': { 'include_dirs': [ @@ -452,18 +442,8 @@ 'variables': { 'lastchange_path': '<(DEPTH)/build/util/LASTCHANGE', + 'branding_path': 'app/theme/<(branding_path_component)/BRANDING', }, - 'conditions': [ - ['branding == "Chrome"', { - 'variables': { - 'branding_path': 'app/theme/google_chrome/BRANDING', - }, - }, { # else branding!="Chrome" - 'variables': { - 'branding_path': 'app/theme/chromium/BRANDING', - }, - }], - ], 'inputs': [ '<(version_path)', '<(branding_path)', diff --git a/chrome/chrome_exe.gypi b/chrome/chrome_exe.gypi index 6c3c0ba..11a42f3 100644 --- a/chrome/chrome_exe.gypi +++ b/chrome/chrome_exe.gypi @@ -316,18 +316,8 @@ # Unique dir to write to so the [lang].lproj/InfoPlist.strings # for the main app and the helper app don't name collide. 'output_path': '<(INTERMEDIATE_DIR)/app_infoplist_strings', + 'branding_name': '<(branding_path_component)_strings', }, - 'conditions': [ - [ 'branding == "Chrome"', { - 'variables': { - 'branding_name': 'google_chrome_strings', - }, - }, { # else branding!="Chrome" - 'variables': { - 'branding_name': 'chromium_strings', - }, - }], - ], 'inputs': [ '<(tool_path)', '<(version_path)', diff --git a/chrome/chrome_installer.gypi b/chrome/chrome_installer.gypi index b3e1a17..e52e398 100644 --- a/chrome/chrome_installer.gypi +++ b/chrome/chrome_installer.gypi @@ -6,7 +6,8 @@ 'variables': { 'lastchange_path': '../build/util/LASTCHANGE', 'libpeer_target_type%': 'static_library', - # 'branding_dir' is set in the 'conditions' section at the bottom. + 'branding_dir': 'app/theme/<(branding_path_component)', + 'branding_dir_100': 'app/theme/default_100_percent/<(branding_path_component)', }, 'conditions': [ ['OS=="win"', { @@ -158,18 +159,9 @@ 'action_name': 'installer_util_strings', 'variables': { 'create_string_rc_py': 'installer/util/prebuild/create_string_rc.py', + 'brand_strings': '<(branding_path_component)_strings', }, - 'conditions': [ - ['branding=="Chrome"', { - 'variables': { - 'brand_strings': 'google_chrome_strings', - }, - }, { - 'variables': { - 'brand_strings': 'chromium_strings', - }, - }], - ], + 'inputs': [ '<(create_string_rc_py)', 'app/<(brand_strings).grd', @@ -300,24 +292,6 @@ }, ], 'conditions': [ - # TODO(mark): <(branding_dir) should be defined by the - # global condition block at the bottom of the file, but - # this doesn't work due to the following issue: - # - # http://code.google.com/p/gyp/issues/detail?id=22 - # - # Remove this block once the above issue is fixed. - [ 'branding == "Chrome"', { - 'variables': { - 'branding_dir': 'app/theme/google_chrome', - 'branding_dir_100': 'app/theme/default_100_percent/google_chrome', - }, - }, { # else branding!="Chrome" - 'variables': { - 'branding_dir': 'app/theme/chromium', - 'branding_dir_100': 'app/theme/default_100_percent/chromium', - }, - }], ['target_arch=="ia32"', { 'msvs_settings': { 'VCCLCompilerTool': { @@ -1091,16 +1065,5 @@ }, ], # targets }], # OS=="mac" - [ 'branding == "Chrome"', { - 'variables': { - 'branding_dir': 'app/theme/google_chrome', - 'branding_dir_100': 'app/theme/default_100_percent/google_chrome', - }, - }, { # else branding!="Chrome" - 'variables': { - 'branding_dir': 'app/theme/chromium', - 'branding_dir_100': 'app/theme/default_100_percent/chromium', - }, - }], ], } |