mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-21 23:09:40 +00:00
short cut for using converter scripts from lib/scripts
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4681 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
f08bbffb0b
commit
6280787bdb
@ -1,3 +1,10 @@
|
||||
|
||||
2002-07-15 André Pönitz <poenitz@gmx.net>
|
||||
|
||||
* converter.C: add support for $$s (scripts from lib/scripts dir)
|
||||
* lyx_main.C: white space
|
||||
|
||||
|
||||
2002-07-17 John Levon <moz@compsoc.man.ac.uk>
|
||||
|
||||
* bufferlist.C:
|
||||
|
@ -46,11 +46,14 @@ using std::find_if;
|
||||
using std::reverse;
|
||||
using std::sort;
|
||||
|
||||
extern string system_lyxdir;
|
||||
|
||||
namespace {
|
||||
|
||||
string const token_from("$$i");
|
||||
string const token_base("$$b");
|
||||
string const token_to("$$o");
|
||||
string const token_lib("$$s");
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@ -624,15 +627,15 @@ bool Converters::convert(Buffer const * buffer,
|
||||
runLaTeX(buffer, latex_command_);
|
||||
}
|
||||
|
||||
string infile2 = (conv.original_dir)
|
||||
string const infile2 = (conv.original_dir)
|
||||
? infile : MakeRelPath(infile, path);
|
||||
string outfile2 = (conv.original_dir)
|
||||
string const outfile2 = (conv.original_dir)
|
||||
? outfile : MakeRelPath(outfile, path);
|
||||
|
||||
string command = conv.command;
|
||||
command = subst(command, token_from, QuoteName(infile2));
|
||||
command = subst(command, token_base, QuoteName(from_base));
|
||||
command = subst(command, token_to, QuoteName(outfile2));
|
||||
command = subst(command, token_lib, system_lyxdir + "scripts");
|
||||
|
||||
if (!conv.parselog.empty())
|
||||
command += " 2> " + QuoteName(infile2 + ".out");
|
||||
|
@ -28,6 +28,8 @@
|
||||
#include <fstream>
|
||||
#include <sys/types.h> // needed for pid_t
|
||||
|
||||
extern string system_lyxdir;
|
||||
|
||||
using std::endl;
|
||||
|
||||
namespace grfx {
|
||||
@ -272,6 +274,7 @@ bool build_script(string const & from_file,
|
||||
string const token_from("$$i");
|
||||
string const token_base("$$b");
|
||||
string const token_to("$$o");
|
||||
string const token_lib("$$s");
|
||||
|
||||
EdgePath::const_iterator it = edgepath.begin();
|
||||
EdgePath::const_iterator end = edgepath.end();
|
||||
@ -292,6 +295,7 @@ bool build_script(string const & from_file,
|
||||
command = subst(command, token_from, "${infile}");
|
||||
command = subst(command, token_base, "${infile_base}");
|
||||
command = subst(command, token_to, "${outfile}");
|
||||
command = subst(command, token_lib, system_lyxdir + "scripts");
|
||||
|
||||
// Store in the shell script
|
||||
script << "\n" << command << "\n\n";
|
||||
|
@ -240,7 +240,7 @@ void LyX::init(bool gui)
|
||||
// If we had a command line switch, system_lyxdir is already set
|
||||
string searchpath;
|
||||
if (!system_lyxdir.empty())
|
||||
searchpath= MakeAbsPath(system_lyxdir) + ';';
|
||||
searchpath = MakeAbsPath(system_lyxdir) + ';';
|
||||
|
||||
// LYX_DIR_13x environment variable
|
||||
string const lyxdir = GetEnvPath("LYX_DIR_13x");
|
||||
|
Loading…
x
Reference in New Issue
Block a user