/usr/lib/swi-prolog/swipl-win.rc is in swi-prolog-x 6.6.4-2ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | /* -*-Prolog-*-
Part of XPCE --- The SWI-Prolog GUI toolkit
Author: Jan Wielemaker and Anjo Anjewierden
E-mail: J.Wielemaker@cs.vu.nl
WWW: http://www.swi-prolog.nl/projects/xpce/
Copyright (C): 1985-2012, University of Amsterdam
VU University Amsterdam
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
:- module(link_xpce, []).
:- set_prolog_flag(generate_debug_info, true).
/** <module> Associate XPCE with SWI-Prolog
This file initialises XPCE, the SWI-Prolog native GUI. XPCE is
initialised only if it is detected.
The source-location of this file is packages/xpce/swipl/swipl-rc. It is
installed as <plbase>/<exe-base>.rc, where <exe-base> is =|swipl-win|=
to associate with the SWI-Prolog gui application on Windows and =swipl=
on Unix/X11 platforms.
*/
:- op(200, fy, user:(@)).
:- op(250, yfx, user:(?)).
:- op(990, xfx, user:(:=)).
:- multifile
user:file_search_path/2.
:- dynamic
pcehomestore_/1.
:- volatile
pcehomestore_/1.
pcehome_(Home) :-
pcehomestore_(Home), !.
pcehome_(Home) :-
( getenv('XPCEHOME', RawHome)
; current_prolog_flag(home, PlHome),
( current_prolog_flag(xpce_version, Version),
atom_concat('/xpce-', Version, Suffix)
; Suffix = '/xpce'
),
atom_concat(PlHome, Suffix, RawHome)
),
exists_directory(RawHome), !,
absolute_file_name(RawHome, Home),
asserta(pcehomestore_(Home)).
user:file_search_path(pce, PceHome) :-
pcehome_(PceHome).
user:file_search_path(library, pce('prolog/lib')).
user:file_search_path(foreign, pce(ArchLib)) :-
current_prolog_flag(arch, Arch),
atom_concat('lib/', Arch, ArchLib).
% We added a directory to the autoload directories: force reloading the
% index
:- reload_library_index.
gui_setup_ :-
current_prolog_flag(gui, true), !.
gui_setup_ :-
( getenv('DISPLAY', _)
; current_prolog_flag(windows, true)
), !,
create_prolog_flag(gui, true, []),
menu_setup_,
editor_setup,
load_files(user:library(swi_hooks), [silent(true)]). % help, etc.
menu_setup_ :- % plwin.exe menus
current_prolog_flag(console_menu, true),
load_files(user:library(win_menu), [silent(true)]).
menu_setup_.
editor_setup :-
current_prolog_flag(editor, default), !,
set_prolog_flag(editor, pce_emacs).
editor_setup.
pce_setup_ :-
current_prolog_flag(xpce, true), !.
pce_setup_ :-
current_prolog_flag(argv, Argv),
\+ memberchk('--nopce', Argv), % explicitely no XPCE
pcehome_(PceHome),
exists_directory(PceHome),
gui_setup_,
( memberchk('--pce', Argv)
; current_prolog_flag(executable, Executable),
file_base_name(Executable, Base),
sub_atom_icasechk(Base, _, pce)
), !,
load_files(user:library(pce), [silent(true)]).
pce_setup_.
:- initialization pce_setup_.
|