b=477727; fix shell service and disable migration browser component for Windows CE; r=gavin
--- a/browser/app/Makefile.in
+++ b/browser/app/Makefile.in
@@ -160,18 +160,26 @@ endif
# shouldn't get 755 perms need $(IFLAGS1) for either way of calling nsinstall.
NSDISTMODE = copy
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
EXTRA_DEPS += \
$(STATIC_EXTRA_DEPS) \
$(NULL)
DEFINES += $(STATIC_DEFINES)
@@ -264,17 +272,17 @@ ifdef BUILD_STATIC_LIBS
@echo WinQueryProperty = PMMERGE.5450 >>$(EXE_DEF_FILE)
@echo WinRemoveProperty = PMMERGE.5451 >>$(EXE_DEF_FILE)
@echo WinSetProperty = PMMERGE.5452 >>$(EXE_DEF_FILE)
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)|" \
-e "s|%MOZ_APP_DISPLAYNAME%|$(MOZ_APP_DISPLAYNAME)|" > $@
chmod +x $@
libs:: $(MOZ_APP_NAME)
$(INSTALL) $< $(DIST)/bin
--- a/browser/components/Makefile.in
+++ b/browser/components/Makefile.in
@@ -58,27 +58,30 @@ EXTRA_PP_COMPONENTS = \
$(NULL)
EXTRA_JS_MODULES = distribution.js
DIRS = \
certerror \
dirprovider \
microsummaries \
- migration \
preferences \
search \
sessionstore \
shell \
sidebar \
feeds \
places \
privatebrowsing \
$(NULL)
+ifndef WINCE
+DIRS += migration
+endif
+
ifdef MOZ_SAFE_BROWSING
DIRS += safebrowsing
endif
DIRS += build
ifneq (,$(BUILD_OFFICIAL)$(MOZILLA_OFFICIAL))
DEFINES += -DOFFICIAL_BUILD=1
--- a/browser/components/build/Makefile.in
+++ b/browser/components/build/Makefile.in
@@ -20,17 +20,16 @@ endif
REQUIRES = \
xpcom \
string \
rdf \
uriloader \
intl \
necko \
- migration \
shellservice \
xulapp \
places \
browserplaces \
microsummaries \
$(NULL)
EXPORTS = nsBrowserCompsCID.h
@@ -40,44 +39,49 @@ CPPSRCS = nsModule.cpp \
ifeq ($(OS_ARCH),WINNT)
DEFINES += -DPSTOREC_DLL=\"$(subst \,\\,$(WINDIR))\\system32\\pstorec.dll\"
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 \
$(NULL)
ifeq ($(OS_ARCH),WINNT)
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)))
EXTRA_DSO_LDOPTS += \
$(TK_LIBS) \
$(NULL)
endif
--- a/browser/components/build/nsModule.cpp
+++ b/browser/components/build/nsModule.cpp
@@ -35,23 +35,27 @@
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsIGenericFactory.h"
#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"
#endif
#if !defined(XP_OS2)
#include "nsOperaProfileMigrator.h"
#endif
#include "nsPhoenixProfileMigrator.h"
@@ -60,31 +64,37 @@
#include "nsIEProfileMigrator.h"
#elif defined(XP_MACOSX)
#include "nsSafariProfileMigrator.h"
#include "nsOmniWebProfileMigrator.h"
#include "nsMacIEProfileMigrator.h"
#include "nsCaminoProfileMigrator.h"
#include "nsICabProfileMigrator.h"
#endif
+
+#endif // WINCE
+
#include "rdf.h"
#include "nsFeedSniffer.h"
#include "nsAboutFeeds.h"
#include "nsIAboutModule.h"
/////////////////////////////////////////////////////////////////////////////
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
#if !defined(XP_OS2)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsOperaProfileMigrator)
#endif
NS_GENERIC_FACTORY_CONSTRUCTOR(nsPhoenixProfileMigrator)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsProfileMigrator)
@@ -93,16 +103,19 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsSeamonk
NS_GENERIC_FACTORY_CONSTRUCTOR(nsIEProfileMigrator)
#elif defined(XP_MACOSX)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSafariProfileMigrator)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsOmniWebProfileMigrator)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsMacIEProfileMigrator)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsCaminoProfileMigrator)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsICabProfileMigrator)
#endif
+
+#endif
+
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFeedSniffer)
/////////////////////////////////////////////////////////////////////////////
static const nsModuleComponentInfo components[] =
{
#if defined(XP_WIN)
{ "Browser Shell Service",
@@ -131,16 +144,18 @@ static const nsModuleComponentInfo compo
nsFeedSniffer::Register },
{ "about:feeds Page",
NS_ABOUTFEEDS_CID,
NS_ABOUT_MODULE_CONTRACTID_PREFIX "feeds",
nsAboutFeeds::Create
},
+#ifndef WINCE
+
{ "Profile Migrator",
NS_FIREFOX_PROFILEMIGRATOR_CID,
NS_PROFILEMIGRATOR_CONTRACTID,
nsProfileMigratorConstructor },
#if defined(XP_WIN) && !defined(__MINGW32__)
{ "Internet Explorer (Windows) Profile Migrator",
NS_WINIEPROFILEMIGRATOR_CID,
@@ -198,12 +213,14 @@ static const nsModuleComponentInfo compo
NS_PHOENIXPROFILEMIGRATOR_CID,
NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "phoenix",
nsPhoenixProfileMigratorConstructor },
{ "Seamonkey Profile Migrator",
NS_SEAMONKEYPROFILEMIGRATOR_CID,
NS_BROWSERPROFILEMIGRATOR_CONTRACTID_PREFIX "seamonkey",
nsSeamonkeyProfileMigratorConstructor }
+
+#endif /* WINCE */
};
NS_IMPL_NSGETMODULE(nsBrowserCompsModule, components)
--- a/browser/components/shell/public/Makefile.in
+++ b/browser/components/shell/public/Makefile.in
@@ -42,17 +42,17 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = shellservice
XPIDL_MODULE = shellservice
XPIDLSRCS = nsIShellService.idl
-ifeq ($(OS_ARCH),WINNT)
+ifneq (,$(filter WINCE WINNT,$(OS_ARCH)))
XPIDLSRCS += nsIWindowsShellService.idl
endif
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
XPIDLSRCS += nsIMacShellService.idl
endif
include $(topsrcdir)/config/rules.mk
--- a/browser/components/shell/src/Makefile.in
+++ b/browser/components/shell/src/Makefile.in
@@ -60,17 +60,17 @@ REQUIRES = \
content \
imglib2 \
gfx \
widget \
pref \
layout \
$(NULL)
-ifeq ($(OS_ARCH),WINNT)
+ifneq (,$(filter WINCE WINNT,$(OS_ARCH)))
CPPSRCS = nsWindowsShellService.cpp
REQUIRES += \
browsercomps \
$(NULL)
else
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
CPPSRCS = nsMacShellService.cpp
else
--- a/browser/components/shell/src/nsWindowsShellService.cpp
+++ b/browser/components/shell/src/nsWindowsShellService.cpp
@@ -261,20 +261,22 @@ nsWindowsShellService::IsDefaultBrowser(
*aIsDefaultBrowser = PR_TRUE;
PRUnichar exePath[MAX_BUF];
if (!::GetModuleFileNameW(0, exePath, MAX_BUF))
return NS_ERROR_FAILURE;
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);
nsCOMPtr<nsILocalFile> lf;
nsresult rv = NS_NewLocalFile(appShortPath, PR_TRUE,
getter_AddRefs(lf));
if (NS_FAILED(rv))
@@ -592,17 +594,17 @@ nsWindowsShellService::SetDesktopBackgro
// The size is always 3 unicode characters.
PRInt32 size = 3 * sizeof(PRUnichar);
::RegSetValueExW(key, L"TileWallpaper",
0, REG_SZ, (const BYTE *)tile, size);
::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);
}
}
return rv;
}
NS_IMETHODIMP