Running developer versions

Follow these steps to run a Logtalk developer version:

Checking out the latest development version

From the command-line, type the following commands:

$ git clone https://github.com/LogtalkDotOrg/logtalk3.git

A logtalk3 directory will be created in your current directory containing a local copy of the current Logtalk development version. Later, to update your local copy to the latest development version, just type:

$ cd logtalk3
$ git pull

In alternative, use one of several available GUI front-ends to git.

Installing

POSIX installation

If you use a bash shell, add the following lines to your ~/.profile file:

LOGTALKHOME=$HOME/logtalk3
LOGTALKUSER=$HOME/logtalk3
PATH=$PATH:$LOGTALKHOME/tools/diagrams
PATH=$PATH:$LOGTALKHOME/tools/lgtdoc/xml
PATH=$PATH:$LOGTALKHOME/tools/packs
PATH=$PATH:$LOGTALKHOME/scripts
PATH=$PATH:$LOGTALKHOME/integration
MANPATH=$MANPATH:$LOGTALKHOME/man
INFOPATH=$INFOPATH:$LOGTALKHOME/docs:$LOGTALKHOME/manuals
export LOGTALKHOME LOGTALKUSER PATH MANPATH INFOPATH

If you use a zsh shell, add the following lines to your ~/.zshenv file:

LOGTALKHOME=$HOME/logtalk3
LOGTALKUSER=$HOME/logtalk3
PATH=$PATH:$LOGTALKHOME/tools/diagrams
PATH=$PATH:$LOGTALKHOME/tools/lgtdoc/xml
PATH=$PATH:$LOGTALKHOME/tools/packs
PATH=$PATH:$LOGTALKHOME/scripts
PATH=$PATH:$LOGTALKHOME/integration
MANPATH=$MANPATH:$LOGTALKHOME/man
INFOPATH=$INFOPATH:$LOGTALKHOME/docs:$LOGTALKHOME/manuals
export LOGTALKHOME LOGTALKUSER PATH MANPATH INFOPATH

If you use a csh shell, add the following line to your ~/.cshrc file:

setenv LOGTALKHOME "${HOME}"/logtalk3
setenv LOGTALKUSER "${HOME}"/logtalk3
setenv PATH "${PATH}":"${LOGTALKHOME}"/tools/diagrams
setenv PATH "${PATH}":"${LOGTALKHOME}"/tools/lgtdoc/xml
setenv PATH "${PATH}":"${LOGTALKHOME}"/tools/packs
setenv PATH "${PATH}":"${LOGTALKHOME}"/scripts
setenv PATH "${PATH}":"${LOGTALKHOME}"/integration
setenv MANPATH "${MANPATH}":"${LOGTALKHOME}"/man
setenv INFOPATH ${INFOPATH}:"${LOGTALKHOME}"/docs:"${LOGTALKHOME}"/manuals

If you use a fish shell, add the following line to your ~/.config/fish/config.fish file:

set -gx LOGTALKHOME $HOME/logtalk3
set -gx LOGTALKUSER $HOME/logtalk3
fish_add_path $LOGTALKHOME/tools/diagrams
fish_add_path $LOGTALKHOME/tools/lgtdoc/xml
fish_add_path $LOGTALKHOME/tools/packs
fish_add_path $LOGTALKHOME/scripts
fish_add_path $LOGTALKHOME/integration
set -gx MANPATH $MANPATH $LOGTALKHOME/man
set -gx INFOPATH $INFOPATH $LOGTALKHOME/docs $LOGTALKHOME/manuals

If your logtalk3 directory is not in your home directory or if you cloned to the default logtalk3 directory, adjust the paths above accordingly. Don’t use relative paths such as ../ or ./ in the definition of the environment variables. Some Prolog compilers have trouble expanding environment variables, resulting in file not found errors when attempting to use the Logtalk integration scripts.

Windows installation

Checkout the Logtalk development version into the directory C:\logtalk3. If you want to have Logtalk integration shortcuts for the supported Prolog compilers created, install Inno Setup Unicode 5.3.0 (or a later version) and open the C:\logtalk3\scripts\windows\logtalk.iss file. Rebuild the Windows GUI installer and run it to install the Logtalk development version. You can also download an installer for the latest git commit from AppVeyor. In alternative, install Windows Subsystem for Linux (WSL) or a Bash shell such as the one provided by Git for Windows and follow the steps above for the POSIX installation.

Running

POSIX systems

You may run Logtalk by typing the name of the integration script with the .sh extension. For example, to run Logtalk using SWI-Prolog as the back-end compiler type swilgt.sh.

Windows systems

Use the shortcuts available from the Logtalk program group in the Start Menu. Note that, depending on the chosen backend Prolog compiler, the first run of some shortcuts may need to be run as an administrator.

Customizing

See the file CUSTOMIZE.md for tips on how to customize Logtalk.

Switching between installed versions

If you want to run both stable and development versions of Logtalk on a POSIX system, you may instead keep the default values for the environment variables LOGTALKHOME and LOGTALKUSER and use the logtalk_version_select command to switch between installed versions. Simply perform a git clone of the Logtalk development version and install it by following these steps:

$ cd logtalk3/scripts
$ sudo ./install.sh

The install.sh shell script accepts an optional prefix and thus can also be used by non-administrative users. For example:

$ cd logtalk3/scripts
$ ./install.sh -p $HOME

Logtalk development versions are identified by the name that will be used once they become the next released version. Thus, simply use the logtalk_version_select command to switch between versions. For example:

$ logtalk_version_select -l
Available versions:
  logtalk-3.100.0-b01
  logtalk-3.100.0-stable
  logtalk-3.100.1-stable
  logtalk-3.101.0-b01
  logtalk-3.101.0-stable
  logtalk-3.102.0-b01
  logtalk-3.102.0-stable
  logtalk-3.103.0-b01
$ sudo logtalk_version_select logtalk-3.102.0-stable
Switched to version: logtalk-3.102.0-stable