Christoph Thiede uploaded a new version of SUnit to project The Trunk:
http://source.squeak.org/trunk/SUnit-ct.138.mcz
==================== Summary ====================
Name: SUnit-ct.138
Author: ct
Time: 31 January 2022, 8:38:14.044214 pm
UUID: b34d72f7-2b2e-a642-9c1e-66cc7a361a00
Ancestors: SUnit-ct.136
Adds and tests #shouldRaiseError: as a convenience assertion that encapsulates the #exError abstraction. Adds an explaining comment on that abstraction (see TestResult exError and allErrors).
Thanks to Marcel for the discussion!
=============== Diff against SUnit-ct.136 ===============
Item was added:
+ ----- Method: SUnitExtensionsTest>>shouldRaiseErrorTest (in category 'real tests') -----
+ shouldRaiseErrorTest
+
+ self shouldRaiseError: [ TestResult exError signal: 'any kind of error' ]
+ !
Item was added:
+ ----- Method: SUnitExtensionsTest>>testShouldRaiseError (in category 'tests') -----
+ testShouldRaiseError
+
+ | testCase testResult |
+ testCase := self class selector: #shouldRaiseErrorTest.
+ testResult := testCase run.
+
+ self assert: (testResult passed includes: testCase).
+ self assert: 1 equals: testResult passed size.
+ self assert: testResult failures isEmpty.
+ self assert: testResult errors isEmpty.!
Item was added:
+ ----- Method: TestCase>>shouldRaiseError: (in category 'asserting') -----
+ shouldRaiseError: aBlock
+
+ ^ self should: aBlock raise: TestResult exError
+ !
Item was changed:
----- Method: TestResult class>>allErrors (in category 'exceptions') -----
allErrors
+ "Answer an exception set for all common exceptions that can be raised when a typical error is detected in Squeak. This method decouples the testing framework from the exception handling system and allows clients to convert their tests to another Smalltalk dialect easily."
^ self exError, Warning, Halt
!
Item was changed:
----- Method: TestResult class>>exError (in category 'exceptions') -----
exError
+ "Answer the exception class that represents a regular error in Squeak. This method decouples the testing framework from the exception handling system and allows clients to convert their tests to another Smalltalk dialect easily."
^Error
!
Christoph Thiede uploaded a new version of Files to project The Trunk:
http://source.squeak.org/trunk/Files-ct.189.mcz
==================== Summary ====================
Name: Files-ct.189
Author: ct
Time: 31 January 2022, 8:03:16.983876 pm
UUID: 6c263b96-030b-d044-934f-7e8c75af61f6
Ancestors: Files-mt.188
FileDirectory: Extracts idempotent #startUpDefaultDirectory from #startUp, which is not idempotent when the host system is Windows, where the source files must not be opened multiple times. Clients only interested in refreshing the default directory should send the new extracted message.
See: http://lists.squeakfoundation.org/pipermail/squeak-dev/2022-January/218179.…
=============== Diff against Files-mt.188 ===============
Item was changed:
+ ----- Method: FileDirectory class>>startUp (in category 'system start up') -----
- ----- Method: FileDirectory class>>startUp (in category 'name utilities') -----
startUp
- "Establish the platform-specific FileDirectory subclass. Do any platform-specific startup."
- self setDefaultDirectoryClass.
+ self startUpDefaultDirectory.
+ Smalltalk openSourceFiles.!
- self setDefaultDirectory: (self dirPathFor: Smalltalk imageName).
-
- Preferences startInUntrustedDirectory
- ifTrue:[ "The SecurityManager may override the default directory to prevent unwanted write access etc."
- self setDefaultDirectory: SecurityManager default untrustedUserDirectory.
- "Make sure we have a place to go to"
- DefaultDirectory assureExistence].
- Smalltalk openSourceFiles.
- (Smalltalk classNamed: #DoItFirst) ifNotNil: [ :doit | doit perform: #reevaluateCwd ].
- !
Item was added:
+ ----- Method: FileDirectory class>>startUpDefaultDirectory (in category 'system start up') -----
+ startUpDefaultDirectory
+ "Establish the platform-specific FileDirectory subclass. Do any platform-specific startup."
+
+ self setDefaultDirectoryClass.
+ self setDefaultDirectory: (self dirPathFor: Smalltalk imageName).
+
+ Preferences startInUntrustedDirectory
+ ifTrue:[ "The SecurityManager may override the default directory to prevent unwanted write access etc."
+ self setDefaultDirectory: SecurityManager default untrustedUserDirectory.
+ "Make sure we have a place to go to"
+ DefaultDirectory assureExistence].
+
+ (Smalltalk classNamed: #DoItFirst) ifNotNil: [ :doit | doit perform: #reevaluateCwd ].!
Marcel Taeumel uploaded a new version of Installer-Core to project The Trunk:
http://source.squeak.org/trunk/Installer-Core-mt.444.mcz
==================== Summary ====================
Name: Installer-Core-mt.444
Author: mt
Time: 31 January 2022, 1:59:06.923089 pm
UUID: 19ed2eee-09fd-eb45-98b4-86d7cd0b1113
Ancestors: Installer-Core-cmm.443
Adds script to conveniently install "Squeak Inbox Talk", which is besides "Git Browser" the second external tool that can be beneficial for modern software development -- given that Nabble (i.e. forum.world.st) is not connected to squeak-dev and vm-dev anymore.
Fixes label issue in "Tools" menu for "Git Browser".
=============== Diff against Installer-Core-cmm.443 ===============
Item was added:
+ ----- Method: Installer class>>installAndOpenSqueakInboxTalk (in category 'scripts') -----
+ installAndOpenSqueakInboxTalk
+ "For more information on Squeak Inbox Talk, visit https://github.com/hpi-swa-lab/squeak-inbox-talk"
+
+ self installSqueakInboxTalk.
+ (Smalltalk at: #TalkInboxBrowser) open.!
Item was changed:
----- Method: Installer class>>installGitInfrastructure (in category 'scripts') -----
installGitInfrastructure
| priorSetting |
"for INIFileTest>>#testComplexRead"
priorSetting := Scanner allowUnderscoreAsAssignment.
[Scanner allowUnderscoreAsAssignment: true.
(Smalltalk at: #Metacello) new
baseline: 'Squot';
repository: 'github://hpi-swa/Squot:latest-release/src';
"repository: 'github://hpi-swa/Squot:develop/src';"
load.
+ "Remove '(click to install)' note in 'Tools' menu."
+ TheWorldMainDockingBar updateInstances.
+
+ ] ensure: [Scanner allowUnderscoreAsAssignment: priorSetting]!
- ] ensure: [Scanner allowUnderscoreAsAssignment: priorSetting]
- !
Item was added:
+ ----- Method: Installer class>>installSqueakInboxTalk (in category 'scripts') -----
+ installSqueakInboxTalk
+ "For more information on Squeak Inbox Talk, visit https://github.com/hpi-swa-lab/squeak-inbox-talk"
+
+ (Smalltalk at: #Metacello) new
+ baseline: 'SqueakInboxTalk';
+ repository: 'github://hpi-swa-lab/squeak-inbox-talk:main/packages';
+ load.
+
+ "Remove '(click to install)' note in 'Tools' menu."
+ TheWorldMainDockingBar updateInstances.!
Marcel Taeumel uploaded a new version of PreferenceBrowser to project The Trunk:
http://source.squeak.org/trunk/PreferenceBrowser-mt.128.mcz
==================== Summary ====================
Name: PreferenceBrowser-mt.128
Author: mt
Time: 31 January 2022, 2:01:38.104089 pm
UUID: 59284507-bd8a-6543-82fe-3a77a6f18a0a
Ancestors: PreferenceBrowser-dtl.127
Complements Installer-Core-mt.444.
Feel free to revise the help texts if you find a better phrasing.
=============== Diff against PreferenceBrowser-dtl.127 ===============
Item was changed:
----- Method: PreferenceWizardMorph>>initializePage99ExtraPackages (in category 'initialization - pages') -----
initializePage99ExtraPackages
"Let the user install extra packages."
| currentPage packagesList installButton |
currentPage := self createPage.
currentPage
cellPositioning: #topCenter;
addMorphBack: self createHorizontalSpacer;
addMorphBack: ((self createLabel: 'Do you want to install extra packages?' color: Color white)
hResizing: #shrinkWrap;
yourself);
addMorphBack: ((self createLabel: 'Note that the installation process requires a network connection with Internet access and might take several minutes.' color: (Color gray: 0.9))
hResizing: #rigid;
vResizing: #shrinkWrap;
width: (self defaultFont widthOf: $x) * 55;
yourself).
currentPage submorphs last text addAttribute: TextAlignment centered.
currentPage submorphs last layoutChanged.
currentPage addMorphBack: (self createVerticalSpace height: self layoutInset).
packagesList := self createScrollPane.
packagesList
width: (self defaultFont widthOf: $x) * 40;
hResizing: #rigid;
vResizing: #spaceFill.
packagesList scroller firstSubmorph addAllMorphsBack: {
self createCheckbox: 'Latest system updates' translated for: #InstallLatestUpdates help: 'Install the latest patches for ' translated, SystemVersion current version.
+ self createCheckbox: 'Refactoring support in code browsers' translated for: #InstallRefactoringTools help: 'Refactoring is a process of re-writing or re-organizing text or code. The purpose of a refactor is to make the code or text more understandable and readable while exactly preserving its meaning and behavior' translated.
+ self createCheckbox: 'Autocomplete in code editors' translated for: #InstallAutoComplete help: 'Package that provides interactive, context-sensitive auto-completion for Squeak' translated.
+ self createCheckbox: 'Git support and browser' translated for: #InstallGitInfrastructure help: 'From the Git Browser, you can create new commits, synchronize with remote repositories (fetch, pull, push), manage and merge branches, switch between them, and compare different versions' translated.
- self createCheckbox: 'Refactoring support in code browsers' translated for: #InstallRefactoringTools help: 'Refactoring is a process of re-writing or re-organizing text or code. The purpose of a refactor is to make the code or text more understandable and readable while exactly preserving its meaning and behavior.' translated.
- self createCheckbox: 'Autocomplete in code editors' translated for: #InstallAutoComplete help: 'Package that provides interactive, context-sensitive auto-completion for Squeak.' translated.
- self createCheckbox: 'Git support and browser' translated for: #InstallGitInfrastructure help: 'From the Git Browser, you can create new commits, synchronize with remote repositories (fetch, pull, push), manage and merge branches, switch between them, and compare different versions.' translated.
self createCheckbox: 'Foreign function interface (FFI)' translated for: #InstallFFI help: 'FFI, the Squeak Foreign Function Interface, is used to call functions located in shared libraries that are not part of the Squeak VM nor its plugins' translated.
+ self createCheckbox: 'Access OS functions' translated for: #InstallOSProcess help: 'OSProcess provides access to operating system functions, including pipes and child process creation' translated.
+ self createCheckbox: 'Integrate Squeak''s mailing lists' translated for: #InstallSqueakInboxTalk help: 'Through Squeak Inbox Talk, you can engage with our community from within Squeak using tools that integrate our mailing lists such as squeak-dev and vm-dev' translated.
- self createCheckbox: 'Access OS functions' translated for: #InstallOSProcess help: 'OSProcess provides access to operating system functions, including pipes and child process creation.' translated.
}.
currentPage addMorphBack: packagesList.
currentPage addMorphBack: ((self createLabel: 'Find more on www.squeak.org/projects' color: (Color gray: 0.9))
hResizing: #shrinkWrap; yourself).
installButton := (self createButton action: #installExtraPackages).
currentPage addMorphBack: installButton.
currentPage addMorphBack: (self createButton action: #showSqueak; label: 'No, maybe later.' translated).
self setProperty: #checkInternet toValue: true.
self checkInternetOn: installButton.
^ currentPage!
Item was changed:
----- Method: PreferenceWizardMorph>>installExtraPackages (in category 'actions') -----
installExtraPackages
"Removes the buttons and adds the progress bar during installation."
| steps page |
self removeProperty: #checkInternet. "No frequent checks for connectivity from here."
steps := #(
InstallLatestUpdates
InstallMetacello
InstallRefactoringTools
InstallAutoComplete
InstallGitInfrastructure
InstallFFI
+ InstallOSProcess
+ InstallSqueakInboxTalk )
- InstallOSProcess )
select: [:ea | self perform: ('state', ea) asSymbol].
page := controlMorph firstSubmorph.
page submorphs second hide. "question"
page submorphs last delete. "url"
page submorphs last delete. "no button"
page submorphs last delete. "yes button"
page submorphs last delete. "package list"
self refreshWorld.
[
PreferenceWizardProgressMorph install.
page
addMorphBack: PreferenceWizardProgressMorph uniqueInstance;
addMorphBack: self createVerticalSpacer.
steps
do: [:step | self perform: step withFirstCharacterDownshifted asSymbol]
displayingProgress: [:step | String streamContents: [:s |
step findFeatureIndicesDo: [:start :end |
s nextPutAll: (step copyFrom: start to: end); space].
s nextPutAll: '...']].
] ensure: [
PreferenceWizardProgressMorph reset.
self showSqueak].!
Item was added:
+ ----- Method: PreferenceWizardMorph>>installSqueakInboxTalk (in category 'actions - packages') -----
+ installSqueakInboxTalk
+
+ Installer installSqueakInboxTalk.!
Item was added:
+ ----- Method: PreferenceWizardMorph>>stateInstallSqueakInboxTalk (in category 'actions - packages') -----
+ stateInstallSqueakInboxTalk
+
+ ^ self
+ valueOfProperty: #InstallSqueakInboxTalk
+ ifAbsent: [false]!
Item was added:
+ ----- Method: PreferenceWizardMorph>>toggleInstallSqueakInboxTalk (in category 'actions - packages') -----
+ toggleInstallSqueakInboxTalk
+
+ self
+ setProperty: #InstallSqueakInboxTalk
+ toValue: self stateInstallSqueakInboxTalk not.
+ self changed: #stateInstallSqueakInboxTalk.!
A new version of System was added to project The Inbox:
http://source.squeak.org/inbox/System-dtl.1277.mcz
==================== Summary ====================
Name: System-dtl.1277
Author: dtl
Time: 1 January 2022, 2:57:48.389886 pm
UUID: 4d975f20-d62d-4b7e-8abb-bc511d976834
Ancestors: System-mt.1276
Look for the sources file in well-known locations on some platforms. For Unix, if not found in the usual locations then look in /usr/share/squeak and /usr/local/share/squeak. Hooks for other platforms may be added to SmalltalkImage>>sourcesFilePaths.
Refactor to reduce duplication of logic in locateSourcesEntry and openSources:forImage: and to ensure that the full set of file paths is searched for stc compressed sources files prior to searching for regular sources files.
=============== Diff against System-mt.1276 ===============
Item was removed:
- ----- Method: FileDirectory class>>openChanges:forImage: (in category '*System-Files') -----
- openChanges: changesName forImage: imageName
- "find the changes file by looking in
- a) the directory derived from the image name
- b) the DefaultDirectory (which will normally be the directory derived from the image name or the SecurityManager's choice)
- If an old file is not found in either place, check for a read-only file in the same places. If that fails, return nil"
- | changes fd |
- "look for the changes file or an alias to it in the image directory"
- fd := FileDirectory on: (FileDirectory dirPathFor: imageName).
- (fd fileExists: changesName)
- ifTrue: [changes := fd oldFileNamed: changesName].
- changes ifNotNil:[^changes].
-
- "look for the changes in the default directory"
- fd := DefaultDirectory.
- (fd fileExists: changesName)
- ifTrue: [changes := fd oldFileNamed: changesName].
- changes ifNotNil:[^changes].
-
- "look for read-only changes in the image directory"
- fd := FileDirectory on: (FileDirectory dirPathFor: imageName).
- (fd fileExists: changesName)
- ifTrue: [changes := fd readOnlyFileNamed: changesName].
- changes ifNotNil:[^changes].
-
- "look for read-only changes in the default directory"
- fd := DefaultDirectory.
- (fd fileExists: changesName)
- ifTrue: [changes := fd readOnlyFileNamed: changesName].
- "this may be nil if the last try above failed to open a file"
- ^changes
- !
Item was removed:
- ----- Method: FileDirectory class>>openSources:andChanges:forImage: (in category '*System-Files') -----
- openSources: sourcesName andChanges: changesName forImage: imageName
- "Open the changes and sources files and install them in SourceFiles. Inform the user of problems regarding write permissions or CR/CRLF mixups."
- "Note: SourcesName and imageName are full paths; changesName is a
- local name."
- | sources changes msg wmsg |
- msg := 'Squeak cannot locate &fileRef.
-
- Please check that the file is named properly and is in the
- same directory as this image.'.
- wmsg := 'Squeak cannot write to &fileRef.
-
- Please check that you have write permission for this file.
-
- You won''t be able to save this image correctly until you fix this.'.
-
- sources := self openSources: sourcesName forImage: imageName.
- changes := self openChanges: changesName forImage: imageName.
-
- ((sources == nil or: [sources atEnd])
- and: [Preferences valueOfFlag: #warnIfNoSourcesFile])
- ifTrue: [Smalltalk platformName = 'Mac OS'
- ifTrue: [msg := msg , '
- Make sure the sources file is not an Alias.'].
- self inform: (msg copyReplaceAll: '&fileRef' with: 'the sources file named ' , sourcesName)].
-
- (changes == nil
- and: [Preferences valueOfFlag: #warnIfNoChangesFile])
- ifTrue: [self inform: (msg copyReplaceAll: '&fileRef' with: 'the changes file named ' , changesName)].
-
- ((Preferences valueOfFlag: #warnIfNoChangesFile) and: [changes notNil])
- ifTrue: [changes isReadOnly
- ifTrue: [self inform: (wmsg copyReplaceAll: '&fileRef' with: 'the changes file named ' , changesName)].
-
- ((changes next: 200)
- includesSubstring: String crlf)
- ifTrue: [self inform: 'The changes file named ' , changesName , '
- has been injured by an unpacking utility. Crs were changed to CrLfs.
- Please set the preferences in your decompressing program to
- "do not convert text files" and unpack the system again.']].
-
- SourceFiles := Array with: sources with: changes!
Item was removed:
- ----- Method: FileDirectory class>>openSources:forImage: (in category '*System-Files') -----
- openSources: fullSourcesName forImage: imageName
- "We first do a check to see if a compressed version ofthe sources file is present.
- Open the .sources file read-only after searching in:
- a) the directory where the VM lives
- b) the directory where the image came from
- c) the DefaultDirectory (which is likely the same as b unless the SecurityManager has changed it).
- "
-
- | sources fd sourcesName |
- (fullSourcesName endsWith: 'sources') ifTrue:
- ["Look first for a sources file in compressed format."
- sources := self openSources: (fullSourcesName allButLast: 7) , 'stc'
- forImage: imageName.
- sources ifNotNil: [^ CompressedSourceStream on: sources]].
-
- sourcesName := FileDirectory localNameFor: fullSourcesName.
- "look for the sources file or an alias to it in the VM's directory"
- fd := FileDirectory on: Smalltalk vmPath.
- (fd fileExists: sourcesName)
- ifTrue: [sources := fd readOnlyFileNamed: sourcesName].
- sources ifNotNil: [^ sources].
- "look for the sources file or an alias to it in the image directory"
- fd := FileDirectory on: (FileDirectory dirPathFor: imageName).
- (fd fileExists: sourcesName)
- ifTrue: [sources := fd readOnlyFileNamed: sourcesName].
- sources ifNotNil: [^ sources].
- "look for the sources in the current directory"
- fd := DefaultDirectory.
- (fd fileExists: sourcesName)
- ifTrue: [sources := fd readOnlyFileNamed: sourcesName].
- "sources may still be nil here"
- ^sources
- !
Item was removed:
- ----- Method: SmalltalkImage>>locateSourcesEntry (in category 'image, changes names') -----
- locateSourcesEntry
- | sourcesFilename |
- sourcesFilename := SourceFileVersionString , FileDirectory dot , 'sources'.
- ^ {Smalltalk vmPath.
- FileDirectory default fullName, FileDirectory slash}
- detect: [ : each | (each , sourcesFilename) asDirectoryEntry notNil ]
- ifFound: [ : foundPath | (foundPath , sourcesFilename) asDirectoryEntry ]
- ifNone: [ nil ]!
Item was added:
+ ----- Method: SmalltalkImage>>locateSourcesEntry: (in category 'image, changes names') -----
+ locateSourcesEntry: sourcesFilename
+ "Locate sources file entry, looking first in the VM path directory, then in the image
+ directory, and finally in some well-known locations for various OS platforms"
+
+ ^ self sourcesFilePaths
+ detect: [ : each | (each , sourcesFilename) asDirectoryEntry notNil ]
+ ifFound: [ : foundPath | (foundPath , sourcesFilename) asDirectoryEntry ]
+ ifNone: [ nil ]!
Item was added:
+ ----- Method: SmalltalkImage>>openChanges:forImage: (in category 'image, changes names') -----
+ openChanges: changesName forImage: imageName
+ "find the changes file by looking in
+ a) the directory derived from the image name
+ b) the DefaultDirectory (which will normally be the directory derived from the image name or the SecurityManager's choice)
+ If an old file is not found in either place, check for a read-only file in the same places. If that fails, return nil"
+ | changes fd |
+ "look for the changes file or an alias to it in the image directory"
+ fd := FileDirectory on: (FileDirectory dirPathFor: imageName).
+ (fd fileExists: changesName)
+ ifTrue: [changes := fd oldFileNamed: changesName].
+ changes ifNotNil:[^changes].
+
+ "look for the changes in the default directory"
+ fd := FileDirectory default.
+ (fd fileExists: changesName)
+ ifTrue: [changes := fd oldFileNamed: changesName].
+ changes ifNotNil:[^changes].
+
+ "look for read-only changes in the image directory"
+ fd := FileDirectory on: (FileDirectory dirPathFor: imageName).
+ (fd fileExists: changesName)
+ ifTrue: [changes := fd readOnlyFileNamed: changesName].
+ changes ifNotNil:[^changes].
+
+ "look for read-only changes in the default directory"
+ fd := FileDirectory default.
+ (fd fileExists: changesName)
+ ifTrue: [changes := fd readOnlyFileNamed: changesName].
+ "this may be nil if the last try above failed to open a file"
+ ^changes
+ !
Item was changed:
----- Method: SmalltalkImage>>openSourceFiles (in category 'sources, changes log') -----
openSourceFiles
-
self imageName = LastImageName ifFalse:
["Reset the author initials to blank when the image gets moved"
LastImageName := self imageName.
Utilities authorInitials: ''].
+ self
+ openSourcesAndChanges: self changesName
- FileDirectory
- openSources: self sourcesName
- andChanges: self changesName
forImage: LastImageName.
SourceFileArray install!
Item was added:
+ ----- Method: SmalltalkImage>>openSources (in category 'image, changes names') -----
+ openSources
+ "Open a sources file from one of several possible locations. Check first for
+ a compressed sources file and use that if available."
+
+ (self locateSourcesEntry: self sourcesCompressedFileName)
+ ifNotNil: [ :entry | ^ CompressedSourceStream on: entry readStream ].
+ (self locateSourcesEntry: self sourcesFileName)
+ ifNotNil: [ :entry | ^ entry readStream ].
+ ^nil.
+ !
Item was added:
+ ----- Method: SmalltalkImage>>openSourcesAndChanges:forImage: (in category 'image, changes names') -----
+ openSourcesAndChanges: changesName forImage: imageName
+ "Open the changes and sources files and install them in SourceFiles. Inform the user of problems regarding write permissions or CR/CRLF mixups."
+ "Note: SourcesName and imageName are full paths; changesName is a
+ local name."
+ | sources changes msg wmsg |
+ msg := 'Squeak cannot locate &fileRef.
+
+ Please check that the file is named properly and is in the
+ same directory as this image.'.
+ wmsg := 'Squeak cannot write to &fileRef.
+
+ Please check that you have write permission for this file.
+
+ You won''t be able to save this image correctly until you fix this.'.
+
+ sources := Smalltalk openSources.
+ changes := Smalltalk openChanges: changesName forImage: imageName.
+
+ ((sources == nil or: [sources atEnd])
+ and: [Preferences valueOfFlag: #warnIfNoSourcesFile])
+ ifTrue: [Smalltalk platformName = 'Mac OS'
+ ifTrue: [msg := msg , '
+ Make sure the sources file is not an Alias.'].
+ self inform: (msg copyReplaceAll: '&fileRef' with: 'the sources file named ' , self sourcesName)].
+
+ (changes == nil
+ and: [Preferences valueOfFlag: #warnIfNoChangesFile])
+ ifTrue: [self inform: (msg copyReplaceAll: '&fileRef' with: 'the changes file named ' , changesName)].
+
+ ((Preferences valueOfFlag: #warnIfNoChangesFile) and: [changes notNil])
+ ifTrue: [changes isReadOnly
+ ifTrue: [self inform: (wmsg copyReplaceAll: '&fileRef' with: 'the changes file named ' , changesName)].
+
+ ((changes next: 200)
+ includesSubstring: String crlf)
+ ifTrue: [self inform: 'The changes file named ' , changesName , '
+ has been injured by an unpacking utility. Crs were changed to CrLfs.
+ Please set the preferences in your decompressing program to
+ "do not convert text files" and unpack the system again.']].
+
+ SourceFiles := Array with: sources with: changes!
Item was added:
+ ----- Method: SmalltalkImage>>sourcesCompressedFileName (in category 'image, changes names') -----
+ sourcesCompressedFileName
+ ^SourceFileVersionString , FileDirectory dot, 'stc'
+ !
Item was added:
+ ----- Method: SmalltalkImage>>sourcesFileName (in category 'image, changes names') -----
+ sourcesFileName
+ ^SourceFileVersionString , FileDirectory dot , 'sources'
+ !
Item was added:
+ ----- Method: SmalltalkImage>>sourcesFilePaths (in category 'image, changes names') -----
+ sourcesFilePaths
+ "A list of likely locations for the sources file. Look first in the VM path directory, then
+ in the image directory, and finally in some well-known locations for this OS platform"
+
+ | paths vmPath imagePath defaultPath |
+ paths := OrderedCollection new.
+ paths add: (vmPath := self vmPath).
+ paths add: (imagePath := self imagePath, FileDirectory slash).
+ imagePath = (defaultPath := FileDirectory default fullName, FileDirectory slash)
+ ifFalse: ["imagePath and defaultPath are usually the same"
+ paths add: defaultPath].
+ ('/usr/*/lib/*' match: vmPath)
+ ifTrue: ["Unix platform with VM installed in system directories"
+ paths
+ add: '/usr/share/squeak/';
+ add: '/usr/local/share/squeak/' ].
+ "Well known paths for other platform types may be added here"
+
+ ^paths
+ !
Item was changed:
----- Method: SmalltalkImage>>sourcesName (in category 'image, changes names') -----
sourcesName
"Answer the full path to the version-stable source code if it exists, otherwise the desired location"
+ ^ (self locateSourcesEntry: self sourcesFileName)
+ ifNil: [ self vmPath , self sourcesFileName ]
- ^ self locateSourcesEntry
- ifNil: [ self vmPath , SourceFileVersionString , FileDirectory dot , 'sources' ]
ifNotNil: [ : entry | entry fullName ]!