So the path to the mathjaxfolder is built in MainWindow.cpp Perhaps the bug is there. The mathjax folder should not have a leading "/" in it, right.
From MainWindow.cpp:
Code:
#ifdef Q_OS_MAC
// On Mac OS X QCoreApplication::applicationDirPath() points to Sigil.app/Contents/MacOS/
QDir execdir(QCoreApplication::applicationDirPath());
execdir.cdUp();
mathjaxurl = execdir.absolutePath() + "/polyfills/MJ/";
#elif defined(Q_OS_WIN32)
mathjaxurl = "/" + QCoreApplication::applicationDirPath() + "/polyfills/MJ/";
#else
On MacOS it is built as an absolute path.
On Windows I am not so sure. What does QCoreApplicationDirPath() return?
But then later on we need to build a file url from it and we do it manually.
Maybe that is why the "/" is prepended?
Code:
m_mathjaxfolder = mathjaxurl;
mathjaxurl = mathjaxurl + "MathJax.js";
mathjaxurl = "file://" + Utility::URLEncodePath(mathjaxurl);
mathjaxurl = mathjaxurl + "?config=local/SIGIL_EBOOK_MML_SVG";
Perhaps we should use QUrl::fromLocalFile() here instead of building the url manually?