mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
Enable LyX to start up under Cygwin.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9415 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d2914ca615
commit
ed6dae8a40
@ -1,3 +1,9 @@
|
|||||||
|
2005-01-01 Kayvan Sylvan <kayvan@sylvan.com>
|
||||||
|
|
||||||
|
* os_win32.C (internal_path): remove the call to MakeLatexName as
|
||||||
|
it is (1) unnecessary and (2) leads to an infinite loop as
|
||||||
|
MakeLatexName calls AddName which calls internal_path...
|
||||||
|
|
||||||
2004-12-19 Angus Leeming <leeming@lyx.org>
|
2004-12-19 Angus Leeming <leeming@lyx.org>
|
||||||
|
|
||||||
* path_defines.C.in (setLyxPaths): on a Windows build,
|
* path_defines.C.in (setLyxPaths): on a Windows build,
|
||||||
|
@ -68,7 +68,7 @@ void init(int /* argc */, char * argv[])
|
|||||||
tmp.erase(tmp.length()-6, string::npos);
|
tmp.erase(tmp.length()-6, string::npos);
|
||||||
binpath_ = tmp;
|
binpath_ = tmp;
|
||||||
|
|
||||||
#ifdef __CYGWIN__
|
#if defined(__CYGWIN__) || defined(__CYGWIN32__)
|
||||||
tmpdir_ = "/tmp";
|
tmpdir_ = "/tmp";
|
||||||
homepath_ = GetEnvPath("HOME");
|
homepath_ = GetEnvPath("HOME");
|
||||||
nulldev_ = "/dev/null";
|
nulldev_ = "/dev/null";
|
||||||
@ -116,7 +116,7 @@ string::size_type common_path(string const & p1, string const & p2)
|
|||||||
string external_path(string const & p)
|
string external_path(string const & p)
|
||||||
{
|
{
|
||||||
string dos_path;
|
string dos_path;
|
||||||
#ifdef __CYGWIN__
|
#if defined(__CYGWIN__) || defined(__CYGWIN32__)
|
||||||
// Translate from cygwin path syntax to dos path syntax
|
// Translate from cygwin path syntax to dos path syntax
|
||||||
if (is_absolute_path(p)) {
|
if (is_absolute_path(p)) {
|
||||||
char dp[MAX_PATH];
|
char dp[MAX_PATH];
|
||||||
@ -146,18 +146,14 @@ string external_path(string const & p)
|
|||||||
// the Win32/DOS pathnames into Cygwin pathnames.
|
// the Win32/DOS pathnames into Cygwin pathnames.
|
||||||
string internal_path(string const & p)
|
string internal_path(string const & p)
|
||||||
{
|
{
|
||||||
#ifdef __CYGWIN__
|
#if defined(__CYGWIN__) || defined(__CYGWIN32__)
|
||||||
char pp[MAX_PATH];
|
char posix_path[MAX_PATH];
|
||||||
cygwin_conv_to_posix_path(p.c_str(), pp);
|
posix_path[0] = '\0';
|
||||||
string const posix_path = MakeLatexName(pp);
|
cygwin_conv_to_posix_path(p.c_str(), posix_path);
|
||||||
#else
|
|
||||||
string const posix_path = subst(p,"\\","/");
|
|
||||||
#endif
|
|
||||||
lyxerr[Debug::DEPEND]
|
|
||||||
<< "<Win32 path correction> ["
|
|
||||||
<< p << "]->>["
|
|
||||||
<< posix_path << ']' << endl;
|
|
||||||
return posix_path;
|
return posix_path;
|
||||||
|
#else
|
||||||
|
return subst(p,"\\","/");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -187,13 +183,13 @@ char const * popen_read_mode()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
string binpath()
|
string const & binpath()
|
||||||
{
|
{
|
||||||
return binpath_;
|
return binpath_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
string binname()
|
string const & binname()
|
||||||
{
|
{
|
||||||
return binname_;
|
return binname_;
|
||||||
}
|
}
|
||||||
@ -205,7 +201,7 @@ void setTmpDir(string const & p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
string getTmpDir()
|
string const & getTmpDir()
|
||||||
{
|
{
|
||||||
return tmpdir_;
|
return tmpdir_;
|
||||||
}
|
}
|
||||||
@ -225,7 +221,7 @@ string const & nulldev()
|
|||||||
|
|
||||||
shell_type shell()
|
shell_type shell()
|
||||||
{
|
{
|
||||||
#ifdef __CYGWIN__
|
#if defined(__CYGWIN__) || defined(__CYGWIN32__)
|
||||||
return UNIX;
|
return UNIX;
|
||||||
#else
|
#else
|
||||||
return CMD_EXE;
|
return CMD_EXE;
|
||||||
|
Loading…
Reference in New Issue
Block a user