From 68b954f0a231a168ea723dd5e6cd864e4b6c1b01 Mon Sep 17 00:00:00 2001 From: "dougt@meer.net" Date: Wed, 5 Mar 2008 11:23:44 -0800 Subject: [PATCH] XRE build changes for windows mobile. b=420240, r=bsmedberg, a=beltzner --- toolkit/library/Makefile.in | 8 ++++++++ toolkit/library/libxul-rules.mk | 2 ++ toolkit/xre/Makefile.in | 8 ++++++-- toolkit/xre/nsAppRunner.cpp | 7 ++++++- toolkit/xre/nsWindowsRestart.cpp | 5 ++++- 5 files changed, 26 insertions(+), 4 deletions(-) diff --git a/toolkit/library/Makefile.in b/toolkit/library/Makefile.in index d6e8c49d2d7..12e18269f39 100644 --- a/toolkit/library/Makefile.in +++ b/toolkit/library/Makefile.in @@ -74,6 +74,10 @@ ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_) CPPSRCS += dlldeps-xul.cpp endif +ifeq ($(OS_ARCH),WINCE) +CPPSRCS += dlldeps-xul.cpp +endif + ifeq ($(OS_ARCH),OS2) CPPSRCS += dlldeps-xul.cpp endif @@ -228,6 +232,10 @@ ifneq (,$(MOZ_DEBUG)$(NS_TRACE_MALLOC)) EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME,imagehlp) endif endif # WINNT +ifeq ($(OS_ARCH),WINCE) +EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME, aygshell cellcore uuid ole32 oleaut32 ) +endif + ifdef MOZ_JPROF EXTRA_DSO_LDOPTS += -ljprof diff --git a/toolkit/library/libxul-rules.mk b/toolkit/library/libxul-rules.mk index 9e3a0ade169..2fbdc3157fb 100644 --- a/toolkit/library/libxul-rules.mk +++ b/toolkit/library/libxul-rules.mk @@ -74,8 +74,10 @@ DEFINES += \ $(NULL) ifeq ($(MOZ_WIDGET_TOOLKIT),windows) +ifneq ($(OS_ARCH),WINCE) OS_LIBS += $(call EXPAND_LIBNAME,usp10) endif +endif ifneq (,$(filter $(MOZ_WIDGET_TOOLKIT),mac cocoa)) EXTRA_DSO_LDOPTS += -lcups ifdef MOZ_ENABLE_GLITZ diff --git a/toolkit/xre/Makefile.in b/toolkit/xre/Makefile.in index 0c050c77bb3..11a22d56bdd 100644 --- a/toolkit/xre/Makefile.in +++ b/toolkit/xre/Makefile.in @@ -92,7 +92,7 @@ XPIDLSRCS = \ nsIXULRuntime.idl \ $(NULL) -ifeq ($(OS_ARCH),WINNT) +ifneq (,$(filter WINCE WINNT,$(OS_ARCH))) XPIDLSRCS += nsIWinAppHelper.idl endif @@ -126,7 +126,11 @@ DEFINES += -DMOZ_UPDATER endif ifeq ($(MOZ_WIDGET_TOOLKIT),windows) +ifdef WINCE +CPPSRCS += nsNativeAppSupportDefault.cpp +else CPPSRCS += nsNativeAppSupportWin.cpp +endif DEFINES += -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE else ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa) @@ -164,7 +168,7 @@ SHAREDCPPSRCS += nsSigHandlers.cpp endif GARBAGE += $(SHAREDCPPSRCS) $(wildcard *.$(OBJ_SUFFIX)) -ifeq ($(OS_ARCH),WINNT) +ifneq (,$(filter WINCE WINNT,$(OS_ARCH))) GARBAGE += $(addprefix $(srcdir)/,$(SHAREDCPPSRCS)) endif diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp index 9a81f64d945..affc067746a 100644 --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -790,6 +790,10 @@ typedef enum NS_IMETHODIMP nsXULAppInfo::GetUserCanElevate(PRBool *aUserCanElevate) { +#ifdef WINCE + *aUserCanElevate = PR_FALSE; + return NS_OK; +#else HANDLE hToken; VISTA_TOKEN_ELEVATION_TYPE elevationType; @@ -817,6 +821,7 @@ nsXULAppInfo::GetUserCanElevate(PRBool *aUserCanElevate) CloseHandle(hToken); return NS_OK; +#endif // WINCE } #endif @@ -2400,7 +2405,7 @@ XRE_main(int argc, char* argv[], const nsXREAppData* aAppData) NS_BREAK(); #endif -#ifdef XP_WIN32 +#if defined (XP_WIN32) && !defined (WINCE) // Suppress the "DLL Foo could not be found" dialog, such that if dependent // libraries (such as GDI+) are not preset, we gracefully fail to load those // XPCOM components, instead of being ungraceful. diff --git a/toolkit/xre/nsWindowsRestart.cpp b/toolkit/xre/nsWindowsRestart.cpp index 2fa6ae7a54e..34969eddae1 100755 --- a/toolkit/xre/nsWindowsRestart.cpp +++ b/toolkit/xre/nsWindowsRestart.cpp @@ -145,6 +145,9 @@ MakeCommandLine(int argc, PRUnichar **argv) static BOOL LaunchAsNormalUser(const PRUnichar *exePath, PRUnichar *cl) { +#ifdef WINCE + return PR_FALSE; +#else if (!pCreateProcessWithTokenW) { // IsUserAnAdmin is not present on Win9x and not exported by name on Win2k *(FARPROC *)&pIsUserAnAdmin = @@ -218,8 +221,8 @@ LaunchAsNormalUser(const PRUnichar *exePath, PRUnichar *cl) CloseHandle(pi.hThread); return TRUE; +#endif } - /** * Convert UTF8 to UTF16 without using the normal XPCOM goop, which we * can't link to updater.exe.