________________________________________________________________________

This file is part of Logtalk <https://logtalk.org/>  
Copyright 1998-2021 Paulo Moura <pmoura@logtalk.org>  
SPDX-License-Identifier: Apache-2.0

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
________________________________________________________________________


% create a GNU Prolog executable that includes the Logtalk compiler/runtime:

$ cd $LOGTALKHOME/scripts/embedding/gprolog/
$ ./gprolog_embed_logtalk.sh -c -d "$HOME"/collect
$ ~/collect/logtalk


% create a GNU Prolog executable that includes the Logtalk compiler/runtime
% and the "searching" example:

$ cd $LOGTALKHOME/scripts/embedding/gprolog/
$ ./gprolog_embed_logtalk.sh -c -d "$HOME"/collect -l ~/logtalk/examples/searching/loader.lgt -s ~/logtalk/scripts/embedding/settings-embedding-sample.lgt -p ~/logtalk/paths/paths.pl
$ ~/collect/logtalk
...
| ?- farmer::initial_state(Initial), depth_first(10)::solve(farmer, Initial, Path), farmer::print_path(Path).


% create a SWI-Prolog QLF files from the "spider" text adventure example:

$ cd $LOGTALKHOME/scripts/embedding/swipl/
$ ./swipl_logtalk_qlf.sh -c -d "$HOME"/collect -l ~/logtalk/examples/adventure/spider.lgt -s ~/logtalk/scripts/embedding/settings-embedding-sample.lgt
$ cd ~/collect
$ swipl -g "[logtalk, application]"
?- spider::start.


% create a SWI-Prolog saved state from the "spider" text adventure example:

$ cd $LOGTALKHOME/scripts/embedding/swipl/
$ ./swipl_logtalk_qlf.sh -c -x -d "$HOME"/collect -n spider -l ~/logtalk/examples/adventure/spider.lgt -s ~/logtalk/scripts/embedding/settings-embedding-sample.lgt -g "'::'(spider,start)"
$ ~/collect/spider


% create a SICStus Prolog pre-compiled version of the "sleepy" text adventure example:

$ cd $LOGTALKHOME/scripts/embedding/sicstus/
$ ./sicstus_logtalk_po.sh -c -d "$HOME"/collect -l ~/logtalk/examples/adventure/sleepy.lgt -s ~/logtalk/scripts/embedding/settings-embedding-sample.lgt
$ cd ~/collect
$ sicstus --goal "load_files(['logtalk.po','application.po'])."
?- sleepy::start.


% create a SICStus Prolog saved state from the "sleepy" text adventure example:

$ cd $LOGTALKHOME/scripts/embedding/sicstus/
$ ./sicstus_logtalk_po.sh -c -x -d "$HOME"/collect -n sleepy -l ~/logtalk/examples/adventure/sleepy.lgt -s ~/logtalk/scripts/embedding/settings-embedding-sample.lgt -g "'::'(sleepy,start)"
$ cd ~/collect
$ ./sleepy.sav


% create a YAP saved state from the "wumpus" text adventure example:

$ cd $LOGTALKHOME/scripts/embedding/yap/
$ ./yap_logtalk_pl.sh -c -x -d "$HOME"/collect -n wumpus -l ~/logtalk/examples/adventure/wumpus.lgt -s ~/logtalk/scripts/embedding/settings-embedding-sample.lgt -g "'::'(wumpus,main)"
$ ~/collect/wumpus


% create LVM Prolog files for embedding the "wumpus" text adventure example:

$ cd $LOGTALKHOME/scripts/embedding/lvm/
$ ./lvm_logtalk_pl.sh -c -d "$HOME"/collect -l ~/logtalk/examples/adventure/wumpus.lgt -s ~/logtalk/scripts/embedding/settings-embedding-sample.lgt
$ cd ~/collect/
$ lvmpl -f logtalk.pl -f application.pl
