b=477727; fix shell service and disable migration browser component for Windows CE; r=gavin

This commit is contained in:
Vladimir Vukicevic 2009-02-11 18:24:53 -08:00
Родитель ac41244ed5
Коммит 2a7a44217c
7 изменённых файлов: 48 добавлений и 14 удалений

Просмотреть файл

@ -165,8 +165,16 @@ include $(topsrcdir)/config/config.mk
ifdef _MSC_VER
# Always enter a Windows program through wmain, whether or not we're
# a console application.
ifdef WINCE
WIN32_EXE_LDFLAGS += -ENTRY:mainWCRTStartup
else
WIN32_EXE_LDFLAGS += -ENTRY:wmainCRTStartup
endif
endif
ifdef WINCE
EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME,corelibc)
endif
ifdef BUILD_STATIC_LIBS
include $(topsrcdir)/config/static-config.mk
@ -269,7 +277,7 @@ LDFLAGS += -Zlinker /NOE
endif
endif
ifneq (,$(filter-out OS2 WINNT,$(OS_ARCH)))
ifneq (,$(filter-out OS2 WINNT WINCE,$(OS_ARCH)))
$(MOZ_APP_NAME):: $(topsrcdir)/build/unix/mozilla.in $(GLOBAL_DEPS)
cat $< | sed -e "s|%MOZAPPDIR%|$(installdir)|" \

Просмотреть файл

@ -63,7 +63,6 @@ DIRS = \
certerror \
dirprovider \
microsummaries \
migration \
preferences \
search \
sessionstore \
@ -74,6 +73,10 @@ DIRS = \
privatebrowsing \
$(NULL)
ifndef WINCE
DIRS += migration
endif
ifdef MOZ_SAFE_BROWSING
DIRS += safebrowsing
endif

Просмотреть файл

@ -25,7 +25,6 @@ REQUIRES = \
uriloader \
intl \
necko \
migration \
shellservice \
xulapp \
places \
@ -45,7 +44,6 @@ OS_LIBS += $(call EXPAND_LIBNAME,ole32 shell32)
endif
LOCAL_INCLUDES = \
-I$(srcdir)/../migration/src \
-I$(srcdir)/../shell/src \
-I$(srcdir)/../feeds/src \
-I$(srcdir)/../places/src \
@ -56,23 +54,29 @@ OS_LIBS += $(call EXPAND_LIBNAME,version)
endif
SHARED_LIBRARY_LIBS = \
../migration/src/$(LIB_PREFIX)migration_s.$(LIB_SUFFIX) \
../feeds/src/$(LIB_PREFIX)browser_feeds_s.$(LIB_SUFFIX) \
../places/src/$(LIB_PREFIX)browserplaces_s.$(LIB_SUFFIX) \
../places/src/$(LIB_PREFIX)browserplaces_s.$(LIB_SUFFIX) \
$(NULL)
ifneq (,$(filter windows mac cocoa gtk2, $(MOZ_WIDGET_TOOLKIT)))
SHARED_LIBRARY_LIBS += ../shell/src/$(LIB_PREFIX)shellservice_s.$(LIB_SUFFIX) \
$(NULL)
SHARED_LIBRARY_LIBS += ../shell/src/$(LIB_PREFIX)shellservice_s.$(LIB_SUFFIX)
endif
EXTRA_DSO_LDOPTS += \
$(call EXPAND_LIBNAME_PATH,unicharutil_external_s,$(LIBXUL_DIST)/lib) \
$(LIBXUL_DIST)/lib/$(LIB_PREFIX)mozreg_s.$(LIB_SUFFIX) \
$(LIBXUL_DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) \
$(MOZ_COMPONENT_LIBS) \
$(NULL)
# migration requires mozreg, which doesn't build on WINCE; only include
# it on non-CE
ifndef WINCE
REQUIRES += migration
LOCAL_INCLUDES += -I$(srcdir)/../migration/src
SHARED_LIBRARY_LIBS += ../migration/src/$(LIB_PREFIX)migration_s.$(LIB_SUFFIX)
EXTRA_DSO_LDOPTS += $(LIBXUL_DIST)/lib/$(LIB_PREFIX)mozreg_s.$(LIB_SUFFIX)
endif
# Mac: Need to link with CoreFoundation for Mac Migrators (PList reading code)
# GTK2: Need to link with glib for GNOME shell service
ifneq (,$(filter mac cocoa gtk2,$(MOZ_WIDGET_TOOLKIT)))

Просмотреть файл

@ -40,13 +40,17 @@
#include "nsBrowserCompsCID.h"
#include "nsPlacesImportExportService.h"
#ifdef XP_WIN
#if defined(XP_WIN)
#include "nsWindowsShellService.h"
#elif defined(XP_MACOSX)
#include "nsMacShellService.h"
#elif defined(MOZ_WIDGET_GTK2)
#include "nsGNOMEShellService.h"
#endif
#ifndef WINCE
#include "nsProfileMigrator.h"
#if !defined(XP_BEOS)
#include "nsDogbertProfileMigrator.h"
@ -65,6 +69,9 @@
#include "nsCaminoProfileMigrator.h"
#include "nsICabProfileMigrator.h"
#endif
#endif // WINCE
#include "rdf.h"
#include "nsFeedSniffer.h"
#include "nsAboutFeeds.h"
@ -73,13 +80,16 @@
/////////////////////////////////////////////////////////////////////////////
NS_GENERIC_FACTORY_CONSTRUCTOR(nsPlacesImportExportService)
#ifdef XP_WIN
#if defined(XP_WIN)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsWindowsShellService)
#elif defined(XP_MACOSX)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacShellService)
#elif defined(MOZ_WIDGET_GTK2)
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGNOMEShellService, Init)
#endif
#ifndef WINCE
#if !defined(XP_BEOS)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsDogbertProfileMigrator)
#endif
@ -98,6 +108,9 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacIEProfileMigrator)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsCaminoProfileMigrator)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsICabProfileMigrator)
#endif
#endif
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFeedSniffer)
/////////////////////////////////////////////////////////////////////////////
@ -136,6 +149,8 @@ static const nsModuleComponentInfo components[] =
nsAboutFeeds::Create
},
#ifndef WINCE
{ "Profile Migrator",
NS_FIREFOX_PROFILEMIGRATOR_CID,
NS_PROFILEMIGRATOR_CONTRACTID,
@ -203,6 +218,8 @@ static const nsModuleComponentInfo components[] =
NS_SEAMONKEYPROFILEMIGRATOR_CID,
NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "seamonkey",
nsSeamonkeyProfileMigratorConstructor }
#endif /* WINCE */
};
NS_IMPL_NSGETMODULE(nsBrowserCompsModule, components)

Просмотреть файл

@ -47,7 +47,7 @@ XPIDL_MODULE = shellservice
XPIDLSRCS = nsIShellService.idl
ifeq ($(OS_ARCH),WINNT)
ifneq (,$(filter WINCE WINNT,$(OS_ARCH)))
XPIDLSRCS += nsIWindowsShellService.idl
endif

Просмотреть файл

@ -65,7 +65,7 @@ REQUIRES = \
layout \
$(NULL)
ifeq ($(OS_ARCH),WINNT)
ifneq (,$(filter WINCE WINNT,$(OS_ARCH)))
CPPSRCS = nsWindowsShellService.cpp
REQUIRES += \
browsercomps \

Просмотреть файл

@ -266,10 +266,12 @@ nsWindowsShellService::IsDefaultBrowser(PRBool aStartupCheck,
nsAutoString appLongPath(exePath);
#ifndef WINCE
// Support short path to the exe so if it is already set the user is not
// prompted to set the default browser again.
if (!::GetShortPathNameW(exePath, exePath, sizeof(exePath)))
return NS_ERROR_FAILURE;
#endif
nsAutoString appShortPath(exePath);
ToUpperCase(appShortPath);
@ -597,7 +599,7 @@ nsWindowsShellService::SetDesktopBackground(nsIDOMElement* aElement,
::RegSetValueExW(key, L"WallpaperStyle",
0, REG_SZ, (const BYTE *)style, size);
::SystemParametersInfoW(SPI_SETDESKWALLPAPER, 0, (PVOID)path.get(),
SPIF_UPDATEINIFILE | SPIF_SENDWININICHANGE);
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE);
// Close the key we opened.
::RegCloseKey(key);
}