|
From: creedon <icr...@us...> - 2005-12-11 08:04:17
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/Frontier/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1366 Modified Files: uninstall Log Message: update system menu Index: uninstall =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/Frontier/tools/uninstall,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** uninstall 26 Mar 2005 19:42:50 -0000 1.1.1.1 --- uninstall 11 Dec 2005 08:04:07 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.verbs.builtins.Frontier.tools.uninstall ! on uninstall (f) { ÇUn-install a tool, given the path to the tool's guest database. ÇTuesday, September 26, 2000 at 11:21:55 PM by JES ÇChanges: Ç06/24/02; 3:07:13 PM by JES ÇUn-register any languages which were installed by Frontier.tools.install, when the Tool was installed. Ç06/13/02; 3:40:42 PM by JES ÇUninstall the Tool's callbacks from user.radio.callbacks, if user.radio.callbacks is defined. Ç11/26/01; 11:01:34 PM by JES ÇCall callbacks at user.tools.callbacks.beforeUninstall with address of the Tool's database before uninstalling the Tool. If the callback returns false, don't uninstall the Tool. ÇCall callbacks at user.tools.callbacks.afterUninstall with the path to the Tool's database, after installing the Tool. The return value is ignored. Ç07/02/01; 2:56:01 AM by JES ÇUninstall windowTypes. Ç04/28/01; 7:44:21 PM by JES ÇUninstall the website framework site in a try block, because user.webserver.responders.websiteFramework may not exist. Ç10/01/00; 11:33:58 PM by PBS ÇMinor cleanups. local (adrTool = @[f]); bundle { //run beforeUninstall callbacks -- if any of the callbacks returns false, don't uninstall the Tool local (adrcallbacks = @user.tools.callbacks.beforeunInstall); local (adrcallback); for adrcallback in adrcallbacks { try { while typeOf (adrcallback^) == addressType { adrcallback = adrcallback^}; if not adrcallback^ (adrTool) { //callback returned false -- don't install return (false)}}}}; //not installed local (name = Frontier.tools.cleanToolName (file.fileFromPath (f))); on getTable (t) { local (adrTable = @adrTool^.[name + t]); return (adrTable)}; on unInstallAddressEntry (adrEntry, expectedAdr = nil) { if defined (adrEntry^) { if typeOf (adrEntry^) == addressType { delete (adrEntry); return (true)}}; return (false)}; on deleteFromTable (adrTable) { ÇDelete the item in the table, if it exists. if defined (adrTable^.[name]) { delete (@adrTable^.[name])}}; on deleteFromSubtables (adrTable) { ÇDelete from all the sub-tables of a table. Callbacks, for instance. local (adr); for adr in adrTable { deleteFromTable (adr)}}; deleteFromTable (@user.webserver.responders); deleteFromTable (@user.betty.rpcHandlers); deleteFromTable (@user.scheduler.threads); try { //websiteFramework responder might not be installed deleteFromTable (@user.webserver.responders.websiteFramework.data.docTree)}; deleteFromTable (@user.scheduler.everyMinute); deleteFromTable (@user.scheduler.hourly); deleteFromTable (@user.scheduler.overnight); deleteFromSubTables (@user.callbacks); if system.environment.isPike { deleteFromSubTables (@user.tools.commandCallbacks)}; if defined (user.radio.callbacks) { deleteFromSubTables (@user.radio.callbacks)}; deleteFromSubTables (@user.html.callbacks.fileWriters.ftp); Frontier.tools.uninstallSubMenu (name); //delete sub-menu from Tools menu bundle { //localizations on uninstallLocalization (adrTable) { local (adr); for adr in adrTable { if typeOf (adr^) == addressType { local (s = string (adr^)); local (addressList = string.parseAddress (s)); local (path = string.lower (addressList [1])); if path endsWith (file.getPathChar () + string.lower (file.fileFromPath (f))) { delete (adr)}}}}; if defined (radio.data.localization.languages) { uninstallLocalization (@radio.data.localization.languages)}; if defined (mainResponder.localization.languages) { uninstallLocalization (@mainResponder.localization.languages)}; if defined (manilaData.localization.languages) { uninstallLocalization (@manilaData.localization.languages)}}; bundle { //nodeTypes -- tricky -- we have to look for the expected file name local (adr); for adr in @user.tools.nodeTypes { if typeOf (adr^) == addressType { local (s = string (adr^)); //convert to string local (addressList = string.parseAddress (s)); local (path = string.lower (addressList [1])); if path endsWith file.getPathChar () + string.lower (file.fileFromPath (f)) { delete (adr)}}}}; //delete this nodetype bundle { //windowTypes -- almost exactly like nodeTypes local (adr); for adr in @user.tools.windowTypes { if typeOf (adr^) == addressType { local (s = string (adr^)); //convert to string local (addressList = string.parseAddress (s)); local (path = string.lower (addressList [1])); if path endsWith file.getPathChar () + string.lower (file.fileFromPath (f)) { delete (adr)}}}}; //delete this windowType bundle { //set to uninstalled if defined (user.tools.databases.[name]) { user.tools.databases.[name].flInstalled = false}}; bundle { //adjust the Tools table at temp.Frontier.tools.[name] if defined (system.temp.Frontier.tools.[name].url) { delete (@system.temp.Frontier.tools.[name].url)}}; bundle { //run afterUninstall callbacks -- the return value is ignored local (adrcallbacks = @user.tools.callbacks.afterUninstall); local (adrcallback); for adrcallback in adrcallbacks { try { while typeOf (adrcallback^) == addressType { adrcallback = adrcallback^}; adrcallback^ (f)}}}; //return value ignored return (true)} \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.verbs.builtins.Frontier.tools.uninstall ! on uninstall (f) { ÇChanges Ç12/9/05; 10:15:17 AM by TAC Çupdate system menu Ç06/24/02; 3:07:13 PM by JES ÇUn-register any languages which were installed by Frontier.tools.install, when the Tool was installed. Ç06/13/02; 3:40:42 PM by JES ÇUninstall the Tool's callbacks from user.radio.callbacks, if user.radio.callbacks is defined. Ç2001 Ç11/26/01; 11:01:34 PM by JES ÇCall callbacks at user.tools.callbacks.beforeUninstall with address of the Tool's database before uninstalling the Tool. If the callback returns false, don't uninstall the Tool. ÇCall callbacks at user.tools.callbacks.afterUninstall with the path to the Tool's database, after installing the Tool. The return value is ignored. Ç07/02/01; 2:56:01 AM by JES ÇUninstall windowTypes. Ç04/28/01; 7:44:21 PM by JES ÇUninstall the website framework site in a try block, because user.webserver.responders.websiteFramework may not exist. Ç10/01/00; 11:33:58 PM by PBS ÇMinor cleanups. Ç9/26/00; 11:21:55 PM by JES Çcreated ÇUn-install a tool, given the path to the tool's guest database. local (adrTool = @[f]); bundle { //run beforeUninstall callbacks -- if any of the callbacks returns false, don't uninstall the Tool local (adrcallbacks = @user.tools.callbacks.beforeunInstall); local (adrcallback); for adrcallback in adrcallbacks { try { while typeOf (adrcallback^) == addressType { adrcallback = adrcallback^}; if not adrcallback^ (adrTool) { //callback returned false -- don't install return (false)}}}}; //not installed local (name = Frontier.tools.cleanToolName (file.fileFromPath (f))); on getTable (t) { local (adrTable = @adrTool^.[name + t]); return (adrTable)}; on unInstallAddressEntry (adrEntry, expectedAdr = nil) { if defined (adrEntry^) { if typeOf (adrEntry^) == addressType { delete (adrEntry); return (true)}}; return (false)}; on deleteFromTable (adrTable) { ÇDelete the item in the table, if it exists. if defined (adrTable^.[name]) { delete (@adrTable^.[name])}}; on deleteFromSubtables (adrTable) { ÇDelete from all the sub-tables of a table. Callbacks, for instance. local (adr); for adr in adrTable { deleteFromTable (adr)}}; deleteFromTable (@user.webserver.responders); deleteFromTable (@user.betty.rpcHandlers); deleteFromTable (@user.scheduler.threads); try { //websiteFramework responder might not be installed deleteFromTable (@user.webserver.responders.websiteFramework.data.docTree)}; deleteFromTable (@user.scheduler.everyMinute); deleteFromTable (@user.scheduler.hourly); deleteFromTable (@user.scheduler.overnight); deleteFromSubTables (@user.callbacks); if system.environment.isPike { deleteFromSubTables (@user.tools.commandCallbacks)}; if defined (user.radio.callbacks) { deleteFromSubTables (@user.radio.callbacks)}; deleteFromSubTables (@user.html.callbacks.fileWriters.ftp); bundle { // menu Frontier.tools.uninstallSubMenu (name); //delete sub-menu from Tools menu menu.addSubMenu (@system.menus.menubar, "", @Frontier.tools.menu)}; bundle { //localizations on uninstallLocalization (adrTable) { local (adr); for adr in adrTable { if typeOf (adr^) == addressType { local (s = string (adr^)); local (addressList = string.parseAddress (s)); local (path = string.lower (addressList [1])); if path endsWith (file.getPathChar () + string.lower (file.fileFromPath (f))) { delete (adr)}}}}; if defined (radio.data.localization.languages) { uninstallLocalization (@radio.data.localization.languages)}; if defined (mainResponder.localization.languages) { uninstallLocalization (@mainResponder.localization.languages)}; if defined (manilaData.localization.languages) { uninstallLocalization (@manilaData.localization.languages)}}; bundle { //nodeTypes -- tricky -- we have to look for the expected file name local (adr); for adr in @user.tools.nodeTypes { if typeOf (adr^) == addressType { local (s = string (adr^)); //convert to string local (addressList = string.parseAddress (s)); local (path = string.lower (addressList [1])); if path endsWith file.getPathChar () + string.lower (file.fileFromPath (f)) { delete (adr)}}}}; //delete this nodetype bundle { //windowTypes -- almost exactly like nodeTypes local (adr); for adr in @user.tools.windowTypes { if typeOf (adr^) == addressType { local (s = string (adr^)); //convert to string local (addressList = string.parseAddress (s)); local (path = string.lower (addressList [1])); if path endsWith file.getPathChar () + string.lower (file.fileFromPath (f)) { delete (adr)}}}}; //delete this windowType bundle { //set to uninstalled if defined (user.tools.databases.[name]) { user.tools.databases.[name].flInstalled = false}}; bundle { //adjust the Tools table at temp.Frontier.tools.[name] if defined (system.temp.Frontier.tools.[name].url) { delete (@system.temp.Frontier.tools.[name].url)}}; bundle { //run afterUninstall callbacks -- the return value is ignored local (adrcallbacks = @user.tools.callbacks.afterUninstall); local (adrcallback); for adrcallback in adrcallbacks { try { while typeOf (adrcallback^) == addressType { adrcallback = adrcallback^}; adrcallback^ (f)}}}; //return value ignored return (true)} \ No newline at end of file |