{
// The advantage of doing this here is that the event loop
// is already started. So any need for interaction will be
- // aknowledged.
+ // acknowledged.
// if reconfiguration is needed.
- if (LayoutFileList::get().empty()) {
+ const bool noLayouts = LayoutFileList::get().empty();
+ if (noLayouts && os::hasPython()) {
switch (Alert::prompt(
_("No textclass is found"),
_("LyX will only have minimal functionality because no textclasses "
0, 2,
_("&Reconfigure"),
_("&Without LaTeX"),
- _("&Continue")))
+ _("&Continue"),
+ _("&Exit LyX")))
{
case 0:
// regular reconfigure
lyx::dispatch(FuncRequest(LFUN_RECONFIGURE,
" --without-latex-config"));
break;
+ case 3:
+ lyx::dispatch(FuncRequest(LFUN_LYX_QUIT, ""));
+ return;
+ default:
+ break;
+ }
+ } else if (noLayouts) {
+ switch (Alert::prompt(
+ _("No python is found"),
+ _("LyX will only have minimal functionality because no python interpreter "
+ "has been found. Consider download and install of an python interpreter."),
+ 0, 1,
+ _("&Continue"),
+ _("&Exit LyX")))
+ {
+ case 1:
+ lyx::dispatch(FuncRequest(LFUN_LYX_QUIT, ""));
+ return;
default:
break;
}
int Package::reconfigureUserLyXDir(string const & option) const
{
- if (configure_command_.empty()) {
+ if (configure_command_.empty() || !os::hasPython()) {
FileName const configure_script(addName(system_support().absFileName(), "configure.py"));
- configure_command_ = os::python() + ' ' +
+ configure_command_ = os::python(true) + ' ' +
quoteName(configure_script.toFilesystemEncoding()) +
with_version_suffix() + " --binary-dir=" +
quoteName(FileName(binary_dir().absFileName()).toFilesystemEncoding());
/// @param reset True if the python path should be recomputed
std::string const python(bool reset = false);
+/// Check for availbility of the python interpreter
+bool hasPython();
+
///
bool isFilesystemCaseSensitive();