author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Wed, 15 Aug 2012 19:31:35 +0200 | |
changeset 1252 | 688c919be522 |
parent 975 | ceddb5e82365 |
child 1256 | 57adb4a406ed |
permissions | -rw-r--r-- |
12 | 1 |
"/ |
2 |
"/ $Header$ |
|
3 |
"/ |
|
656 | 4 |
"/ This file is processed very early at initial startup (before any rc script) |
12 | 5 |
"/ - not when resuming an image. |
6 |
"/ |
|
0 | 7 |
|
656 | 8 |
"/ |
446 | 9 |
"/ set the package for changes done below |
656 | 10 |
"/ |
24 | 11 |
Project notNil ifTrue:[ |
446 | 12 |
|p| |
13 |
||
14 |
p := Project new. |
|
656 | 15 |
p package:#'patches'. |
446 | 16 |
Project current:p. |
24 | 17 |
]. |
18 |
||
975 | 19 |
Smalltalk splashInfo:'patches [info]: installing patches...'. |
174 | 20 |
! |
125 | 21 |
|
672 | 22 |
"/ read patches from two patch-directories, called 'stxPatches' and 'userPatches'. |
23 |
"/ (in the future, patch-sets will be delivered for that directory in the future) |
|
24 |
"/ This is not yet done, but we are prepared here for this ... |
|
25 |
"/ |
|
26 |
"/ Patches from that directory are read in alphabetic order; |
|
358
14a45495e3d8
autoloaded classes must be read after the host.rc file;
Claus Gittinger <cg@exept.de>
parents:
323
diff
changeset
|
27 |
"/ patches will be named them p_nnnn.st, where nnnn is a sequence-nr. |
291
b6ece4a96c36
preps to read patchFiles from stxPatches directory
Claus Gittinger <cg@exept.de>
parents:
284
diff
changeset
|
28 |
|
672 | 29 |
#( |
30 |
'stxPatches' |
|
31 |
'userPatches' |
|
32 |
) do:[:patchDirName | |
|
33 |
|patchDirOrNil patchDir| |
|
291
b6ece4a96c36
preps to read patchFiles from stxPatches directory
Claus Gittinger <cg@exept.de>
parents:
284
diff
changeset
|
34 |
|
672 | 35 |
patchDirOrNil := Smalltalk getSystemFileName:patchDirName. |
36 |
patchDirOrNil notNil ifTrue:[ |
|
37 |
patchDir := patchDirOrNil asFilename. |
|
38 |
(patchDir exists and:[patchDir isDirectory and:[patchDir isReadable]]) ifTrue:[ |
|
39 |
patchDir directoryContents sort do:[:f | |
|
1252
688c919be522
Do not try to file-in directory when loading patches
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
975
diff
changeset
|
40 |
|file fn| |
291
b6ece4a96c36
preps to read patchFiles from stxPatches directory
Claus Gittinger <cg@exept.de>
parents:
284
diff
changeset
|
41 |
|
1252
688c919be522
Do not try to file-in directory when loading patches
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
975
diff
changeset
|
42 |
fn := (file := patchDir construct:f) name. |
688c919be522
Do not try to file-in directory when loading patches
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
975
diff
changeset
|
43 |
"JV@2012-08-15: File in only if file is not a directory. Otherwise system |
688c919be522
Do not try to file-in directory when loading patches
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
975
diff
changeset
|
44 |
crashes during startup, if one of the patch directories contains another directory |
688c919be522
Do not try to file-in directory when loading patches
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
975
diff
changeset
|
45 |
(such as CVS)" |
688c919be522
Do not try to file-in directory when loading patches
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
975
diff
changeset
|
46 |
(file isDirectory not and:[file isReadable]) ifTrue:[ |
688c919be522
Do not try to file-in directory when loading patches
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
975
diff
changeset
|
47 |
Smalltalk splashInfo:('patches [info]: reading patchFile ''' , fn , '''...'). |
688c919be522
Do not try to file-in directory when loading patches
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
975
diff
changeset
|
48 |
Smalltalk fileIn:fn. |
688c919be522
Do not try to file-in directory when loading patches
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
975
diff
changeset
|
49 |
] |
672 | 50 |
] |
51 |
] |
|
52 |
]. |
|
291
b6ece4a96c36
preps to read patchFiles from stxPatches directory
Claus Gittinger <cg@exept.de>
parents:
284
diff
changeset
|
53 |
]. |
b6ece4a96c36
preps to read patchFiles from stxPatches directory
Claus Gittinger <cg@exept.de>
parents:
284
diff
changeset
|
54 |
! |
b6ece4a96c36
preps to read patchFiles from stxPatches directory
Claus Gittinger <cg@exept.de>
parents:
284
diff
changeset
|
55 |
|
16 | 56 |
"/ |
12 | 57 |
"/ the following patches where added by the changesBrowsers 'make change a patch' |
58 |
"/ function ... |
|
59 |
"/ |
|
210 | 60 |
! |