[Windows][kinetic] Fix devel and install space intermixes in %PATH% after devel\setup.bat is sourced #1010
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change is to address an issue originally reported here: ms-iot/ROSOnWindows#69
On Windows, we observed that
%PATH%
intermixesdevel
andinstall
space forbin
andlib
. Ideally thedevel\bin
anddevel\lib
should always come before theinstall
space afterdevel\setup.bat
is sourced. Otherwise, for example, at runtime, it could favor the content frominstall space
over the one indevel space
and subsequently cause unexpected problems, especially when we build\test a package both existed indevel space
andinstall space
.This change is to propose to make sure
bin
andlib
on Windows forENV_VAR_SUBFOLDERS['PATH']
in_setup_util.py
, and then let_setup_util.py
to prepend the workspace prefix accordingly. In this case,_setup_util.py
can produce%PATH%
like:C:\catkin_ws\devel\bin;C:\catkin_ws\devel\lib;C:\opt\ros\melodic\x64\bin;C:\opt\ros\melodic\x64\lib;...