The cause of different path computation is the way how compiler computes the path of the current compilation unit (when the macro __FILE__ is used).
For example, under VC10 it returns the file path starting with "../../../src", while under VC12 it returns the full path starting with "D:\".
Branch CR28673 has been created by msv.
The method OSD_Path::RemoveATrek has been modified, so that to remove leading track separator if the first component has been removed.
Now the command getsourcefile returns the relative path starting with "src" without leading "/" on all platforms.
I believe that making punctual changes in OSD_Path without clear understanding how it should behave is not worth doing: it can easily cause regressions in existing client's code but does not solve the issue completely, as its reason is lack of clear behavior. This is to be done together with other related issues.
I can propose another, more safe way. It is to add a new method in OSD_Path with name RemoveLeadingTrekSeparator(). It will remove the leading separator if any from the track. Then call this method from Draw_Interpretor::add().
At last, the most safe way we found is to make needed correction in the method Draw_Interpretor::add().
Branch CR28673_1 has been created by msv.
The method Draw_Interpretor::add() has been corrected so that the command getsourcefile returned the relative path starting with "src" without leading "/" on all platforms.
Please review the new version.
No remarks, please test (only test demo draw getsource needs to be checked, on both Linux and Windows).
Branch CR28673_1 has been updated forcibly by mkv.
Branch CR28673_1 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
Branch CR28673 has been deleted by kgv.
Branch CR28673_1 has been deleted by kgv.