Makefile.am | 2 - configure.ac | 10 +++++++-- gtk/Makefile | 37 ----------------------------------- gtk/Makefile.am | 41 +++++++++++++++++++++++++++++++++++++++ loleaflet/html/loleaflet.html.m4 | 2 - wsd/LOOLWSD.cpp | 2 - 6 files changed, 52 insertions(+), 42 deletions(-)
New commits: commit f122e92977c0689f48f99333a7c84bed4c781be1 Author: Tor Lillqvist <t...@collabora.com> AuthorDate: Wed Oct 17 10:26:01 2018 +0300 Commit: Tor Lillqvist <t...@collabora.com> CommitDate: Wed Oct 17 11:00:28 2018 +0300 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>. diff --git a/Makefile.am b/Makefile.am index d5fd39ba7..9913867a8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,7 +6,7 @@ else if ENABLE_GTKAPP -SUBDIRS = loleaflet +SUBDIRS = gtk loleaflet else diff --git a/configure.ac b/configure.ac index c0ca7ad30..eb28d7a1c 100644 --- a/configure.ac +++ b/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 diff --git a/gtk/Makefile b/gtk/Makefile deleted file mode 100644 index cefbeb992..000000000 --- a/gtk/Makefile +++ /dev/null @@ -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 diff --git a/gtk/Makefile.am b/gtk/Makefile.am new file mode 100644 index 000000000..6d767bbc0 --- /dev/null +++ b/gtk/Makefile.am @@ -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) diff --git a/gtk/gtk.h b/gtk/gtk.hpp similarity index 100% rename from gtk/gtk.h rename to gtk/gtk.hpp diff --git a/gtk/main.cpp b/gtk/mobile.cpp similarity index 100% rename from gtk/main.cpp rename to gtk/mobile.cpp diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp index 37ebfe4a8..c81862c44 100644 --- a/wsd/LOOLWSD.cpp +++ b/wsd/LOOLWSD.cpp @@ -137,7 +137,7 @@ using Poco::Net::PartHandler; #ifdef IOS #include "ios.h" #else -#include "gtk.h" +#include "gtk.hpp" #endif #endif commit 15bd1dc48c9006f75e111d3e77359398f0c99bca Author: Tor Lillqvist <t...@collabora.com> AuthorDate: Wed Oct 17 10:25:46 2018 +0300 Commit: Tor Lillqvist <t...@collabora.com> CommitDate: Wed Oct 17 11:00:28 2018 +0300 Fix typo diff --git a/loleaflet/html/loleaflet.html.m4 b/loleaflet/html/loleaflet.html.m4 index 08ac4e34a..2a173f4fb 100644 --- a/loleaflet/html/loleaflet.html.m4 +++ b/loleaflet/html/loleaflet.html.m4 @@ -12,7 +12,7 @@ define([_foreachq],[ifelse([$#],[3],[],[define([$1],[$4])$2[]$0([$1],[$2],shift( <meta name="viewport" content="width=device-width, initial-scale=1.0"> <script> -dnl# Define MOBILEAPP as true if this is either for the iOS aoo or for the gtk+ "app" testbed +dnl# Define MOBILEAPP as true if this is either for the iOS app or for the gtk+ "app" testbed ifelse(IOSAPP,[true],[define([MOBILEAPP],[true])]) ifelse(GTKAPP,[true],[define([MOBILEAPP],[true])]) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits