diff --git a/src/backends/julia/juliabackend.cpp b/src/backends/julia/juliabackend.cpp index 27cf6e91..b74fef67 100644 --- a/src/backends/julia/juliabackend.cpp +++ b/src/backends/julia/juliabackend.cpp @@ -1,160 +1,160 @@ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --- Copyright (C) 2016 Ivan Lakhtanov */ #include "juliabackend.h" #include #include #include #include "juliasession.h" #include "ui_settings.h" #include "settings.h" #include "juliaextensions.h" JuliaBackend::JuliaBackend(QObject *parent, const QList &args) : Cantor::Backend(parent, args) { setEnabled(true); new JuliaVariableManagementExtension(this); new JuliaPackagingExtension(this); new JuliaPlotExtension(this); new JuliaScriptExtension(this); new JuliaLinearAlgebraExtension(this); } QString JuliaBackend::id() const { return QLatin1String("julia"); } QString JuliaBackend::version() const { return QLatin1String("1.0.0"); } Cantor::Session *JuliaBackend::createSession() { return new JuliaSession(this); } Cantor::Backend::Capabilities JuliaBackend::capabilities() const { Cantor::Backend::Capabilities cap= SyntaxHighlighting| Completion; if (JuliaSettings::variableManagement()) cap |= VariableManagement; return cap; } QString JuliaBackend::description() const { return i18n( "

Julia is a high-level, high-performance dynamic programming " "language for technical computing, with syntax that is familiar to " "users of other technical computing environments. It provides a " "sophisticated compiler, distributed parallel execution, numerical " "accuracy, and an extensive mathematical function library.

" ); } QUrl JuliaBackend::helpUrl() const { return QUrl(i18nc( "The url to the documentation of Julia, please check if there is a" " translated version and use the correct url", "http://docs.julialang.org/en/latest/" )); } bool JuliaBackend::requirementsFullfilled(QString* const reason) const { const QString& replPath = JuliaSettings::self()->replPath().toLocalFile(); QFileInfo info(replPath); if (!info.isExecutable()) { if (reason) *reason = i18n("You should set path to Julia executable"); return false; } if (info.isSymLink()) { if (reason) *reason = i18n("Path to Julia should point directly to julia executable, symlink not allowed"); return false; } // Julia because of C API can handle only MAJOR.MINOR.* versions corresponding to // version, which used to build cantor_juliaserver // So check it and print info about it to user, if versions don't match QProcess getJuliaVersionProcess; getJuliaVersionProcess.setProgram(replPath); getJuliaVersionProcess.setArguments(QStringList()<(); ) #include "juliabackend.moc"