Change the meaning of the $$s placeholder to <lyx support dir>.

(It was <lyx support dir>/scripts.)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9509 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2005-01-20 15:02:16 +00:00
parent 40b5d05445
commit 1665be55ae
9 changed files with 43 additions and 22 deletions

View File

@ -1,3 +1,7 @@
2005-01-20 Angus Leeming <leeming@lyx.org>
* configure.m4: replace all occurences of '$$s/' with '$$s/scripts'.
2005-01-15 Georg Baum <Georg.Baum@post.rwth-aachen.de> 2005-01-15 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* ui/classic.ui, ui/stdmenus.ui: Increase number of bookmarks to 5 * ui/classic.ui, ui/stdmenus.ui: Increase number of bookmarks to 5

View File

@ -322,7 +322,7 @@ SEARCH_PROG([for a DVI to PDF converter],dvi_to_pdf_command,dvipdfm)
test $dvi_to_pdf_command = "dvipdfm" && dvi_to_pdf_command="dvipdfm \$\$i" test $dvi_to_pdf_command = "dvipdfm" && dvi_to_pdf_command="dvipdfm \$\$i"
# We have a script to convert previewlyx to ppm or to png # We have a script to convert previewlyx to ppm or to png
lyxpreview_to_bitmap_command='python $$s/lyxpreview2bitmap.py' lyxpreview_to_bitmap_command='python $$s/scripts/lyxpreview2bitmap.py'
# Search for 'dvipng'. Only enable the conversion from lyxpreview -> png # Search for 'dvipng'. Only enable the conversion from lyxpreview -> png
# if dvipng is found. # if dvipng is found.
@ -584,9 +584,9 @@ cat >$outfile <<EOF
\\converter docbook html "$docbook_to_html_command" "" \\converter docbook html "$docbook_to_html_command" ""
\\converter dvi pdf3 "$dvi_to_pdf_command" "" \\converter dvi pdf3 "$dvi_to_pdf_command" ""
\\converter dvi ps "$dvi_to_ps_command" "" \\converter dvi ps "$dvi_to_ps_command" ""
\\converter fen asciichess "python \$\$s/fen2ascii.py \$\$i \$\$o" "" \\converter fen asciichess "python \$\$s/scripts/fen2ascii.py \$\$i \$\$o" ""
\\converter fig pdftex "sh \$\$s/fig2pdftex.sh \$\$i \$\$o" "" \\converter fig pdftex "sh \$\$s/scripts/fig2pdftex.sh \$\$i \$\$o" ""
\\converter fig pstex "sh \$\$s/fig2pstex.sh \$\$i \$\$o" "" \\converter fig pstex "sh \$\$s/scripts/fig2pstex.sh \$\$i \$\$o" ""
\\converter html latex "$html_to_latex_command" "" \\converter html latex "$html_to_latex_command" ""
\\converter latex html "$latex_to_html_command" "originaldir,needaux" \\converter latex html "$latex_to_html_command" "originaldir,needaux"
\\converter latex dvi "$latex_to_dvi" "latex" \\converter latex dvi "$latex_to_dvi" "latex"
@ -654,9 +654,9 @@ fi
cat >>$outfile <<EOF cat >>$outfile <<EOF
\\copier fig "sh \$\$s/fig_copy.sh \$\$i \$\$o" \\copier fig "sh \$\$s/scripts/fig_copy.sh \$\$i \$\$o"
\\copier pstex "python \$\$s/tex_copy.py \$\$i \$\$o \$\$l" \\copier pstex "python \$\$s/scripts/tex_copy.py \$\$i \$\$o \$\$l"
\\copier pdftex "python \$\$s/tex_copy.py \$\$i \$\$o \$\$l" \\copier pdftex "python \$\$s/scripts/tex_copy.py \$\$i \$\$o \$\$l"
$rc_entries $rc_entries
\\font_encoding "$chk_fontenc" \\font_encoding "$chk_fontenc"

View File

@ -1,3 +1,8 @@
2005-01-20 Angus Leeming <leeming@lyx.org>
* mover.h: change commentary to reflect the changed meaning of
the $$s placeholder.
2005-01-20 Jean-Marc Lasgouttes <lasgouttes@lyx.org> 2005-01-20 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* output_linuxdoc.C (linuxdocParagraphs): silence warning * output_linuxdoc.C (linuxdocParagraphs): silence warning

View File

@ -1,3 +1,8 @@
2005-01-20 Angus Leeming <leeming@lyx.org>
* FormPreferences.C: change the tooltip messages to reflect the
changed meaning of the $$s placeholder.
2005-01-15 Angus Leeming <leeming@lyx.org> 2005-01-15 Angus Leeming <leeming@lyx.org>
* FormPreferences.C, forms/form_preferences.fd: add an interface * FormPreferences.C, forms/form_preferences.fd: add an interface

View File

@ -763,9 +763,9 @@ FormPreferences::Converters::feedback(FL_OBJECT const * const ob) const
if (ob == dialog_->input_converter) if (ob == dialog_->input_converter)
return _("The conversion command. $$i is the input file name, " return _("The conversion command. $$i is the input file name, "
"$$b is the file name without its extension and $$o is " "$$b is the file name without its extension and $$o "
"the name of the output file. $$s can be used as path to " "is the name of the output file. $$s can be used "
"LyX's own collection of conversion scripts."); "as the path to LyX's support directory.");
if (ob == dialog_->input_flags) if (ob == dialog_->input_flags)
return _("Extra information for the Converter class, whether and " return _("Extra information for the Converter class, whether and "
@ -1024,8 +1024,8 @@ FormPreferences::Copiers::feedback(FL_OBJECT const * const ob) const
return _("The command used to copy the file. " return _("The command used to copy the file. "
"$$i is the \"from\" file name and " "$$i is the \"from\" file name and "
"$$o is the \"to\" file name.\n" "$$o is the \"to\" file name.\n"
"$$s can be used as path to " "$$s can be used as the path to LyX's support "
"LyX's own collection of scripts."); "directory.");
if (ob == dialog_->button_delete) if (ob == dialog_->button_delete)
return _("Remove the current copier from the list of available " return _("Remove the current copier from the list of available "

View File

@ -105,9 +105,9 @@ public:
/** @c command should be of the form /** @c command should be of the form
* <code> * <code>
* sh $$s/copy_fig.sh $$i $$o $$l * sh $$s/scripts/fig_copy.sh $$i $$o $$l
* </code> * </code>
* where $$s is a placeholder for the lyx script directory, * where $$s is a placeholder for the lyx support directory,
* $$i is a placeholder for the name of the file to be moved, * $$i is a placeholder for the name of the file to be moved,
* $$o is a placeholder for the name of the file after moving, * $$o is a placeholder for the name of the file after moving,
* $$l is a placeholder for the name of the file after moving, * $$l is a placeholder for the name of the file after moving,

View File

@ -1,3 +1,9 @@
2005-01-20 Angus Leeming <leeming@lyx.org>
* filetools.[Ch] (LibScriptSearch): modify the code that replaces
the $$s placeholder with a path, so that it now inserts the path
of the lyx support directory, not the scripts subdirectory.
2005-01-19 Asger Ottar Alstrup <aalstrup@laerdal.dk> 2005-01-19 Asger Ottar Alstrup <aalstrup@laerdal.dk>
* lyxsum.C, socktools.C, tempname.C, userinfo.C: use the * lyxsum.C, socktools.C, tempname.C, userinfo.C: use the

View File

@ -362,7 +362,8 @@ string const LibScriptSearch(string const & command_in)
string::size_type const pos1 = command.find(token_scriptpath); string::size_type const pos1 = command.find(token_scriptpath);
if (pos1 == string::npos) if (pos1 == string::npos)
return command; return command;
// Find the end of the "$$s/some_script" word within command // Find the end of the "$$s/some_script" word within command.
// Assumes that the script name does not contain spaces.
string::size_type const start_script = pos1 + 4; string::size_type const start_script = pos1 + 4;
string::size_type const pos2 = command.find(' ', start_script); string::size_type const pos2 = command.find(' ', start_script);
string::size_type const size_script = pos2 == string::npos? string::size_type const size_script = pos2 == string::npos?
@ -370,13 +371,13 @@ string const LibScriptSearch(string const & command_in)
// Does this script file exist? // Does this script file exist?
string const script = string const script =
LibFileSearch("scripts", command.substr(start_script, size_script)); LibFileSearch(".", command.substr(start_script, size_script));
if (script.empty()) { if (script.empty()) {
// Replace "$$s/" with "" // Replace "$$s/" with ""
command.erase(pos1, 4); command.erase(pos1, 4);
} else { } else {
// Replace "$$s/some_script" with "$LYX_SCRIPT_PATH/some_script" // Replace "$$s/foo/some_script" with "<path to>/some_script".
string::size_type const size_replace = size_script + 4; string::size_type const size_replace = size_script + 4;
command.replace(pos1, size_replace, QuoteName(script)); command.replace(pos1, size_replace, QuoteName(script));
} }

View File

@ -104,11 +104,11 @@ std::string const
i18nLibFileSearch(std::string const & dir, std::string const & name, i18nLibFileSearch(std::string const & dir, std::string const & name,
std::string const & ext = std::string()); std::string const & ext = std::string());
/** Takes a command such as "sh $$s/convertDefault.sh file.in file.out" /** Takes a command such as "sh $$s/scripts/convertDefault.sh file.in file.out"
* and replaces "$$s/" with the path to the "most important" of LyX's * and replaces "$$s/" with the path to the LyX support directory containing
* script directories containing this script. If the script is not found, * this script. If the script is not found, "$$s/" is removed. Executing the
* "$$s/" is removed. Executing the command will still fail, but the * command will still fail, but the error message will make some sort of
* error message will make some sort of sense ;-) * sense ;-)
*/ */
std::string const LibScriptSearch(std::string const & command); std::string const LibScriptSearch(std::string const & command);