[squeak-dev] linux installation & squeak.sh confusions

tim Rowledge tim at rowledge.org
Thu Aug 1 20:05:27 UTC 2019


Yeah, I'm pretty familiar with the original rules about using the vmPath prim; I might even have been one of the original suggesters. Too long ago (like, 1996) to recall.

The practical problem with 'sources in the vmpath directory' for unix *these days* is that we  have an intermediate directory that we did not used to have. Thus the (probably) smarter heuristic would be  to use 'Smalltalk vmPath asFileDirectory containingDirectory ' as the path. 

Of course, this is only appropriate for unix, and only if one decides to not make use of the fairly common unix idiom of putting stuff like that in one of the various 'shared' directory trees. /usr/share? /usr/local/share? Or maybe /var/squeak/share? *This* is the bit I don't know about; just enough to know it confuses me and seems to be somewhat variable around unixes.

Yes, one could use links to simplify, I guess. Again, rather unix specific unless Windows & Mac OS have started doing links properly. (In which case it is high time we added link handling stuff to FileDirectory etc!)

> On 2019-08-01, at 5:06 AM, K K Subbu <kksubbu.ml at gmail.com> wrote:
> 
> 	On 01/08/19 4:08 AM, tim Rowledge wrote:
>> I know that part of this is the result of the rather varied rules
>> different unixes have for storing loaded applications. I don't know
>> very much about those rules - and I really, really, don't want to
>> have to care - so maybe somebody has ideas that might help have a
>> decent shared location for the sources file that would fit? Could we
>> just use vmPath/../ for 'normal' installs?
> 
> The *.sources is a read-only file, so it is first searched in VM path where it is protected from accidental modifications and caters to the case when the same VM is used to run images located in multiple directories. It is part of the image, so it could also be placed in the image directory if VM path is not writable (multi-user case). This will get the beginners started quickly with minimum fuss.
> 
> For more advanced uses, we could change the image to look for an override, say $SQUEAK_SOURCES, to override these hard-coded paths.
> 
> Or, we could place sources file in $HOME/.squeak/ and symlink it from different image directories. This can be added to the launch script.
> 
> SQUEAK_SOURCES=....
> IMAGE_DIR=...
> VM_DIR=...
> 
> ensure_sources() {
> test -f $VM_DIR/$1 || \
>  test -f $IMAGE_DIR/$1 || \
>  ln -s "$HOME/.squeak/$1" "$IMAGE_DIR/$1"
> }
> 
> ensure_sources $SQUEAK_SOURCES
> 
> Regards .. Subbu
> 
> 


tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Strange OpCodes: SDR: Shift Disk Right




More information about the Squeak-dev mailing list