[squeak-dev] Sources file locations (was: User config directories)
eliot.miranda at gmail.com
Mon Jan 3 17:13:41 UTC 2022
On Mon, Jan 3, 2022 at 8:42 AM David T. Lewis <lewis at mail.msen.com> wrote:
> Hi Jakob,
> On Sun, Jan 02, 2022 at 08:39:29PM +0100, Jakob Reschke wrote:
> > Hi Dave,
> > Happy new year!
> > Am Sa., 1. Jan. 2022 um 21:46 Uhr schrieb David T. Lewis <
> lewis at mail.msen.com>:
> > >
> > > For Unix/Linux, the solution can be very simple, just add
> > > and /usr/local/share/squeak/ to the list of locations to be searched
> > > for sources files.
> > >
> > > I suspect (but I'm not sure) that some similar convention will work
> > > for Windows.
> > >
> > On Windows you would need additional help from the VM because there is
> > no fixed path like /usr/share or /usr/local/share. Most Windows
> > installations are on drive C:, but it is possible to spread Windows
> > across different partitions. Possible candidates for a non-writable
> > system-wide location are %ProgramFiles%\Common Files (usually
> > C:\Program Files\Common Files) or, if Squeak were installed like other
> > applications, its program directory under %ProgramFiles% (for example
> > C:\Program Files\Squeak). If it should be writable by users (or at
> > least the one who creates it), we could take %ProgramData% (usually
> > C:\ProgramData).
> > https://docs.microsoft.com/en-us/windows/win32/shell/knownfolderid
> Thanks, this link makes it much more clear. Indeed, this would be
> better be supported by the VM, which has direct access to the Windows
> API calls.
> > The most official way to get the folder paths at runtime is to use the
> > Windows API, but going via the environment variables should work as
> > well. So if the VM does not provide the paths, we would still need at
> > least access to environment variables from a VM without separately
> > installed plugins.
> Given that the KNOWNFOLDERID locations are well defined in the API,
> I would think that the Windows API would be the better way to handle
> it. Perhaps the VM should provide an optional primitive for this,
> with the primitive providing a list of one or more locations in
> which the sources files might be found. And if the primitive is
> not implemented, then don't look there :-)
We have a plugin in the Virtend VM that gives official values for several
named directories. I'm happy to move this plugin and/or the primitive into
VMMaker. The specification is
Primitive. Query for a common file location.
location: String describing the common file location.
Return value: The path to the designated location.
'home' - the user's home directory
'desktop' - the user's desktop directory
'temp' - the temp directory to use
'preferences' - the place to store (per user) app
'applications' - the directory for installing applications
'fonts' - the directory to install fonts in the system
'documents' - the users documents folder
'music' - the users default location for music
'pictures' - the users default location for pictures
'videos' - the users default location for videos
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Squeak-dev