MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How change $AddOnsDirectory

  • To: mathgroup at smc.vnet.net
  • Subject: [mg41198] Re: [mg41128] How change $AddOnsDirectory
  • From: Murray Eisenberg <murraye at attbi.com>
  • Date: Wed, 7 May 2003 03:51:21 -0400 (EDT)
  • Organization: Mathematics & Statistics, Univ. of Mass./Amherst
  • References: <200305060610.h466AZ107676@wolfram.com>
  • Reply-to: murray at math.umass.edu
  • Sender: owner-wri-mathgroup at wolfram.com

Under Windows XP, on the Environment Variables tab of the Advanced tab 
on the System Properties control panel, I set

   MATHEMATICA_PREFERENCES

to have value d:\Math\AddOns, in both the "User variables for 
Administrator" (the account I'm using) and "System variables".  This 
seemed to have no effect whatsoever!  When I start Mathematica (two 
different versions), the values are exactly the same as the defaults:

    $AddOnsDirectory
C:\Documents and Settings\All Users\Application Data\Mathematica

    $UserAddOnsDirectory
"C:\\Documents and Settings\\Administrator\\Application Data\\Mathematica"

I also tried d:\\Math\\AddOns, but again with no apparent effect.

John Fultz wrote:
> On Windows and MacOS X, the locations of these directories are not 
> hard-coded; they are based upon system queries which point, by default, to 
> exactly where Microsoft and Apple want them.  On Unix platforms, we had to 
> do a bit of hard-coding based on Unix cultural expectations.
> 
> The usage of the particular system call being used under Windows is by 
> very specific and emphatic Microsoft recommendation.  $UserAddOnsDirectory 
> matches to the user's profile directory which, in some network 
> environments, is allowed to roam from machine to machine (the equivalent 
> of a centralized home directory under Unix).  This means that you can 
> install an addon into your user account and be able to access it from any 
> machine from which you can log into that account.  Microsoft feels so 
> strongly about the issue that they've re-targeted some other common system 
> defaults applications developers use for this kind of thing to point 
> inside the user's profile directory under Windows XP (*).
> 
> Note also that the default directory targeted by the Open dialog in a 
> fresh installation is the "My Documents" directory, which sits in the 
> user's profile.  So, Microsoft's solution to the problem you're trying to 
> solve using multiple drives is to confine all of the data to the profile 
> directories...the user's profile for user-specific data, the "All Users" 
> profile in the case of machine-specific, user-generic data.
> 
> Sincerely,
> 
> John Fultz
> jfultz at wolfram.com
> User Interface Group
> Wolfram Research, Inc.
> 
> (*) MS, incidentally, or at least a few very senior WinXP developers 
> there, have admitted that the thinking on the profile/home directory issue 
> was muddle-headed in previous OS's...particularly in the Win9x series of 
> OS's.  But they insist that they've got it right now (a statement with 
> which I would mostly agree), and proper usage of these directory standards 
> was right at the top of their recommendations for Windows XP migration.
> 
> 
> 
> On Mon, 05 May 2003 23:21:36 -0400, Murray Eisenberg wrote:
> 
>>OK, the reason offered for appending "Mathematica" afterwards to the
>>user-specified value of MATHEMATICA_ADDONS makes sense: it reduces the
>>number of environment variables.  Of course I see no reason why one
>>could not have one environment variable for Mathematica itself, another
>>for Calculation Center, etc. And I still dislike its forcing nesting one
>>level lower in the directory tree).
>>
>>As to $AddOnsDirectory and $UserAddOnsDirectory being versionless: yes,
>>that's obvious.  The trouble here is that the default value in Windows
>>for $AddOnsDirectory is in
>>
>>C:\Documents and Settings\All Users\Application Data\Mathematica
>>
>>and similarly for $UserAddOnsDirectory.  Encouraging users, by default,
>>to put user-created (or other) applications onto the same drive as the
>>operating system seems to me to be courting trouble: a safer procedure
>>is to segregate OS, programs, and data on separate drives (in Windows --
>>and similarly onto separate partitions with Linux).
>>
>>Just my 2 cents.
>>
>>John Fultz wrote:
>>
>>>As of version 4.2, AddOns are no longer in versioned directories.  I.e.,
>>>
>>>$AddOnsDirectory won't change from 4.2 to 5.0 to future versions.  It's
>>>not clear to me from your email why you're trying to set up separate
>>>directories (the desirability of sharing the AddOns directory between
>>>versions is part of what motivated the design for $AddOnsDirectory in
>>>the
>>>first place).
>>>
>>>As to the decision to add "Mathematica" afterwards, this has to do with
>>>the fact that we build non-Mathematica products which are based upon the
>>>
>>>Mathematica binaries.  These products would append their own identity
>>>instead (for example, Calculation Center would append
>>>"\CalculationCenter"
>>>afterwards).  So one environment variable setting can affect the base
>>>directory chosen for $AddOnsDirectory by all Wolfram products.
>>>
>>>Sincerely,
>>>
>>>John Fultz
>>>jfultz at wolfram.com
>>>User Interface Group
>>>Wolfram Research, Inc.
>>>
>>>
>>>On Mon, 05 May 2003 09:04:07 -0400, Murray Eisenberg wrote:
>>>
>>>
>>>>Thank you -- but OUCH!
>>>>
>>>>I do not want to have "Mathematica" automatically appended to the path 
> 
> I
> 
>>>>specify!  My directory structure has, under D:\Math, several separate
>>>>directories for different versions of Mathematica
>>>>(D:\Math\Mathematica4.0, D:\Math\Mathematica4.2, etc.)
>>>>
>>>>In order to use all my AddOns (except Standard AddOns), especially
>>>>Applications, with all versions of Mathematica -- without having to
>>>>maintain multiple copies of these AddOns -- I want a separate directory
>>>>D:\Math\AddOnsMma for them (and then have subdirectories Applications,
>>>>etc., of that.
>>>>
>>>>With the effect you describe of setting, say
>>>>MATHEMATICA_ADDONS=D:\Math\AddOnsMma, then this would force everthing
>>>>there to be buried one directory deeper than I want -- into
>>>>D:\Math\AddOnsMma\Mathematica.
>>>>
>>>>On the other hand, if I set, say MATHEMATICA_ADDONS=D:\Math, then that
>>>>would be obviously (?) undesirable: the directory would be
>>>>D:\Math\Mathematica, which is obviously too much like the names of the
>>>>top directories I'm using for the different versions of Mathematica
>>>>itself.
>>>>
>>>>Why in the world was the design decision made to automatically append
>>>>"Mathematica" to what those environment variables specified?  Is there
>>>>some decent way around this?
>>>>
>>>>John Fultz wrote:
>>>>
>>>>
>>>>>You can set the default value of the parent of $AddOnsDirectory and
>>>>>$UserAddOnsDirectory via an environment variable, which works for both
>>>>>FE
>>>>>and kernel.
>>>>>
>>>>>MATHEMATICA_ADDONS for $AddOnsDirectory
>>>>>MATHEMATICA_USERADDONS for $UserAddOnsDirectory
>>>>>
>>>>>Mathematica will append '\Mathematica' to whatever you set, so if, for
>>>>>example, you do:
>>>>>
>>>>>MATHEMATICA_ADDONS=D:\Math\AddOnsMma
>>>>>
>>>>>then the value of $AddOnsDirectory will be...
>>>>>
>>>>>"D:\\Math\\AddOnsMMa\\Mathematica"
>>>>>
>>>>>$AddOnsDirectory and $UserAddOnsDirectory in the kernel are intended 
> 
> to
> 
>>>>>be
>>>>>equivalent to something like $TopDirectory, which is to say that
>>>>>they're
>>>>>
>>>>>constants derived from the system.
>>>>>
>>>>>Incidentally, the above is true for all operating systems; it is not
>>>>>Windows-specific.
>>>>>
>>>>>Sincerely,
>>>>>
>>>>>John Fultz
>>>>>jfultz at wolfram.com
>>>>>User Interface Group
>>>>>Wolfram Research, Inc.
>>>>>
>>>>>
>>>>>On Sun, 4 May 2003 03:57:04 -0400 (EDT), Murray Eisenberg wrote:
>>>>>
>>>>>
>>>>>
>>>>>>How do I supply a permanent new location for $AddOnsDirectory.  This
>>>>>>is
>>>>>>under Windows XP.
>>>>>>
>>>>>>The HelpBrower documentation under "File Layout" seems to say that if
>>>>>>I
>>>>>>set a value for $AddOnsDirectory in an init.m file located somewhere
>>>>>>on
>>>>>>the ConfigurationPath, that value should be used.
>>>>>>
>>>>>>So in [top directory]\Configuration\FrontEnd -- where [top directory]
>>>
>>>is
>>>
>>>
>>>>>>the directory containing Mathematica.exe -- I created a file init.m.
>>>
>>>In
>>>
>>>
>>>>>>that file I tried, separately, all three of the following:
>>>>>>
>>>>>>$AddOnsDirectory="D:/Math/AddOnsMma"
>>>>>>
>>>>>>$AddOnsDirectory="D:\\Math\\AddOnsMma"
>>>>>>
>>>>>>$AddOnsDirectory=FrontEnd`FileName[{"D:", "Math", "AddOnsMma"}]
>>>>>>
>>>>>>None of these seems to have any effect, however:  Once I open
>>>>>>Mathematica, the value of $AddOnsDirectory is still its original
>>>>>>value,
>>>>>>namely,
>>>>>>
>>>>>>"C:\Documents and Settings\All Users\Application Data\Mathematica"
> 
> 
> 
> 
> 

-- 
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305



  • Prev by Date: Re: Re: How change $AddOnsDirectory
  • Next by Date: Re: Re: How change $AddOnsDirectory
  • Previous by thread: Re: How change $AddOnsDirectory
  • Next by thread: Re: Re: How change $AddOnsDirectory