--- a/AbstractOperatingSystem.st Wed Dec 18 21:54:05 2019 +0000
+++ b/AbstractOperatingSystem.st Sat Jan 25 21:55:08 2020 +0000
@@ -5242,6 +5242,30 @@
definition notNil ifTrue:[
| execPathEndInBuildTree1 execPathEndInBuildTree2 |
+ "/ When running from build-tree but using out-of-tree compilation
+ OperatingSystem isUNIXlike ifTrue:[
+ execPathEndInBuildTree1 :=
+ definition module , '/' , definition directory , '/build/' , Smalltalk configuration, '/' , definition applicationName
+ ] ifFalse:[ OperatingSystem isMSWINDOWSlike ifTrue:[
+ execPathEndInBuildTree1 :=
+ definition module , '\' , (definition directory copyReplaceAll: $/ with: $\) , '\build\' , Smalltalk configuration, '\' , definition applicationNameConsole.
+ execPathEndInBuildTree2 :=
+ definition module , '\' , (definition directory copyReplaceAll: $/ with: $\) , '\build\' , Smalltalk configuration, '\' , definition applicationNameNoConsole.
+ ] ifFalse:[
+ self error:'Operating system not supported'.
+ ]].
+
+ ((execPathEndInBuildTree1 notNil and:[ execPath endsWith: execPathEndInBuildTree1 ]) or:[execPathEndInBuildTree2 notNil and:[ execPath endsWith: execPathEndInBuildTree2 ]]) ifTrue:[
+ | root top |
+
+ top := definition pathToTopWithSeparator: Filename separator.
+ root := execPath asFilename directory / top / '..' / '..' / '..' .
+ root exists ifTrue:[
+ packagePath add: root asAbsoluteFilename pathName.
+ ].
+ ].
+
+ "/ When running from build-tree and using (now obsolete) **IN-TREE** compilation
OperatingSystem isUNIXlike ifTrue:[
execPathEndInBuildTree1 :=
definition module , '/' , definition directory , '/' , definition applicationName
@@ -5274,8 +5298,8 @@
"
"Modified: / 04-02-2011 / 16:27:15 / cg"
- "Modified (comment): / 19-07-2019 / 12:08:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 14-11-2019 / 16:10:59 / jv"
+ "Modified: / 25-01-2020 / 21:51:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
defaultSystemPath