mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 14:52:16 +00:00
Bug 1502457 - Move MOZ_APP_VERSION{,_DISPLAY} to python configure. r=nalexander
Depends on D11983 Differential Revision: https://phabricator.services.mozilla.com/D11984 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
f4802de169
commit
b1fdc6b2a4
@ -31,9 +31,6 @@ fi
|
||||
# Enable building ./signmar and running libmar signature tests
|
||||
MOZ_ENABLE_SIGNMAR=1
|
||||
|
||||
MOZ_APP_VERSION=$FIREFOX_VERSION
|
||||
MOZ_APP_VERSION_DISPLAY=$FIREFOX_VERSION_DISPLAY
|
||||
|
||||
if [ "${MOZ_BROWSER_XHTML}" = "1" ]; then
|
||||
BROWSER_CHROME_URL=chrome://browser/content/browser.xhtml
|
||||
else
|
||||
|
@ -1041,23 +1041,39 @@ add_old_configure_assignment('MOZ_BUILD_APP', build_project)
|
||||
# - if we have "a1" in GRE_MILESTONE, we're building Nightly (define NIGHTLY_BUILD)
|
||||
# - otherwise, if we have "a" in GRE_MILESTONE, we're building Nightly or Aurora
|
||||
# - otherwise, we're building Release/Beta (define RELEASE_OR_BETA)
|
||||
@depends(check_build_environment, '--help')
|
||||
@depends(check_build_environment, build_project, '--help')
|
||||
@imports(_from='__builtin__', _import='open')
|
||||
@imports('os')
|
||||
@imports('re')
|
||||
def milestone(build_env, _):
|
||||
def milestone(build_env, build_project, _):
|
||||
versions = []
|
||||
for p in (
|
||||
('config', 'milestone.txt'),
|
||||
('browser', 'config', 'version.txt'),
|
||||
('browser', 'config', 'version_display.txt'),
|
||||
):
|
||||
with open(os.path.join(build_env.topsrcdir, *p), 'r') as fh:
|
||||
paths = [
|
||||
'config/milestone.txt',
|
||||
'browser/config/version.txt',
|
||||
'browser/config/version_display.txt',
|
||||
]
|
||||
for f in ('version.txt', 'version_display.txt'):
|
||||
f = os.path.join(build_project, f)
|
||||
if not os.path.exists(os.path.join(build_env.topsrcdir, f)):
|
||||
break
|
||||
paths.append(f)
|
||||
|
||||
for p in paths:
|
||||
with open(os.path.join(build_env.topsrcdir, p), 'r') as fh:
|
||||
content = fh.read().splitlines()
|
||||
if not content:
|
||||
die('Could not find a version number in {}'.format(os.path.join(*p)))
|
||||
die('Could not find a version number in {}'.format(p))
|
||||
versions.append(content[-1])
|
||||
|
||||
milestone, firefox_version, firefox_version_display = versions
|
||||
milestone, firefox_version, firefox_version_display = versions[:3]
|
||||
|
||||
# version.txt content from the project directory if there is one, otherwise
|
||||
# the firefox version.
|
||||
app_version = versions[3] if len(versions) > 3 else firefox_version
|
||||
# version_display.txt content from the project directory if there is one,
|
||||
# otherwise version.txt content from the project directory, otherwise the
|
||||
# firefox version for display.
|
||||
app_version_display = versions[-1] if len(versions) > 3 else firefox_version_display
|
||||
|
||||
is_nightly = is_release_or_beta = None
|
||||
|
||||
@ -1080,8 +1096,8 @@ def milestone(build_env, _):
|
||||
symbolversion='%s%s' % (major_version, ab_patch),
|
||||
is_nightly=is_nightly,
|
||||
is_release_or_beta=is_release_or_beta,
|
||||
firefox_version=firefox_version,
|
||||
firefox_version_display=firefox_version_display)
|
||||
app_version=app_version,
|
||||
app_version_display=app_version_display)
|
||||
|
||||
|
||||
set_config('GRE_MILESTONE', milestone.version)
|
||||
@ -1101,10 +1117,9 @@ set_config('MOZILLA_SYMBOLVERSION', milestone.symbolversion)
|
||||
add_old_configure_assignment('MOZILLA_VERSION', milestone.version)
|
||||
add_old_configure_assignment('MOZILLA_SYMBOLVERSION', milestone.symbolversion)
|
||||
|
||||
set_config('FIREFOX_VERSION', milestone.firefox_version)
|
||||
set_define('FIREFOX_VERSION', milestone.firefox_version)
|
||||
add_old_configure_assignment('FIREFOX_VERSION', milestone.firefox_version)
|
||||
add_old_configure_assignment('FIREFOX_VERSION_DISPLAY', milestone.firefox_version_display)
|
||||
set_config('MOZ_APP_VERSION', milestone.app_version)
|
||||
set_config('MOZ_APP_VERSION_DISPLAY', milestone.app_version_display)
|
||||
add_old_configure_assignment('MOZ_APP_VERSION', milestone.app_version)
|
||||
|
||||
# The app update channel is 'default' when not supplied. The value is used in
|
||||
# the application's confvars.sh (and is made available to a project specific
|
||||
|
@ -6,4 +6,3 @@
|
||||
MOZ_APP_NAME=geckoembed
|
||||
MOZ_APP_DISPLAYNAME=GeckoEmbed
|
||||
MOZ_UPDATER=
|
||||
MOZ_APP_VERSION=$MOZILLA_VERSION
|
||||
|
@ -5,4 +5,3 @@
|
||||
|
||||
MOZ_APP_NAME=mozilla
|
||||
MOZ_APP_DISPLAYNAME=Mozilla
|
||||
MOZ_APP_VERSION=$MOZILLA_VERSION
|
||||
|
@ -1705,7 +1705,6 @@ AC_SUBST(MOZ_POST_PROGRAM_COMMAND)
|
||||
|
||||
AC_SUBST(MOZ_APP_NAME)
|
||||
AC_SUBST(MOZ_APP_DISPLAYNAME)
|
||||
AC_SUBST(MOZ_APP_VERSION)
|
||||
|
||||
AC_SUBST(MOZ_PKG_SPECIAL)
|
||||
|
||||
@ -1825,7 +1824,6 @@ AC_SUBST(ac_configure_args)
|
||||
|
||||
if test -n "$JS_STANDALONE"; then
|
||||
MOZ_APP_NAME="mozjs"
|
||||
MOZ_APP_VERSION="$MOZILLA_SYMBOLVERSION"
|
||||
JS_LIBRARY_NAME="mozjs-$MOZILLA_SYMBOLVERSION"
|
||||
else
|
||||
JS_LIBRARY_NAME="mozjs"
|
||||
|
@ -5,8 +5,6 @@
|
||||
MOZ_APP_BASENAME=Fennec
|
||||
MOZ_APP_VENDOR=Mozilla
|
||||
|
||||
MOZ_APP_VERSION=$FIREFOX_VERSION
|
||||
MOZ_APP_VERSION_DISPLAY=$FIREFOX_VERSION_DISPLAY
|
||||
MOZ_APP_UA_NAME=Firefox
|
||||
|
||||
BROWSER_CHROME_URL=chrome://browser/content/browser.xul
|
||||
|
@ -3959,9 +3959,6 @@ AC_SUBST(MOZ_CHILD_PROCESS_BUNDLENAME)
|
||||
# - 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_VERSION: Defines the application version number.
|
||||
# - MOZ_APP_VERSION_DISPLAY: Defines the application version number. Used
|
||||
# in the "About" window. If not set, defaults to MOZ_APP_VERSION.
|
||||
# - 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
|
||||
@ -3981,6 +3978,15 @@ AC_SUBST(MOZ_CHILD_PROCESS_BUNDLENAME)
|
||||
# - MOZ_MMA_GCM_SENDERID: This GCM Sender ID is used for MMA integration.
|
||||
# - MOZ_PROFILE_MIGRATOR: When set, enables profile migrator.
|
||||
|
||||
# The following environment variables used to have an effect, but don't anymore:
|
||||
# - MOZ_APP_VERSION: Defines the application version number. This was replaced with
|
||||
# the contents from the version.txt file in the application directory, or
|
||||
# browser/config/version.txt if there isn't one.
|
||||
# - MOZ_APP_VERSION_DISPLAY: Defines the application version number. Used
|
||||
# in the "About" window. This was replaced with the contents from the
|
||||
# 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
|
||||
@ -3989,10 +3995,6 @@ if test -z "$MOZ_APP_REMOTINGNAME"; then
|
||||
MOZ_APP_REMOTINGNAME=$MOZ_APP_NAME
|
||||
fi
|
||||
|
||||
if test -z "$MOZ_APP_VERSION_DISPLAY"; then
|
||||
MOZ_APP_VERSION_DISPLAY=$MOZ_APP_VERSION
|
||||
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
|
||||
@ -4053,8 +4055,6 @@ AC_SUBST(MOZ_PROFILE_MIGRATOR)
|
||||
AC_DEFINE_UNQUOTED(MOZ_APP_UA_NAME, "$MOZ_APP_UA_NAME")
|
||||
AC_SUBST(MOZ_APP_UA_NAME)
|
||||
AC_DEFINE_UNQUOTED(MOZ_APP_UA_VERSION, "$MOZ_APP_VERSION")
|
||||
AC_SUBST(MOZ_APP_VERSION)
|
||||
AC_SUBST(MOZ_APP_VERSION_DISPLAY)
|
||||
AC_DEFINE_UNQUOTED(BROWSER_CHROME_URL, $BROWSER_CHROME_URL)
|
||||
AC_DEFINE_UNQUOTED(BROWSER_CHROME_URL_QUOTED, "$BROWSER_CHROME_URL")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user