# HG changeset patch # User Wolfgang Rosenauer # Date 1259520499 -3600 # Node ID 19a21516979667e5ce001bd633eb05c7bcaad93b # Parent 17b1dd932700fdf46f066a51b00e491345679a84 Move widgetproperty patch to temp diff -r 17b1dd932700 -r 19a215169796 temp/widgetproperty --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/temp/widgetproperty Sun Nov 29 19:48:19 2009 +0100 @@ -0,0 +1,188 @@ +diff --git a/xpcom/build/Makefile.in b/xpcom/build/Makefile.in +--- a/xpcom/build/Makefile.in ++++ b/xpcom/build/Makefile.in +@@ -161,17 +161,18 @@ OS_LIBS += $(LIBICONV) + GARBAGE += $(XPCOM_GLUE_SRC_LCSRCS) $(XPCOM_GLUE_SRC_LCPPSRCS) $(XPCOM_GLUENS_SRC_LCPPSRCS) $(wildcard *.$(OBJ_SUFFIX)) + + include $(topsrcdir)/config/rules.mk + + DEFINES += \ + -D_IMPL_NS_COM \ + -D_IMPL_NS_STRINGAPI \ + -DEXPORT_XPT_API \ +- -DEXPORT_XPTC_API ++ -DEXPORT_XPTC_API \ ++ -DMOZ_WIDGET_TOOLKIT=\"$(MOZ_WIDGET_TOOLKIT)\" + + EXTRA_DSO_LDOPTS += $(NSPR_LIBS) + + ifdef GC_LEAK_DETECTOR + DEFINES += -DGC_LEAK_DETECTOR + endif + + ifdef TARGET_XPCOM_ABI +diff --git a/xpcom/glue/Makefile.in b/xpcom/glue/Makefile.in +--- a/xpcom/glue/Makefile.in ++++ b/xpcom/glue/Makefile.in +@@ -157,11 +157,13 @@ include $(topsrcdir)/config/rules.mk + + ifdef _MSC_VER + # Don't include directives about which CRT to use + OS_COMPILE_CXXFLAGS += -Zl + OS_COMPILE_CFLAGS += -Zl + DEFINES += -D_USE_ANSI_CPP + endif + ++DEFINES += -DMOZ_WIDGET_TOOLKIT=\"$(MOZ_WIDGET_TOOLKIT)\" ++ + ifdef TARGET_XPCOM_ABI + DEFINES += -DTARGET_XPCOM_ABI=\"$(TARGET_XPCOM_ABI)\" + endif +diff --git a/xpcom/glue/nsGREGlue.cpp b/xpcom/glue/nsGREGlue.cpp +--- a/xpcom/glue/nsGREGlue.cpp ++++ b/xpcom/glue/nsGREGlue.cpp +@@ -157,36 +157,46 @@ GRE_GetPathFromRegKey(HKEY aRegKey, + + nsresult + GRE_GetGREPathWithProperties(const GREVersionRange *versions, + PRUint32 versionsLength, + const GREProperty *properties, + PRUint32 propertiesLength, + char *aBuffer, PRUint32 aBufLen) + { ++ // append the widget information to be able to have multiple xulrunners ++ // based on different widget toolkits installed ++ static const GREProperty kWidgetProperty = ++ { "widget", MOZ_WIDGET_TOOLKIT }; ++ + #ifdef TARGET_XPCOM_ABI +- // append the ABI to the properties to match only binary ++ // append the ABI to the properties to match only binary + // compatible GREs +- static const GREProperty kExtraProperty = +- { "abi", TARGET_XPCOM_ABI }; ++ static const GREProperty kAbiProperty = ++ { "abi", TARGET_XPCOM_ABI }; + ++ GREProperty *allProperties = new GREProperty[propertiesLength + 2]; ++#else + GREProperty *allProperties = new GREProperty[propertiesLength + 1]; ++#endif + if (!allProperties) + return NS_ERROR_OUT_OF_MEMORY; + + for (PRUint32 i=0; i $@ ++ printf "[%s]\nGRE_PATH=%s\nxulrunner=true\nwidget=%s\nabi=%s" \ ++ $(MOZILLA_VERSION) $(installdir) $(MOZ_WIDGET_TOOLKIT) $(TARGET_XPCOM_ABI)> $@ + + ifndef SKIP_GRE_REGISTRATION + # to register xulrunner per-user, override this with $HOME/.gre.d + regdir = /etc/gre.d + + install:: $(MOZILLA_VERSION).system.conf + $(NSINSTALL) -D $(DESTDIR)$(regdir) + $(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(regdir) diff -r 17b1dd932700 -r 19a215169796 widgetproperty --- a/widgetproperty Sun Nov 29 19:46:53 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,188 +0,0 @@ -diff --git a/xpcom/build/Makefile.in b/xpcom/build/Makefile.in ---- a/xpcom/build/Makefile.in -+++ b/xpcom/build/Makefile.in -@@ -161,17 +161,18 @@ OS_LIBS += $(LIBICONV) - GARBAGE += $(XPCOM_GLUE_SRC_LCSRCS) $(XPCOM_GLUE_SRC_LCPPSRCS) $(XPCOM_GLUENS_SRC_LCPPSRCS) $(wildcard *.$(OBJ_SUFFIX)) - - include $(topsrcdir)/config/rules.mk - - DEFINES += \ - -D_IMPL_NS_COM \ - -D_IMPL_NS_STRINGAPI \ - -DEXPORT_XPT_API \ -- -DEXPORT_XPTC_API -+ -DEXPORT_XPTC_API \ -+ -DMOZ_WIDGET_TOOLKIT=\"$(MOZ_WIDGET_TOOLKIT)\" - - EXTRA_DSO_LDOPTS += $(NSPR_LIBS) - - ifdef GC_LEAK_DETECTOR - DEFINES += -DGC_LEAK_DETECTOR - endif - - ifdef TARGET_XPCOM_ABI -diff --git a/xpcom/glue/Makefile.in b/xpcom/glue/Makefile.in ---- a/xpcom/glue/Makefile.in -+++ b/xpcom/glue/Makefile.in -@@ -157,11 +157,13 @@ include $(topsrcdir)/config/rules.mk - - ifdef _MSC_VER - # Don't include directives about which CRT to use - OS_COMPILE_CXXFLAGS += -Zl - OS_COMPILE_CFLAGS += -Zl - DEFINES += -D_USE_ANSI_CPP - endif - -+DEFINES += -DMOZ_WIDGET_TOOLKIT=\"$(MOZ_WIDGET_TOOLKIT)\" -+ - ifdef TARGET_XPCOM_ABI - DEFINES += -DTARGET_XPCOM_ABI=\"$(TARGET_XPCOM_ABI)\" - endif -diff --git a/xpcom/glue/nsGREGlue.cpp b/xpcom/glue/nsGREGlue.cpp ---- a/xpcom/glue/nsGREGlue.cpp -+++ b/xpcom/glue/nsGREGlue.cpp -@@ -157,36 +157,46 @@ GRE_GetPathFromRegKey(HKEY aRegKey, - - nsresult - GRE_GetGREPathWithProperties(const GREVersionRange *versions, - PRUint32 versionsLength, - const GREProperty *properties, - PRUint32 propertiesLength, - char *aBuffer, PRUint32 aBufLen) - { -+ // append the widget information to be able to have multiple xulrunners -+ // based on different widget toolkits installed -+ static const GREProperty kWidgetProperty = -+ { "widget", MOZ_WIDGET_TOOLKIT }; -+ - #ifdef TARGET_XPCOM_ABI -- // append the ABI to the properties to match only binary -+ // append the ABI to the properties to match only binary - // compatible GREs -- static const GREProperty kExtraProperty = -- { "abi", TARGET_XPCOM_ABI }; -+ static const GREProperty kAbiProperty = -+ { "abi", TARGET_XPCOM_ABI }; - -+ GREProperty *allProperties = new GREProperty[propertiesLength + 2]; -+#else - GREProperty *allProperties = new GREProperty[propertiesLength + 1]; -+#endif - if (!allProperties) - return NS_ERROR_OUT_OF_MEMORY; - - for (PRUint32 i=0; i $@ -+ printf "[%s]\nGRE_PATH=%s\nxulrunner=true\nwidget=%s\nabi=%s" \ -+ $(MOZILLA_VERSION) $(installdir) $(MOZ_WIDGET_TOOLKIT) $(TARGET_XPCOM_ABI)> $@ - - ifndef SKIP_GRE_REGISTRATION - # to register xulrunner per-user, override this with $HOME/.gre.d - regdir = /etc/gre.d - - install:: $(MOZILLA_VERSION).system.conf - $(NSINSTALL) -D $(DESTDIR)$(regdir) - $(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(regdir)