зеркало из https://github.com/mozilla/pjs.git
Fix bug 170621
Static build changes to support viewer, mfcembed, winembed r=cls
This commit is contained in:
Родитель
c613c3a8ca
Коммит
aad55d637a
12
Makefile.in
12
Makefile.in
|
@ -264,6 +264,18 @@ ifdef MOZ_ENABLE_GTK2
|
|||
tier_99_dirs += embedding/browser/gtk/tests
|
||||
endif
|
||||
|
||||
# viewer
|
||||
ifneq (,$(ENABLE_TESTS))
|
||||
tier_99_dirs += webshell/tests
|
||||
endif
|
||||
|
||||
# winembed, mfcembed
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
ifneq (,$(ENABLE_TESTS)$(MOZILLA_OFFICIAL))
|
||||
tier_99_dirs += embedding/tests
|
||||
endif
|
||||
endif
|
||||
|
||||
else
|
||||
|
||||
# Standalone build
|
||||
|
|
|
@ -27,12 +27,4 @@ include $(DEPTH)/config/autoconf.mk
|
|||
|
||||
DIRS = base components browser
|
||||
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
ifeq (,$(MOZ_STATIC_COMPONENT_LIBS))
|
||||
ifneq (,$(ENABLE_TESTS)$(MOZILLA_OFFICIAL))
|
||||
DIRS += tests
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
|
|
@ -91,6 +91,7 @@ LIBS = \
|
|||
$(EXTRA_DSO_LIBS) \
|
||||
$(XPCOM_LIBS) \
|
||||
$(NSPR_LIBS) \
|
||||
$(MOZ_JS_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
OS_LIBS += \
|
||||
|
@ -114,8 +115,34 @@ LOCAL_INCLUDES = -I$(srcdir)/components
|
|||
#
|
||||
LDFLAGS += /HEAP:0x40000
|
||||
|
||||
|
||||
include $(topsrcdir)/config/config.mk
|
||||
|
||||
|
||||
ifdef BUILD_STATIC_LIBS
|
||||
|
||||
include $(topsrcdir)/config/static-config.mk
|
||||
|
||||
EXTRA_DEPS += $(STATIC_EXTRA_DEPS)
|
||||
EXTRA_DSO_LIBS += $(STATIC_EXTRA_DSO_LIBS)
|
||||
ifneq ($(OS_ARCH),WINNT)
|
||||
EXTRA_LIBS += -L$(DEPTH)/dist/lib/components
|
||||
endif # !WINNT
|
||||
EXTRA_LIBS += $(EXTRA_DSO_LIBS) $(STATIC_EXTRA_LIBS)
|
||||
DEFINES += $(STATIC_DEFINES)
|
||||
CPPSRCS += $(STATIC_CPPSRCS)
|
||||
|
||||
endif # BUILD_STATIC_LIBS
|
||||
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
||||
ifdef BUILD_STATIC_LIBS
|
||||
include $(topsrcdir)/config/static-rules.mk
|
||||
endif # BUILD_STATIC_LIBS
|
||||
|
||||
|
||||
CXXFLAGS += /D "_AFXDLL" /D "USE_SINGLE_SIGN_ON" -DMOZILLA_VERSION=\"$(MOZILLA_VERSION)\"
|
||||
LDFLAGS += -SUBSYSTEM:windows
|
||||
|
||||
|
|
|
@ -59,6 +59,14 @@
|
|||
#include <io.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
|
||||
#ifdef _BUILD_STATIC_BIN
|
||||
#include "nsStaticComponent.h"
|
||||
nsresult PR_CALLBACK
|
||||
app_getModuleInfo(nsStaticModuleInfo **info, PRUint32 *count);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef NS_TRACE_MALLOC
|
||||
#include "nsTraceMalloc.h"
|
||||
#endif
|
||||
|
@ -345,6 +353,11 @@ void CMfcEmbedApp::ShowDebugConsole()
|
|||
//
|
||||
BOOL CMfcEmbedApp::InitInstance()
|
||||
{
|
||||
#ifdef _BUILD_STATIC_BIN
|
||||
// Initialize XPCOM's module info table
|
||||
NSGetStaticModuleInfo = app_getModuleInfo;
|
||||
#endif
|
||||
|
||||
|
||||
CMfcEmbedCommandLine cmdLine(*this);
|
||||
ParseCommandLine(cmdLine);
|
||||
|
|
|
@ -71,6 +71,7 @@ EXTRA_DSO_LDOPTS += \
|
|||
$(EXTRA_DSO_LIBS) \
|
||||
$(XPCOM_LIBS) \
|
||||
$(NSPR_LIBS) \
|
||||
$(MOZ_UNICHARUTIL_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
FORCE_SHARED_LIB = 1
|
||||
|
|
|
@ -68,6 +68,7 @@ LIBS = \
|
|||
$(EXTRA_DSO_LIBS) \
|
||||
$(XPCOM_LIBS) \
|
||||
$(NSPR_LIBS) \
|
||||
$(MOZ_JS_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
OS_LIBS += \
|
||||
|
@ -89,4 +90,29 @@ OS_LIBS += \
|
|||
#
|
||||
LDFLAGS += /HEAP:0x40000
|
||||
|
||||
|
||||
include $(topsrcdir)/config/config.mk
|
||||
|
||||
|
||||
ifdef BUILD_STATIC_LIBS
|
||||
|
||||
include $(topsrcdir)/config/static-config.mk
|
||||
|
||||
EXTRA_DEPS += $(STATIC_EXTRA_DEPS)
|
||||
EXTRA_DSO_LIBS += $(STATIC_EXTRA_DSO_LIBS)
|
||||
ifneq ($(OS_ARCH),WINNT)
|
||||
EXTRA_LIBS += -L$(DEPTH)/dist/lib/components
|
||||
endif # !WINNT
|
||||
EXTRA_LIBS += $(EXTRA_DSO_LIBS) $(STATIC_EXTRA_LIBS)
|
||||
DEFINES += $(STATIC_DEFINES)
|
||||
CPPSRCS += $(STATIC_CPPSRCS)
|
||||
|
||||
endif # BUILD_STATIC_LIBS
|
||||
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
||||
ifdef BUILD_STATIC_LIBS
|
||||
include $(topsrcdir)/config/static-rules.mk
|
||||
endif # BUILD_STATIC_LIBS
|
||||
|
|
|
@ -68,6 +68,14 @@
|
|||
|
||||
#define MAX_LOADSTRING 100
|
||||
|
||||
|
||||
#ifdef _BUILD_STATIC_BIN
|
||||
#include "nsStaticComponent.h"
|
||||
nsresult PR_CALLBACK
|
||||
app_getModuleInfo(nsStaticModuleInfo **info, PRUint32 *count);
|
||||
#endif
|
||||
|
||||
|
||||
const TCHAR *szWindowClass = _T("WINEMBED");
|
||||
|
||||
// Foward declarations of functions included in this code module:
|
||||
|
@ -167,6 +175,11 @@ int main(int argc, char *argv[])
|
|||
LoadString(ghInstanceResources, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
|
||||
MyRegisterClass(ghInstanceApp);
|
||||
|
||||
#ifdef _BUILD_STATIC_BIN
|
||||
// Initialize XPCOM's module info table
|
||||
NSGetStaticModuleInfo = app_getModuleInfo;
|
||||
#endif
|
||||
|
||||
// Init Embedding APIs
|
||||
NS_InitEmbedding(nsnull, nsnull);
|
||||
|
||||
|
|
|
@ -28,10 +28,6 @@ include $(DEPTH)/config/autoconf.mk
|
|||
|
||||
DIRS = public
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += tests
|
||||
endif
|
||||
|
||||
# XXX Export the viewer samples from here
|
||||
# XXX so that we have them in our release builds.
|
||||
# XXX move these back to tests/viewer when we stop shipping with debug menus
|
||||
|
|
|
@ -174,8 +174,34 @@ include $(topsrcdir)/config/config.mk
|
|||
libs::
|
||||
+$(LOOP_OVER_DIRS)
|
||||
|
||||
|
||||
ifdef BUILD_STATIC_LIBS
|
||||
|
||||
include $(topsrcdir)/config/static-config.mk
|
||||
|
||||
EXTRA_DEPS += $(STATIC_EXTRA_DEPS)
|
||||
EXTRA_DSO_LIBS += $(STATIC_EXTRA_DSO_LIBS)
|
||||
ifneq ($(OS_ARCH),WINNT)
|
||||
EXTRA_LIBS += -L$(DEPTH)/dist/lib/components
|
||||
endif # !WINNT
|
||||
EXTRA_LIBS += $(EXTRA_DSO_LIBS) $(STATIC_EXTRA_LIBS)
|
||||
QT_LIBS += $(EXTRA_LIBS)
|
||||
XLIB_LIBS += $(EXTRA_LIBS)
|
||||
GTK_LIBS += $(EXTRA_LIBS)
|
||||
DEFINES += $(STATIC_DEFINES)
|
||||
CPPSRCS += $(STATIC_CPPSRCS)
|
||||
|
||||
endif # BUILD_STATIC_LIBS
|
||||
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
||||
ifdef BUILD_STATIC_LIBS
|
||||
include $(topsrcdir)/config/static-rules.mk
|
||||
endif # BUILD_STATIC_LIBS
|
||||
|
||||
|
||||
ifeq ($(OS_ARCH),Darwin)
|
||||
LOCAL_INCLUDES += -I$(topsrcdir)/widget/src/mac
|
||||
endif
|
||||
|
|
|
@ -135,6 +135,14 @@ static NS_DEFINE_IID(kIDOMHTMLSelectElementIID, NS_IDOMHTMLSELECTELEMENT_IID);
|
|||
#define DEFAULT_WIDTH 620
|
||||
#define DEFAULT_HEIGHT 400
|
||||
|
||||
|
||||
#ifdef _BUILD_STATIC_BIN
|
||||
#include "nsStaticComponent.h"
|
||||
nsresult PR_CALLBACK
|
||||
app_getModuleInfo(nsStaticModuleInfo **info, PRUint32 *count);
|
||||
#endif
|
||||
|
||||
|
||||
nsViewerApp::nsViewerApp()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
|
@ -296,6 +304,11 @@ nsViewerApp::Initialize(int argc, char** argv)
|
|||
{
|
||||
nsresult rv;
|
||||
|
||||
#ifdef _BUILD_STATIC_BIN
|
||||
// Initialize XPCOM's module info table
|
||||
NSGetStaticModuleInfo = app_getModuleInfo;
|
||||
#endif
|
||||
|
||||
rv = SetupRegistry();
|
||||
if (NS_OK != rv) {
|
||||
return rv;
|
||||
|
|
|
@ -80,6 +80,12 @@ endif
|
|||
|
||||
DEFINES += -D_IMPL_NS_WIDGET -DMOZ_AIMM -DMOZ_UNICODE
|
||||
|
||||
|
||||
ifdef BUILD_STATIC_LIBS
|
||||
DEFINES += -DMOZ_STATIC_COMPONENT_LIBS
|
||||
endif # BUILD_STATIC_LIBS
|
||||
|
||||
|
||||
EXPORTS = nsdefs.h
|
||||
|
||||
LOCAL_INCLUDES = -I. -I$(srcdir)/../xpwidgets -I$(srcdir)
|
||||
|
|
|
@ -550,7 +550,7 @@ nsToolkit::nsToolkit()
|
|||
#endif
|
||||
|
||||
#ifdef MOZ_STATIC_COMPONENT_LIBS
|
||||
nsToolkit::Startup(nsnull);
|
||||
nsToolkit::Startup(GetModuleHandle(NULL));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -115,7 +115,9 @@ EXTRA_DEPS += \
|
|||
$(NULL)
|
||||
DEFINES += $(STATIC_DEFINES)
|
||||
CPPSRCS += $(STATIC_CPPSRCS)
|
||||
ifneq ($(OS_ARCH),WINNT)
|
||||
EXTRA_DSO_LDOPTS+= -L$(DEPTH)/dist/lib/components
|
||||
endif # !WINNT
|
||||
EXTRA_DSO_LIBS += $(STATIC_EXTRA_DSO_LIBS)
|
||||
REQUIRES += $(STATIC_REQUIRES)
|
||||
XP_LIBS += $(STATIC_EXTRA_LIBS)
|
||||
|
|
Загрузка…
Ссылка в новой задаче