bug 507288: move greprefs/*js into res/greprefs.js r=bsmedberg

cdiff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
This commit is contained in:
Dão Gottwald 2009-10-04 12:43:18 +02:00
parent f3273b5ed5
commit f1297fc664
6 changed files with 23 additions and 16 deletions

View File

@ -363,9 +363,7 @@
@BINPATH@/@PREF_DIR@/firefox.js
@BINPATH@/@PREF_DIR@/firefox-branding.js
@BINPATH@/@PREF_DIR@/channel-prefs.js
@BINPATH@/greprefs/all.js
@BINPATH@/greprefs/security-prefs.js
@BINPATH@/greprefs/xpinstall.js
@BINPATH@/greprefs.js
@BINPATH@/defaults/autoconfig/platform.js
@BINPATH@/defaults/autoconfig/prefcalls.js

View File

@ -780,6 +780,9 @@ components/xuldoc.xpt
components/xultmpl.xpt
components/zipwriter.xpt
components/firefox.xpt
greprefs/all.js
greprefs/security-prefs.js
greprefs/xpinstall.js
run-mozilla.sh
firefox
dependentlibs.list
@ -810,4 +813,4 @@ install.rdf
@DLL_PREFIX@jsj@DLL_SUFFIX@
#ifdef XP_WIN
components/brwsrcmp.dll
#endif
#endif

View File

@ -72,8 +72,6 @@ ifdef WINCE
DEFINES += -DWINCE=1
endif
PREF_JS_EXPORTS = $(srcdir)/init/all.js
EXTRA_DSO_LDOPTS = \
$(LIBS_DIR) \
$(MOZ_COMPONENT_LIBS) \
@ -82,9 +80,13 @@ EXTRA_DSO_LDOPTS = \
include $(topsrcdir)/config/rules.mk
GARBAGE += $(addprefix $(DIST)/bin/defaults/pref/, \
all.js mailnews.js editor.js \
mailnews.js editor.js \
aix.js beos.js unix.js winpref.js os2prefs.js openvms.js photon.js)
GARBAGE += greprefs.js
GREPREF_FILES = $(topsrcdir)/xpinstall/public/xpinstall.js $(topsrcdir)/netwerk/base/public/security-prefs.js $(srcdir)/init/all.js
# Optimizer bug with GCC 3.2.2 on OS/2
ifeq ($(OS_ARCH), OS2)
nsPrefService.$(OBJ_SUFFIX): nsPrefService.cpp
@ -92,3 +94,10 @@ nsPrefService.$(OBJ_SUFFIX): nsPrefService.cpp
@$(MAKE_DEPS_AUTO_CXX)
$(ELOG) $(CCC) $(OUTOPTION)$@ -c $(COMPILE_CXXFLAGS:-O2=-O1) $(_VPATH_SRCS)
endif
greprefs.js: $(GREPREF_FILES)
$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(PREF_PPFLAGS) $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) $^ > $@
libs:: greprefs.js
$(INSTALL) $^ $(DIST)/bin/

View File

@ -464,8 +464,8 @@ static nsresult openPrefFile(nsIFile* aFile)
if (NS_FAILED(rv))
return rv;
PRInt64 fileSize;
rv = aFile->GetFileSize(&fileSize);
PRUint32 fileSize;
rv = inStr->Available(&fileSize);
if (NS_FAILED(rv))
return rv;
@ -640,18 +640,19 @@ static nsresult pref_LoadPrefsInDirList(const char *listId)
static nsresult pref_InitInitialObjects()
{
nsCOMPtr<nsIFile> aFile;
nsCOMPtr<nsIFile> greprefsFile;
nsCOMPtr<nsIFile> defaultPrefDir;
nsresult rv;
// first we parse the GRE default prefs. This also works if we're not using a GRE,
rv = NS_GetSpecialDirectory(NS_GRE_DIR, getter_AddRefs(defaultPrefDir));
rv = NS_GetSpecialDirectory(NS_GRE_DIR, getter_AddRefs(greprefsFile));
NS_ENSURE_SUCCESS(rv, rv);
rv = defaultPrefDir->AppendNative(NS_LITERAL_CSTRING("greprefs"));
rv = greprefsFile->AppendNative(NS_LITERAL_CSTRING("greprefs.js"));
NS_ENSURE_SUCCESS(rv, rv);
rv = pref_LoadPrefsInDir(defaultPrefDir, nsnull, 0);
rv = openPrefFile(greprefsFile);
if (NS_FAILED(rv)) {
NS_WARNING("Error parsing GRE default preferences. Is this an old-style embedding app?");
}

View File

@ -146,8 +146,6 @@ EXPORTS = \
nsASocketHandler.h \
$(NULL)
PREF_JS_EXPORTS = $(srcdir)/security-prefs.js
include $(topsrcdir)/config/rules.mk
DEFINES += -DIMPL_NS_NET

View File

@ -62,6 +62,4 @@ EXPORTS = \
nsSoftwareUpdateIIDs.h \
$(NULL)
PREF_JS_EXPORTS = $(srcdir)/xpinstall.js
include $(topsrcdir)/config/rules.mk