RE: RE: RE: Installing package "SpreadOption`"
- To: mathgroup at smc.vnet.net
- Subject: [mg35961] RE: [mg35826] RE: [mg35699] RE: [mg35673] Installing package "SpreadOption`"
- From: "David Park" <djmp at earthlink.net>
- Date: Fri, 9 Aug 2002 05:18:10 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Perhaps the best approach right now would be to put packages that contain palettes or style sheets in the Applications folder as Omega Consulting recommends. Then if users would prefer to have the package moved to the ExtraPackages folder, they can use the Options Inspector to add ExtraPackages to the PalettesPath and the StyleSheetPath. This can be fairly easily done as follows: Open the Option Inspector and set it for global. Go to Global Options\File Locations\PalettePath. Click the button on the right edge to bring up the list of paths. Select the one with $TopDirectory,"AddOns","Applications"... Click Edit, Copy it, and click Cancel. Click Add and paste in the copy. Change "Applications" to "ExtraPackages". Click OK, OK. You now have paths to both folders. Do the same for StyleSheetPath. You then can put packages in either place. It still would be nice if WRI included ExtraPackages on the PalettePath and StyleSheetPath. David Park djmp at earthlink.net http://home.earthlink.net/~djmp/ From: David Park [mailto:djmp at earthlink.net] To: mathgroup at smc.vnet.net I consider the ExtraPackages folder to be preferable to the Applications folder because I consider a package to be a resource and not an "application". I expect that my various applications can use that resource. I don't really like my Applications folder, at the top level, being filled up with packages. If the Applications folder is the "blessed" location for packages, why have the ExtraPackages folder at all? It would be very easy for WRI to fix it so that Mathematica automatically looked for palettes and style sheets in ExtraPackages, just as it now does in Applications. Then people could put the package in either place according to their own preference. Maybe, in some cases, a package would come with many application notebooks, and the package might mainly be designed for use with those notebooks. Then the Applications folder might be the preferred place. In other cases the package might be a general package for wide use. Then the ExtraPackages folder would be more appropriate. David Park djmp at earthlink.net http://home.earthlink.net/~djmp/ From: Omega Consulting [mailto:omega_consulting at yahoo.com] To: mathgroup at smc.vnet.net Perhaps. I don't see why the ExtraPackages folder is preferable to the Applications folder. Regardless, all indications are that Applications is the "blessed" location for packages. --- David Park <djmp at earthlink.net> wrote: > So, wouldn't it be a good idea if WRI automatically > included > > FrontEnd`FileName[{$TopDirectory, "AddOns", > "ExtraPackages", _, "FrontEnd", > "Palettes"}, CharacterEncoding -> "WindowsANSI"] > > on the PalettePath and > > FrontEnd`FileName[{$TopDirectory, "AddOns", > "ExtraPackages", _, "FrontEnd", > "StyleSheets"}, CharacterEncoding -> > "WindowsANSI"] > > on the StyleSheetsPath? Then complete packages could > just be dropped into > the ExtraPackages folder, where they would more > logically belong, instead of > putting them in the Applications folder. > > David Park > djmp at earthlink.net > http://home.earthlink.net/~djmp/ > > From: Omega Consulting To: mathgroup at smc.vnet.net > [mailto:omega_consulting at yahoo.com] > > > All of these are possible. Mathematica has a drop-in > system as long as you > understand the layout scheme (which is a bit > complicated, but worth > understanding). The trick is that each package gets > its own directory. > Avoiding the conflicts you describe above. > > All these properties are set by options, so let's > look at an option: > > In[3]:= > pp=PalettePath/.Options[$FrontEnd, PalettePath]; > > Let's just look at one value, the others are > similar. > > In[5]:= > pp[[6]] > > Out[5]= > FrontEnd`FileName[{$TopDirectory,AddOns,Applications,_,FrontEnd,Palettes}, > CharacterEncoding[Rule]WindowsANSI] > > This says look in $TopDirectory/AddOns/Applications > for directories of any > name. Then in those directories look for a > FrontEnd/Palettes directory with > *.nb files. If any of these files exist, when the > front end is started, > then it will be included in the Palettes menu. > > Similar things are done for StyleSheetPath and > AddOnHelpPath (for > documentation). There are also other more exotic > paths like > ConfigurationPath and SpellingDictionariesPath, but > these are largely > unused. > > So when I write a package it looks like this: > > MyPackageName/ > MyPackages.m (Actual packages) > Kernel/ > init.m (Stub package. > Loaded by <<MyPackageName`) > FrontEnd/ > Palettes/ > MyPalettes.nb (Palettes) > StyleSheets/ > MyStyleSheets.nb > (Stylesheets) > Documentation/ > $Language/ (English, French, > Japanese, etc.) > BrowserCategories.m > (Organization of docs) > BrowserIndex.nb (Master > Index entries) > HelpFiles.nb (Actual > documentation) > > Just drop the whole tree into the > $TopDirectory/AddOns/Applications > directory (a couple other directories work as well) > and you're ready to go. > (Except you have rebuild the help index, but > otherwise you're set.) > > > -------------------------------------------------------------- > Omega Consulting > "The final answer to your Mathematica needs" > > Spend less time searching and more time finding.