diff --git a/client.mak b/client.mak index 89662b4363df..e054ec08af9a 100644 --- a/client.mak +++ b/client.mak @@ -161,6 +161,18 @@ pull_ldapcsdk: cd $(MOZ_SRC)\. $(CVSCO_LDAPCSDK) mozilla/directory/c-sdk +pull_xpconnect: + cd $(MOZ_SRC)\. + $(CVSCO_NSPR) mozilla/nsprpub + $(CVSCO) mozilla/include + $(CVSCO) mozilla/config + $(CVSCO) -l mozilla/js + $(CVSCO) -l mozilla/js/src + $(CVSCO) mozilla/js/src/fdlibm + $(CVSCO) mozilla/js/src/xpconnect + $(CVSCO) mozilla/modules/libreg + $(CVSCO) mozilla/xpcom + # pull either layout only or seamonkey the browser pull_layout: cd $(MOZ_SRC)\. @@ -191,6 +203,20 @@ clobber_psm: @cd $(MOZ_SRC)\$(MOZ_TOP)\security nmake -f makefile.win clobber_all +clobber_xpconnect: + @cd $(MOZ_SRC)\$(MOZ_TOP)\. + -rd /s /q dist + set DIST_DIRS=1 + @cd $(MOZ_SRC)\$(MOZ_TOP)\nsprpub + nmake -f makefile.win clobber_all + @cd $(MOZ_SRC)\$(MOZ_TOP)\include + nmake -f makefile.win clobber_all + @cd $(MOZ_SRC)\$(MOZ_TOP)\modules\libreg + nmake -f makefile.win clobber_all + @cd $(MOZ_SRC)\$(MOZ_TOP)\xpcom + nmake -f makefile.win clobber_all + @cd $(MOZ_SRC)\$(MOZ_TOP)\js + nmake -f makefile.win clobber_all clobber_seamonkey: @cd $(MOZ_SRC)\$(MOZ_TOP)\. @@ -215,6 +241,18 @@ build_psm: @cd $(MOZ_SRC)\$(MOZ_TOP)\security nmake -f makefile.win export +build_xpconnect: + @cd $(MOZ_SRC)\$(MOZ_TOP)\nsprpub + nmake -f makefile.win all + @cd $(MOZ_SRC)\$(MOZ_TOP)\include + nmake -f makefile.win all + @cd $(MOZ_SRC)\$(MOZ_TOP)\modules\libreg + nmake -f makefile.win all + @cd $(MOZ_SRC)\$(MOZ_TOP)\xpcom + nmake -f makefile.win all + @cd $(MOZ_SRC)\$(MOZ_TOP)\js\src + nmake -f makefile.win all + build_seamonkey: @cd $(MOZ_SRC)\$(MOZ_TOP)\. set DIST_DIRS=1 diff --git a/config/config.mak b/config/config.mak index 7de7960738d4..3a8b566a996c 100644 --- a/config/config.mak +++ b/config/config.mak @@ -200,6 +200,15 @@ CFLAGS=$(CFLAGS) -DSTAND_ALONE_JAVA NECKO=1 CFLAGS=$(CFLAGS) -DNECKO + +!if defined(XPCOM_STANDALONE) +CFLAGS=$(CFLAGS) -DXPCOM_STANDALONE +!endif + +!if defined(XPCONNECT_STANDALONE) +CFLAGS=$(CFLAGS) -DXPCONNECT_STANDALONE +!endif + # XXX We need to remove this before we ship. # This causes a static linkage between the webshell # and xpfe.f diff --git a/js/src/makefile.win b/js/src/makefile.win index 38148b7143c3..036ce1b29010 100644 --- a/js/src/makefile.win +++ b/js/src/makefile.win @@ -39,8 +39,10 @@ DEPTH=..\.. include <$(DEPTH)\config\config.mak> !ifdef MOZ_OJI +!if !defined(XPCONNECT_STANDALONE) DIRS = liveconnect !endif +!endif DIRS = $(DIRS) fdlibm xpconnect diff --git a/js/src/xpconnect/tests/components/makefile.win b/js/src/xpconnect/tests/components/makefile.win index ec4c4816f9ae..e7f2e4042e34 100644 --- a/js/src/xpconnect/tests/components/makefile.win +++ b/js/src/xpconnect/tests/components/makefile.win @@ -71,8 +71,13 @@ LLIBS= $(LIBNSPR) \ $(DIST)\lib\js$(MOZ_BITS)$(VERSION_NUMBER).lib \ $(DIST)\lib\xpcom.lib \ $(DIST)\lib\xpc$(MOZ_BITS)$(VERSION_NUMBER).lib \ + $(NULL) + +!ifndef XPCOM_STANDALONE +LLIBS= $(LLIBS) \ $(DIST)\lib\timer_s.lib \ $(NULL) +!endif include <$(DEPTH)\config\rules.mak> diff --git a/js/src/xpconnect/tests/components/xpctest_echo.cpp b/js/src/xpconnect/tests/components/xpctest_echo.cpp index 2706ad429bcc..ebf858cd2314 100644 --- a/js/src/xpconnect/tests/components/xpctest_echo.cpp +++ b/js/src/xpconnect/tests/components/xpctest_echo.cpp @@ -37,16 +37,23 @@ #include "xpctest_private.h" -#ifndef XPCONNECT_STANDALONE +#if defined(WIN32) && !defined(XPCONNECT_STANDALONE) +#define IMPLEMENT_TIMER_STUFF 1 +#endif -class xpctestEcho : public nsIEcho, public nsITimerCallback +class xpctestEcho : public nsIEcho +#ifdef IMPLEMENT_TIMER_STUFF +, public nsITimerCallback +#endif // IMPLEMENT_TIMER_STUFF { public: NS_DECL_ISUPPORTS NS_DECL_NSIECHO +#ifdef IMPLEMENT_TIMER_STUFF // not very xpcom compilant method from nsITimerCallback NS_IMETHOD_(void) Notify(nsITimer *timer); +#endif // IMPLEMENT_TIMER_STUFF xpctestEcho(); virtual ~xpctestEcho(); @@ -56,7 +63,11 @@ private: /***************************************************************************/ +#ifdef IMPLEMENT_TIMER_STUFF NS_IMPL_ISUPPORTS2(xpctestEcho, nsIEcho, nsITimerCallback); +#else +NS_IMPL_ISUPPORTS1(xpctestEcho, nsIEcho); +#endif // IMPLEMENT_TIMER_STUFF xpctestEcho::xpctestEcho() : mReceiver(NULL) @@ -416,7 +427,8 @@ xpctestEcho::CallReceiverSometimeLater(void) // have build order problems with linking to the static timer lib // as it is built today. This is only test code and we can stand to // have it only work on Win32 for now. -#ifdef WIN32 + +#ifdef IMPLEMENT_TIMER_STUFF nsCOMPtr timer; nsresult rv; timer = do_CreateInstance("component://netscape/timer", &rv); @@ -426,9 +438,10 @@ xpctestEcho::CallReceiverSometimeLater(void) return NS_OK; #else return NS_ERROR_NOT_IMPLEMENTED; -#endif +#endif // IMPLEMENT_TIMER_STUFF } +#ifdef IMPLEMENT_TIMER_STUFF NS_IMETHODIMP_(void) xpctestEcho::Notify(nsITimer *timer) { @@ -436,6 +449,7 @@ xpctestEcho::Notify(nsITimer *timer) mReceiver->CallReceiverSometimeLater(); NS_RELEASE(timer); } +#endif // IMPLEMENT_TIMER_STUFF /* readonly attribute short throwInGetter; */ NS_IMETHODIMP @@ -470,5 +484,3 @@ xpctest::ConstructEcho(nsISupports *aOuter, REFNSIID aIID, void **aResult) return rv; } - -#endif // XPCONNECT_STANDALONE diff --git a/js/src/xpconnect/tests/components/xpctest_module.cpp b/js/src/xpconnect/tests/components/xpctest_module.cpp index f8e49d5ac54b..91cdfa73dbd3 100644 --- a/js/src/xpconnect/tests/components/xpctest_module.cpp +++ b/js/src/xpconnect/tests/components/xpctest_module.cpp @@ -43,9 +43,7 @@ // XXX progids need to be standardized! static nsModuleComponentInfo components[] = { -#ifndef XPCONNECT_STANDALONE {nsnull, NS_ECHO_CID, "nsEcho", xpctest::ConstructEcho }, -#endif {nsnull, NS_CHILD_CID, "nsChild", xpctest::ConstructChild }, {nsnull, NS_NOISY_CID, "nsNoisy", xpctest::ConstructNoisy }, {nsnull, NS_STRING_TEST_CID, "nsStringTest", xpctest::ConstructStringTest }, diff --git a/js/src/xpconnect/tests/components/xpctest_private.h b/js/src/xpconnect/tests/components/xpctest_private.h index 85a23dfb66e4..d5b889a384b2 100644 --- a/js/src/xpconnect/tests/components/xpctest_private.h +++ b/js/src/xpconnect/tests/components/xpctest_private.h @@ -52,10 +52,14 @@ #include "xpctest.h" #include "jsapi.h" -#ifndef XPCONNECT_STANDALONE +#if defined(WIN32) && !defined(XPCONNECT_STANDALONE) +#define IMPLEMENT_TIMER_STUFF 1 +#endif + +#ifdef IMPLEMENT_TIMER_STUFF #include "nsITimer.h" #include "nsITimerCallback.h" -#endif +#endif // IMPLEMENT_TIMER_STUFF // {ED132C20-EED1-11d2-BAA4-00805F8A5DD7} #define NS_ECHO_CID \ diff --git a/xpcom/tests/PropertiesTest.cpp b/xpcom/tests/PropertiesTest.cpp index f22bb6ce5cb3..581a52d96377 100644 --- a/xpcom/tests/PropertiesTest.cpp +++ b/xpcom/tests/PropertiesTest.cpp @@ -21,6 +21,7 @@ * Pierre Phaneuf */ +#ifndef XPCOM_STANDALONE #define NS_IMPL_IDS #include "nsIEventQueueService.h" @@ -93,9 +94,11 @@ NS_SetupRegistry() } +#endif int main(int argc, char* argv[]) { +#ifndef XPCOM_STANDALONE nsresult ret; NS_SetupRegistry(); @@ -203,6 +206,6 @@ main(int argc, char* argv[]) delete[] pVal; ret = propEnum->Next(); } - +#endif return 0; }