mirror of
https://github.com/LibreOffice/online.git
synced 2025-08-15 21:13:02 +00:00
Build the GTK+ testbed app using autofoo
Rename the gtk/gtk.h file to gtk/gtk.hpp to not have it confused with the actual GTK+ <gtk/gtk.h>.
This commit is contained in:
@ -6,7 +6,7 @@ else
|
||||
|
||||
if ENABLE_GTKAPP
|
||||
|
||||
SUBDIRS = loleaflet
|
||||
SUBDIRS = gtk loleaflet
|
||||
|
||||
else
|
||||
|
||||
|
10
configure.ac
10
configure.ac
@ -228,8 +228,10 @@ AC_SUBST(MAX_DOCUMENTS)
|
||||
|
||||
# Test for build environment
|
||||
|
||||
CXXFLAGS="$CXXFLAGS -std=c++11"
|
||||
CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wshadow"
|
||||
AS_IF([test "$ENABLE_GTKAPP" != true],
|
||||
[CXXFLAGS="$CXXFLAGS -std=c++11"
|
||||
CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wshadow"])
|
||||
|
||||
CFLAGS="$CFLAGS -Wall -Wextra"
|
||||
|
||||
AC_MSG_CHECKING([whether to turn warnings to errors])
|
||||
@ -352,6 +354,9 @@ PKG_CHECK_MODULES([ZLIB], [zlib])
|
||||
|
||||
PKG_CHECK_MODULES([CPPUNIT], [cppunit])
|
||||
|
||||
AS_IF([test "$ENABLE_GTKAPP" = true],
|
||||
[PKG_CHECK_MODULES([WEBKIT],[webkit2gtk-4.0])])
|
||||
|
||||
AS_IF([test "$enable_ssl" != "no"],
|
||||
[AC_DEFINE([ENABLE_SSL],1,[Whether to enable SSL])],
|
||||
[AC_DEFINE([ENABLE_SSL],0,[Whether to enable SSL])])
|
||||
@ -507,6 +512,7 @@ AC_CONFIG_LINKS([loleaflet/package.json:loleaflet/package.json])
|
||||
AC_LINK_FILES([loleaflet/node_shrinkwrap], [loleaflet/node_shrinkwrap])
|
||||
|
||||
AC_CONFIG_FILES([Makefile
|
||||
gtk/Makefile
|
||||
test/Makefile
|
||||
loleaflet/Makefile
|
||||
loleaflet/npm-shrinkwrap.json
|
||||
|
37
gtk/Makefile
37
gtk/Makefile
@ -1,37 +0,0 @@
|
||||
PROGS = mobile
|
||||
|
||||
all : $(PROGS)
|
||||
|
||||
WARNINGFLAGS = -Wall -Werror -Wno-parentheses -Wno-sign-compare -Wno-unused-variable
|
||||
INCLUDEFLAGS = -I../common -I../net -I../kit -I../wsd -I../bundled/include -I.. -I.
|
||||
DEFINEFLAGS = -DMOBILEAPP -DLOOLWSD_DATADIR='"/usr/local/share/loolwsd"' -DLOOLWSD_CONFIGDIR='"/usr/local/etc/loolwsd"' -DTOPSRCDIR='"'$(realpath $(PWD)/..)'"'
|
||||
|
||||
CFLAGS = -g $(WARNINGFLAGS) `pkg-config --cflags webkit2gtk-4.0` $(INCLUDEFLAGS) $(DEFINEFLAGS)
|
||||
CXXFLAGS = $(CFLAGS)
|
||||
|
||||
LIBS=`pkg-config --libs webkit2gtk-4.0` -lPocoFoundationd -lPocoUtild -lPocoXMLd -lPocoJSONd -lPocoNetd -lpng -lpthread -ldl
|
||||
|
||||
common_OBJS = Unit.o FileUtil.o Log.o MessageQueue.o Protocol.o Session.o SigUtil.o SpookyV2.o Util.o
|
||||
kit_OBJS = ChildSession.o Kit.o
|
||||
net_OBJS = FakeSocket.o Socket.o
|
||||
wsd_OBJS = ClientSession.o DocumentBroker.o LOOLWSD.o Storage.o TileCache.o
|
||||
|
||||
mobile_OBJS = main.o $(common_OBJS) $(kit_OBJS) $(net_OBJS) $(wsd_OBJS)
|
||||
|
||||
$(common_OBJS) : %.o : ../common/%.cpp
|
||||
$(CXX) $(CXXFLAGS) -c -o $@ $^
|
||||
|
||||
$(kit_OBJS) : %.o : ../kit/%.cpp
|
||||
$(CXX) $(CXXFLAGS) -c -o $@ $^
|
||||
|
||||
$(net_OBJS) : %.o : ../net/%.cpp
|
||||
$(CXX) $(CXXFLAGS) -c -o $@ $^
|
||||
|
||||
$(wsd_OBJS) : %.o : ../wsd/%.cpp
|
||||
$(CXX) $(CXXFLAGS) -c -o $@ $^
|
||||
|
||||
mobile : $(mobile_OBJS)
|
||||
$(CXX) -o $@ $(mobile_OBJS) $(LIBS)
|
||||
|
||||
clean :
|
||||
rm -f $(PROGS) *.o 2>/dev/null
|
41
gtk/Makefile.am
Normal file
41
gtk/Makefile.am
Normal file
@ -0,0 +1,41 @@
|
||||
bin_PROGRAMS = mobile
|
||||
|
||||
include_paths = -I${top_srcdir}/common -I${top_srcdir}/net -I${top_srcdir}/kit -I${top_srcdir}/wsd -I${top_srcdir}
|
||||
|
||||
warning_flags = -Wall -Werror -Wno-parentheses -Wno-sign-compare -Wno-unused-variable -Wno-stringop-overflow
|
||||
define_flags = -DMOBILEAPP
|
||||
|
||||
AM_CPPFLAGS = -pthread \
|
||||
-DLOOLWSD_DATADIR='"@LOOLWSD_DATADIR@"' \
|
||||
-DLOOLWSD_CONFIGDIR='"@LOOLWSD_CONFIGDIR@"' \
|
||||
-DTOPSRCDIR='"'$(realpath ${top_srcdir})'"' \
|
||||
${define_flags} \
|
||||
${warning_flags} \
|
||||
${include_paths} \
|
||||
${WEBKIT_CFLAGS}
|
||||
|
||||
AM_LDFLAGS = -pthread ${WEBKIT_LIBS} -ldl
|
||||
|
||||
common_sources = ../common/Unit.cpp \
|
||||
../common/FileUtil.cpp \
|
||||
../common/Log.cpp \
|
||||
../common/MessageQueue.cpp \
|
||||
../common/Protocol.cpp \
|
||||
../common/Session.cpp \
|
||||
../common/SigUtil.cpp \
|
||||
../common/SpookyV2.cpp \
|
||||
../common/Util.cpp
|
||||
|
||||
kit_sources = ../kit/ChildSession.cpp \
|
||||
../kit/Kit.cpp
|
||||
|
||||
net_sources = ../net/FakeSocket.cpp \
|
||||
../net/Socket.cpp
|
||||
|
||||
wsd_sources = ../wsd/ClientSession.cpp \
|
||||
../wsd/DocumentBroker.cpp \
|
||||
../wsd/LOOLWSD.cpp \
|
||||
../wsd/Storage.cpp \
|
||||
../wsd/TileCache.cpp
|
||||
|
||||
mobile_SOURCES = mobile.cpp $(common_sources) $(kit_sources) $(net_sources) $(wsd_sources)
|
@ -137,7 +137,7 @@ using Poco::Net::PartHandler;
|
||||
#ifdef IOS
|
||||
#include "ios.h"
|
||||
#else
|
||||
#include "gtk.h"
|
||||
#include "gtk.hpp"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user