mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
win32 port updates
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2840 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
98cd1026da
commit
eeb1a304e2
@ -1,3 +1,9 @@
|
||||
2001-07-02 Claus Hentschel <claus.hentschel@mbau.fh-hannover.de>
|
||||
|
||||
* Win32/lyxwin32.c: renamed from lyxwin32.C
|
||||
|
||||
* Win32/lyxprofile: update
|
||||
|
||||
2001-09-21 Kayvan A. Sylvan <kayvan@satyr.sylvan.com>
|
||||
|
||||
* lyx.spec.in: last cleanup
|
||||
|
@ -1,27 +1,29 @@
|
||||
PATH="/usr/local/lyx/bin:/usr/local/bin:/usr/X11R6/bin:/usr/bin:/bin:$PATH"
|
||||
# Set up your home directory (in Cygwin syntax)
|
||||
export HOME="//x/YourHomeDirectory"
|
||||
|
||||
# Set up your Language (if you do not want English)
|
||||
# export LANG=DE
|
||||
|
||||
# ========================================================
|
||||
# Below this line you should not change anything if you're
|
||||
# not familiar with configuration of an unix application!
|
||||
# ========================================================
|
||||
export PATH="/usr/bin:/usr/local/bin:/usr/X11R6/bin:/bin:$PATH"
|
||||
export USER="`id -un`"
|
||||
export DISPLAY=127.0.0.1:0.0
|
||||
export MAKE_MODE=unix
|
||||
|
||||
unset DOSDRIVE
|
||||
unset DOSDIR
|
||||
unset TMPDIR
|
||||
unset TMP
|
||||
|
||||
USER="`id -un`"
|
||||
|
||||
# Set up USER's home directory; no spaces allowed in the path!
|
||||
export HOME=//c/Docs/Lyx
|
||||
|
||||
export USER PATH
|
||||
|
||||
for i in /etc/profile.d/*.sh ; do
|
||||
if [ -f $i ]; then
|
||||
. $i
|
||||
fi
|
||||
done
|
||||
|
||||
export DISPLAY=localhost:0
|
||||
|
||||
export MAKE_MODE=unix
|
||||
|
||||
|
||||
cd "$HOME"
|
||||
|
||||
test -f ./.bashrc && . ./.bashrc
|
||||
|
@ -1,32 +0,0 @@
|
||||
#include <stdio.h> /* standard io library */
|
||||
#include <stdlib.h> /* standard library */
|
||||
#include <unistd.h> /* sleep , fork & exec */
|
||||
#include <string.h> /* standard string library */
|
||||
#include <errno.h>
|
||||
|
||||
int main ( int argc, char *argv[] )
|
||||
{
|
||||
/*char cmd [32000] = "lyx " ; */ /* user command */
|
||||
char cmd [32000] = "lyx " ;
|
||||
char *nargs [4 ] = { "/bin/bash", "-c" , cmd , NULL } ; /* execute with login /bin/bash */
|
||||
int i=1;
|
||||
|
||||
putenv ( "BASH_ENV=/etc/lyxprofile" ) ; /* ensure bash reads my global env changes */
|
||||
|
||||
while ( i < argc ) /* do for all "real" args */
|
||||
{
|
||||
strcat ( cmd , "\"" ) ; /* add quote before */
|
||||
strcat ( cmd , argv [ i ] ) ; /* add the argument */
|
||||
strcat ( cmd , "\" " ) ; /* add closing quote */
|
||||
i ++ ;
|
||||
}
|
||||
|
||||
strcat ( cmd, "</dev/null 2>/dev/null");
|
||||
|
||||
fprintf ( stderr , "Command is: |%s|\n" , cmd );
|
||||
execv ( "/bin/bash" , nargs ) ; /* exec sub command */
|
||||
|
||||
/* we should never reach here */
|
||||
fprintf ( stderr , "Execute failed, error = %d\n" , errno ) ;
|
||||
return ( 0 ) ; /* exit with no error */
|
||||
}
|
37
development/Win32/lyxwin32.c
Normal file
37
development/Win32/lyxwin32.c
Normal file
@ -0,0 +1,37 @@
|
||||
#include <stdio.h> /* standard io library */
|
||||
#include <stdlib.h> /* standard library */
|
||||
#include <unistd.h> /* sleep , fork & exec */
|
||||
#include <string.h> /* standard string library */
|
||||
#include <errno.h>
|
||||
|
||||
int main ( int argc, char *argv[] )
|
||||
{
|
||||
char cmd [32000] = "lyx " ; /* user command */
|
||||
char *nargs [4 ] = { /* execute with login /bin/bash */
|
||||
"/bin/bash",
|
||||
"-c" , cmd ,
|
||||
NULL
|
||||
} ;
|
||||
int i = 1; /* just to count */
|
||||
|
||||
/* ensure bash reads my global env changes */
|
||||
putenv ( "BASH_ENV=/etc/lyxprofile" ) ;
|
||||
|
||||
/* do for all "real" args */
|
||||
while ( i < argc )
|
||||
{
|
||||
strcat ( cmd , "\"" ) ; /* add quote before */
|
||||
strcat ( cmd , argv [ i ] ) ; /* add the argument */
|
||||
strcat ( cmd , "\" " ) ; /* add closing quote */
|
||||
i ++ ;
|
||||
}
|
||||
|
||||
strcat ( cmd, "</dev/null 2>/dev/null");
|
||||
|
||||
fprintf ( stderr , "Command is: |%s|\n" , cmd );
|
||||
execv ( "/bin/bash" , nargs ) ; /* exec sub command */
|
||||
|
||||
/* Oops: we should never reach here */
|
||||
perror ( "Execute failed") ;
|
||||
return ( 1 ) ; /* exit with an error */
|
||||
}
|
@ -1,3 +1,7 @@
|
||||
2001-10-03 Garst Reese <reese@isn.net>
|
||||
|
||||
* lyx_cb.C: fhange CheckTex error msg.
|
||||
|
||||
2001-10-03 José Matos <jamatos@fep.up.pt>
|
||||
|
||||
* buffer.C (simpleDocBookOnePar): add support for pass_thru.
|
||||
|
@ -263,11 +263,11 @@ int MenuRunChktex(Buffer * buffer)
|
||||
s = _("No warnings found.");
|
||||
} else if (ret == 1) {
|
||||
s = _("One warning found.");
|
||||
t = _("Use 'Edit->Go to Error' to find it.");
|
||||
t = _("Use `Navigate->Error' to find it.");
|
||||
} else {
|
||||
s += tostr(ret);
|
||||
s += _(" warnings found.");
|
||||
t = _("Use 'Edit->Go to Error' to find them.");
|
||||
t = _("Use `Navigate->Error' to find them.");
|
||||
}
|
||||
WriteAlert(_("Chktex run successfully"), s, t);
|
||||
} else {
|
||||
|
@ -1,3 +1,12 @@
|
||||
2001-07-02 Claus Hentschel <claus.hentschel@mbau.fh-hannover.de>
|
||||
|
||||
* os_win32.C:
|
||||
* os_unix.C:
|
||||
* os_os2.C:
|
||||
* os.h: add internal_path method, which converts a unix-type file
|
||||
name to the type known to the underlying file system (currently
|
||||
only useful on cygwin) [from Ruurd A. Reitsma and Claus Hentschel]
|
||||
|
||||
2001-08-18 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
||||
|
||||
* smart_ptr.h: new file
|
||||
|
@ -45,14 +45,18 @@ public:
|
||||
|
||||
// no-op on UNIX, '\\'->'/' on OS/2 and Win32, ':'->'/' on MacOS, etc.
|
||||
static string slashify_path(string p);
|
||||
// converts a host OS path to unix style
|
||||
static string external_path(string p);
|
||||
// converts a unix path to host OS style
|
||||
static string internal_path(string p);
|
||||
static void warn(string mesg);
|
||||
private:
|
||||
static string binpath_;
|
||||
static string binname_;
|
||||
static string tmpdir_;
|
||||
static os::shell_type _shell;
|
||||
static unsigned long cp_; // Used only on OS/2 to determine file system encoding.
|
||||
// Used only on OS/2 to determine file system encoding.
|
||||
static unsigned long cp_;
|
||||
|
||||
// Never initialize static variables in the header!
|
||||
// Anyway I bet this class will never be constructed.
|
||||
|
@ -158,3 +158,7 @@ string os::slashify_path(string p) {
|
||||
string os::external_path(string p) {
|
||||
return p;
|
||||
}
|
||||
|
||||
string os::internal_path(string p) {
|
||||
return p;
|
||||
}
|
||||
|
@ -68,3 +68,6 @@ string os::external_path(string p) {
|
||||
return p;
|
||||
}
|
||||
|
||||
string os::internal_path(string p) {
|
||||
return p;
|
||||
}
|
||||
|
@ -80,4 +80,19 @@ string os::external_path(string p) {
|
||||
<< p << "]->>["
|
||||
<< dos_path << "]" << endl;
|
||||
return dos_path;
|
||||
}
|
||||
}
|
||||
|
||||
// (Claus H.) Parsing the latex log file in an Win32 environment all
|
||||
// files are mentioned in Win32/DOS syntax. Because LyX uses the dep file
|
||||
// entries to check if any file has been changed we must retranslate
|
||||
// the Win32/DOS pathnames into Cygwin pathnames.
|
||||
string os::internal_path(string p) {
|
||||
char pp[256];
|
||||
cygwin_conv_to_posix_path(p.c_str(), pp);
|
||||
string const posix_path = MakeLatexName(pp);
|
||||
lyxerr[Debug::DEPEND]
|
||||
<< "<Win32 path correction> ["
|
||||
<< p << "]->>["
|
||||
<< posix_path << "]" << endl;
|
||||
return posix_path;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user