Bug 1246874 - Unify GRE_BUILDID and MOZ_APP_BUILDID at the build system level. r=mshal

This commit is contained in:
Mike Hommey 2016-02-09 16:13:37 +09:00
parent 155889c4aa
commit 5554e09add
16 changed files with 31 additions and 31 deletions

View File

@ -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

View File

@ -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

View File

@ -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 /,_,$*)

View File

@ -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@";

View File

@ -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 += \

View File

@ -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"

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -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

View File

@ -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;
}

View File

@ -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

View File

@ -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);

View File

@ -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@

View File

@ -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

View File

@ -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);
}