]> git.lyx.org Git - features.git/commit
Implement the LyXServer on Windows.
authorEnrico Forestieri <forenr@lyx.org>
Fri, 21 Aug 2009 22:58:38 +0000 (22:58 +0000)
committerEnrico Forestieri <forenr@lyx.org>
Fri, 21 Aug 2009 22:58:38 +0000 (22:58 +0000)
commitfc978618030ebfaa4b624764330a0d7be4bd23e8
tree45d5202d0047863e7aebdbd34aa6a9dc9feb978a
parent818ae93e0cced864e93facac72f4e2be3c60eac4
Implement the LyXServer on Windows.
Only for autotools, I don't know how to update cmake and scons, sorry.
For cmake and scons, you should make sure that moc is called on Server.h
using the -D_WIN32 option.

In order to enable the server, specify the LyXServer pipe in
Tools->Preferences->Paths. The path to be entered there must have the
form "\\.\pipe\nameofyourchoice" (without quotes). After that, you can
send commands to LyX. For example, if the pipe path is \\.\pipe\lyxpipe,
typing the following in a terminal:

echo LYXCMD:test:file-open > \\.\pipe\lyxpipe.in
type \\.\pipe\lyxpipe.out

brings up the file dialog and returns the acknowledgment from LyX.
Beware of spaces when using cmd.exe. For example, the following:
echo LYXCMD:test:file-open:foo.lyx> \\.\pipe\lyxpipe.in
will correctly load the document named foo.lyx, but
echo LYXCMD:test:file-open:foo.lyx > \\.\pipe\lyxpipe.in
(notice the space before the redirection) will try to load a
document whose name is "foo.lyx .lyx" because cmd.exe will also
pass the space (sigh).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31189 a592a061-630c-0410-9148-cb99ea01b6c8
config/lyxinclude.m4
src/Makefile.am
src/Server.cpp
src/Server.h