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 |
|
|
25 |
(OperatingSystem getEnvironment: 'DISPLAY') notNil ifTrue:[
|
|
26 |
Smalltalk beHeadless: false.
|
|
27 |
].
|
|
28 |
] ifFalse: [
|
|
29 |
Smalltalk beHeadless: true.
|
|
30 |
].
|
|
31 |
|
|
32 |
(Smalltalk at:#'Builder::ReportRunner') isNil ifTrue:[
|
|
33 |
(Smalltalk loadPackage: 'stx:goodies/builder/reports') ifFalse:[
|
|
34 |
Stderr nextPutAll:'ERROR: cannot load stx:goodies/builder/reports.'.
|
|
35 |
Smalltalk exit: 17
|
|
36 |
].
|
|
37 |
].
|
|
38 |
|
|
39 |
Smalltalk addStartBlock:[(Smalltalk at:#'Builder::ReportRunner') start].
|