Skip to content

Commit

Permalink
Allow linux installer to be build without chrome branding
Browse files Browse the repository at this point in the history
This change allows chromium developers to build
installer packages by setting 'is_official_build'
without requiring 'is_chrome_branded'.

This allows the installer scripts to be developed
and tested without needing access to the closed source
chrome branding.

BUG=564904

Review-Url: https://codereview.chromium.org/2395673002
Cr-Commit-Position: refs/heads/master@{#423197}
  • Loading branch information
sbc100 authored and Commit bot committed Oct 5, 2016
1 parent 65d34f8 commit fa8f43b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 14 deletions.
7 changes: 5 additions & 2 deletions chrome/installer/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@

import("//build/config/chrome_build.gni")

declare_args() {
enable_linux_installer = is_desktop_linux && is_chrome_branded
}

# Meta-target that forwards to the installer of the correct type (if any).
group("installer") {
# We only make Linux installers for 64-bit desktop.
if (is_desktop_linux && is_chrome_branded && target_cpu == "x64") {
if (enable_linux_installer) {
deps = [
"//chrome/installer/linux",
]
Expand Down
25 changes: 15 additions & 10 deletions chrome/installer/linux/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if (current_cpu == "x86" || current_cpu == "x64") {
import("//media/cdm/ppapi/cdm_paths.gni")
}

assert(is_linux && is_chrome_branded)
assert(is_linux)

# This target builds all "normal" Linux installers.
#
Expand Down Expand Up @@ -72,7 +72,6 @@ copy("common_packaging_files") {
"common/default-app-block.template",
"common/default-app.template",
"common/desktop.template",
"common/google-chrome/google-chrome.info",
"common/installer.include",
"common/postinst.include",
"common/prerm.include",
Expand All @@ -84,6 +83,12 @@ copy("common_packaging_files") {
"common/wrapper",
]

if (is_chrome_branded) {
sources += [ "common/google-chrome/google-chrome.info" ]
} else {
sources += [ "common/chromium-browser/chromium-browser.info" ]
}

if (current_cpu == "x86") {
sources += [ "//build/linux/bin/eu-strip" ]
} else if (current_cpu == "x64") {
Expand Down Expand Up @@ -224,20 +229,20 @@ template("linux_package") {
]

if (current_cpu == "x86") {
packaging_files_binaries += [
"$root_out_dir/nacl_irt_x86_32.nexe",
"$root_out_dir/$widevine_cdm_path/libwidevinecdmadapter.so",
"$root_out_dir/$widevine_cdm_path/libwidevinecdm.so",
]
packaging_files_binaries += [ "$root_out_dir/nacl_irt_x86_32.nexe" ]
} else if (current_cpu == "x64") {
packaging_files_binaries += [ "$root_out_dir/nacl_irt_x86_64.nexe" ]
} else if (current_cpu == "arm") {
packaging_files_binaries += [ "$root_out_dir/nacl_irt_arm.nexe" ]
}

if (is_chrome_branded) {
packaging_files_binaries += [
"$root_out_dir/nacl_irt_x86_64.nexe",
"$root_out_dir/$widevine_cdm_path/libwidevinecdmadapter.so",
"$root_out_dir/$widevine_cdm_path/libwidevinecdm.so",
]
} else if (current_cpu == "arm") {
packaging_files_binaries += [ "$root_out_dir/nacl_irt_arm.nexe" ]
}

if (is_asan) {
packaging_files_binaries += [ "$root_out_dir/lib/libc++.so" ]
}
Expand Down
3 changes: 1 addition & 2 deletions chrome/installer/linux/debian/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,7 @@ if [ $BAD_DIFF -ne 0 ] && [ -z "${IGNORE_DEPS_CHANGES:-}" ]; then
echo
echo "ERROR: Shared library dependencies changed!"
echo "If this is intentional, please update:"
echo "chrome/installer/linux/debian/expected_deps_ia32"
echo "chrome/installer/linux/debian/expected_deps_x64"
echo "chrome/installer/linux/debian/expected_deps_$TARGETARCH"
echo
exit $BAD_DIFF
fi
Expand Down

0 comments on commit fa8f43b

Please sign in to comment.