* Use origin-branded names for Linux packages and dist artifacts When is_brave_origin_branded=true, use brave-origin instead of brave-browser for DEB/RPM package names and brave-origin instead of brave for Linux symbols zip filenames. - Add brave-origin/chromium-browser.info and appdata.xml.template - Add brave_dist_name and brave_linux_package_name to config.gni - Use brave_linux_package_name in Linux installer patch - Conditionally select branding directory in sources.gni * Use origin-branded dist name for all platform artifacts Use brave_dist_name for dist zips, symbols, and native symbols on all platforms. For origin builds this renames artifacts from brave-v* to brave-origin-v* on Windows, Mac, and Android. * Update chromium_src/chrome/installer/linux/common/brave-origin/appdata.xml.template Co-authored-by: Francois Marier <francois@brave.com> * Apply suggestion from @fmarier Co-authored-by: Francois Marier <francois@brave.com> * Use separate install dirs for origin to allow coexistence Use /opt/brave.com/brave-origin and /etc/brave-origin for origin builds so that regular Brave and Brave Origin can be installed side by side on the same machine. * Use origin screenshot URL in appdata template * Match project_license with brave-browser appdata template * Use distinct PROGNAME for origin to avoid conflicts with brave-browser * Use brave-origin as binary name on Linux for origin builds * Revert brave_exe and PROGNAME changes for origin PROGNAME must match the actual binary name (brave) since the wrapper script uses it to exec the binary. Coexistence between brave-browser and brave-origin is handled by distinct PACKAGE, INSTALLDIR, and ENROLLMENTDIR values, not the binary name. --------- Co-authored-by: Francois Marier <francois@brave.com>
207 lines
6.5 KiB
Plaintext
207 lines
6.5 KiB
Plaintext
# Copyright (c) 2018 The Brave Authors. All rights reserved.
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
# You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
|
|
import("//brave/build/brave_channel.gni")
|
|
import("//brave/components/brave_origin/buildflags/buildflags.gni")
|
|
import("//build/config/apple/symbols.gni")
|
|
import("//build/util/branding.gni")
|
|
import("//chrome/version.gni")
|
|
|
|
declare_args() {
|
|
base_sparkle_update_url = ""
|
|
enable_sparkle = !is_component_build && is_mac
|
|
build_sparkle = false
|
|
|
|
sparkle_dsa_private_key_file = ""
|
|
sparkle_eddsa_private_key = ""
|
|
sparkle_eddsa_public_key = ""
|
|
|
|
brave_product_name = "brave"
|
|
brave_exe = ""
|
|
brave_version_major = ""
|
|
brave_version_minor = ""
|
|
brave_version_build = ""
|
|
chrome_version_string = ""
|
|
target_android_output_format = ""
|
|
brave_android_keystore_path = "."
|
|
brave_android_keystore_name = ""
|
|
brave_android_keystore_password = ""
|
|
brave_android_key_password = ""
|
|
brave_android_pkcs11_provider = ""
|
|
brave_android_pkcs11_alias = ""
|
|
|
|
skip_signing = false
|
|
|
|
# Used for generating delta installer on macOS/Windows
|
|
last_chrome_installer = ""
|
|
|
|
# Enables brave/tools/redirect_cc target, replaces brave/chromium_src
|
|
# overrides with empty ones to make //base buildable for redirect_cc.
|
|
android_aab_to_apk = false
|
|
}
|
|
|
|
if (target_os == "win") {
|
|
# Omaha 3 and its related arguments are available on Windows only.
|
|
declare_args() {
|
|
build_omaha = false
|
|
tag_ap = ""
|
|
tag_installdataindex = ""
|
|
}
|
|
}
|
|
|
|
declare_args() {
|
|
# Generate symbols for Release builds.
|
|
# MacOS requires dSYMs and non-component build, otherwise upstream dump syms
|
|
# target is a no-op.
|
|
should_generate_symbols =
|
|
is_official_build && (!is_mac || (enable_dsyms && !is_component_build))
|
|
}
|
|
|
|
if (should_generate_symbols && is_mac) {
|
|
assert(enable_dsyms && !is_component_build,
|
|
"Incompatible args to generate symbols on MacOS")
|
|
}
|
|
|
|
brave_version = "$brave_version_major.$brave_version_minor.$brave_version_build"
|
|
|
|
if (brave_exe == "") {
|
|
brave_exe = brave_product_name
|
|
}
|
|
|
|
brave_dist_dir = "$root_out_dir/dist"
|
|
|
|
# Use different installer/product names for Brave Origin
|
|
if (is_brave_origin_branded) {
|
|
_product_brand = "Origin"
|
|
brave_dist_name = "brave-origin"
|
|
brave_linux_package_name = "brave-origin"
|
|
} else {
|
|
_product_brand = "Browser"
|
|
brave_dist_name = "brave"
|
|
brave_linux_package_name = "brave-browser"
|
|
}
|
|
|
|
if (is_win) {
|
|
brave_exe = "$brave_exe.exe"
|
|
brave_underline_full_version =
|
|
"_$chrome_version_major" + "_$brave_version_major" +
|
|
"_$brave_version_minor" + "_$brave_version_build"
|
|
_channel = ""
|
|
|
|
# Brave Origin uses separate app GUIDs from Brave Browser to allow
|
|
# side-by-side installation and independent update infrastructure.
|
|
if (is_brave_origin_branded) {
|
|
brave_app_guid = "{F1EF32DE-F987-4289-81D2-6C4780027F9B}"
|
|
} else {
|
|
brave_app_guid = "{AFE6A462-C574-4B8A-AF43-4CC60DF4563B}"
|
|
}
|
|
if (brave_channel == "nightly") {
|
|
# Temporary support PR's non-Release builds on nightly channel.
|
|
# CI expect the installer files (*Setup.exe) in the output dir are
|
|
# correspond passed brave_channel. Therefore to make Static+nightly work
|
|
# we should set _channel to "Nightly".
|
|
# TODO(atuchin): revert after PRs start to use the development channel.
|
|
_channel = "Nightly"
|
|
if (is_brave_origin_branded) {
|
|
brave_app_guid = "{50474E96-9CD2-4BC8-B0A7-0D4B6EF2E709}"
|
|
} else {
|
|
brave_app_guid = "{C6CB981E-DB30-4876-8639-109F8933582C}"
|
|
}
|
|
} else if (is_official_build) {
|
|
if (brave_channel == "beta") {
|
|
_channel = "Beta"
|
|
if (is_brave_origin_branded) {
|
|
brave_app_guid = "{56DA94FD-D872-416B-BFC4-1D7011DA7473}"
|
|
} else {
|
|
brave_app_guid = "{103BD053-949B-43A8-9120-2E424887DE11}"
|
|
}
|
|
} else if (brave_channel == "dev") {
|
|
_channel = "Dev"
|
|
if (is_brave_origin_branded) {
|
|
brave_app_guid = "{716D6A4A-D071-47A8-AC64-DBDE3EE3797B}"
|
|
} else {
|
|
brave_app_guid = "{CB2150F2-595F-4633-891A-E39720CE0531}"
|
|
}
|
|
} else {
|
|
assert(brave_channel == "", "Unknown channel name")
|
|
}
|
|
} else {
|
|
_channel = "Development"
|
|
}
|
|
|
|
_arch = ""
|
|
if (target_cpu == "x86") {
|
|
_arch = "32"
|
|
}
|
|
|
|
brave_installer_exe = "brave_installer.exe"
|
|
brave_stub_installer_exe = "Brave$_product_brand$_channel" +
|
|
"Setup$_arch$brave_underline_full_version.exe"
|
|
brave_untagged_stub_installer_exe =
|
|
"Brave${_product_brand}Untagged$_channel" +
|
|
"Setup$_arch$brave_underline_full_version.exe"
|
|
brave_standalone_installer_exe =
|
|
"Brave${_product_brand}Standalone$_channel" +
|
|
"Setup$_arch$brave_underline_full_version.exe"
|
|
brave_silent_installer_exe =
|
|
"Brave${_product_brand}StandaloneSilent$_channel" +
|
|
"Setup$_arch$brave_underline_full_version.exe"
|
|
brave_untagged_installer_exe =
|
|
"Brave${_product_brand}StandaloneUntagged$_channel" +
|
|
"Setup$_arch$brave_underline_full_version.exe"
|
|
} else if (is_mac) {
|
|
brave_exe = "$chrome_product_full_name.app"
|
|
brave_dmg = "$chrome_product_full_name.dmg"
|
|
brave_delta = "$chrome_product_full_name.delta"
|
|
|
|
brave_product_dir_name_suffix = ""
|
|
if (is_official_build) {
|
|
if (brave_channel == "beta") {
|
|
brave_product_dir_name_suffix = "-Beta"
|
|
} else if (brave_channel == "dev") {
|
|
brave_product_dir_name_suffix = "-Dev"
|
|
} else if (brave_channel == "nightly") {
|
|
brave_product_dir_name_suffix = "-Nightly"
|
|
} else {
|
|
assert(brave_channel == "", "Unknown channel name")
|
|
}
|
|
} else {
|
|
brave_product_dir_name_suffix = "-Development"
|
|
}
|
|
|
|
brave_product_dir_name =
|
|
"BraveSoftware/Brave-$_product_brand$brave_product_dir_name_suffix"
|
|
|
|
if (base_sparkle_update_url == "") {
|
|
base_sparkle_update_url =
|
|
"https://updates.bravesoftware.com/sparkle/Brave-$_product_brand"
|
|
}
|
|
}
|
|
|
|
brave_platform = "darwin"
|
|
if (is_win) {
|
|
brave_platform = "win32"
|
|
} else if (is_linux) {
|
|
brave_platform = "linux"
|
|
} else if (is_android) {
|
|
brave_platform = "android"
|
|
}
|
|
|
|
is_release_channel = brave_channel == ""
|
|
|
|
brave_android_output = ""
|
|
if (is_android) {
|
|
brave_android_output += "$root_out_dir/apks/Brave"
|
|
|
|
# TODO(https://github.com/brave/brave-browser/issues/51200)
|
|
# Cleanup Mono once cr144 reaches stable channel, CI also needs to be updated
|
|
brave_android_output += "Mono"
|
|
if (target_android_output_format == "aab") {
|
|
brave_android_output += "$target_cpu.aab"
|
|
} else {
|
|
brave_android_output += "$target_cpu.apk"
|
|
}
|
|
}
|