mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-07 18:04:46 +00:00
Bug 1657954 - Move various branding options from old-configure
r=geckoview-reviewers,mhentges,nalexander,snorp
Differential Revision: https://phabricator.services.mozilla.com/D86391
This commit is contained in:
parent
75d072859c
commit
cd9a620ede
@ -3,7 +3,6 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
MOZ_APP_BASENAME=Firefox
|
||||
MOZ_APP_VENDOR=Mozilla
|
||||
MOZ_UPDATER=1
|
||||
|
||||
|
@ -1341,7 +1341,27 @@ def project_flag(env=None, set_for_old_configure=False,
|
||||
|
||||
# milestone.is_nightly corresponds to cases NIGHTLY_BUILD is set.
|
||||
|
||||
|
||||
@depends(milestone)
|
||||
def enabled_in_nightly(milestone):
|
||||
return milestone.is_nightly
|
||||
|
||||
# Branding
|
||||
# ==============================================================
|
||||
option('--with-app-basename', env='MOZ_APP_BASENAME', nargs=1,
|
||||
help='Typically stays consistent for multiple branded versions of a '
|
||||
'given application (e.g. Aurora and Firefox both use "Firefox"), but '
|
||||
'may vary for full rebrandings (e.g. Iceweasel). Used for '
|
||||
'application.ini\'s "Name" field, which controls profile location in '
|
||||
'the absence of a "Profile" field (see below), and various system '
|
||||
'integration hooks (Unix remoting, Windows MessageWindow name, etc.')
|
||||
|
||||
@depends('--with-app-basename', target_is_android)
|
||||
def moz_app_basename(value, target_is_android):
|
||||
if value:
|
||||
return value[0]
|
||||
if target_is_android:
|
||||
return 'Fennec'
|
||||
return 'Firefox'
|
||||
|
||||
set_config('MOZ_APP_BASENAME', moz_app_basename,
|
||||
when=depends(build_project)(lambda p: p != 'js'))
|
||||
|
@ -235,8 +235,6 @@ def old_configure_options(*options):
|
||||
'--with-android-distribution-directory',
|
||||
'--with-android-max-sdk',
|
||||
'--with-android-min-sdk',
|
||||
'--with-app-basename',
|
||||
'--with-app-name',
|
||||
'--with-branding',
|
||||
'--with-distribution-id',
|
||||
'--with-macbundlename-prefix',
|
||||
|
@ -18,6 +18,22 @@ def building_js(build_project):
|
||||
option(env='JS_STANDALONE', default=building_js,
|
||||
help='Reserved for internal use')
|
||||
|
||||
# Branding
|
||||
# ==============================================================
|
||||
js_option('--with-app-name', env='MOZ_APP_NAME', nargs=1,
|
||||
help='Used for e.g. the binary program file name. If not set, '
|
||||
'defaults to a lowercase form of MOZ_APP_BASENAME.')
|
||||
|
||||
@depends('--with-app-name', 'JS_STANDALONE', moz_app_basename)
|
||||
def moz_app_name(value, js_standalone, moz_app_basename):
|
||||
if value:
|
||||
return value[0]
|
||||
if js_standalone:
|
||||
return 'js'
|
||||
return moz_app_basename.lower()
|
||||
|
||||
set_config('MOZ_APP_NAME', moz_app_name)
|
||||
|
||||
# SmooshMonkey (new frontend)
|
||||
# ==================================================
|
||||
|
||||
|
@ -1343,7 +1343,6 @@ AC_SUBST_LIST(MOZ_FIX_LINK_PATHS)
|
||||
|
||||
AC_SUBST(MOZ_POST_PROGRAM_COMMAND)
|
||||
|
||||
AC_SUBST(MOZ_APP_NAME)
|
||||
AC_SUBST(MOZ_APP_DISPLAYNAME)
|
||||
|
||||
AC_SUBST(MOZ_PKG_SPECIAL)
|
||||
@ -1433,7 +1432,6 @@ MOZ_CHECK_ALLOCATOR
|
||||
AC_SUBST(ac_configure_args)
|
||||
|
||||
if test -n "$JS_STANDALONE"; then
|
||||
MOZ_APP_NAME="js"
|
||||
JS_LIBRARY_NAME="mozjs-$MOZILLA_SYMBOLVERSION"
|
||||
else
|
||||
JS_LIBRARY_NAME="mozjs"
|
||||
|
@ -77,10 +77,9 @@ def js_subconfigure(host, target, build_env, js_configure_args, mozconfig,
|
||||
# in `substs`.
|
||||
for var in (
|
||||
'MOZ_SYSTEM_ZLIB', 'MOZ_ZLIB_CFLAGS', 'MOZ_ZLIB_LIBS',
|
||||
'MOZ_APP_NAME', 'MOZ_APP_REMOTINGNAME', 'MOZ_DEV_EDITION',
|
||||
'STLPORT_LIBS', 'DIST', 'MOZ_LINKER', 'ZLIB_IN_MOZGLUE', 'RANLIB',
|
||||
'AR', 'CPP', 'CC', 'CXX', 'CPPFLAGS', 'CFLAGS', 'CXXFLAGS',
|
||||
'LDFLAGS', 'HOST_CC', 'HOST_CXX', 'HOST_CPPFLAGS',
|
||||
'MOZ_DEV_EDITION', 'STLPORT_LIBS', 'DIST', 'MOZ_LINKER',
|
||||
'ZLIB_IN_MOZGLUE', 'RANLIB', 'AR', 'CPP', 'CC', 'CXX', 'CPPFLAGS',
|
||||
'CFLAGS', 'CXXFLAGS', 'LDFLAGS', 'HOST_CC', 'HOST_CXX', 'HOST_CPPFLAGS',
|
||||
'HOST_CXXFLAGS', 'HOST_LDFLAGS'
|
||||
):
|
||||
if var not in from_assignment and var in substs:
|
||||
|
@ -2,7 +2,6 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
MOZ_APP_BASENAME=Fennec
|
||||
MOZ_APP_VENDOR=Mozilla
|
||||
|
||||
MOZ_APP_UA_NAME=Firefox
|
||||
|
@ -83,7 +83,6 @@ case "$target" in
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(ANDROID_PACKAGE_NAME)
|
||||
AC_SUBST(OBJCOPY)
|
||||
|
||||
dnl ========================================================
|
||||
@ -1546,25 +1545,6 @@ else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
# Allow someone to change MOZ_APP_NAME and MOZ_APP_BASENAME in mozconfig
|
||||
MOZ_ARG_WITH_STRING(app-name,
|
||||
[--with-app-name=APPNAME sets MOZ_APP_NAME to APPNAME],
|
||||
WITH_APP_NAME=$withval,
|
||||
)
|
||||
|
||||
if test -n "$WITH_APP_NAME" ; then
|
||||
MOZ_APP_NAME="$WITH_APP_NAME"
|
||||
fi
|
||||
|
||||
MOZ_ARG_WITH_STRING(app-basename,
|
||||
[--with-app-basename=BASENAME sets MOZ_APP_BASENAME to BASENAME],
|
||||
WITH_APP_BASENAME=$withval,
|
||||
)
|
||||
|
||||
if test -n "$WITH_APP_BASENAME" ; then
|
||||
MOZ_APP_BASENAME="$WITH_APP_BASENAME"
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
dnl Ensure Android SDK and build-tools versions depending on
|
||||
dnl mobile target.
|
||||
@ -2622,19 +2602,9 @@ AC_SUBST(MOZ_CHILD_PROCESS_BUNDLENAME)
|
||||
# configuration ($BRANDING/configure.sh and $APPLICATION/confvars.sh):
|
||||
# - MOZ_APP_VENDOR: Used for application.ini's "Vendor" field, which also
|
||||
# impacts profile location and user-visible fields.
|
||||
# - MOZ_APP_BASENAME: Typically stays consistent for multiple branded
|
||||
# versions of a given application (e.g. Aurora and Firefox both use
|
||||
# "Firefox"), but may vary for full rebrandings (e.g. Iceweasel). Used
|
||||
# for application.ini's "Name" field, which controls profile location in
|
||||
# the absence of a "Profile" field (see below), and various system
|
||||
# integration hooks (Unix remoting, Windows MessageWindow name, etc.)
|
||||
# - MOZ_APP_DISPLAYNAME: Used in user-visible fields (DLL properties,
|
||||
# Mac Bundle name, Updater, Installer), it is typically used for nightly
|
||||
# builds (e.g. Aurora for Firefox).
|
||||
# - MOZ_APP_NAME: Used for e.g. the binary program file name. If not set,
|
||||
# defaults to a lowercase form of MOZ_APP_BASENAME.
|
||||
# - MOZ_APP_REMOTINGNAME: Used for the internal program name, which affects
|
||||
# profile name and remoting. If not set, defaults to MOZ_APP_NAME.
|
||||
# - MOZ_APP_PROFILE: When set, used for application.ini's
|
||||
# "Profile" field, which controls profile location.
|
||||
# - MOZ_APP_ID: When set, used for application.ini's "ID" field, and
|
||||
@ -2650,31 +2620,6 @@ AC_SUBST(MOZ_CHILD_PROCESS_BUNDLENAME)
|
||||
# version_display.txt or version.txt in the application directory, or
|
||||
# browser/config/version_display.txt.
|
||||
|
||||
if test -z "$MOZ_APP_NAME"; then
|
||||
MOZ_APP_NAME=`echo $MOZ_APP_BASENAME | tr A-Z a-z`
|
||||
fi
|
||||
|
||||
if test -z "$MOZ_APP_REMOTINGNAME"; then
|
||||
MOZ_APP_REMOTINGNAME=$MOZ_APP_NAME
|
||||
fi
|
||||
|
||||
if test -z "$ANDROID_PACKAGE_NAME" ; then
|
||||
# When we got rid of the Aurora channel we decided to replace the old
|
||||
# Nightly ANDROID_PACKAGE_NAME with Aurora. To make sure this is inherited
|
||||
# by all mozilla-central based branches we make this the new "default"
|
||||
# for Fennec. Non mozilla-central based branches set ANDROID_PACKAGE_NAME
|
||||
# in their mozconfig, so they will never get this. If there are ever
|
||||
# non-Fennec builds for Android, they will fall into the else block
|
||||
# and use their own default name.
|
||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=1357808 has additional
|
||||
# background on this.
|
||||
if test "$MOZ_APP_NAME" = "fennec"; then
|
||||
ANDROID_PACKAGE_NAME="org.mozilla.fennec_aurora"
|
||||
else
|
||||
ANDROID_PACKAGE_NAME="org.mozilla.$MOZ_APP_NAME"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For extensions and langpacks, we require a max version that is compatible
|
||||
# across security releases. MOZ_APP_MAXVERSION is our method for doing that.
|
||||
# 24.0a1 and 24.0a2 aren't affected
|
||||
@ -2693,10 +2638,7 @@ else
|
||||
MOZ_APP_MAXVERSION=$MOZ_APP_VERSION
|
||||
fi
|
||||
|
||||
AC_SUBST(MOZ_APP_NAME)
|
||||
AC_SUBST(MOZ_APP_REMOTINGNAME)
|
||||
AC_SUBST(MOZ_APP_DISPLAYNAME)
|
||||
AC_SUBST(MOZ_APP_BASENAME)
|
||||
AC_SUBST(MOZ_APP_VENDOR)
|
||||
AC_SUBST(MOZ_APP_PROFILE)
|
||||
AC_SUBST(MOZ_APP_ID)
|
||||
|
@ -2062,3 +2062,31 @@ def enable_startupcache(value):
|
||||
|
||||
set_define('MOZ_DISABLE_STARTUPCACHE', True,
|
||||
when=depends(enable_startupcache)(lambda x: not x))
|
||||
|
||||
|
||||
# Branding
|
||||
# ==============================================================
|
||||
option(env='MOZ_APP_REMOTINGNAME', nargs=1,
|
||||
help='Used for the internal program name, which affects profile name '
|
||||
'and remoting. If not set, defaults to MOZ_APP_NAME.')
|
||||
|
||||
@depends('MOZ_APP_REMOTINGNAME', moz_app_name)
|
||||
def moz_app_remotingname(value, moz_app_name):
|
||||
if value:
|
||||
return value[0]
|
||||
return moz_app_name
|
||||
|
||||
set_config('MOZ_APP_REMOTINGNAME', moz_app_remotingname)
|
||||
|
||||
option(env='ANDROID_PACKAGE_NAME', nargs=1,
|
||||
help='Name of the Android package (default org.mozilla.$MOZ_APP_NAME)')
|
||||
|
||||
@depends('ANDROID_PACKAGE_NAME', moz_app_name)
|
||||
def android_package_name(value, moz_app_name):
|
||||
if value:
|
||||
return value[0]
|
||||
if moz_app_name == 'fennec':
|
||||
return 'org.mozilla.fennec_aurora'
|
||||
return 'org.mozilla.%s' % moz_app_name
|
||||
|
||||
set_config('ANDROID_PACKAGE_NAME', android_package_name)
|
||||
|
@ -3,7 +3,6 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
MOZ_APP_BASENAME=Firefox
|
||||
MOZ_APP_VENDOR=Mozilla
|
||||
|
||||
MOZ_BRANDING_DIRECTORY=browser/branding/unofficial
|
||||
|
Loading…
Reference in New Issue
Block a user