Windows directory locations (was: [Announce] Amaya 9.2.1 and Amaya 8.8.1)

I don't know how Amaya resolves the directories it uses but I'm 
having troubles (again) running it as non-Administrator user on 
Windows XP (I guess with the other NT/2000 systems, too). It is like 
that since the 9.1 release became available (not exactly sure). The 
reason, as it seems, the Amaya user directory is resolved like:

%SystemDrive%\Document and Settings\%USERNAME%\amaya

This is far different from where my profile directory is and the 
"amaya" user directory could not be created, and Amaya doesn't 
start. I haven't tested if installed on different than the Windows 
system drive, if Amaya actually tries to create:

<AMAYA_DRIVE>\Document and Settings\%USERNAME%\amaya

All of the above are pretty wrong assumptions since (as in my case) 
the Windows system drive could be not "C:" or the profile could 
reside not under "%SystemDrive%\Document and Settings". The 
%HOMEDRIVE% and %HOMEPATH% variables (as others like %USERPROFILE% 
available only on NT systems) still point to the correct place, 
though (I wonder why they are not used like described in the 
documentation).

I suggest using the %APPDATA% environment variable as it is 
available on all Windows platforms (incl. 95/98/Me), like:

%APPDATA%\amaya

This will have "amaya" directory as:

C:\WINNT\Profiles\%USERNAME%\Application Data\amaya
C:\Document and Settings\%USERNAME%\Application Data\amaya
C:\WINDOWS\Application Data\amaya

i.e. at the correct place (no matter if Windows and the user profile 
reside at the default paths). Note the "Document and Settings" on 
differently (than English) localized Windows versions could have 
different name.

More on the paths: if used as described in the documentation the 
temporary directory should be resolved just from the %TEMP% 
environment variable and not as "C:\Temp".

/Irene Vatton/:

> Amaya 9.2.1 is the first native MacOS X version.
> Other versions are shynchronized with this release and then include some bug 
> fixes:
> ...
> - New font locations are now checked on Windows platforms
> ...

It would be good if the font locations defined in 
"<AMAYA_DIR>/config/fonts.gl.win" are specified relatively to 
%windir% (the directory where Windows is installed), also available 
on all Windows platforms, to remove the need of modifying this file 
when Windows is not installed in the default drive and/or path 
(that's not task for casual user and is just inconvenient).

The exact "Fonts", "Temp" and "Application Data" directories are 
obtainable by calls to the Win32 API (actually Windows Shell) 
functions, also:

SHGetSpecialFolderPath Function 
<http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/reference/functions/shgetspecialfolderpath.asp>

CSIDL (special folder identifiers) 
<http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/reference/enums/csidl.asp>:

> Remarks
> 
> These values supersede the use of environment variables for this 
> purpose.

I'll be glad if the above suggestions would get considered for the 
next Amaya releases.

-- 
Stanimir

Received on Wednesday, 13 July 2005 17:54:34 UTC