|
From: creedon <icr...@us...> - 2006-02-15 05:12:02
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/Frontier In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15418 Modified Files: installApp Log Message: relative path handling on Windows is pretty messed up, work around the issue set relativePath to relative path first thing changed f to relativePath Index: installApp =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/Frontier/installApp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** installApp 13 Aug 2005 19:14:35 -0000 1.2 --- installApp 15 Feb 2006 05:11:51 -0000 1.3 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.verbs.builtins.Frontier.installApp ! on installApp (appRoot, flRunStartupScript = true) { ÇChanges Ç7/17/05; 5:35:23 PM by TAC Çstore f as relative path, more portable in that one can move folder around with less hassle Ç6/13/05; 4:26:18 PM by TAC Çmoved from userland table Ç11/28/04; 7:51:35 PM by TAC Çadded flRunStartupScript Ç10/26/99; 6:18:10 PM by PBS Çcreated ÇInstall one app in the Guest Databases/apps/ folder. ÇappRoot is the name of the gdb, as in mainResponder.root or manila.root. ÇThis script: Ç1) Open the gdb if it's not open. Ç2) Creates an entry in user.databases. Ç3) Runs the startup script. local (f = Frontier.getSubFolder ("apps") + appRoot); if not defined ([f]) { fileMenu.open (f, true)}; //open it hidden ÇAdd an entry to the user.databases table. local (adrTable = @user.databases.[appRoot]); new (tableType, adrTable); adrTable^.f = file.getPathChar () + (f - Frontier.pathString); adrTable^.openOnStartup = true; adrTable^.runStartupScript = true; adrTable^.supportsSubscribe = false; if flRunStartupScript { // 11/28/04; 7:52:05 PM by TAC - run the startup script adrStartupScript = @[f].["#startup"]; if defined (adrStartupScript^) { adrStartupScript^ ()}}; //run the startup script return (true)} \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.verbs.builtins.Frontier.installApp ! on installApp (appRoot, flRunStartupScript = true, subFolderName = "apps") { ÇChanges Ç2/14/06; 4:14:05 PM by TAC Çrelative path handling on Windows is pretty messed up, work around the issue Çset relativePath to relative path first thing Çchanged f to relativePath Ç2/8/06 by SSL Çadded file.exists test (caveat: assumes that failing silently is ok; others may disagree) Çadded subFolderName, can be used for prefs.root (in "www") Ç7/17/05; 5:35:23 PM by TAC Çstore f as relative path, more portable in that one can move folder around with less hassle Ç6/13/05; 4:26:18 PM by TAC Çmoved from userland table Ç11/28/04; 7:51:35 PM by TAC Çadded flRunStartupScript Ç10/26/99; 6:18:10 PM by PBS Çcreated ÇInstall one app in the Guest Databases/apps/ folder. ÇappRoot is the name of the gdb, as in mainResponder.root or manila.root. ÇThis script: Ç1) Open the gdb if it's not open. Ç2) Creates an entry in user.databases. Ç3) Runs the startup script. local (relativePath = file.getPathChar () + ((Frontier.getSubFolder (subFolderName) + appRoot) - Frontier.pathString), fullPath = relativePath); if system.environment.isWindows { if fullPath [1] == '\\' { delete (@fullPath [1])}}; fullPath = string (fileSpec (fullPath)); if file.exists (fullPath) { if not (defined ([fullPath])) { fileMenu.open (relativePath, true)}; //open it hidden ÇAdd an entry to the user.databases table. local (adrTable = @user.databases.[appRoot]); new (tableType, adrTable); adrTable^.f = relativePath; adrTable^.openOnStartup = true; adrTable^.runStartupScript = true; adrTable^.supportsSubscribe = false; if flRunStartupScript { adrStartupScript = @[fullPath].["#startup"]; if defined (adrStartupScript^) { adrStartupScript^ ()}}; //run the startup script return (true)} else { return (false)}} \ No newline at end of file |