The attached patch ensures that the LyX binary dir is the first element in
the PATH on non-POSIX builds. The change will mean that fixes like Enrico
Forestieri's, described here:
http://marc.theaimsgroup.com/?l=lyx-devel&m=111851430815315&w=2
are much easier to apply. (His python.bat stuff.)

OK?
-- 
Angus
Index: src/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v
retrieving revision 1.1021.2.84
diff -u -p -r1.1021.2.84 ChangeLog
--- src/ChangeLog	11 Jun 2005 11:16:04 -0000	1.1021.2.84
+++ src/ChangeLog	14 Jun 2005 08:13:21 -0000
@@ -1,3 +1,8 @@
+2005-06-14  Angus Leeming  <[EMAIL PROTECTED]>
+
+	* lyx_main.C (init): ensure that the LyX binary dir is the first
+	element in the PATH on non-POSIX builds.
+
 2005-06-11  Georg Baum  <[EMAIL PROTECTED]>
 
 	* LaTeXFeatures.C (getPackages): solve amsmath-wasysym conflict
Index: src/lyx_main.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyx_main.C,v
retrieving revision 1.134.2.15
diff -u -p -r1.134.2.15 lyx_main.C
--- src/lyx_main.C	29 Mar 2005 14:18:00 -0000	1.134.2.15
+++ src/lyx_main.C	14 Jun 2005 08:13:22 -0000
@@ -291,13 +291,6 @@ void LyX::init(bool gui)
 
 	lyx::Package const & package = lyx::package();
 
-#if !defined (USE_POSIX_PACKAGING)
-	// Add the directory containing the LyX executable to the path
-	// so that LyX can find things like reLyX.
-	if (package.build_support().empty())
-		prependEnvPath("PATH", package.binary_dir());
-#endif
-
 	// Check that user LyX directory is ok. We don't do that if
 	// running in batch mode.
 	bool reconfigure = false;
@@ -364,6 +357,13 @@ void LyX::init(bool gui)
 
 	if (!lyxrc.path_prefix.empty())
 		prependEnvPath("PATH", lyxrc.path_prefix);
+
+#if !defined (USE_POSIX_PACKAGING)
+	// Add the directory containing the LyX executable to the path
+	// so that LyX can find things like reLyX.
+	if (package.build_support().empty())
+		prependEnvPath("PATH", package.binary_dir());
+#endif
 
 	// Having reset the PATH we're now in a position to run configure
 	// if necessary.
Index: src/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v
retrieving revision 1.2200
diff -u -p -r1.2200 ChangeLog
--- src/ChangeLog	10 Jun 2005 14:54:59 -0000	1.2200
+++ src/ChangeLog	14 Jun 2005 08:14:39 -0000
@@ -1,3 +1,8 @@
+2005-06-14  Angus Leeming  <[EMAIL PROTECTED]>
+
+	* lyx_main.C (init): ensure that the LyX binary dir is the first
+	element in the PATH on non-POSIX builds.
+
 2005-06-09  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
 
 	* rowpainter.C (paintInset, paintHebrewComposeChar) 
Index: src/lyx_main.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyx_main.C,v
retrieving revision 1.208
diff -u -p -r1.208 lyx_main.C
--- src/lyx_main.C	7 Jun 2005 16:50:01 -0000	1.208
+++ src/lyx_main.C	14 Jun 2005 08:14:40 -0000
@@ -406,13 +406,6 @@ void LyX::init(bool gui)
 	signal(SIGTERM, error_handler);
 	// SIGPIPE can be safely ignored.
 
-#if !defined (USE_POSIX_PACKAGING)
-	// Add the directory containing the LyX executable to the path
-	// so that LyX can find things like reLyX.
-	if (package().build_support().empty())
-		prependEnvPath("PATH", package().binary_dir());
-#endif
-
 	// Check that user LyX directory is ok. We don't do that if
 	// running in batch mode.
 	bool reconfigure = false;
@@ -486,6 +479,13 @@ void LyX::init(bool gui)
 	os::cygwin_path_fix(lyxrc.cygwin_path_fix);
 	if (!lyxrc.path_prefix.empty())
 		prependEnvPath("PATH", lyxrc.path_prefix);
+
+#if !defined (USE_POSIX_PACKAGING)
+	// Add the directory containing the LyX executable to the path
+	// so that LyX can find things like reLyX.
+	if (package().build_support().empty())
+		prependEnvPath("PATH", package().binary_dir());
+#endif
 
 	// Having reset the PATH we're now in a position to run configure
 	// if necessary.

Reply via email to