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.js
@BINPATH@/@PREF_DIR@/firefox-branding.js @BINPATH@/@PREF_DIR@/firefox-branding.js
@BINPATH@/@PREF_DIR@/channel-prefs.js @BINPATH@/@PREF_DIR@/channel-prefs.js
@BINPATH@/greprefs/all.js @BINPATH@/greprefs.js
@BINPATH@/greprefs/security-prefs.js
@BINPATH@/greprefs/xpinstall.js
@BINPATH@/defaults/autoconfig/platform.js @BINPATH@/defaults/autoconfig/platform.js
@BINPATH@/defaults/autoconfig/prefcalls.js @BINPATH@/defaults/autoconfig/prefcalls.js

View File

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

View File

@ -72,8 +72,6 @@ ifdef WINCE
DEFINES += -DWINCE=1 DEFINES += -DWINCE=1
endif endif
PREF_JS_EXPORTS = $(srcdir)/init/all.js
EXTRA_DSO_LDOPTS = \ EXTRA_DSO_LDOPTS = \
$(LIBS_DIR) \ $(LIBS_DIR) \
$(MOZ_COMPONENT_LIBS) \ $(MOZ_COMPONENT_LIBS) \
@ -82,9 +80,13 @@ EXTRA_DSO_LDOPTS = \
include $(topsrcdir)/config/rules.mk include $(topsrcdir)/config/rules.mk
GARBAGE += $(addprefix $(DIST)/bin/defaults/pref/, \ 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) 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 # Optimizer bug with GCC 3.2.2 on OS/2
ifeq ($(OS_ARCH), OS2) ifeq ($(OS_ARCH), OS2)
nsPrefService.$(OBJ_SUFFIX): nsPrefService.cpp nsPrefService.$(OBJ_SUFFIX): nsPrefService.cpp
@ -92,3 +94,10 @@ nsPrefService.$(OBJ_SUFFIX): nsPrefService.cpp
@$(MAKE_DEPS_AUTO_CXX) @$(MAKE_DEPS_AUTO_CXX)
$(ELOG) $(CCC) $(OUTOPTION)$@ -c $(COMPILE_CXXFLAGS:-O2=-O1) $(_VPATH_SRCS) $(ELOG) $(CCC) $(OUTOPTION)$@ -c $(COMPILE_CXXFLAGS:-O2=-O1) $(_VPATH_SRCS)
endif 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)) if (NS_FAILED(rv))
return rv; return rv;
PRInt64 fileSize; PRUint32 fileSize;
rv = aFile->GetFileSize(&fileSize); rv = inStr->Available(&fileSize);
if (NS_FAILED(rv)) if (NS_FAILED(rv))
return rv; return rv;
@ -640,18 +640,19 @@ static nsresult pref_LoadPrefsInDirList(const char *listId)
static nsresult pref_InitInitialObjects() static nsresult pref_InitInitialObjects()
{ {
nsCOMPtr<nsIFile> aFile; nsCOMPtr<nsIFile> aFile;
nsCOMPtr<nsIFile> greprefsFile;
nsCOMPtr<nsIFile> defaultPrefDir; nsCOMPtr<nsIFile> defaultPrefDir;
nsresult rv; nsresult rv;
// first we parse the GRE default prefs. This also works if we're not using a GRE, // 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); 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); NS_ENSURE_SUCCESS(rv, rv);
rv = pref_LoadPrefsInDir(defaultPrefDir, nsnull, 0); rv = openPrefFile(greprefsFile);
if (NS_FAILED(rv)) { if (NS_FAILED(rv)) {
NS_WARNING("Error parsing GRE default preferences. Is this an old-style embedding app?"); NS_WARNING("Error parsing GRE default preferences. Is this an old-style embedding app?");
} }

View File

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

View File

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