diff options
author | Jon Nermut <jon.nermut@gmail.com> | 2018-01-24 22:00:52 +1100 |
---|---|---|
committer | jan iversen <jani@libreoffice.org> | 2018-01-30 08:51:39 +0100 |
commit | 671e67dfc24205a133dbbaf87bc7be9f3af56b3a (patch) | |
tree | 652e745616226a5ca04584094ed5c220cddd6574 /ios/source | |
parent | fd7ca0db5c2d5d1580d76c9536828a024543ea53 (diff) |
iOS: linker changes for on device
[ae490dd] iOS: add script to sym link the dylib to the right spot
Adds a shell script to symlink the right dylib into the build products folder,
which means we can reference libKit.dylib relative to that, rather than absolutely
[ba4c072] iOS: pass in user path
On device using appPath/user as the user directory causes a crash, as an app cannot write inside it's bundle. Instead, add a new param to pass the documents dir into the init.
[088ad49] iOS: linker changes to run on device
Change-Id: I16f5d85f3ca483df11b82108ee39c4ec461214f4
Reviewed-on: https://gerrit.libreoffice.org/48866
Reviewed-by: jan iversen <jani@libreoffice.org>
Tested-by: jan iversen <jani@libreoffice.org>
Diffstat (limited to 'ios/source')
-rw-r--r-- | ios/source/LibreOfficeKit.c | 7 | ||||
-rw-r--r-- | ios/source/LibreOfficeKit.h | 2 |
2 files changed, 3 insertions, 6 deletions
diff --git a/ios/source/LibreOfficeKit.c b/ios/source/LibreOfficeKit.c index 1868ae7b21fa..55f56d212ab2 100644 --- a/ios/source/LibreOfficeKit.c +++ b/ios/source/LibreOfficeKit.c @@ -31,15 +31,12 @@ static double twipsPerXtile, twipsPerYtile; // Bridge functions to LibreOfficeKit __attribute__((visibility("default"))) -int BridgeLOkit_Init(const char *path) +int BridgeLOkit_Init(const char *appPath, const char *userPath) { - char bufUserPath[200]; - strcpy(bufUserPath, path); - strcpy(bufUserPath + strlen(path), "/user"); // Initialize LibreOfficeKit if (!kit) { - kit = lok_init_2(path, bufUserPath); + kit = lok_init_2(appPath, userPath); if (!kit) return 1; } diff --git a/ios/source/LibreOfficeKit.h b/ios/source/LibreOfficeKit.h index c4624371b347..abc4fe87a4ce 100644 --- a/ios/source/LibreOfficeKit.h +++ b/ios/source/LibreOfficeKit.h @@ -11,7 +11,7 @@ // The swift compiler uses this header to generate a needed interface // The functions (LibreOfficeKit.mm) calls functions directly in LibreOffice -int BridgeLOkit_Init(const char *path); +int BridgeLOkit_Init(const char *appPath, const char *userPath); int BridgeLOkit_Sizing(const int countXtiles, const int countYtiles, const int pixelsXtile, const int pixelsYtile); int BridgeLOkit_open(const char *path); |