diff --git a/.gitignore b/.gitignore index de7aa723..bebff81a 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,6 @@ *.pc compositor *.jpg -*.png *~ aclocal.m4 autom4te.cache/ diff --git a/Makefile b/Makefile index 51263e5f..bf53de28 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ include config.mk -subdirs = clients spec +subdirs = clients spec data libs = libwayland-server.so libwayland-client.so all : $(libs) compositor subdirs-all scanner @@ -60,10 +60,10 @@ scanner : \ scanner : LDLIBS += $(EXPAT_LIBS) -subdirs-all subdirs-clean : +subdirs-all subdirs-clean subdirs-install: for f in $(subdirs); do $(MAKE) -C $$f $(@:subdirs-%=%); done -install : $(libs) compositor +install : $(libs) compositor subdirs-install install -d $(libdir) $(libdir)/pkgconfig ${udev_rules_dir} install $(libs) $(libdir) install wayland-server.pc wayland-client.pc $(libdir)/pkgconfig diff --git a/clients/Makefile b/clients/Makefile index cd46599e..1ff8f144 100644 --- a/clients/Makefile +++ b/clients/Makefile @@ -21,3 +21,5 @@ view : view.o window.o wayland-glib.o cairo-util.o terminal : LDLIBS += -lutil view : CFLAGS += $(POPPLER_CFLAGS) view : LDLIBS += $(POPPLER_LIBS) + +install : \ No newline at end of file diff --git a/compositor.c b/compositor.c index a1b9fcc5..89fc1a61 100644 --- a/compositor.c +++ b/compositor.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -202,17 +201,17 @@ static const struct { const char *filename; int hotspot_x, hotspot_y; } pointer_images[] = { - { "resources/bottom_left_corner.png", 6, 30 }, - { "resources/bottom_right_corner.png", 28, 28 }, - { "resources/bottom_side.png", 16, 20 }, - { "resources/grabbing.png", 20, 17 }, - { "resources/left_ptr.png", 10, 5 }, - { "resources/left_side.png", 10, 20 }, - { "resources/right_side.png", 30, 19 }, - { "resources/top_left_corner.png", 8, 8 }, - { "resources/top_right_corner.png", 26, 8 }, - { "resources/top_side.png", 18, 8 }, - { "resources/xterm.png", 15, 15 } + { DATADIR "/wayland/bottom_left_corner.png", 6, 30 }, + { DATADIR "/wayland/bottom_right_corner.png", 28, 28 }, + { DATADIR "/wayland/bottom_side.png", 16, 20 }, + { DATADIR "/wayland/grabbing.png", 20, 17 }, + { DATADIR "/wayland/left_ptr.png", 10, 5 }, + { DATADIR "/wayland/left_side.png", 10, 20 }, + { DATADIR "/wayland/right_side.png", 30, 19 }, + { DATADIR "/wayland/top_left_corner.png", 8, 8 }, + { DATADIR "/wayland/top_right_corner.png", 26, 8 }, + { DATADIR "/wayland/top_side.png", 18, 8 }, + { DATADIR "/wayland/xterm.png", 15, 15 } }; static void diff --git a/config.mk.in b/config.mk.in index 60af1cc4..c8659e1c 100644 --- a/config.mk.in +++ b/config.mk.in @@ -1,10 +1,12 @@ CFLAGS = @GCC_CFLAGS@ -O -g -Wall -MMD -MF .$*.deps +CPPFLAGS = -DDATADIR=\"$(datadir)\" prefix = @prefix@ exec_prefix = @exec_prefix@ udev_rules_dir = @sysconfdir@/udev/rules.d libdir = @libdir@ includedir = @includedir@ +datadir = @datadir@ COMPOSITOR_CFLAGS = @COMPOSITOR_CFLAGS@ COMPOSITOR_LIBS = @COMPOSITOR_LIBS@ diff --git a/data/COPYING b/data/COPYING new file mode 100644 index 00000000..b9d6c37d --- /dev/null +++ b/data/COPYING @@ -0,0 +1,6 @@ +(c) 2007-2010 Novell, Inc. + +This work is licenced under the Creative Commons Attribution-Share Alike 3.0 +United States License. To view a copy of this licence, visit +http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative +Commons, 171 Second Street, Suite 300, San Francisco, California 94105, USA. diff --git a/data/Makefile b/data/Makefile new file mode 100644 index 00000000..3a44a1b8 --- /dev/null +++ b/data/Makefile @@ -0,0 +1,21 @@ +include ../config.mk + +cursor_images = \ + bottom_left_corner.png \ + bottom_right_corner.png \ + bottom_side.png \ + grabbing.png \ + left_ptr.png \ + left_side.png \ + right_side.png \ + top_left_corner.png \ + top_right_corner.png \ + top_side.png \ + xterm.png + + +all : + +install : + install -d $(datadir)/wayland + install $(cursor_images) $(datadir)/wayland diff --git a/data/bottom_left_corner.png b/data/bottom_left_corner.png new file mode 100644 index 00000000..2d4370fe Binary files /dev/null and b/data/bottom_left_corner.png differ diff --git a/data/bottom_right_corner.png b/data/bottom_right_corner.png new file mode 100644 index 00000000..768e7778 Binary files /dev/null and b/data/bottom_right_corner.png differ diff --git a/data/bottom_side.png b/data/bottom_side.png new file mode 100644 index 00000000..ac7c70e5 Binary files /dev/null and b/data/bottom_side.png differ diff --git a/data/grabbing.png b/data/grabbing.png new file mode 100644 index 00000000..04694594 Binary files /dev/null and b/data/grabbing.png differ diff --git a/data/left_ptr.png b/data/left_ptr.png new file mode 100644 index 00000000..c42ac551 Binary files /dev/null and b/data/left_ptr.png differ diff --git a/data/left_side.png b/data/left_side.png new file mode 100644 index 00000000..2e2fab54 Binary files /dev/null and b/data/left_side.png differ diff --git a/data/right_side.png b/data/right_side.png new file mode 100644 index 00000000..d49b1142 Binary files /dev/null and b/data/right_side.png differ diff --git a/data/top_left_corner.png b/data/top_left_corner.png new file mode 100644 index 00000000..25c4e84d Binary files /dev/null and b/data/top_left_corner.png differ diff --git a/data/top_right_corner.png b/data/top_right_corner.png new file mode 100644 index 00000000..fb7727ca Binary files /dev/null and b/data/top_right_corner.png differ diff --git a/data/top_side.png b/data/top_side.png new file mode 100644 index 00000000..bf351f13 Binary files /dev/null and b/data/top_side.png differ diff --git a/data/xterm.png b/data/xterm.png new file mode 100644 index 00000000..dc054c92 Binary files /dev/null and b/data/xterm.png differ diff --git a/spec/Makefile b/spec/Makefile index bbb81ffc..26a3e23f 100644 --- a/spec/Makefile +++ b/spec/Makefile @@ -7,3 +7,5 @@ main.pdf : main.tex clean : rm -f main.pdf main.aux main.log + +install :