- lyxerr[Debug::GRAPHICS]
- << "\tNo converter defined! I use convertDefault.py\n\t"
- << script_command_ << endl;
-
- } else {
-
- lyxerr[Debug::GRAPHICS] << "\tConversion script:"
- << "\n--------------------------------------\n"
- << script.str()
- << "\n--------------------------------------\n";
-
- // Output the script to file.
- static int counter = 0;
- script_file_ = onlyPath(to_file_base) + "lyxconvert" +
- convert<string>(counter++) + ".py";
-
- std::ofstream fs(script_file_.c_str());
- if (!fs.good()) {
- lyxerr << "Unable to write the conversion script to \""
- << script_file_ << '\n'
- << "Please check your directory permissions."
- << std::endl;
- return;
- }
-
- fs << script.str();
- fs.close();
-
- // The command needed to run the conversion process
- // We create a dummy command for ease of understanding of the
- // list of forked processes.
- // Note: 'sh ' is absolutely essential, or execvp will fail.
- script_command_ = support::os::python() + ' ' +
- quoteName(script_file_) + ' ' +
- quoteName(onlyFilename(from_file)) + ' ' +
- quoteName(to_format);
+ // Output the script to file.
+ static int counter = 0;
+ script_file_ = onlyPath(to_file_base) + "lyxconvert" +
+ convert<string>(counter++) + ".py";
+
+ std::ofstream fs(script_file_.c_str());
+ if (!fs.good()) {
+ lyxerr << "Unable to write the conversion script to \""
+ << script_file_ << '\n'
+ << "Please check your directory permissions."
+ << std::endl;
+ return;