summaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
Diffstat (limited to 'gtk')
-rw-r--r--gtk/mobile.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/gtk/mobile.cpp b/gtk/mobile.cpp
index 61d5d6c91f..a819972cbf 100644
--- a/gtk/mobile.cpp
+++ b/gtk/mobile.cpp
@@ -270,6 +270,12 @@ static void handle_error_message(WebKitUserContentManager *manager,
int main(int argc, char* argv[])
{
+ if (argc != 2)
+ {
+ fprintf(stderr, "Usage: %s document\n", argv[0]);
+ exit(1);
+ }
+
Log::initialize("Mobile", "trace", false, false, {});
Util::setThreadName("main");
fakeSocketSetLoggingCallback([](const std::string& line)
@@ -324,9 +330,7 @@ int main(int argc, char* argv[])
g_signal_connect(main_window, "destroy", G_CALLBACK(destroyWindowCb), NULL);
g_signal_connect(webView, "close", G_CALLBACK(closeWebViewCb), main_window);
- system("cp " TOPSRCDIR "/test/data/hello.odt" " " TOPSRCDIR "/test/data/hello-world.odt");
-
- fileURL = "file://" TOPSRCDIR "/test/data/hello-world.odt";
+ fileURL = "file://" + std::string(realpath(argv[1], NULL));
std::string urlAndQuery =
"file://" TOPSRCDIR "/loleaflet/dist/loleaflet.html"