'From Squeak3.0 of 4 February 2001 [latest update: #3414] on 5 February 2001 at 10:12:28 pm'! "Change Set: NewChanges Date: 5 February 2001 Author: Dan Ingalls Provides a facility for condenseSources to install a new name for the source code file. Includes the code for MakeExternalRelease. Removes the classes ColumnsTester and Flipper. Removes the obsolete preference: #allowMVCprojects. Enables the preference #mvcProjectsAllowed. "! IdentityDictionary subclass: #SystemDictionary instanceVariableNames: 'cachedClassNames ' classVariableNames: 'LastImageName LastQuitLogPosition LowSpaceProcess LowSpaceSemaphore MemoryHogs ShutDownList SourceFileVersionString SpecialSelectors StartUpList StartupStamp SystemChanges VersionString ' poolDictionaries: '' category: 'System-Support'! !SystemDictionary methodsFor: 'housekeeping' stamp: 'di 2/5/2001 22:16'! makeExternalRelease "Smalltalk makeExternalRelease" (self confirm: self version , ' Is this the correct version designation? If not, choose no, and fix it.') ifFalse: [^ self]. "Object classPool at: #DependentsFields" Smalltalk reclaimDependents. Preferences enable: #mvcProjectsAllowed. Preferences enable: #fastDragWindowForMorphic. Browser initialize. Undeclared isEmpty ifFalse: [self halt]. ScriptingSystem deletePrivateGraphics. #(Helvetica Palatino Courier) do: [:n | TextConstants removeKey: n ifAbsent: []]. (Utilities classPool at: #UpdateUrlLists) copy do: [:pair | (pair first includesSubstring: 'Disney' caseSensitive: false) ifTrue: [ (Utilities classPool at: #UpdateUrlLists) remove: pair]]. (ServerDirectory serverNames copyWithoutAll: #('UCSBCreateArchive' 'UIUCArchive' 'UpdatesExtUIUC' 'UpdatesExtWebPage')) do: [:sn | ServerDirectory removeServerNamed: sn]. Smalltalk garbageCollect. Smalltalk obsoleteClasses isEmpty ifFalse: [self halt]. Symbol rehash. self halt: 'Ready to condense changes or sources'.! ! !Browser methodsFor: 'message list' stamp: 'di 2/5/2001 22:04'! validateMessageSource: selector | sourcesName | (self selectedClass compilerClass == Object compilerClass and: [(contents asString findString: selector keywords first ) ~= 1]) ifTrue: [sourcesName _ FileDirectory localNameFor: Smalltalk sourcesName. PopUpMenu notify: 'There may be a problem with your sources file!! The source code for every method should start with the method selector but this is not the case!! You may proceed with caution but it is recommended that you get a new source file. This can happen if you download the "' , sourcesName , '" file, or the ".changes" file you use, as TEXT. It must be transfered in BINARY mode, even if it looks like a text file, to preserve the CR line ends. Mac users: This may have been caused by Stuffit Expander. To prevent the files above to be converted to Mac line ends when they are expanded, do this: Start the program, then from Preferences... in the File menu, choose the Cross Platform panel, then select "Never" and press OK. Then expand the compressed archive again.'].! ! !SystemDictionary methodsFor: 'housekeeping' stamp: 'di 2/5/2001 22:10'! condenseSources "Smalltalk condenseSources" "Move all the changes onto a compacted sources file." | f classCount dir newVersionString | dir _ FileDirectory default. newVersionString _ FillInTheBlank request: 'Please designate the version for the new source code file...' initialAnswer: SourceFileVersionString. newVersionString ifNil: [^ self]. newVersionString = SourceFileVersionString ifTrue: [^ self error: 'The new source file must not be the same as the old.']. SourceFileVersionString _ newVersionString. "Write all sources with fileIndex 1" f _ FileStream newFileNamed: self sourcesName. f header; timeStamp. 'Condensing Sources File...' displayProgressAt: Sensor cursorPoint from: 0 to: Smalltalk classNames size during: [:bar | classCount _ 0. Smalltalk allClassesDo: [:class | bar value: (classCount _ classCount + 1). class fileOutOn: f moveSource: true toFile: 1]]. f trailer; close. "Make a new empty changes file" self closeSourceFiles. dir rename: self changesName toBe: self changesName , '.old'. (FileStream newFileNamed: self changesName) header; timeStamp; close. LastQuitLogPosition _ 0. self setMacFileInfoOn: self changesName. self setMacFileInfoOn: self sourcesName. self openSourceFiles. SelectionMenu notify: 'Source files have been rewritten!! Check that all is well, and then save/quit.'! ! !SystemDictionary methodsFor: 'image, changes name' stamp: 'di 2/5/2001 21:43'! sourcesName "Answer the full path to the version-stable source code" ^ self vmPath , SourceFileVersionString , FileDirectory dot , 'sources'! ! Smalltalk removeClassNamed: #ColumnsTester! Smalltalk removeClassNamed: #Flipper! Preferences deletePreference: #allowMVCprojects! Preferences enable: #mvcProjectsAllowed! "Postscript: Initialize SourceFileVersionString." SystemDictionary classPool at: #SourceFileVersionString put: ((SourceFiles first name allButLast: 8) last: 8)!