diff --git a/gtk/Makefile.am b/gtk/Makefile.am index df7a59360e..f2e9e313a1 100644 --- a/gtk/Makefile.am +++ b/gtk/Makefile.am @@ -1,6 +1,6 @@ bin_PROGRAMS = mobile -include_paths = -I${top_srcdir}/common -I${top_srcdir}/net -I${top_srcdir}/kit -I${top_srcdir}/wsd -I${top_srcdir} +include_paths = -I${top_srcdir}/common -I${top_srcdir}/net -I${top_srcdir}/kit -I${top_srcdir}/wsd -I${top_srcdir} ${ZSTD_CFLAGS} warning_flags = -Wall -Werror -Wno-parentheses -Wno-sign-compare -Wno-unused-variable define_flags = -DMOBILEAPP=1 @@ -8,6 +8,7 @@ define_flags = -DMOBILEAPP=1 AM_CPPFLAGS = -pthread \ -DCOOLWSD_DATADIR='"@COOLWSD_DATADIR@"' \ -DCOOLWSD_CONFIGDIR='"@COOLWSD_CONFIGDIR@"' \ + -DDEBUG_ABSSRCDIR='"'$(realpath ${top_srcdir})'"' \ -DTOPSRCDIR='"'$(realpath ${top_srcdir})'"' \ -DGTKAPP \ ${define_flags} \ @@ -15,10 +16,11 @@ AM_CPPFLAGS = -pthread \ ${include_paths} \ ${WEBKIT_CFLAGS} -AM_LDFLAGS = -pthread ${WEBKIT_LIBS} -ldl +AM_LDFLAGS = -pthread ${WEBKIT_LIBS} -ldl $(ZSTD_LIBS) common_sources = \ ../common/Authorization.cpp \ + ../common/ConfigUtil.cpp \ ../common/FileUtil.cpp \ ../common/Log.cpp \ ../common/MessageQueue.cpp \ @@ -27,6 +29,7 @@ common_sources = \ ../common/SigUtil.cpp \ ../common/SpookyV2.cpp \ ../common/StringVector.cpp \ + ../common/TraceEvent.cpp \ ../common/Unit.cpp \ ../common/Util.cpp diff --git a/gtk/README b/gtk/README index ae95283793..75200bbbc5 100644 --- a/gtk/README +++ b/gtk/README @@ -17,5 +17,8 @@ Obviously, adjust the path to your LibreOffice build tree as necessary. Then make. -You will get the gtk/mobile executable. Run it. Debug it. Fix it. +You will get the gtk/mobile executable. Run it for example like this: +gtk/mobile file://$PWD/test/data/hello-world.odt + +Then, if it doesn't work, debug it and fix it. diff --git a/gtk/gtk.hpp b/gtk/gtk.hpp index 1875115aa1..511846ed25 100644 --- a/gtk/gtk.hpp +++ b/gtk/gtk.hpp @@ -6,5 +6,6 @@ */ extern int coolwsd_server_socket_fd; +extern const char *user_name; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/gtk/mobile.cpp b/gtk/mobile.cpp index 1d7a0edf36..38eaae8438 100644 --- a/gtk/mobile.cpp +++ b/gtk/mobile.cpp @@ -26,6 +26,10 @@ #include "Protocol.hpp" #include "Util.hpp" +#include "gtk.hpp" + +const char *user_name = "Dummy"; + const int SHOW_JS_MAXLEN = 70; int coolwsd_server_socket_fd = -1; diff --git a/wsd/Storage.cpp b/wsd/Storage.cpp index 36f5ccd758..df13155380 100644 --- a/wsd/Storage.cpp +++ b/wsd/Storage.cpp @@ -59,6 +59,8 @@ #include #elif defined(__ANDROID__) #include "androidapp.hpp" +#elif defined(GTKAPP) +#include "gtk.hpp" #endif bool StorageBase::FilesystemEnabled;