How to build a development version of Glamorous Toolkit

To contibute to the development of the Glamorous Toolkit or to diagnose bugs it is sometimes helpful to have a development version of the Glamorous Toolkit at hand.

A development version of the Glamorous Toolkit is much like the regular GlamorousToolkit, with the difference that all the GT-related repositories are still loaded and some image build code might be present that is scrubbed from the regular prebuilt image.

The easiest way to build a development version is to download the appropriate script from feenk’s servers and use it to download and build an image. Here is an example Bash script for how to do this inside a folder that is named after the current date—so you can have multiple fresh copies that co-exist:

        
DIR=`date +%Y-%m-%d-%H-%M`
mkdir $DIR
cd $DIR
curl https://dl.feenk.com/scripts/mac.sh | bash #change "mac" for your system

cd glamoroustoolkit

./GlamorousToolkit.app/Contents/MacOS/GlamorousToolkit # this packaging is system-dependent
        
      

Sometimes you might even want to run custom code before this happens. To achieve this, we can, for instance, write a simple Shell function to simplify things for us:

        
function loadStFile() { #this function allows us to load files
    # $1 is the filename with Pharo code, $GToolkitCLI is system-dependent again
    GToolkitCLI="./GlamorousToolkit.app/Contents/MacOS/GlamorousToolkit-cli"
    CUSTOMIZATION_FILE="$1"
    echo "Loading custom configuration: ${CUSTOMIZATION_FILE}"
    "$GToolkitCLI" *.image st "$CUSTOMIZATION_FILE" --interactive --no-quit
}

DIR=`date +%Y-%m-%d-%H-%M`
mkdir $DIR
cd $DIR
curl https://dl.feenk.com/scripts/mac.sh | bash

cd glamoroustoolkit

loadStFile ../../myscript.st # and here is how we use it

./GlamorousToolkit.app/Contents/MacOS/GlamorousToolkit