Backout 8ceaedf06a57, f67977dea071 & 3fcaee9224ce (bug 704230) since bug 686466 does the same thing for all platforms; a=glandium

This commit is contained in:
Ed Morley 2011-11-22 11:44:41 +00:00
parent 2dd18a43b6
commit 0654ab4131
8 changed files with 24 additions and 48 deletions

View File

@ -697,5 +697,3 @@ ifeq (1_a,$(.PYMAKE)_$(firstword a$(subst /, ,$(srcdir))))
$(error MSYS-style srcdir being used with Pymake. Did you mean to run GNU Make instead? [see-also: https://developer.mozilla.org/en/Gmake_vs._Pymake])
endif
endif # WINNT
MOZ_APP_ID = @MOZ_APP_ID@

View File

@ -8688,8 +8688,6 @@ AC_SUBST(LIBJPEG_TURBO_ASFLAGS)
AC_SUBST(LIBJPEG_TURBO_X86_ASM)
AC_SUBST(LIBJPEG_TURBO_X64_ASM)
AC_SUBST(MOZ_APP_ID)
AC_MSG_CHECKING([for posix_fallocate])
AC_TRY_LINK([#define _XOPEN_SOURCE 600
#include <fcntl.h>],

View File

@ -105,7 +105,6 @@ DEFINES += -DGRE_MILESTONE=$(GRE_MILESTONE) \
-DAPP_NAME=$(MOZ_APP_NAME) \
-DAPP_VERSION=$(MOZ_APP_VERSION) \
-DMOZ_UPDATER=$(MOZ_UPDATER) \
-DAPP_ID=$(MOZ_APP_ID) \
$(NULL)
ifdef MOZILLA_OFFICIAL

View File

@ -10,7 +10,7 @@ SourceRepository=@MOZ_SOURCE_REPO@
#ifdef MOZ_SOURCE_STAMP
SourceStamp=@MOZ_SOURCE_STAMP@
#endif
ID=@APP_ID@
ID={a23983c0-fd0e-11dc-95ff-0800200c9a66}
[Gecko]
MinVersion=1.9.2b5pre

View File

@ -67,5 +67,3 @@ MOZ_APP_COMPONENT_INCLUDE=nsBrowserComponents.h
# use custom widget for html:select
MOZ_USE_NATIVE_POPUP_WINDOWS=1
MOZ_APP_ID={a23983c0-fd0e-11dc-95ff-0800200c9a66}

View File

@ -687,7 +687,6 @@ function cleanupActiveUpdate() {
* the application directory.
*/
function getLocale() {
if (gLocale)
return gLocale;
@ -695,10 +694,11 @@ function getLocale() {
if (!localeFile.exists())
localeFile = FileUtils.getFile(KEY_GRED, [FILE_UPDATE_LOCALE]);
if (!localeFile.exists()) {
// XXX temp workaround. see bug 704230
return "en-US";
}
if (!localeFile.exists())
throw Components.Exception(FILE_UPDATE_LOCALE + " file doesn't exist in " +
"either the " + KEY_APPDIR + " or " + KEY_GRED +
" directories", Cr.NS_ERROR_FILE_NOT_FOUND);
gLocale = readStringFromFile(localeFile);
LOG("getLocale - getting locale from file: " + localeFile.path +
", locale: " + gLocale);

View File

@ -251,20 +251,8 @@ GRE_BUILDID := $(shell cat $(DEPTH)/config/buildid)
DEFINES += -DGRE_MILESTONE=$(GRE_MILESTONE) -DGRE_BUILDID=$(GRE_BUILDID)
ifdef MOZILLA_OFFICIAL
DEFINES += -DMOZILLA_OFFICIAL
endif
DEFINES += -DAPP_VERSION=$(MOZ_APP_VERSION)
DEFINES += -DAPP_ID=$(MOZ_APP_ID)
$(srcdir)/nsAppRunner.cpp: $(DEPTH)/config/buildid $(topsrcdir)/config/milestone.txt
ifeq ($(OS_TARGET),Android)
nsAndroidStartup.o: $(DEPTH)/config/buildid $(topsrcdir)/config/milestone.txt
endif
platform.ini: FORCE
$(PYTHON) $(srcdir)/make-platformini.py --buildid=$(shell cat $(DEPTH)/config/buildid) $(INIARGS) $(topsrcdir)/config/milestone.txt > $@

View File

@ -57,9 +57,6 @@
#define LOG(args...) __android_log_print(ANDROID_LOG_INFO, MOZ_APP_NAME, args)
#define _STR(s) # s
#define STR(s) _STR(s)
struct AutoAttachJavaThread {
AutoAttachJavaThread() {
attached = mozilla_AndroidBridge_SetMainThread((void*)pthread_self());
@ -100,6 +97,20 @@ GeckoStart(void *data)
LOG("Failed to get GRE_HOME from the env vars");
return 0;
}
nsCAutoString appini_path(greHome);
appini_path.AppendLiteral("/application.ini");
rv = NS_NewNativeLocalFile(appini_path, false, getter_AddRefs(appini));
if (NS_FAILED(rv)) {
LOG("Failed to create nsILocalFile for appdata\n");
return 0;
}
nsXREAppData *appData;
rv = XRE_CreateAppData(appini, &appData);
if (NS_FAILED(rv)) {
LOG("Failed to load application.ini from %s\n", appini_path.get());
return 0;
}
nsCOMPtr<nsILocalFile> xreDir;
rv = NS_NewNativeLocalFile(nsDependentCString(greHome), false, getter_AddRefs(xreDir));
@ -108,25 +119,7 @@ GeckoStart(void *data)
return 0;
}
nsXREAppData appData = {
sizeof(nsXREAppData),
xreDir.get(),
"Mozilla",
"Fennec",
STR(APP_VERSION),
STR(GRE_BUILDID),
STR(APP_ID),
NULL,
#ifdef MOZILLA_OFFICIAL
NS_XRE_ENABLE_EXTENSION_MANAGER | NS_XRE_ENABLE_CRASH_REPORTER,
#else
NS_XRE_ENABLE_EXTENSION_MANAGER,
#endif
xreDir.get(),
STR(GRE_MILESTONE),
STR(GRE_MILESTONE),
"https://crash-reports.mozilla.com/submit"
};
appData->xreDirectory = xreDir.get();
nsTArray<char *> targs;
char *arg = strtok(static_cast<char *>(data), " ");
@ -136,11 +129,13 @@ GeckoStart(void *data)
}
targs.AppendElement(static_cast<char *>(nsnull));
int result = XRE_main(targs.Length() - 1, targs.Elements(), &appData);
int result = XRE_main(targs.Length() - 1, targs.Elements(), appData);
if (result)
LOG("XRE_main returned %d", result);
XRE_FreeAppData(appData);
mozilla::AndroidBridge::Bridge()->NotifyXreExit();
free(targs[0]);