1#!/usr/bin/swipl 2 3:- initialization cp_server. 4 5/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 6This file provides a skeleton startup file. It can be localized by running 7 8 % ./configure (Unix) 9 % Double-clicking win-config.exe (Windows) 10 11After that, the system may be customized by copying or linking 12customization files from config-available to config-enabled. See 13config-enabled/README.txt for details. 14 15To run the system, do one of the following: 16 17 * Running for development 18 Run ./run.pl (Unix) or open run.pl by double clicking it (Windows) 19 20 * Running as Unix daemon (service) 21 See daemon.pl 22- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 23 24% Setup search path for cliopatria. We add both a relative and absolute 25% path. The absolute path allow us to start in any directory, while the 26% relative one ensures that the system remains working when installed on 27% a device that may be mounted on a different location. 28 29add_relative_search_path(Alias, Abs) :- 30 is_absolute_file_name(Abs), !, 31 prolog_load_context(file, Here), 32 relative_file_name(Abs, Here, Rel), 33 assertz(user:file_search_path(Alias, Rel)). 34add_relative_search_path(Alias, Rel) :- 35 assertz(user:file_search_path(Alias, Rel)). 36 37file_search_path(cliopatria, '/home/vdeboer/src/ClioPatria/ClioPatria'). 38:- add_relative_search_path(cliopatria, '/home/vdeboer/src/ClioPatria/ClioPatria'). 39 40% Make loading files silent. Comment if you want verbose loading. 41 42:- current_prolog_flag(verbose, Verbose), 43 asserta(saved_verbose(Verbose)), 44 set_prolog_flag(verbose, silent). 45 46 47 /******************************* 48 * LOAD CODE * 49 *******************************/ 50 51% Use the ClioPatria help system. May be commented to disable online 52% help on the source-code. 53 54:- use_module(cliopatria('applications/help/load')). 55 56% Load ClioPatria itself. Better keep this line. 57 58:- use_module(cliopatria(cliopatria)). 59 60% Get back normal verbosity of the toplevel. 61 62:- ( retract(saved_verbose(Verbose)) 63 -> set_prolog_flag(verbose, Verbose) 64 ; true 65 ).