Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
What's new
4
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Menu
Open sidebar
Olly Betts
lloconv
Commits
f827695a
Commit
f827695a
authored
Oct 18, 2019
by
Olly Betts
Browse files
Automatically find packaged LO on 64bit Fedora
parent
d0acbe0e
Changes
2
Hide whitespace changes
Inline
Side-by-side
README
View file @
f827695a
...
...
@@ -23,7 +23,8 @@ the content of, but fetching arbitrary documents is equivalent to automatically
opening email attachments.
The code checks for LibreOffice installed in /usr/lib/libreoffice/program
(which is where the Debian packages install to) and if it's not there, tries
or /usr/lib64/libreoffice/program (which is where the Debian and Fedora
packages install to) and if it's not there, tries
/opt/libreoffice<major>.<minor>/program for known <major>.<minor> versions
(which is where the .debs from libreoffice.org install to). You can override
this by setting environmental variable LO_PATH, either to handle an install in
...
...
convert.cc
View file @
f827695a
/* convert.cc - Convert documents using LibreOfficeKit
*
* Copyright (C) 2014,2015,2016,2018 Olly Betts
* Copyright (C) 2014,2015,2016,2018
,2019
Olly Betts
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
...
...
@@ -27,9 +27,12 @@
using
namespace
std
;
using
namespace
lok
;
// Install location for Debian packages:
// Install location for Debian packages
(also Fedora on 32-bit architectures)
:
#define LO_PATH_DEBIAN "/usr/lib/libreoffice/program"
// Install location for Fedora packages on 64-bit architectures:
#define LO_PATH_FEDORA64 "/usr/lib64/libreoffice/program"
// Install location for .deb files from libreoffice.org:
#define LO_PATH_LIBREOFFICEORG(V) "/opt/libreoffice"#V"/program"
...
...
@@ -44,6 +47,7 @@ get_lo_path()
struct
stat
sb
;
#define CHECK_DIR(P) if (!lo_path && stat(P"/versionrc", &sb) == 0 && S_ISREG(sb.st_mode)) lo_path = P
CHECK_DIR
(
LO_PATH_DEBIAN
);
CHECK_DIR
(
LO_PATH_FEDORA64
);
CHECK_DIR
(
LO_PATH_LIBREOFFICEORG
(
6.2
));
CHECK_DIR
(
LO_PATH_LIBREOFFICEORG
(
6.1
));
CHECK_DIR
(
LO_PATH_LIBREOFFICEORG
(
6.0
));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment