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:- attach_packs('/home/vdeboer/lib/swipl/pack'). 41 42% Make loading files silent. Comment if you want verbose loading. 43 44:- current_prolog_flag(verbose, Verbose), 45 asserta(saved_verbose(Verbose)), 46 set_prolog_flag(verbose, silent). 47 48 49 /******************************* 50 * LOAD CODE * 51 *******************************/ 52 53% Use the ClioPatria help system. May be commented to disable online 54% help on the source-code. 55 56:- use_module(cliopatria('applications/help/load')). 57 58% Load ClioPatria itself. Better keep this line. 59 60:- use_module(cliopatria(cliopatria)). 61 62% Get back normal verbosity of the toplevel. 63 64:- ( retract(saved_verbose(Verbose)) 65 -> set_prolog_flag(verbose, Verbose) 66 ; true 67 ).