author | Claus Gittinger <cg@exept.de> |
Tue, 26 Mar 2019 18:44:15 +0100 | |
changeset 535 | 02bf82681471 |
parent 189 | bd2bed33aba7 |
child 326 | 113031dfa759 |
permissions | -rw-r--r-- |
75 | 1 |
| pp wd i p | |
2 |
||
3 |
"Search for package path, bit hacky but..." |
|
4 |
wd := Filename currentDirectory. |
|
5 |
pp := nil. |
|
6 |
p := wd. |
|
7 |
i := 10."How many super-directories try" |
|
8 |
[i > 0 and:[pp == nil]] whileTrue:[ |
|
9 |
p := p / '..'. i := i - 1. |
|
10 |
((p / 'stx' / 'libbasic') exists and:[(p / 'stx' / 'libcomp') exists]) |
|
11 |
ifTrue:[pp := p]]. |
|
12 |
pp |
|
13 |
ifNil: |
|
14 |
[Stderr nextPutAll: 'ERROR: Cannot find package path'. |
|
15 |
Smalltalk exit: 16] |
|
16 |
ifNotNil: |
|
17 |
[Smalltalk packagePath add: pp pathName]. |
|
18 |
||
19 |
(Smalltalk commandLineArguments includes:'--debug') ifTrue:[ |
|
20 |
Stderr nextPutAll:'Package path:'; cr. |
|
21 |
Smalltalk packagePath do:[:each| |
|
22 |
Stderr nextPutAll:' '; nextPutAll: each; cr. |
|
23 |
]. |
|
24 |
||
83 | 25 |
Smalltalk beHeadless: (OperatingSystem getEnvironment: 'DISPLAY') isNil. |
75 | 26 |
] ifFalse: [ |
27 |
Smalltalk beHeadless: true. |
|
28 |
]. |
|
29 |
||
30 |
(Smalltalk at:#'Builder::ReportRunner') isNil ifTrue:[ |
|
189
bd2bed33aba7
Fixes to make it running on Smalltalk/X 6.2.2 released in July 2012
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
83
diff
changeset
|
31 |
(Smalltalk loadPackage: 'stx:goodies/sunit') ifFalse:[ |
bd2bed33aba7
Fixes to make it running on Smalltalk/X 6.2.2 released in July 2012
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
83
diff
changeset
|
32 |
Stderr nextPutAll:'ERROR: cannot load stx:goodies/sunit.'. |
bd2bed33aba7
Fixes to make it running on Smalltalk/X 6.2.2 released in July 2012
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
83
diff
changeset
|
33 |
Smalltalk exit: 17 |
bd2bed33aba7
Fixes to make it running on Smalltalk/X 6.2.2 released in July 2012
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
83
diff
changeset
|
34 |
]. |
75 | 35 |
(Smalltalk loadPackage: 'stx:goodies/builder/reports') ifFalse:[ |
36 |
Stderr nextPutAll:'ERROR: cannot load stx:goodies/builder/reports.'. |
|
37 |
Smalltalk exit: 17 |
|
38 |
]. |
|
39 |
]. |
|
40 |
||
189
bd2bed33aba7
Fixes to make it running on Smalltalk/X 6.2.2 released in July 2012
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
83
diff
changeset
|
41 |
(Smalltalk at:#'Builder::ReportRunner') start. |