'From Squeak3.8alpha of ''17 July 2004'' [latest update: #6268] on 26 September 2004 at 1:40:01 pm'! "Change Set: KCPCleanSystDict005 Date: 26 September 2004 Author: Stephane ducasse First version of ReleaseBuilder.... Move some misplace SystemDictionary methods there. Now we can move all the discard methods from SystemDictionary there."! Object subclass: #ReleaseBuilder instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'System-Support'! !ReleaseBuilder commentStamp: '' prior: 0! I'm responsible to help people releasing various distribution of Squeak! !ReleaseBuilder methodsFor: 'utilities' stamp: 'sd 9/26/2004 13:37'! fixObsoleteReferences "ReleaseBuilder new fixObsoleteReferences" | informee obsoleteBindings obsName realName realClass | Preference allInstances do: [:each | informee _ each instVarNamed: #changeInformee. ((informee isKindOf: Behavior) and: [informee isObsolete]) ifTrue: [ Transcript show: each name; cr. each instVarNamed: #changeInformee put: (Smalltalk at: (informee name copyReplaceAll: 'AnObsolete' with: '') asSymbol)]]. CompiledMethod allInstances do: [:method | obsoleteBindings _ method literals select: [:literal | literal isVariableBinding and: [literal value isBehavior] and: [literal value isObsolete]]. obsoleteBindings do: [:binding | obsName _ binding value name. Transcript show: obsName; cr. realName _ obsName copyReplaceAll: 'AnObsolete' with: ''. realClass _ Smalltalk at: realName asSymbol ifAbsent: [UndefinedObject]. binding isSpecialWriteBinding ifTrue: [binding privateSetKey: binding key value: realClass] ifFalse: [binding key: binding key value: realClass]]]. Behavior flushObsoleteSubclasses. Smalltalk garbageCollect; garbageCollect. SystemNavigation default obsoleteBehaviors size > 0 ifTrue: [SystemNavigation default inspect]! ! !ReleaseBuilder methodsFor: 'squeakland' stamp: 'sd 9/26/2004 13:35'! makeSqueaklandRelease "ReleaseBuilder new makeSqueaklandRelease" self makeSqueaklandReleasePhasePrepare; makeSqueaklandReleasePhaseStripping; makeSqueaklandReleasePhaseFinalSettings; makeSqueaklandReleasePhaseCleanup! ! !ReleaseBuilder methodsFor: 'squeakland' stamp: 'sd 9/26/2004 13:36'! makeSqueaklandReleasePhaseCleanup "ReleaseBuilder new makeSqueaklandReleasePhaseCleanup" Browser initialize. ChangeSorter removeChangeSetsNamedSuchThat: [:cs| cs name ~= ChangeSet current name]. ChangeSet current clear. ChangeSet current name: 'Unnamed1'. Smalltalk garbageCollect. "Reinitialize DataStream; it may hold on to some zapped entitities" DataStream initialize. "Remove existing player references" References keys do:[:k| References removeKey: k]. Smalltalk garbageCollect. ScheduledControllers _ nil. Behavior flushObsoleteSubclasses. Smalltalk garbageCollect; garbageCollect. Smalltalk obsoleteBehaviors isEmpty ifFalse:[self error:'Still have obsolete behaviors']. "Reinitialize DataStream; it may hold on to some zapped entitities" DataStream initialize. Smalltalk fixObsoleteReferences. Smalltalk abandonTempNames. Smalltalk zapAllOtherProjects. Smalltalk forgetDoIts. Smalltalk flushClassNameCache. 3 timesRepeat: [ Smalltalk garbageCollect. Symbol compactSymbolTable. ]. ! ! !ReleaseBuilder methodsFor: 'squeakland' stamp: 'sd 9/26/2004 13:36'! makeSqueaklandReleasePhaseFinalSettings "ReleaseBuilder new makeSqueaklandReleasePhaseFinalSettings" | serverName serverURL serverDir updateServer highestUpdate newVersion | ProjectLauncher splashMorph: (FileDirectory default readOnlyFileNamed: 'scripts\SqueaklandSplash.morph') fileInObjectAndCode. "Dump all morphs so we don't hold onto anything" World submorphsDo:[:m| m delete]. #( (honorDesktopCmdKeys false) (warnIfNoChangesFile false) (warnIfNoSourcesFile false) (showDirectionForSketches true) (menuColorFromWorld false) (unlimitedPaintArea true) (useGlobalFlaps false) (mvcProjectsAllowed false) (projectViewsInWindows false) (automaticKeyGeneration true) (securityChecksEnabled true) (showSecurityStatus false) (startInUntrustedDirectory true) (warnAboutInsecureContent false) (promptForUpdateServer false) (fastDragWindowForMorphic false) (externalServerDefsOnly true) (expandedFormat false) (allowCelesteTell false) (eToyFriendly true) (eToyLoginEnabled true) (magicHalos true) (mouseOverHalos true) (biggerHandles false) (selectiveHalos true) (includeSoundControlInNavigator true) (readDocumentAtStartup true) (preserveTrash true) (slideDismissalsToTrash true) ) do:[:spec| Preferences setPreference: spec first toValue: spec last]. "Workaround for bug" Preferences enable: #readDocumentAtStartup. World color: (Color r: 0.9 g: 0.9 b: 1.0). "Clear all server entries" ServerDirectory serverNames do: [:each | ServerDirectory removeServerNamed: each]. SystemVersion current resetHighestUpdate. "Add the squeakalpha update stream" serverName _ 'Squeakalpha'. serverURL _ 'squeakalpha.org'. serverDir _ serverURL , '/'. updateServer _ ServerDirectory new. updateServer server: serverURL; directory: 'updates/'; altUrl: serverDir; user: 'sqland'; password: nil. Utilities updateUrlLists addFirst: {serverName. {serverDir. }.}. "Add the squeakland update stream" serverName _ 'Squeakland'. serverURL _ 'squeakland.org'. serverDir _ serverURL , '/'. updateServer _ ServerDirectory new. updateServer server: serverURL; directory: 'public_html/updates/'; altUrl: serverDir. Utilities updateUrlLists addFirst: {serverName. {serverDir. }.}. highestUpdate _ SystemVersion current highestUpdate. (self confirm: 'Reset highest update (' , highestUpdate printString , ')?') ifTrue: [SystemVersion current highestUpdate: 0]. newVersion _ FillInTheBlank request: 'New version designation:' initialAnswer: 'Squeakland 3.8.' , highestUpdate printString. SystemVersion newVersion: newVersion. (self confirm: self version , ' Is this the correct version designation? If not, choose no, and fix it.') ifFalse: [^ self]. ! ! !ReleaseBuilder methodsFor: 'squeakland' stamp: 'sd 9/26/2004 13:35'! makeSqueaklandReleasePhasePrepare "ReleaseBuilder new makeSqueaklandReleasePhasePrepare" Undeclared removeUnreferencedKeys. StandardScriptingSystem initialize. Preferences initialize. "(Object classPool at: #DependentsFields) size > 1 ifTrue: [self error:'Still have dependents']." Undeclared isEmpty ifFalse: [self error:'Please clean out Undeclared']. "Dump all projects" Project allSubInstancesDo:[:prj| prj == Project current ifFalse:[Project deletingProject: prj]]. "Set new look so we don't need older fonts later" StandardScriptingSystem applyNewEToyLook. Browser initialize. ScriptingSystem deletePrivateGraphics. ChangeSorter removeChangeSetsNamedSuchThat: [:cs| cs name ~= ChangeSet current name]. ChangeSet current clear. ChangeSet current name: 'Unnamed1'. Smalltalk garbageCollect. "Reinitialize DataStream; it may hold on to some zapped entitities" DataStream initialize. "Remove existing player references" References keys do:[:k| References removeKey: k]. Smalltalk garbageCollect. ScheduledControllers _ nil. Smalltalk garbageCollect. ! ! !ReleaseBuilder methodsFor: 'squeakland' stamp: 'sd 9/26/2004 13:35'! makeSqueaklandReleasePhaseStripping "ReleaseBuilder new makeSqueaklandReleasePhaseStripping" #(#Helvetica #Palatino #Courier #ComicSansMS ) do: [:n | TextConstants removeKey: n ifAbsent: []]. Smalltalk at: #Player ifPresent: [:superCls | superCls allSubclassesDo: [:cls | cls isSystemDefined ifFalse: [cls removeFromSystem]. cls := nil]]. Smalltalk garbageCollect. Smalltalk discardFFI; discardSUnit; discardSpeech; yourself. "discardMVC;" SystemOrganization removeEmptyCategories. Smalltalk garbageCollect. ScheduledControllers := nil. Behavior flushObsoleteSubclasses. Smalltalk garbageCollect; garbageCollect. DataStream initialize. Smalltalk fixObsoleteReferences! ! SystemDictionary removeSelector: #fixObsoleteReferences! SystemDictionary removeSelector: #makeSqueaklandReleasePhaseCleanup! SystemDictionary removeSelector: #makeSqueaklandReleasePhaseFinalSettings! SystemDictionary removeSelector: #makeSqueaklandReleasePhasePrepare! SystemDictionary removeSelector: #makeSqueaklandReleasePhaseStripping! !SystemDictionary reorganize! ('accessing' organization) ('class names' classNamed: classNames flushClassNameCache forgetClass:logged: hasClassNamed: removeClassNamed: renameClass:as: renameClassNamed:as:) ('dictionary access' associationAtOrAbove:ifAbsent: associationOrUndeclaredAt: at:put: atOrAbove:ifAbsent: atOrBelow:ifAbsent: environmentForCategory: includesKeyOrAbove: kernelCategories scopeFor:from:envtAndPathIfFound:) ('housekeeping' cleanOutUndeclared compressSources condenseChanges condenseSources forgetDoIts makeExternalRelease makeInternalRelease makeSqueaklandRelease reclaimDependents reconstructChanges reformatChangesToUTF8 removeAllLineFeeds removeEmptyMessageCategories testFormatter testFormatter2 verifyChanges) ('memory space' bytesLeft bytesLeft: bytesLeftString createStackOverflow createStackOverflow: garbageCollect garbageCollectMost installLowSpaceWatcher lowSpaceThreshold lowSpaceWatcher lowSpaceWatcherProcess memoryHogs okayToProceedEvenIfSpaceIsLow primBytesLeft primLowSpaceSemaphore: primSignalAtBytesLeft: primitiveGarbageCollect signalLowSpace useUpMemory useUpMemoryWithArrays useUpMemoryWithContexts useUpMemoryWithTinyObjects) ('miscellaneous' exitToDebugger handleUserInterrupt hasMorphic logError:inContext:to: m17nVersion nihongoVersion setMacFileInfoOn: verifyMorphicAvailability) ('objects from disk' objectForDataStream: storeDataOn:) ('printing' printElementsOn:) ('retrieving' allClasses allClassesDo: poolUsers) ('shrinking' abandonSources abandonTempNames cleanUpUndoCommands computeImageSegmentation discard3D discardDiscards discardFFI discardFlash discardMIDI discardMVC discardMorphic discardNetworking discardOddsAndEnds discardSUnit discardSoundAndSpeech discardSoundSynthesis discardSpeech discardTrueType discardWonderland lastRemoval majorShrink presumedSentMessages removeAllUnSentMessages removeNormalCruft removeSelector: reportClassAndMethodRemovalsFor: unusedClasses unusedClassesAndMethodsWithout: writeImageSegmentsFrom:withKernel: zapAllOtherProjects zapMVCprojects) ('snapshot and quit' add:toList:after: addToShutDownList: addToShutDownList:after: addToStartUpList: addToStartUpList:after: isMorphic processShutDownList: processStartUpList: quitPrimitive removeFromShutDownList: removeFromStartUpList: send:toClassesNamedIn:with: setGCParameters shutDown shutDownSound snapshotEmbeddedPrimitive snapshotPrimitive unbindExternalPrimitives) ('sources, change log' aboutThisSystem assureStartupStampLogged copyright currentChangeSetString currentProjectDo: datedVersion endianness externalizeSources forceChangesToDisk internalizeChangeLog internalizeSources lastUpdateString recover: systemInformationString timeStamp: writeRecentCharacters:toFileNamed: writeRecentToFile) ('special objects' clearExternalObjects compactClassesArray externalObjects hasSpecialSelector:ifTrueSetByte: recreateSpecialObjectsArray registerExternalObject: specialNargsAt: specialObjectsArray specialSelectorAt: specialSelectorSize specialSelectors unregisterExternalObject:) ('copying' assureUniClass veryDeepCopyWith: vocabularyDemanded) ('deprecated' browseObsoleteMethodReferences changeImageNameTo: changesName clearProfile closeSourceFiles dumpProfile extraVMMemory extraVMMemory: fullNameForChangesNamed: fullNameForImageNamed: getFileNameFromUser getSystemAttribute: getVMParameters imageName imageName: imagePath isBigEndian isLittleEndian lastQuitLogPosition listBuiltinModule: listBuiltinModules listLoadedModule: listLoadedModules logChange: obsoleteBehaviors obsoleteClasses obsoleteMethodReferences openSourceFiles osVersion platformName platformSubtype pointersTo: pointersTo:except: pointersToItem:of: profile: readDocumentFile recompileAllFrom: removeClassFromSystem:logged: saveAs saveAsEmbeddedImage saveAsNewVersion saveChangesInFileNamed: saveImageInFileNamed: saveImageSegments saveSession setPlatformPreferences snapshot:andQuit: snapshot:andQuit:embedded: sourcesName startProfiling stopProfiling swapBytesIn:from:to: testDecompiler unloadModule: version vmParameterAt: vmParameterAt:put: vmPath vmVersion) ('ui' inspectGlobals) ('*Refactory-RBAddonsReasonable') ('image, changes name' primImageName primImageName: primVmPath) ! !ReleaseBuilder reorganize! ('utilities' fixObsoleteReferences) ('squeakland' makeSqueaklandRelease makeSqueaklandReleasePhaseCleanup makeSqueaklandReleasePhaseFinalSettings makeSqueaklandReleasePhasePrepare makeSqueaklandReleasePhaseStripping) !