--- a/Smalltalk.st Thu Jun 23 23:30:33 2016 +0100
+++ b/Smalltalk.st Sun Jun 26 05:38:45 2016 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
"
COPYRIGHT (c) 1988 by Claus Gittinger
All Rights Reserved
@@ -235,17 +233,17 @@
right after startup, usually immediately followed by Smalltalk>>start.
Notice:
- this is NOT called when an image is restarted; in this
- case the show starts in Smalltalk>>restart."
+ this is NOT called when an image is restarted; in this
+ case the show starts in Smalltalk>>restart."
Compiler := ByteCodeCompiler.
Compiler isNil ifTrue:[
- "
- ByteCodeCompiler is not in the system (i.e. has not been linked in)
- this allows at least immediate evaluations for runtime systems without compiler
- NOTICE: a parser is always needed, otherwise we cannot read resource files etc.
- "
- Compiler := Parser
+ "
+ ByteCodeCompiler is not in the system (i.e. has not been linked in)
+ this allows at least immediate evaluations for runtime systems without compiler
+ NOTICE: a parser is always needed, otherwise we cannot read resource files etc.
+ "
+ Compiler := Parser
].
"/
@@ -279,12 +277,13 @@
"/ but, on OSX we need the CharacterEncoder to be initialized
CharacterEncoder initialize.
self initSystemPath.
+ self initPackagePath.
"/
"/ in case, someone needs the objectFileLoader early
"/
ObjectFileLoader notNil ifTrue:[
- ObjectFileLoader initialize.
+ ObjectFileLoader initialize.
].
"/
@@ -301,7 +300,7 @@
"/ flush them here, so they are reread in any case.
"/ required for some apps, for example to show the menu correctly (see launcher's help menu)
ApplicationModel notNil ifTrue:[
- ApplicationModel flushAllClassResources.
+ ApplicationModel flushAllClassResources.
].
"/
@@ -314,6 +313,7 @@
"Modified: / 08-01-1997 / 19:58:12 / stefan"
"Modified: / 05-12-2006 / 21:48:58 / cg"
"Modified: / 24-10-2012 / 18:45:15 / sr"
+ "Modified: / 25-06-2016 / 16:35:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
initGlobalsFromEnvironment
@@ -411,6 +411,15 @@
"Modified: 20.8.1997 / 09:35:49 / stefan"
!
+initPackagePath
+ "Initialize package path"
+
+ PackagePath := OperatingSystem defaultPackagePath.
+ self addWorkspaceDirectoryToPackagePath.
+
+ "Created: / 25-06-2016 / 16:35:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
initStandardStreams
"initialize some well-known streams"
@@ -7546,8 +7555,16 @@
!
packagePath
- "return a collection of additional directory names, where smalltalk
- looks for package directories.
+ "Return a list directory names, where smalltalk looks for packages,
+ that is, the list of directories searched when a package load is
+ requested via #loadPackage:.
+
+ To add a new entry to a package path, do
+
+ Smalltalk packagePath add: '/path/to/some/directory'.
+
+ See comment of Smalltalk class>>initPackagePath for default package path.
+
Notice, that directories named 'packages' under the systemPath are
always consulted - even if not in the packagePath"
@@ -7558,13 +7575,20 @@
Smalltalk packagePath addLast:'/opt/smalltalk'
Smalltalk packagePath addFirst:'/usr/local/otherPackages'
"
+
+ "Modified (comment): / 25-06-2016 / 16:44:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
packagePath:aPath
- "set the packagePath;
- a collection of additional directorynames, where smalltalk
- looks for package directories.
- Notice, that directories named 'packages' under the systemPath are
+ "set the 'packagePath', a list of directories where smalltalk
+ looks for packages. See #packagePath and #initPackagePath
+
+ Setting package path this way is rarely necessary, to add more
+ directories you may do
+
+ Smalltalk packagePath add: '/path/to/some/directory'.
+
+ ALso note, that directories named 'packages' under the systemPath are
always consulted - even if not in the packagePath"
PackagePath := aPath asOrderedCollection
@@ -7572,6 +7596,8 @@
"
Smalltalk packagePath:#( '.' '/opt/stx' '/opt/smalltalk' '/usr/local/otherPackages')
"
+
+ "Modified (format): / 26-06-2016 / 05:31:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
projectDirectoryForClass:aClass
@@ -7746,9 +7772,10 @@
PackagePath := PackagePath select:[:p | p asFilename exists].
].
PackagePath isEmptyOrNil ifTrue:[
- PackagePath := OperatingSystem defaultPackagePath
- ].
- self addWorkspaceDirectoryToPackagePath.
+ self initSystemPath
+ ].
+
+ "Modified: / 25-06-2016 / 16:36:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
relativePackagePathForPackage:aPackage
@@ -8315,13 +8342,13 @@
(lang == #de) ifTrue:[
proto := 'Willkommen bei %1 (%4Version %2 von %3)'. bit := 'Bit'.
] ifFalse:[ (lang == #fr) ifTrue:[
- proto := 'Salut, Bienvenue à%1 (%4version %2 de %3)'
+ proto := 'Salut, Bienvenue à %1 (%4version %2 de %3)'
] ifFalse:[ (lang == #it) ifTrue:[
proto := 'Ciao, benvenuto al %1 (%4versione %2 di %3)'
] ifFalse:[ (lang == #es) ifTrue:[
proto := 'Hola, bienvenida a %1 (%4version %2 de %3)'
] ifFalse:[ (lang == #pt) ifTrue:[
- proto := 'Olá!!, mem-vindo a %1 (%4version %2 de %3)'
+ proto := 'Olá!!, mem-vindo a %1 (%4version %2 de %3)'
] ifFalse:[ (lang == #no) ifTrue:[
proto := 'Hei, verdenmottakelse til %1 (%4versjon %2 av %3)'
]]]]]].