Commit 0367e359 authored by Yngve N. Pettersen's avatar Yngve N. Pettersen Committed by Commit Bot

Make branding_file_path and branding_path_component GN arguments

This allows downstream embedders to specify their own branding files
and locations without having to patch chromium source files.

Change-Id: I8b5c1d71a11998ef68b586f11326d82aced35529
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1932781Reviewed-by: default avatarDirk Pranke <dpranke@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Yngve Pettersen <yngve@vivaldi.com>
Cr-Commit-Position: refs/heads/master@{#721428}
parent 070637f5
......@@ -18,10 +18,17 @@ declare_args() {
generate_order_files = false
}
# Refers to the subdirectory for branding in various places including
# chrome/app/theme.
if (is_chrome_branded) {
branding_path_component = "google_chrome"
} else {
branding_path_component = "chromium"
declare_args() {
# Refers to the subdirectory for branding in various places including
# chrome/app/theme.
if (is_chrome_branded) {
branding_path_component = "google_chrome"
} else {
branding_path_component = "chromium"
}
}
declare_args() {
# The path to the BRANDING file in chrome/app/theme.
branding_file_path = "//chrome/app/theme/$branding_path_component/BRANDING"
}
\ No newline at end of file
......@@ -23,16 +23,15 @@ _branding_dictionary_template =
"installer_short_name = \"@PRODUCT_INSTALLER_SHORTNAME@\" " +
"team_id = \"@MAC_TEAM_ID@\" "
_branding_file = "//chrome/app/theme/$branding_path_component/BRANDING"
_result = exec_script("version.py",
[
"-f",
rebase_path(_branding_file, root_build_dir),
rebase_path(branding_file_path, root_build_dir),
"-t",
_branding_dictionary_template,
],
"scope",
[ _branding_file ])
[ branding_file_path ])
chrome_product_full_name = _result.full_name
chrome_product_short_name = _result.short_name
......
......@@ -5,6 +5,7 @@
import("//build/android/resource_sizes.gni")
import("//build/config/android/config.gni")
import("//build/config/android/rules.gni")
import("//build/config/chrome_build.gni") # For branding_file_path.
import("//build/config/python.gni")
import("//build/util/process_version.gni")
import("//build/util/version.gni")
......@@ -21,7 +22,6 @@ import("//chrome/android/monochrome_android_manifest_jinja_variables.gni")
import("//chrome/browser/share/android/java_sources.gni")
import("//chrome/chrome_paks.gni")
import("//chrome/common/features.gni")
import("//chrome/process_version_rc_template.gni") # For branding_file_path.
import("//device/vr/buildflags/buildflags.gni")
import("//testing/test.gni")
import("//third_party/icu/config.gni")
......
......@@ -3,9 +3,9 @@
# found in the LICENSE file.
import("//build/buildflag_header.gni")
import("//build/config/chrome_build.gni") # For branding_file_path.
import("//build/util/process_version.gni")
import("//chrome/common/features.gni")
import("//chrome/process_version_rc_template.gni") # For branding_file_path.
import("//components/nacl/features.gni")
import("//components/offline_pages/buildflags/features.gni")
import("//device/vr/buildflags/buildflags.gni")
......
......@@ -10,7 +10,6 @@ import("//build/config/sysroot.gni")
import("//build/util/lastchange.gni")
import("//build/util/process_version.gni")
import("//build/util/version.gni")
import("//chrome/process_version_rc_template.gni") # For branding_file_path.
import("//components/nacl/features.gni")
import("//third_party/widevine/cdm/widevine.gni")
......
......@@ -6,9 +6,6 @@ import("//build/config/chrome_build.gni")
import("//build/util/lastchange.gni")
import("//build/util/process_version.gni")
# The path to the BRANDING file in chrome/app/theme.
branding_file_path = "//chrome/app/theme/$branding_path_component/BRANDING"
# This is a wrapper around process_version() that eases the task of processing
# a .rc.version file (used especially on Windows).
#
......
......@@ -5,7 +5,6 @@
import("//build/config/chrome_build.gni")
import("//build/util/lastchange.gni")
import("//build/util/process_version.gni")
import("//chrome/process_version_rc_template.gni") # For branding_file_path.
declare_args() {
use_unofficial_version_number = !is_chrome_branded
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment