File tree Expand file tree Collapse file tree 3 files changed +24
-9
lines changed
Expand file tree Collapse file tree 3 files changed +24
-9
lines changed Original file line number Diff line number Diff line change @@ -1343,16 +1343,23 @@ FILE_VERSION_FILTER = "cleartool desc -fmt \%Vn"
13431343]]>
13441344 </docs >
13451345 </option >
1346- <option type =' list' id =' EXTERNAL_TOOL_PATHS ' format =' dir' defval =' ' >
1346+ <option type =' list' id =' EXTERNAL_TOOL_PATH ' format =' dir' defval =' ' >
13471347 <docs >
13481348<![CDATA[
1349- The \c EXTERNAL_TOOL_PATHS tag can be used to extend the search path (PATH environment variable)
1350- so that external tools such as \c latex and \c gs can be found.
1349+ The \c EXTERNAL_TOOL_PATH tag can be used to extend the search path (PATH environment variable)
1350+ so that external tools such as \c latex and \c gs can be found.
1351+ \note Directories specified with EXTERNAL_TOOL_PATH are added in front of the path already specified by
1352+ the PATH variable, and are added in the order specified.
13511353 \note This option is particularly useful for macOS version 14 (Sonoma) and higher,
13521354 when running Doxygen from Doxywizard, because in this case any user-defined changes to the PATH
13531355 are ignored. A typical example on macOS is to set
13541356\verbatim
1355- EXTERNAL_TOOL_PATHS = /Library/TeX/texbin /usr/local/bin
1357+ EXTERNAL_TOOL_PATH = /Library/TeX/texbin /usr/local/bin
1358+ \endverbatim
1359+ together with the standard path, the full search path used by doxygen when launching external tools
1360+ will then become
1361+ \verbatim
1362+ PATH=/Library/TeX/texbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
13561363\endverbatim
13571364]]>
13581365 </docs >
Original file line number Diff line number Diff line change @@ -11788,7 +11788,7 @@ void parseInput()
1178811788 AUTO_TRACE ();
1178911789 std::atexit (exitDoxygen);
1179011790
11791- Portable::correctPath (Config_getList (EXTERNAL_TOOL_PATHS ));
11791+ Portable::correctPath (Config_getList (EXTERNAL_TOOL_PATH ));
1179211792
1179311793#if USE_LIBCLANG
1179411794 Doxygen::clangAssistedParsing = Config_getBool (CLANG_ASSISTED_PARSING);
Original file line number Diff line number Diff line change @@ -526,18 +526,26 @@ bool Portable::isAbsolutePath(const QCString &fileName)
526526void Portable::correctPath (const StringVector &extraPaths)
527527{
528528 QCString p = Portable::getenv (" PATH" );
529+ bool first=true ;
530+ QCString result;
529531#if defined(_WIN32) && !defined(__CYGWIN__)
530- QCString result = substitute (p," /" ," \\ " );
531532 for (const auto &path : extraPaths)
532533 {
533- result+=" ;\" " +substitute (QCString (path)," /" ," \\ " )+" \" " ;
534+ if (!first) result+=' ;' ;
535+ first=false ;
536+ result += substitute (QCString (path)," /" ," \\ " );
534537 }
538+ if (!result.isEmpty () && !p.isEmpty ()) result+=' ;' ;
539+ result += substitute (p," /" ," \\ " );
535540#else
536- QCString result=p;
537541 for (const auto &path : extraPaths)
538542 {
539- result+=" :" +QCString (path);
543+ if (!first) result+=' :' ;
544+ first=false ;
545+ result += QCString (path);
540546 }
547+ if (!result.isEmpty () && !p.isEmpty ()) result+=' :' ;
548+ result += p;
541549#endif
542550 if (result!=p) Portable::setenv (" PATH" ,result.data ());
543551 // printf("settingPath(%s) #extraPaths=%zu\n",Portable::getenv("PATH").data(),extraPaths.size());
You can’t perform that action at this time.
0 commit comments