[squeak-dev] squeak.sh appears unable to allow specifying a project/file

K K Subbu kksubbu.ml at gmail.com
Mon Jul 20 09:35:06 UTC 2020


On 20/07/20 1:00 am, Tim Johnson wrote:
> Hi Subbu & all,
> 
> On Jul 18, 2020, at 4:32 AM, K K Subbu wrote:
> 
>> On 18/07/20 4:39 pm, Robert Withers wrote:
>>>> This was patched recently. Does the version below solve your problem?
>>>>
>>>> https://github.com/squeak-smalltalk/squeak-app/blob/squeak-trunk/templates/linux/squeak.sh 
>>>>
>>> Would there be any chance of modifying the script to open a file chooser
>>> dialog so the user can select the image s/he wants to run? There is a
>>> squeak.sh out there somewhere that does this.
>>
>> The script uses a file dialog only when required. It is skipped if an 
>> image file is specified in the command line or a single image is found 
>> in the shared/ directory or through SQUEAK_IMAGE env variable.

> Are you sure about the SQUEAK_IMAGE environment variable?  My experience 
> in the last ~6 months had been that squeak.sh actually interfered with 
> the VM's ability to read SQUEAK_IMAGE.

Nice catch! squeak-app is a GUI launcher while the squeak.sh in 
unix/config is meant for shell sessions. The GUI launcher picks its env 
variables from xsession rc files while the script squeak.sh picks them 
from shell rc files. Using SQUEAK_IMAGE in xsessions is very rare. It is 
more likely in shells.

> Let's differentiate the two squeak.sh files:
> 
> (a) The squeak.sh which is produced as part of the opensmalltalk-vm 
> build process.  It begins life as  'platforms/unix/config/squeak.sh.in' 
> and/or 'platforms/unix/config/bin.squeak.sh.in' in the opensmalltalk-vm 
> repo.  Its stated purpose is to "Run the VM, setting SQUEAK_PLUGINS if 
> unset to the VM's containing directory if unset, and ensuring 
> LD_LIBRARY_PATH includes the VM's containing directory".
> 
> (b) The squeak.sh which lives in the 'squeak-smalltalk/squeak-app' repo, 
> and which is significantly different.  Its stated purpose is "Script to 
> launch Squeak executable from a bundle".

The launcher script is just that - a launcher. It is meant to detect and 
use options specific to a Linux distro. The two launchers you list above 
are used in different contexts - xsession and bash.

> My suggestion would be:  if squeak.sh ("b") from the squeak-app repo 
> wants to honor the contents of the SQUEAK_IMAGE environment variable on 
> Unix, it should either:  (1) adapt ensure_image() to check whether 
> SQUEAK_IMAGE is set, and if it is, consider passing it along;  or (2) 
> not supply  "${IMAGE}"  to the VM if no image is found.

1) is an good suggestion. Please propose a patch to the repo or this 
list. 2) does not help in xsession. If an image file is not specified, 
it is better to use a file dialog to get one.

> Please ignore me or correct me if I'm totally off-base here.

I am glad you posted your observation. I too was confused about the 
multiple squeak.sh files. I really wish we could converge them into a 
single one, but the diversity in *ix deployments is too large to be 
captured in a single script.

Regards .. Subbu


More information about the Squeak-dev mailing list