samer@7: #!/usr/local/bin/swipl samer@7: samer@7: :- initialization cp_server. samer@7: samer@7: /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - samer@7: This file provides a skeleton startup file. It can be localized by running samer@7: samer@7: % ./configure (Unix) samer@7: % Double-clicking win-config.exe (Windows) samer@7: samer@7: After that, the system may be customized by copying or linking samer@7: customization files from config-available to config-enabled. See samer@7: config-enabled/README.txt for details. samer@7: samer@7: To run the system, do one of the following: samer@7: samer@7: * Running for development samer@7: Run ./run.pl (Unix) or open run.pl by double clicking it (Windows) samer@7: samer@7: * Running as Unix daemon (service) samer@7: See daemon.pl samer@7: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ samer@7: samer@7: % Setup search path for cliopatria. We add both a relative and absolute samer@7: % path. The absolute path allow us to start in any directory, while the samer@7: % relative one ensures that the system remains working when installed on samer@7: % a device that may be mounted on a different location. samer@7: samer@7: add_relative_search_path(Alias, Abs) :- samer@7: is_absolute_file_name(Abs), !, samer@7: prolog_load_context(file, Here), samer@7: relative_file_name(Abs, Here, Rel), samer@7: assertz(user:file_search_path(Alias, Rel)). samer@7: add_relative_search_path(Alias, Rel) :- samer@7: assertz(user:file_search_path(Alias, Rel)). samer@7: samer@7: file_search_path(cliopatria, '/home/dml/src/github/ClioPatria'). samer@7: :- add_relative_search_path(cliopatria, '/home/dml/src/github/ClioPatria'). samer@7: samer@7: % Make loading files silent. Comment if you want verbose loading. samer@7: samer@33: %:- current_prolog_flag(verbose, Verbose), samer@33: % asserta(saved_verbose(Verbose)), samer@33: % set_prolog_flag(verbose, silent). samer@7: samer@7: samer@7: /******************************* samer@7: * LOAD CODE * samer@7: *******************************/ samer@7: samer@7: % Use the ClioPatria help system. May be commented to disable online samer@7: % help on the source-code. samer@7: samer@7: :- use_module(cliopatria('applications/help/load')). samer@7: samer@7: % Load ClioPatria itself. Better keep this line. samer@7: samer@7: :- use_module(cliopatria(cliopatria)). samer@7: samer@7: % Get back normal verbosity of the toplevel. samer@7: samer@7: :- ( retract(saved_verbose(Verbose)) samer@7: -> set_prolog_flag(verbose, Verbose) samer@7: ; true samer@7: ). samer@7: samer@42: :- debug(db). samer@7: samer@42: