mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 877626 - Port GTK2 to GTK3 - build config - xpcom, toolkit, accessible, xulrunner dirs. r=ted, r=karlt
This commit is contained in:
parent
a26de060a2
commit
572a55316c
@ -18,8 +18,10 @@ FORCE_STATIC_LIB = 1
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
CFLAGS += $(MOZ_GTK2_CFLAGS)
|
||||
CXXFLAGS += $(MOZ_GTK2_CFLAGS)
|
||||
ifdef MOZ_ENABLE_GTK
|
||||
CFLAGS += $(TK_CFLAGS)
|
||||
CXXFLAGS += $(TK_CFLAGS)
|
||||
endif
|
||||
|
||||
ifdef MOZ_ENABLE_DBUS
|
||||
CXXFLAGS += $(MOZ_DBUS_CFLAGS)
|
||||
|
@ -28,9 +28,11 @@ LOCAL_INCLUDES += \
|
||||
-I$(srcdir)/../../../layout/svg \
|
||||
-I$(srcdir)/../../../layout/xul/base/src \
|
||||
-I$(srcdir)/../../../layout/xul/tree/ \
|
||||
-I$(srcdir)/../../../ipc/chromium/src \
|
||||
$(NULL)
|
||||
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
|
||||
ifdef MOZ_ENABLE_GTK
|
||||
CXXFLAGS += $(MOZ_CAIRO_CFLAGS)
|
||||
LOCAL_INCLUDES += \
|
||||
-I$(srcdir)/../atk \
|
||||
$(NULL)
|
||||
|
@ -28,7 +28,7 @@ LOCAL_INCLUDES = \
|
||||
-I$(srcdir)/../../../layout/xul/base/src \
|
||||
$(NULL)
|
||||
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
|
||||
ifdef MOZ_ENABLE_GTK
|
||||
LOCAL_INCLUDES += \
|
||||
-I$(srcdir)/../atk \
|
||||
$(NULL)
|
||||
|
@ -29,7 +29,7 @@ LOCAL_INCLUDES = \
|
||||
-I$(srcdir)/../../../layout/xul/base/src \
|
||||
$(NULL)
|
||||
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
|
||||
ifdef MOZ_ENABLE_GTK
|
||||
LOCAL_INCLUDES += \
|
||||
-I$(srcdir)/../atk \
|
||||
$(NULL)
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
toolkit = CONFIG['MOZ_WIDGET_TOOLKIT']
|
||||
|
||||
if toolkit == 'gtk2':
|
||||
if CONFIG['MOZ_ENABLE_GTK']:
|
||||
DIRS += ['atk']
|
||||
elif toolkit == 'windows':
|
||||
DIRS += ['windows']
|
||||
|
@ -25,7 +25,7 @@ LOCAL_INCLUDES = \
|
||||
-I$(srcdir)/../generic \
|
||||
$(NULL)
|
||||
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
|
||||
ifdef MOZ_ENABLE_GTK
|
||||
LOCAL_INCLUDES += \
|
||||
-I$(srcdir)/../atk \
|
||||
$(NULL)
|
||||
|
@ -29,7 +29,7 @@ LOCAL_INCLUDES = \
|
||||
-I$(srcdir)/../../../layout/xul/tree// \
|
||||
$(NULL)
|
||||
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
|
||||
ifdef MOZ_ENABLE_GTK
|
||||
LOCAL_INCLUDES += \
|
||||
-I$(srcdir)/../atk \
|
||||
$(NULL)
|
||||
|
@ -16,7 +16,7 @@ CPP_SOURCES += [
|
||||
'nsXRemoteService.cpp',
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk2':
|
||||
if CONFIG['MOZ_ENABLE_GTK']:
|
||||
CPP_SOURCES += [
|
||||
'nsGTKRemoteService.cpp',
|
||||
]
|
||||
|
@ -49,7 +49,7 @@ LIBS += \
|
||||
LOCAL_INCLUDES += -I$(srcdir) -I$(srcdir)/../google-breakpad/src/common/mac/
|
||||
endif
|
||||
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
|
||||
ifdef MOZ_WIDGET_GTK
|
||||
|
||||
ifdef MOZ_PLATFORM_MAEMO
|
||||
# Maemo's libcurl doesn't ship with a set of CA certificates,
|
||||
@ -64,8 +64,8 @@ LIBS += \
|
||||
$(DEPTH)/toolkit/crashreporter/google-breakpad/src/common/linux/$(LIB_PREFIX)breakpad_linux_common_s.$(LIB_SUFFIX) \
|
||||
$(NULL)
|
||||
LOCAL_INCLUDES += -I$(srcdir)
|
||||
OS_CXXFLAGS += $(MOZ_GTK2_CFLAGS) $(MOZ_GTHREAD_CFLAGS)
|
||||
OS_LIBS += $(MOZ_GTK2_LIBS) $(MOZ_GTHREAD_LIBS)
|
||||
OS_CXXFLAGS += $(TK_CFLAGS) $(MOZ_GTHREAD_CFLAGS)
|
||||
OS_LIBS += $(TK_LIBS) $(MOZ_GTHREAD_LIBS)
|
||||
endif
|
||||
|
||||
ifeq ($(OS_ARCH),SunOS)
|
||||
|
@ -9,7 +9,7 @@ MODULE = 'crashreporter'
|
||||
if CONFIG['OS_TARGET'] != 'Android':
|
||||
PROGRAM = 'crashreporter'
|
||||
# The xpcshell test case here verifies that the CA certificate list
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk2' and CONFIG['MOZ_PLATFORM_MAEMO']:
|
||||
if CONFIG['MOZ_ENABLE_GTK'] and CONFIG['MOZ_PLATFORM_MAEMO']:
|
||||
XPCSHELL_TESTS_MANIFESTS += ['maemo-unit/xpcshell.ini']
|
||||
|
||||
CPP_SOURCES += [
|
||||
@ -30,7 +30,7 @@ elif CONFIG['OS_ARCH'] == 'SunOS':
|
||||
'crashreporter_unix.cpp',
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk2':
|
||||
if CONFIG['MOZ_ENABLE_GTK']:
|
||||
CPP_SOURCES += [
|
||||
'crashreporter_gtk_common.cpp',
|
||||
'crashreporter_unix_common.cpp',
|
||||
|
@ -186,7 +186,7 @@ COMPONENT_LIBS += \
|
||||
$(NULL)
|
||||
|
||||
ifdef MOZ_XUL
|
||||
ifdef MOZ_ENABLE_GTK2
|
||||
ifdef MOZ_ENABLE_GTK
|
||||
COMPONENT_LIBS += \
|
||||
unixproxy \
|
||||
$(NULL)
|
||||
@ -269,6 +269,10 @@ COMPONENT_LIBS += \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
ifdef MOZ_ENABLE_GTK3
|
||||
COMPONENT_LIBS += widget_gtk3
|
||||
endif
|
||||
|
||||
ifdef MOZ_ENABLE_GTK2
|
||||
COMPONENT_LIBS += widget_gtk2
|
||||
endif
|
||||
@ -280,7 +284,7 @@ endif
|
||||
endif
|
||||
|
||||
# Platform-specific icon channel stuff - supported mostly-everywhere
|
||||
ifneq (,$(filter windows os2 mac cocoa gtk2 qt android,$(MOZ_WIDGET_TOOLKIT)))
|
||||
ifneq (,$(filter windows os2 mac cocoa gtk2 gtk3 qt android,$(MOZ_WIDGET_TOOLKIT)))
|
||||
DEFINES += -DICON_DECODER
|
||||
COMPONENT_LIBS += imgicon
|
||||
endif
|
||||
@ -530,8 +534,9 @@ ifdef MOZ_ENABLE_DBUS
|
||||
EXTRA_DSO_LDOPTS += $(MOZ_DBUS_GLIB_LIBS)
|
||||
endif
|
||||
|
||||
ifeq (gtk2,$(MOZ_WIDGET_TOOLKIT))
|
||||
EXTRA_DSO_LDOPTS += $(XLDFLAGS) $(XLIBS) $(XEXT_LIBS) $(XCOMPOSITE_LIBS) $(MOZ_PANGO_LIBS) $(MOZ_GTK2_LIBS) $(XT_LIBS) -lgthread-2.0
|
||||
ifdef MOZ_WIDGET_GTK
|
||||
EXTRA_DSO_LDOPTS += $(TK_LIBS)
|
||||
EXTRA_DSO_LDOPTS += $(XLDFLAGS) $(XLIBS) $(XEXT_LIBS) $(XCOMPOSITE_LIBS) $(MOZ_PANGO_LIBS) $(XT_LIBS) -lgthread-2.0
|
||||
EXTRA_DSO_LDOPTS += $(FT2_LIBS)
|
||||
endif
|
||||
|
||||
|
@ -30,7 +30,7 @@ if CONFIG['MOZ_MAINTENANCE_SERVICE']:
|
||||
|
||||
DIRS += ['xre']
|
||||
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'qt'):
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'qt'):
|
||||
PARALLEL_DIRS += ['system/unixproxy']
|
||||
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
|
||||
PARALLEL_DIRS += ['system/osxproxy']
|
||||
|
@ -16,7 +16,7 @@ else
|
||||
ifeq (,$(filter-out SunOS, $(OS_ARCH)))
|
||||
MOZ_PKG_FORMAT = BZ2
|
||||
else
|
||||
ifeq (,$(filter-out gtk2 qt, $(MOZ_WIDGET_TOOLKIT)))
|
||||
ifeq (,$(filter-out gtk2 gtk3 qt, $(MOZ_WIDGET_TOOLKIT)))
|
||||
MOZ_PKG_FORMAT = BZ2
|
||||
else
|
||||
ifeq (android,$(MOZ_WIDGET_TOOLKIT))
|
||||
|
@ -38,7 +38,7 @@ endif
|
||||
|
||||
endif
|
||||
|
||||
ifneq ($(MOZ_ENABLE_GTK2),)
|
||||
ifdef MOZ_WIDGET_GTK
|
||||
OS_CXXFLAGS += $(TK_CFLAGS)
|
||||
OS_LIBS += $(TK_LIBS)
|
||||
endif
|
||||
@ -75,7 +75,7 @@ WIN32_EXE_LDFLAGS += -ENTRY:wmainCRTStartup
|
||||
WIN32_EXE_LDFLAGS += -DELAYLOAD:wsock32.dll -DELAYLOAD:crypt32.dll
|
||||
endif
|
||||
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
|
||||
ifdef MOZ_WIDGET_GTK
|
||||
libs:: updater.png
|
||||
$(NSINSTALL) -D $(DIST)/bin/icons
|
||||
$(INSTALL) $(IFLAGS1) $^ $(DIST)/bin/icons
|
||||
@ -111,4 +111,3 @@ ifneq (,$(filter nightly aurora nightly-elm nightly-profiling nightly-oak,$(MOZ_
|
||||
RCFLAGS += -DMAR_SIGNING_AURORA_NIGHTLY=1
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -21,7 +21,7 @@ if CONFIG['OS_ARCH'] == 'WINNT':
|
||||
'win_dirent.cpp',
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_ENABLE_GTK2']:
|
||||
if CONFIG['MOZ_ENABLE_GTK']:
|
||||
have_progressui = 1
|
||||
CPP_SOURCES += [
|
||||
'progressui_gtk.cpp',
|
||||
|
@ -33,5 +33,10 @@ CXXFLAGS += \
|
||||
$(MOZ_GNOMEVFS_CFLAGS) \
|
||||
$(MOZ_GIO_CFLAGS) \
|
||||
$(GLIB_CFLAGS) \
|
||||
$(MOZ_GTK2_CFLAGS) \
|
||||
$(NULL)
|
||||
|
||||
ifdef MOZ_ENABLE_GTK
|
||||
CXXFLAGS += \
|
||||
$(TK_CFLAGS) \
|
||||
$(NULL)
|
||||
endif
|
||||
|
@ -146,7 +146,7 @@ LOCAL_INCLUDES += \
|
||||
|
||||
CXXFLAGS += $(TK_CFLAGS) $(MOZ_DBUS_CFLAGS) $(MOZ_DBUS_GLIB_CFLAGS)
|
||||
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
|
||||
ifdef MOZ_WIDGET_GTK
|
||||
CXXFLAGS += $(MOZ_PANGO_CFLAGS)
|
||||
endif
|
||||
|
||||
|
@ -42,7 +42,7 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'os2':
|
||||
CPP_SOURCES += [
|
||||
'nsNativeAppSupportOS2.cpp',
|
||||
]
|
||||
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk2':
|
||||
elif CONFIG['MOZ_ENABLE_GTK']:
|
||||
CPP_SOURCES += [
|
||||
'nsNativeAppSupportUnix.cpp',
|
||||
]
|
||||
|
@ -10,10 +10,16 @@ VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
ifdef MOZ_ENABLE_GTK2
|
||||
MODULE_NAME = nsWidgetGtk2Module
|
||||
LIBRARY_NAME = widget_gtk2
|
||||
else
|
||||
MODULE_NAME = nsWidgetGtk3Module
|
||||
LIBRARY_NAME = widget_gtk3
|
||||
endif
|
||||
|
||||
EXPORT_LIBRARY = 1
|
||||
IS_COMPONENT = 1
|
||||
MODULE_NAME = nsWidgetGtk2Module
|
||||
LIBXUL_LIBRARY = 1
|
||||
|
||||
NATIVE_THEME_SUPPORT = 1
|
||||
@ -32,7 +38,11 @@ endif
|
||||
SHARED_LIBRARY_LIBS = ../xpwidgets/libxpwidgets_s.a
|
||||
|
||||
ifdef NATIVE_THEME_SUPPORT
|
||||
ifdef MOZ_ENABLE_GTK2
|
||||
CSRCS += gtk2drawing.c
|
||||
else
|
||||
CSRCS += gtk3drawing.c
|
||||
endif
|
||||
DEFINES += -DNATIVE_THEME_SUPPORT
|
||||
endif
|
||||
|
||||
@ -40,9 +50,12 @@ include $(topsrcdir)/config/config.mk
|
||||
include $(topsrcdir)/ipc/chromium/chromium-config.mk
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
CFLAGS += $(MOZ_GTK2_CFLAGS) $(MOZ_STARTUP_NOTIFICATION_CFLAGS)
|
||||
CFLAGS += $(MOZ_STARTUP_NOTIFICATION_CFLAGS)
|
||||
CXXFLAGS += $(MOZ_CAIRO_CFLAGS) $(MOZ_PIXMAN_CFLAGS) \
|
||||
$(MOZ_GTK2_CFLAGS) $(MOZ_STARTUP_NOTIFICATION_CFLAGS)
|
||||
$(MOZ_STARTUP_NOTIFICATION_CFLAGS)
|
||||
|
||||
CFLAGS += $(TK_CFLAGS)
|
||||
CXXFLAGS += $(TK_CFLAGS)
|
||||
|
||||
ifdef MOZ_PLATFORM_MAEMO
|
||||
ifdef MOZ_ENABLE_GCONF
|
||||
|
@ -10,7 +10,7 @@ toolkit = CONFIG['MOZ_WIDGET_TOOLKIT']
|
||||
|
||||
if toolkit in ('os2', 'cocoa', 'qt', 'android', 'gonk'):
|
||||
DIRS += [toolkit]
|
||||
if toolkit in ('qt', 'android', 'gonk', 'gtk2'):
|
||||
if toolkit in ('qt', 'android', 'gonk', 'gtk2', 'gtk3'):
|
||||
EXPORTS += ['nsIPrintDialogService.h']
|
||||
|
||||
if toolkit == 'windows':
|
||||
@ -54,7 +54,7 @@ TEST_TOOL_DIRS += ['tests']
|
||||
# multiple implementations of widget can be built on the same
|
||||
# source tree.
|
||||
#
|
||||
if CONFIG['MOZ_ENABLE_GTK2']:
|
||||
if CONFIG['MOZ_ENABLE_GTK']:
|
||||
DIRS += ['gtk2']
|
||||
|
||||
if CONFIG['MOZ_X11']:
|
||||
|
@ -27,8 +27,18 @@ ifdef MOZ_ENABLE_D3D10_LAYER
|
||||
DEFINES += -DMOZ_ENABLE_D3D10_LAYER
|
||||
endif
|
||||
|
||||
ifneq (,$(filter gtk3,$(MOZ_WIDGET_TOOLKIT)))
|
||||
# gtk3 shares includes with gtk2
|
||||
LOCAL_INCLUDES += \
|
||||
-I$(srcdir)/../gtk2 \
|
||||
$(NULL)
|
||||
else
|
||||
LOCAL_INCLUDES += \
|
||||
-I$(srcdir)/../$(MOZ_WIDGET_TOOLKIT) \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
LOCAL_INCLUDES += \
|
||||
-I$(srcdir)/../$(MOZ_WIDGET_TOOLKIT) \
|
||||
-I$(srcdir)/../shared \
|
||||
-I$(topsrcdir)/layout/base \
|
||||
-I$(topsrcdir)/layout/forms \
|
||||
|
@ -44,13 +44,13 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('os2', 'cocoa', 'windows'):
|
||||
'nsBaseClipboard.cpp',
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('qt', 'gtk2', 'os2', 'cocoa', 'windows',
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('qt', 'gtk2', 'gtk3', 'os2', 'cocoa', 'windows',
|
||||
'android', 'gonk'):
|
||||
CPP_SOURCES += [
|
||||
'nsBaseFilePicker.cpp',
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('qt', 'gtk2', 'windows', 'cocoa'):
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('qt', 'gtk2', 'gtk3', 'windows', 'cocoa'):
|
||||
CPP_SOURCES += [
|
||||
'nsNativeTheme.cpp',
|
||||
]
|
||||
|
@ -60,8 +60,8 @@ include $(topsrcdir)/config/rules.mk
|
||||
|
||||
DEFINES += -D_IMPL_NS_COM
|
||||
|
||||
ifneq (,$(filter gtk2,$(MOZ_WIDGET_TOOLKIT)))
|
||||
CXXFLAGS += $(MOZ_GTK2_CFLAGS)
|
||||
ifdef MOZ_WIDGET_GTK
|
||||
CXXFLAGS += $(TK_CFLAGS)
|
||||
endif
|
||||
|
||||
LOCAL_INCLUDES += \
|
||||
|
@ -116,7 +116,7 @@ nsSystemInfo::Init()
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_WIDGET_GTK2
|
||||
#if defined(MOZ_WIDGET_GTK)
|
||||
// This must be done here because NSPR can only separate OS's when compiled, not libraries.
|
||||
char* gtkver = PR_smprintf("GTK %u.%u.%u", gtk_major_version, gtk_minor_version, gtk_micro_version);
|
||||
if (gtkver) {
|
||||
|
@ -32,6 +32,6 @@ include $(topsrcdir)/config/rules.mk
|
||||
|
||||
DEFINES += -D_IMPL_NS_COM
|
||||
|
||||
ifneq (,$(filter gtk2,$(MOZ_WIDGET_TOOLKIT)))
|
||||
CXXFLAGS += $(MOZ_GTK2_CFLAGS)
|
||||
ifdef MOZ_WIDGET_GTK
|
||||
CXXFLAGS += $(TK_CFLAGS)
|
||||
endif
|
||||
|
@ -464,7 +464,7 @@ ParseManifest(NSLocationType type, FileLocation &file, char* buf, bool aChromeOn
|
||||
majorVersion,
|
||||
minorVersion);
|
||||
}
|
||||
#elif defined(MOZ_WIDGET_GTK2)
|
||||
#elif defined(MOZ_WIDGET_GTK)
|
||||
nsTextFormatter::ssprintf(osVersion, NS_LITERAL_STRING("%ld.%ld").get(),
|
||||
gtk_major_version,
|
||||
gtk_minor_version);
|
||||
|
@ -102,7 +102,7 @@ LDFLAGS += /HEAP:0x40000
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
|
||||
ifdef MOZ_WIDGET_GTK
|
||||
libs::
|
||||
$(INSTALL) $(IFLAGS1) $(DIST)/branding/default16.png $(DIST)/bin/chrome/icons/default
|
||||
$(INSTALL) $(IFLAGS1) $(DIST)/branding/default32.png $(DIST)/bin/chrome/icons/default
|
||||
@ -120,7 +120,7 @@ ifeq ($(OS_ARCH),WINNT)
|
||||
cp $(srcdir)/xulrunner.ico $(DIST)/branding/app.ico
|
||||
cp $(srcdir)/document.ico $(DIST)/branding/document.ico
|
||||
endif
|
||||
ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
|
||||
ifdef MOZ_WIDGET_GTK
|
||||
cp $(srcdir)/default16.png $(DIST)/branding/default16.png
|
||||
cp $(srcdir)/default32.png $(DIST)/branding/default32.png
|
||||
cp $(srcdir)/default48.png $(DIST)/branding/default48.png
|
||||
|
Loading…
Reference in New Issue
Block a user