diff options
author | albert-github <albert.tests@gmail.com> | 2020-02-15 13:43:31 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2020-02-15 13:43:31 (GMT) |
commit | d32c7f52414d6a2bcb8b2a62bb780333348000be (patch) | |
tree | 6fbedf341ab7010499532c3a265a584363726e59 /src/portable.cpp | |
parent | c8d3befccbfbba83c2c0509dc23d53144177aa94 (diff) | |
download | Doxygen-d32c7f52414d6a2bcb8b2a62bb780333348000be.zip Doxygen-d32c7f52414d6a2bcb8b2a62bb780333348000be.tar.gz Doxygen-d32c7f52414d6a2bcb8b2a62bb780333348000be.tar.bz2 |
Creation of svg images for formulas with inkscape
Based on the implementation as mentioned in #7578 to add the possibilities to generated svg images for formulas
- When running with inkscape 92.3 / 92.4 on Cygwin /Windows there were no images generated as the `-o` flag didn't exist, the output file had to be specified as part of the `-l` (or `--export-plain-svg`) option
- For more flexibility the system is checked on existence of the `pdf2svg` and `inkscape` executables, so no compilations flags are necessary
Diffstat (limited to 'src/portable.cpp')
-rw-r--r-- | src/portable.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/portable.cpp b/src/portable.cpp index 8ceb7d6..8c941b6 100644 --- a/src/portable.cpp +++ b/src/portable.cpp @@ -348,7 +348,6 @@ char Portable::pathListSeparator(void) #endif } -#if defined(_WIN32) && !defined(__CYGWIN__) static const bool ExistsOnPath(const char *fileName) { QFileInfo fi1(fileName); @@ -380,7 +379,20 @@ static const bool ExistsOnPath(const char *fileName) } return false; } + +const bool Portable::checkForExecutable(const char *fileName) +{ +#if defined(_WIN32) && !defined(__CYGWIN__) + char *extensions[] = {".bat",".com",".exe"}; + for (int i = 0; i < sizeof(extensions) / sizeof(*extensions); i++) + { + if (ExistsOnPath(QCString(fileName) + extensions[i])) return true; + } + return false; +#else + return ExistsOnPath(fileName); #endif +} const char *Portable::ghostScriptCommand(void) { |