From ed1c39fba6cd7b181bf0ee90e59447fc3f7634b5 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Tue, 9 Feb 2016 16:13:37 +0900 Subject: [PATCH] Bug 1246874 - Unify GRE_BUILDID and MOZ_APP_BUILDID at the build system level. r=mshal --- build/Makefile.in | 4 ++-- build/application.ini | 4 ++-- config/faster/rules.mk | 2 +- mobile/android/base/AppConstants.java.in | 2 +- mobile/android/base/Makefile.in | 6 +++--- testing/taskcluster/scripts/builder/build-simulator.sh | 8 ++++---- toolkit/xre/Makefile.in | 8 ++++---- toolkit/xre/nsAppRunner.cpp | 2 +- webapprt/Makefile.in | 4 ++-- webapprt/gtk/Makefile.in | 4 ++-- webapprt/gtk/webapprt.cpp | 2 +- webapprt/mac/Makefile.in | 4 ++-- webapprt/mac/webapprt.mm | 2 +- webapprt/webapprt.ini | 4 ++-- webapprt/win/Makefile.in | 4 ++-- webapprt/win/webapprt.cpp | 2 +- 16 files changed, 31 insertions(+), 31 deletions(-) diff --git a/build/Makefile.in b/build/Makefile.in index b0261635f0e..8d05e9f973d 100644 --- a/build/Makefile.in +++ b/build/Makefile.in @@ -9,10 +9,10 @@ include $(topsrcdir)/config/makefiles/makeutils.mk ifdef MOZ_APP_BASENAME APP_INI_DEPS = $(topsrcdir)/config/milestone.txt -MOZ_APP_BUILDID := $(shell cat $(DEPTH)/config/buildid) +MOZ_BUILDID := $(shell cat $(DEPTH)/config/buildid) APP_INI_DEPS += $(DEPTH)/config/buildid -DEFINES += -DMOZ_APP_BUILDID=$(MOZ_APP_BUILDID) +DEFINES += -DMOZ_BUILDID=$(MOZ_BUILDID) APP_INI_DEPS += $(DEPTH)/config/autoconf.mk diff --git a/build/application.ini b/build/application.ini index 74b0139d252..b87185f789a 100644 --- a/build/application.ini +++ b/build/application.ini @@ -26,7 +26,7 @@ Version=@MOZ_APP_VERSION@ #ifdef MOZ_APP_PROFILE Profile=@MOZ_APP_PROFILE@ #endif -BuildID=@MOZ_APP_BUILDID@ +BuildID=@MOZ_BUILDID@ #ifdef MOZ_SOURCE_REPO SourceRepository=@MOZ_SOURCE_REPO@ #endif @@ -47,5 +47,5 @@ EnableProfileMigrator=1 #if MOZ_CRASHREPORTER [Crash Reporter] Enabled=1 -ServerURL=https://crash-reports.mozilla.com/submit?id=@MOZ_APP_ID@&version=@MOZ_APP_VERSION@&buildid=@MOZ_APP_BUILDID@ +ServerURL=https://crash-reports.mozilla.com/submit?id=@MOZ_APP_ID@&version=@MOZ_APP_VERSION@&buildid=@MOZ_BUILDID@ #endif diff --git a/config/faster/rules.mk b/config/faster/rules.mk index 6cfd05b2d03..86cdd41dd78 100644 --- a/config/faster/rules.mk +++ b/config/faster/rules.mk @@ -103,7 +103,7 @@ $(addprefix install-,$(INSTALL_MANIFESTS)): install-%: $(TOPOBJDIR)/config/build $(TOPOBJDIR)/$* \ -DAB_CD=en-US \ -DBOOKMARKS_INCLUDE_DIR=$(TOPSRCDIR)/browser/locales/en-US/profile \ - -DMOZ_APP_BUILDID=$(shell cat $(TOPOBJDIR)/config/buildid) \ + -DMOZ_BUILDID=$(shell cat $(TOPOBJDIR)/config/buildid) \ $(ACDEFINES) \ install_$(subst /,_,$*) diff --git a/mobile/android/base/AppConstants.java.in b/mobile/android/base/AppConstants.java.in index cef1dfdf4bc..5fe577c9564 100644 --- a/mobile/android/base/AppConstants.java.in +++ b/mobile/android/base/AppConstants.java.in @@ -97,7 +97,7 @@ public class AppConstants { // For the benefit of future archaeologists: // GRE_BUILDID is exactly the same as MOZ_APP_BUILDID unless you're running // on XULRunner, which is never the case on Android. - public static final String MOZ_APP_BUILDID = "@MOZ_APP_BUILDID@"; + public static final String MOZ_APP_BUILDID = "@MOZ_BUILDID@"; public static final String MOZ_APP_ID = "@MOZ_APP_ID@"; public static final String MOZ_APP_NAME = "@MOZ_APP_NAME@"; public static final String MOZ_APP_VENDOR = "@MOZ_APP_VENDOR@"; diff --git a/mobile/android/base/Makefile.in b/mobile/android/base/Makefile.in index 1a1dbff6e75..950a9f6ba13 100644 --- a/mobile/android/base/Makefile.in +++ b/mobile/android/base/Makefile.in @@ -2,7 +2,7 @@ # 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_BUILDID=$(shell cat $(DEPTH)/config/buildid) +MOZ_BUILDID := $(shell cat $(DEPTH)/config/buildid) # Set the appropriate version code, based on the existance of the # MOZ_APP_ANDROID_VERSION_CODE variable. @@ -15,7 +15,7 @@ else --with-android-cpu-arch=$(ANDROID_CPU_ARCH) \ $(if $(MOZ_ANDROID_MIN_SDK_VERSION),--with-android-min-sdk=$(MOZ_ANDROID_MIN_SDK_VERSION)) \ $(if $(MOZ_ANDROID_MAX_SDK_VERSION),--with-android-max-sdk=$(MOZ_ANDROID_MAX_SDK_VERSION)) \ - $(MOZ_APP_BUILDID)) + $(MOZ_BUILDID)) endif DEFINES += \ @@ -23,7 +23,7 @@ DEFINES += \ -DMOZ_ANDROID_SHARED_ID="$(MOZ_ANDROID_SHARED_ID)" \ -DMOZ_ANDROID_SHARED_ACCOUNT_TYPE="$(MOZ_ANDROID_SHARED_ACCOUNT_TYPE)" \ -DMOZ_ANDROID_SHARED_FXACCOUNT_TYPE="$(MOZ_ANDROID_SHARED_FXACCOUNT_TYPE)" \ - -DMOZ_APP_BUILDID=$(MOZ_APP_BUILDID) \ + -DMOZ_BUILDID=$(MOZ_BUILDID) \ $(NULL) GARBAGE += \ diff --git a/testing/taskcluster/scripts/builder/build-simulator.sh b/testing/taskcluster/scripts/builder/build-simulator.sh index 2f590e56b8f..dc9758a7dc2 100755 --- a/testing/taskcluster/scripts/builder/build-simulator.sh +++ b/testing/taskcluster/scripts/builder/build-simulator.sh @@ -157,12 +157,12 @@ else echo "Unable to find application.ini file" exit fi -MOZ_APP_BUILDID=$(sed -n "s/BuildID=\([0-9]\{8\}\)/\1/p" $APPLICATION_INI) -echo "BUILDID $MOZ_APP_BUILDID -- VERSION $VERSION" +MOZ_BUILDID=$(sed -n "s/BuildID=\([0-9]\{8\}\)/\1/p" $APPLICATION_INI) +echo "BUILDID $MOZ_BUILDID -- VERSION $VERSION" -XPI_NAME=fxos-simulator-$VERSION.$MOZ_APP_BUILDID-$PLATFORM.xpi +XPI_NAME=fxos-simulator-$VERSION.$MOZ_BUILDID-$PLATFORM.xpi ADDON_ID=fxos_$(echo $VERSION | sed "s/\./_/")_simulator@mozilla.org -ADDON_VERSION=$VERSION.$MOZ_APP_BUILDID +ADDON_VERSION=$VERSION.$MOZ_BUILDID ADDON_NAME="Firefox OS $VERSION Simulator" ADDON_DESCRIPTION="a Firefox OS $VERSION Simulator" diff --git a/toolkit/xre/Makefile.in b/toolkit/xre/Makefile.in index a1f21d7637b..25505520a21 100644 --- a/toolkit/xre/Makefile.in +++ b/toolkit/xre/Makefile.in @@ -28,15 +28,15 @@ ifdef MOZ_SOURCE_STAMP endif # MOZ_SOURCE_STAMP -GRE_BUILDID := $(strip $(firstword $(shell cat $(DEPTH)/config/buildid 2>/dev/null))) -$(call errorIfEmpty,GRE_MILESTONE GRE_BUILDID) +MOZ_BUILDID := $(strip $(firstword $(shell cat $(DEPTH)/config/buildid 2>/dev/null))) +$(call errorIfEmpty,GRE_MILESTONE MOZ_BUILDID) -DEFINES += -DGRE_BUILDID=$(GRE_BUILDID) +DEFINES += -DMOZ_BUILDID=$(MOZ_BUILDID) $(srcdir)/nsAppRunner.cpp: $(DEPTH)/config/buildid $(milestone_txt) platform.ini: FORCE - $(PYTHON) $(srcdir)/make-platformini.py --buildid=$(GRE_BUILDID) $(INIARGS) $(milestone_txt) > $@ + $(PYTHON) $(srcdir)/make-platformini.py --buildid=$(MOZ_BUILDID) $(INIARGS) $(milestone_txt) > $@ GARBAGE += platform.ini diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp index e0b231b339c..3f7c2fe9ba2 100644 --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -224,7 +224,7 @@ int gArgc; char **gArgv; static const char gToolkitVersion[] = NS_STRINGIFY(GRE_MILESTONE); -static const char gToolkitBuildID[] = NS_STRINGIFY(GRE_BUILDID); +static const char gToolkitBuildID[] = NS_STRINGIFY(MOZ_BUILDID); static nsIProfileLock* gProfileLock; diff --git a/webapprt/Makefile.in b/webapprt/Makefile.in index 7c9d774ce80..329d8242f03 100644 --- a/webapprt/Makefile.in +++ b/webapprt/Makefile.in @@ -6,7 +6,7 @@ # for webapprt.ini need to be set after PP_TARGETS are expanded in rules.mk. include $(topsrcdir)/config/rules.mk -MOZ_APP_BUILDID := $(shell cat $(DEPTH)/config/buildid) -DEFINES += -DMOZ_APP_BUILDID=$(MOZ_APP_BUILDID) +MOZ_BUILDID := $(shell cat $(DEPTH)/config/buildid) +DEFINES += -DMOZ_BUILDID=$(MOZ_BUILDID) $(FINAL_TARGET)/webapprt.ini: $(DEPTH)/config/buildid $(topsrcdir)/config/milestone.txt diff --git a/webapprt/gtk/Makefile.in b/webapprt/gtk/Makefile.in index 64806a80f50..d7401b1fac4 100644 --- a/webapprt/gtk/Makefile.in +++ b/webapprt/gtk/Makefile.in @@ -8,7 +8,7 @@ PROGRAMS_DEST = $(DIST)/bin include $(topsrcdir)/config/rules.mk -GRE_BUILDID := $(shell cat $(DEPTH)/config/buildid) -DEFINES += -DGRE_BUILDID=$(GRE_BUILDID) +MOZ_BUILDID := $(shell cat $(DEPTH)/config/buildid) +DEFINES += -DMOZ_BUILDID=$(MOZ_BUILDID) webapprt.$(OBJ_SUFFIX): $(DEPTH)/config/buildid diff --git a/webapprt/gtk/webapprt.cpp b/webapprt/gtk/webapprt.cpp index a8487485ec9..0b25d01b2c6 100644 --- a/webapprt/gtk/webapprt.cpp +++ b/webapprt/gtk/webapprt.cpp @@ -396,7 +396,7 @@ int main(int argc, char *argv[]) } // If WebAppRT version == Firefox version, load XUL and execute the application - if (!strcmp(buildid, NS_STRINGIFY(GRE_BUILDID))) { + if (!strcmp(buildid, NS_STRINGIFY(MOZ_BUILDID))) { if (GRELoadAndLaunch(firefoxDir, false)) return 0; } diff --git a/webapprt/mac/Makefile.in b/webapprt/mac/Makefile.in index 005f1e05011..7cc8697273f 100644 --- a/webapprt/mac/Makefile.in +++ b/webapprt/mac/Makefile.in @@ -10,7 +10,7 @@ PROGRAMS_DEST = $(DIST)/bin include $(topsrcdir)/config/rules.mk -GRE_BUILDID := $(shell cat $(DEPTH)/config/buildid) -DEFINES += -DGRE_BUILDID=$(GRE_BUILDID) +MOZ_BUILDID := $(shell cat $(DEPTH)/config/buildid) +DEFINES += -DMOZ_BUILDID=$(MOZ_BUILDID) webapprt.$(OBJ_SUFFIX): $(DEPTH)/config/buildid diff --git a/webapprt/mac/webapprt.mm b/webapprt/mac/webapprt.mm index ace444cff9b..ccbd4e164a1 100644 --- a/webapprt/mac/webapprt.mm +++ b/webapprt/mac/webapprt.mm @@ -98,7 +98,7 @@ main(int argc, char **argv) NSString *alternateBinaryID = nil; //this is our version, to be compared with the version of the binary we are asked to use - NSString* myVersion = [NSString stringWithFormat:@"%s", NS_STRINGIFY(GRE_BUILDID)]; + NSString* myVersion = [NSString stringWithFormat:@"%s", NS_STRINGIFY(MOZ_BUILDID)]; NSLog(@"MY WEBAPPRT BUILDID: %@", myVersion); diff --git a/webapprt/webapprt.ini b/webapprt/webapprt.ini index e6cbabe3139..51722922125 100644 --- a/webapprt/webapprt.ini +++ b/webapprt/webapprt.ini @@ -14,7 +14,7 @@ Vendor=Mozilla ; as distinct products, per bug 747409. Name=Webapp Runtime Version=@GRE_MILESTONE@ -BuildID=@MOZ_APP_BUILDID@ +BuildID=@MOZ_BUILDID@ UAName=@MOZ_APP_BASENAME@ [Gecko] @@ -25,4 +25,4 @@ MaxVersion=@GRE_MILESTONE@ #if MOZILLA_OFFICIAL Enabled=1 #endif -ServerURL=https://crash-reports.mozilla.com/submit?id=webapprt@mozilla.org&version=@GRE_MILESTONE@&buildid=@MOZ_APP_BUILDID@ +ServerURL=https://crash-reports.mozilla.com/submit?id=webapprt@mozilla.org&version=@GRE_MILESTONE@&buildid=@MOZ_BUILDID@ diff --git a/webapprt/win/Makefile.in b/webapprt/win/Makefile.in index 37ef231a0f9..71fcb5d2daa 100644 --- a/webapprt/win/Makefile.in +++ b/webapprt/win/Makefile.in @@ -49,7 +49,7 @@ PROGRAMS_DEST = $(DIST)/bin include $(topsrcdir)/config/rules.mk include $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/makensis.mk -GRE_BUILDID := $(shell cat $(DEPTH)/config/buildid) -DEFINES += -DGRE_BUILDID=$(GRE_BUILDID) +MOZ_BUILDID := $(shell cat $(DEPTH)/config/buildid) +DEFINES += -DMOZ_BUILDID=$(MOZ_BUILDID) webapprt.$(OBJ_SUFFIX): $(DEPTH)/config/buildid diff --git a/webapprt/win/webapprt.cpp b/webapprt/win/webapprt.cpp index 9dfe0adad6b..54b2b2b5d06 100644 --- a/webapprt/win/webapprt.cpp +++ b/webapprt/win/webapprt.cpp @@ -326,7 +326,7 @@ namespace { MAXPATHLEN); NS_ENSURE_SUCCESS(rv, false); - if (0 == strcmp(buildid, NS_STRINGIFY(GRE_BUILDID))) { + if (0 == strcmp(buildid, NS_STRINGIFY(MOZ_BUILDID))) { return AttemptGRELoadAndLaunch(firefoxDir); }