Do not update root geometry when a fullscreened window change root size
[clfswm.git] / load.lisp
blob2ab8436665bc7216783a4e5518a4495846bda74f
1 ;;; --------------------------------------------------------------------------
2 ;;; CLFSWM - FullScreen Window Manager
3 ;;;
4 ;;; --------------------------------------------------------------------------
5 ;;; Documentation: System loading functions
6 ;;; --------------------------------------------------------------------------
7 ;;;
8 ;;; (C) 2005 Philippe Brochard <hocwp@free.fr>
9 ;;;
10 ;;; This program is free software; you can redistribute it and/or modify
11 ;;; it under the terms of the GNU General Public License as published by
12 ;;; the Free Software Foundation; either version 3 of the License, or
13 ;;; (at your option) any later version.
14 ;;;
15 ;;; This program is distributed in the hope that it will be useful,
16 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;;; GNU General Public License for more details.
19 ;;;
20 ;;; You should have received a copy of the GNU General Public License
21 ;;; along with this program; if not, write to the Free Software
22 ;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 ;;;
24 ;;; --------------------------------------------------------------------------
26 ;;;------------------
27 ;;; Customization part
28 ;;;------------------
29 (pushnew :clfswm-compile *features*)
30 (pushnew :clfswm-run *features*)
31 (pushnew :clfswm-build-image *features*)
33 ;;(pushnew :clfswm-install *features*)
35 ;;;;;; Uncomment lines above to build the default documentation.
36 ;;(pushnew :clfswm-build-doc *features*)
38 ;;;;; Uncomment the line below if you want to see all ignored X errors
39 ;;(pushnew :xlib-debug *features*)
41 ;;;;; Uncomment the line below if you want to see all event debug messages
42 ;;(pushnew :event-debug *features*)
45 (defparameter *binary-name* "clfswm")
47 (defparameter *install-prefix* "/tmp/usr/local")
49 (defun with-prefix (&rest place)
50 (apply #'concatenate 'string *install-prefix* place))
52 (defparameter *install-bin* (with-prefix "/bin/"))
53 (defparameter *install-contrib* (with-prefix "/lib/clfswm/"))
54 (defparameter *install-doc* (with-prefix "/share/doc/clfswm/"))
55 (defparameter *install-man* (with-prefix "/share/man/man1/"))
59 #+:CMU (setf ext:*gc-verbose* nil)
61 ;;;------------------
62 ;;; XLib part 1
63 ;;;------------------
64 #+(or :CMU :ECL)
65 (require :clx)
68 ;;;------------------
69 ;;; ASDF part
70 ;;;------------------
71 ;;;; Loading ASDF
72 #+(or :SBCL :CMUCL :CCL :ECL)
73 (require :asdf)
75 #-:ASDF
76 (load "contrib/asdf.lisp")
79 ;;;------------------
80 ;;; XLib part 2
81 ;;;------------------
82 ;;; Loading clisp dynamic module. This part needs clisp >= 2.50
83 ;;#+(AND CLISP (not CLX))
84 ;;(when (fboundp 'require)
85 ;; (require "clx.lisp"))
87 ;;;------------------
88 ;;; CLFSWM loading
89 ;;;------------------
90 #+:clfswm-compile
91 (asdf:oos 'asdf:load-op :clfswm)
94 ;;;-------------------------
95 ;;; Starting clfswm
96 ;;;-------------------------
97 #+(or :clfswm-run :clfswm-build-doc :clfswm-build-image)
98 (in-package :clfswm)
100 #+:clfswm-run
101 (ignore-errors
102 (main :read-conf-file-p t))
105 ;;;-------------------------
106 ;;; Building documentation
107 ;;;-------------------------
108 #+:clfswm-build-doc
109 (produce-all-docs)
111 ;;;-----------------------
112 ;;; Building image part
113 ;;;-----------------------
114 #+:clfswm-build-image
115 (build-lisp-image "clfswm")
117 ;;;-----------------------
118 ;;; Installation part
119 ;;;-----------------------
120 #+:clfswm-install
121 (in-package :cl-user)
123 #+:SBCL
124 (require :sb-posix)
126 #+:clfswm-install
127 (load (compile-file "src/tools.lisp"))
129 #+:clfswm-install
130 (defun check-directory (dir)
131 (format t "Checking ~A~%" dir)
132 (ensure-directories-exist dir :verbose t))
135 #+:clfswm-install
136 (defun move-file (file where)
137 (format t "cp -R ~A ~A~%" file where)
138 (tools:fdo-shell "cp -R ~A ~A" file where))
142 #+:clfswm-install
143 (progn
144 (check-directory *install-prefix*)
145 (check-directory *install-bin*)
146 (check-directory *install-contrib*)
147 (check-directory *install-doc*)
148 (check-directory *install-man*)
149 (move-file *binary-name* *install-bin*)
150 (move-file "contrib/*" *install-contrib*)
151 (move-file "doc/*" *install-doc*)
152 (move-file "clfswm.1" *install-man*)
153 (format t "Please, adjust *contrib-dir* variable to ~A in your configuration file.~%" *install-contrib*)
154 (format t "Something like: (setf *contrib-dir* ~S)~%" *install-contrib*)
155 (sleep 0.5)
156 (tools:fdo-shell "rm -f ~A/clfswm.1.gz && gzip ~A/clfswm.1" *install-man* *install-man*)
157 (tools:uquit))