I want to uninstall the Glamorous Toolkit (to me seems to be overloaded versions of classic Smalltalk tools) in Pharo 4 or 5.
Here is my code:
| config configName |
configName := #ConfigurationOfGTInspectorCore.
config := (MBConfigurationInfo
configurationClass: (Smalltalk globals at: (configName asSymbol)))
configurationRoot: MBConfigurationRoot new;
yourself.
config workingCopy unload
but my script unloads the Configuration, but not the packages or classes and methods it contains, and I want to unload all GT packages in the Configuration.
What am I doing wrong? Any assistance will be greatly appreciated!
Thank you in advance.
I also prefer GT to be optional, the fact the Pharo board is going to impose GT by default in upcoming Pharos makes me think about the transparency process, and how far is a Pharo fork if such policies continues.
That said, GT tools cannot be easily uninstalled (and it takes a lot of time):
Workspace openContents: 'GTPlayground setGTPlaygroundEnabledStatus: false.
" ========== Debuggers ========== "
Nautilus pluginClasses: nil.
SpecDebugger closeAllDebuggers.
GTGenericStackDebugger closeAllDebuggers.
GTGenericStackDebugger setGTDebuggerEnabledStatus: false.
" ========== Miscellany ========== "
GTInspector setGTInspectorEnabledStatus: false.
GTExampleOrganizer stop.
GTEventRecorder cleanUp.
GTEventRecorderSettings cleanUp.
GTSnippets reset.
GTPlayBook reset.
GTPlayBook resetDirectories.
GTSpotter cleanUp.
GTSpotterGlobalShortcut reset.
GlobalIdentifier cleanUp.
Privacy cleanUp.
" ========== QA ========== "
QASettings inspectorPluggin: false.
QASettings spotterPlugin: false.
QAEventCollector unload.
(MCPackage named: ''QualityAssistant'') unload.
" ========== RPackage ========== "
RPackageOrganizer default packageNames
select: [ :each | each beginsWith: ''GT'' ]
thenDo: [ :each |
(MCPackage named: each) unload.
RPackageOrganizer default unregisterPackageNamed: each.
" Possibly unnecessary... "
Smalltalk removeEmptyMessageCategories.
Smalltalk cleanOutUndeclared.
Smalltalk fixObsoleteReferences.
Smalltalk globals flushClassNameCache ].
Behavior flushEvents.
Behavior flushObsoleteSubclasses.
SmalltalkImage current resetTools.'