View source with raw comments or as raw
    1#!/usr/bin/swipl 
    2
    3:- initialization(cp_server, main).    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, '/srv/ClioPatria').
   38:- add_relative_search_path(cliopatria, '/srv/ClioPatria').   39
   40		 /*******************************
   41		 *	      LOAD CODE		*
   42		 *******************************/
   43
   44% Use the ClioPatria help system.  May   be  commented to disable online
   45% help on the source-code.
   46:- use_module(cliopatria('applications/help/load')).   47
   48% Load ClioPatria itself.  Better keep this line.
   49:- use_module(cliopatria(cliopatria)).