patches from madams@janna.com to build xpconnect standalone. bug 42026. r=leaf@mozilla.org a=brendan@mozilla.org

This commit is contained in:
jband%netscape.com 2000-07-19 03:36:27 +00:00
parent 4c3d8cae94
commit ff320436f0
8 changed files with 82 additions and 11 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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>

View File

@ -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<nsITimer> 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

View File

@ -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 },

View File

@ -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 \

View File

@ -21,6 +21,7 @@
* Pierre Phaneuf <pp@ludusdesign.com>
*/
#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;
}