On 2010-08-08, at 22:44:42, Tetsuro KURITA wrote:
History and other systems show that it's a good way to avoid hardcode paths to libraries.
What I'd like all you library loader developers to do is use my suggestion for a shared property list which contains user designated library folders and his or her search configurations. That way folks can keep track of their own stuff easily and put it anywhere they want.
Tommy has indicated that he's on board and I have been paying attention to his posts. The shell tool at:
creates version 0.3 of the property list as an example.
I feel it has some improvements to the previous one in terms of clarity for users and an easier implementation for developers. For ease of discussion, the XML at the end of this post provides a compact description of everything you get from the scptlibplist tool and comments are welcome.
###
For version 0.4, I will accommodate your remark about hard coded paths. I will add Alias and Bookmark path description possibilities so that library loaders can have the best possible chance to resolve the folder paths. The XML description will look something like:
<library name="Library A"> <property type="furl" name="Alias" value="9902ED3E-8F8F42698621F7B941EFF1C3…FC2858D507C046A5953B63615AC5388B"/> <property type="bool" name="SearchRecursively" value="yes"/> <property type="bool" name="AllowOverrides" value="no"/> </library>
<library name="Library B"> <property type="bmrk" name="Bookmark" value="9902ED3E-8F8F42698621F7B941EFF1C3…FC2858D507C046A5953B63615AC5388B"/> <property type="bool" name="SearchRecursively" value="yes"/> <property type="bool" name="AllowOverrides" value="no"/> </library>
###
Two new functions in OSA.h for 10.6:
OSAGetScriptDataFromURL(); OSALoadScriptData()
###
Note that when the shared property list format goes to version 1.0, I can provide any one interested with C code to help with your library loader implementation.
### Current XML description ###
<?xml version="1.0" encoding="UTF-8"?>
<info name="info.libraries.osascript" version="0.3"> <array name="DisabledSuffixes"> <string>(Disabled)</string> </array> <property type="text" name="DefaultSearchConfiguration" value="Standard"/> <array name="SearchConfigurations"> <configuration name="Standard"> <string>UserLibrary</string> <string>LocalLibrary</string> </configuration> <configuration name="All Defaults"> <string>UserLibrary</string> <string>LocalLibrary</string> <string>NetworkLibrary</string> </configuration> </array> <array name="Libraries"> <library name="UserLibrary" reserved="yes"> <property type="uri" name="URI" value="Library/Scripts/Modules"/> <property type="bool" name="SearchRecursively" value="yes"/> <property type="bool" name="AllowOverrides" value="no"/> </library> <library name="LocalLibrary" reserved="yes"> <property type="uri" name="URI" value="/Library/Scripts/Modules"/> <property type="bool" name="SearchRecursively" value="yes"/> <property type="bool" name="AllowOverrides" value="yes"/> </library> <library name="NetworkLibrary" reserved="yes"> <property type="uri" name="URI" value="/Network/Library/Scripts/Modules"/> <property type="bool" name="SearchRecursively" value="yes"/> <property type="bool" name="AllowOverrides" value="yes"/> </library> </array> </info>
Philip Aker echo email@hidden@nl | tr a-z@. p-za-o.@
Democracy: Two wolves and a sheep voting on lunch.
|