mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1246874 - Unify GRE_BUILDID and MOZ_APP_BUILDID at the build system level. r=mshal
This commit is contained in:
parent
155889c4aa
commit
5554e09add
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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 /,_,$*)
|
||||
|
||||
|
@ -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@";
|
||||
|
@ -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 += \
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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@
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user