|
From: creedon <icr...@us...> - 2005-06-13 22:27:56
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/Frontier/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11277 Modified Files: startup Log Message: comment test code bundle Index: startup =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/Frontier/tools/startup,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** startup 26 Mar 2005 19:42:49 -0000 1.1.1.1 --- startup 13 Jun 2005 22:27:46 -0000 1.2 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.verbs.builtins.Frontier.tools.startup ! on startup () { ÇInstall every Tool that is enabled. Uninstall every Tool that is disabled. Ç01/06/01; 7:03:27 PM by PBS ÇChanges: Ç3/31/02; 3:41:01 AM by JES ÇWrite out nodeTypes' custom icons within a try block, in case the nodeType no longer exists. Prevents errors at startup after a nodeType has been deleted. Ç11/30/01; 5:01:11 PM by JES ÇInstall Tools in a try statement. Ç8/21/01; 12:08:46 AM by JES ÇIf no Tools are installed, then call system.menus.buildMenuBar so that the Tools menu will appear in the menu bar, regardless of wheteher there are any Tools installed. Ç7/12/01; 3:45:38 AM by JES ÇWhen writing out custom icons, dive into addresses of nodeType tables. Ç2/13/01; 2:17:54 PM by PBS ÇDon't install Tools such as Music.root, StaticSites.root, etc. Ç2/12/01; 12:13:40 PM by PBS ÇCheck if Music.root exists in the Tools folder before attempting to build the Player app sub-menu. This prevents a scriptError during startup if you don't have or have moved Music.root. Frontier.tools.init (); //11/28/00 JES bundle { //PBS 08/16/00: write out custom icons ÇCustom icons are written to the [program folder]/Appearance/Icons/ directory. Ç04/18/2001 JES: cribbed from startup.startupScript in Radio local (appFolder = file.folderFromPath (Frontier.getProgramPath ())); local (pc = file.getPathChar ()); local (iconsFolder = appFolder + "Appearance" + pc + "Icons" + pc); file.sureFilePath (iconsFolder); //make sure path to folder exists file.sureFolder (iconsFolder); //make sure the folder exists local (adrTable); local (platform = "windows"); if system.environment.isMac { platform = "mac"}; local (adrItem); for adrItem in @Frontier.tools.data.nodeTypes { try { //don't fail when a nodeType no longer exists while typeOf (adrItem^) == addressType { adrItem = adrItem^}; if defined (adrItem^.icon) { local (adrIcon = @adrItem^.icon.[platform]); if defined (adrIcon^) { local (itemName = nameOf (adrItem^)); local (fname = itemName); if system.environment.isWindows { fname = fname + ".bmp"}; local (f = iconsFolder + fname); if not (file.exists (f)) { //write only if file does not exist if system.environment.isWindows { file.writeWholeFile (f, adrIcon^)}; if system.environment.isMac { //write to resource fork file.writeWholeFile (f, "", 'rsrc', 'RSED'); //type is resource, creator is ResEdit local (adrResource); for adrResource in adrIcon { //write each resource rez.putResource (f, getBinaryType (adrResource^), 128, adrResource)}}}}}}}}; try { //11/28/00 JES: lock a semaphore to prevent race conditions semaphore.lock (this, 7200)} else { semaphore.unlock (this)}; if system.environment.isPike { Frontier.tools.menu = Frontier.tools.data.virginRadioToolsMenu} else { Frontier.tools.menu = Frontier.tools.data.virginToolsMenu}; local (toolsFolder = Frontier.tools.getToolsFolderPath ()); local (f, flRebuildMenuBar = true); fileloop (f in toolsFolder) { //install new and changed tools local (fname = file.fileFromPath (f)); if string.lower (fname) endsWith ".root" { try { Frontier.tools.uninstall (f); if Frontier.tools.isEnabled (f) { Frontier.tools.install (f); //now install it flRebuildMenuBar = false}}}}; bundle { //uninstall removed tools local (adrDatabase); for adrDatabase in @user.tools.databases { local (flUninstall = false); if not (file.exists (adrDatabase^.path)) { flUninstall = true}; if string.lower (file.folderFromPath (adrDatabase^.path)) != string.lower (toolsFolder) { flUninstall = true}; if flUninstall { Frontier.tools.uninstall (adrDatabase^.path)}}}; bundle { //special case for Music tool -- build Player submenu if file.exists (toolsFolder + "Music.root") { //PBS 02/12/01: skip if the Music Tool doesn't exist if Frontier.tools.isEnabled (toolsFolder + "Music.root") { MusicSuite.buildPlayerSubmenu ()}}}; semaphore.unlock (this); //11/28/00 JES if flRebuildMenuBar { //08/21/01 JES: make sure the Tools menu is installed. system.menus.buildMenuBar ()}; return (true)}; bundle { //testing startup ()} \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.verbs.builtins.Frontier.tools.startup ! on startup () { ÇInstall every Tool that is enabled. Uninstall every Tool that is disabled. ÇChanges Ç3/31/02; 3:41:01 AM by JES ÇWrite out nodeTypes' custom icons within a try block, in case the nodeType no longer exists. Prevents errors at startup after a nodeType has been deleted. Ç11/30/01; 5:01:11 PM by JES ÇInstall Tools in a try statement. Ç8/21/01; 12:08:46 AM by JES ÇIf no Tools are installed, then call system.menus.buildMenuBar so that the Tools menu will appear in the menu bar, regardless of wheteher there are any Tools installed. Ç7/12/01; 3:45:38 AM by JES ÇWhen writing out custom icons, dive into addresses of nodeType tables. Ç2/13/01; 2:17:54 PM by PBS ÇDon't install Tools such as Music.root, StaticSites.root, etc. Ç2/12/01; 12:13:40 PM by PBS ÇCheck if Music.root exists in the Tools folder before attempting to build the Player app sub-menu. This prevents a scriptError during startup if you don't have or have moved Music.root. Ç01/06/01; 7:03:27 PM by PBS Frontier.tools.init (); //11/28/00 JES bundle { //PBS 08/16/00: write out custom icons ÇCustom icons are written to the [program folder]/Appearance/Icons/ directory. Ç04/18/2001 JES: cribbed from startup.startupScript in Radio local (appFolder = file.folderFromPath (Frontier.getProgramPath ())); local (pc = file.getPathChar ()); local (iconsFolder = appFolder + "Appearance" + pc + "Icons" + pc); file.sureFilePath (iconsFolder); //make sure path to folder exists file.sureFolder (iconsFolder); //make sure the folder exists local (adrTable); local (platform = "windows"); if system.environment.isMac { platform = "mac"}; local (adrItem); for adrItem in @Frontier.tools.data.nodeTypes { try { //don't fail when a nodeType no longer exists while typeOf (adrItem^) == addressType { adrItem = adrItem^}; if defined (adrItem^.icon) { local (adrIcon = @adrItem^.icon.[platform]); if defined (adrIcon^) { local (itemName = nameOf (adrItem^)); local (fname = itemName); if system.environment.isWindows { fname = fname + ".bmp"}; local (f = iconsFolder + fname); if not (file.exists (f)) { //write only if file does not exist if system.environment.isWindows { file.writeWholeFile (f, adrIcon^)}; if system.environment.isMac { //write to resource fork file.writeWholeFile (f, "", 'rsrc', 'RSED'); //type is resource, creator is ResEdit local (adrResource); for adrResource in adrIcon { //write each resource rez.putResource (f, getBinaryType (adrResource^), 128, adrResource)}}}}}}}}; try { //11/28/00 JES: lock a semaphore to prevent race conditions semaphore.lock (this, 7200)} else { semaphore.unlock (this)}; if system.environment.isPike { Frontier.tools.menu = Frontier.tools.data.virginRadioToolsMenu} else { Frontier.tools.menu = Frontier.tools.data.virginToolsMenu}; local (toolsFolder = Frontier.tools.getToolsFolderPath ()); local (f, flRebuildMenuBar = true); fileloop (f in toolsFolder) { //install new and changed tools local (fname = file.fileFromPath (f)); if string.lower (fname) endsWith ".root" { try { Frontier.tools.uninstall (f); if Frontier.tools.isEnabled (f) { Frontier.tools.install (f); //now install it flRebuildMenuBar = false}}}}; bundle { //uninstall removed tools local (adrDatabase); for adrDatabase in @user.tools.databases { local (flUninstall = false); if not (file.exists (adrDatabase^.path)) { flUninstall = true}; if string.lower (file.folderFromPath (adrDatabase^.path)) != string.lower (toolsFolder) { flUninstall = true}; if flUninstall { Frontier.tools.uninstall (adrDatabase^.path)}}}; bundle { //special case for Music tool -- build Player submenu if file.exists (toolsFolder + "Music.root") { //PBS 02/12/01: skip if the Music Tool doesn't exist if Frontier.tools.isEnabled (toolsFolder + "Music.root") { MusicSuite.buildPlayerSubmenu ()}}}; semaphore.unlock (this); //11/28/00 JES if flRebuildMenuBar { //08/21/01 JES: make sure the Tools menu is installed. system.menus.buildMenuBar ()}; return (true)}; Çbundle //testing Çstartup () \ No newline at end of file |