foxygit / doom Log in
commit d07b88e469abbb7c82d10fbe17473d529aaa4388
Author:     Simon Howard <fraggle@gmail.com>
AuthorDate: Sat May 14 21:07:55 2011 +0000
Commit:     Simon Howard <fraggle@gmail.com>
CommitDate: Sat May 14 21:07:55 2011 +0000

    Add freedesktop.org desktop files for chocolate-doom, chocolate-setup
    (thanks Adrián Chaves Fernández).

    Subversion-branch: /trunk/chocolate-doom
    Subversion-revision: 2337
---
 Makefile.am                     | 13 +------------
 NEWS                            |  4 ++++
 configure.in                    |  3 +++
 data/.gitignore                 |  4 ++++
 data/Makefile.am                | 21 +++++++++++++++++++++
 rpm.spec.in                     |  2 ++
 setup/.gitignore                |  5 ++++-
 setup/Makefile.am               |  6 ++++++
 setup/setup.desktop.in          |  7 +++++++
 src/Makefile.am                 | 10 ++++++++++
 src/doom-screensaver.desktop.in |  4 ++--
 src/doom.desktop.in             |  7 +++++++
 12 files changed, 71 insertions(+), 15 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 56c82fe8..d766ab61 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -23,16 +23,6 @@ CODEBLOCKS_FILES=                              \
 	codeblocks/setup-res.rc                \
 	codeblocks/textscreen.cbp

-DATA_FILES=                   \
-        data/README           \
-        data/doom.ico         \
-        data/doom8.ico        \
-        data/doom.png         \
-        data/setup.ico        \
-        data/setup8.ico       \
-        data/setup.png        \
-        data/convert-icon
-
 DOC_FILES=                              \
         CMDLINE                         \
         README                          \
@@ -45,7 +35,6 @@ EXTRA_DIST=                             \
         $(AUX_DIST_GEN)                 \
         $(MSVC_FILES)                   \
         $(CODEBLOCKS_FILES)             \
-        $(DATA_FILES)                   \
         $(DOC_FILES)                    \
         .lvimrc                         \
         HACKING                         \
@@ -57,7 +46,7 @@ doc_DATA=$(DOC_FILES)

 MAINTAINERCLEANFILES =  $(AUX_DIST_GEN)

-SUBDIRS=wince textscreen opl pcsound src man setup
+SUBDIRS=wince textscreen opl pcsound data src man setup
 DIST_SUBDIRS=pkg $(SUBDIRS)

 if HAVE_PYTHON
diff --git a/NEWS b/NEWS
index 72ca2670..759e6af3 100644
--- a/NEWS
+++ b/NEWS
@@ -20,6 +20,10 @@
        more polished.
      * In Mac OS X, it is now possible to simply double click an IWAD
        file in the Finder to configure its location within the launcher.
+     * Freedesktop.org desktop files are now installed for Doom and
+       the setup tool, which will appear in the main menu on desktop
+       environments such as Gnome and KDE (thanks Adrián Chaves
+       Fernández).

     Compatibility:
      * Added support for the alternate version of the Final Doom
diff --git a/configure.in b/configure.in
index 7007b96e..2ef7c41c 100644
--- a/configure.in
+++ b/configure.in
@@ -154,9 +154,12 @@ pkg/config.make
 pkg/osx/Info.plist
 pkg/osx/Info-gnustep.plist
 setup/Makefile
+setup/setup.desktop
 setup/setup-res.rc
 setup/setup-manifest.xml
+data/Makefile
 src/Makefile
+src/doom.desktop
 src/doom-screensaver.desktop
 src/resource.rc
 textscreen/Makefile
diff --git a/data/.gitignore b/data/.gitignore
new file mode 100644
index 00000000..a76bba93
--- /dev/null
+++ b/data/.gitignore
@@ -0,0 +1,4 @@
+Makefile.in
+Makefile
+*-doom.png
+*-setup.png
diff --git a/data/Makefile.am b/data/Makefile.am
new file mode 100644
index 00000000..dccb51a3
--- /dev/null
+++ b/data/Makefile.am
@@ -0,0 +1,21 @@
+
+EXTRA_DIST=              \
+        README           \
+        doom.ico         \
+        doom8.ico        \
+        doom.png         \
+        setup.ico        \
+        setup8.ico       \
+        setup.png        \
+        convert-icon
+
+iconsdir = $(prefix)/share/icons
+icons_DATA = @PROGRAM_PREFIX@doom.png   \
+             @PROGRAM_PREFIX@setup.png
+
+@PROGRAM_PREFIX@doom.png : doom.png
+	cp $^ $@
+
+@PROGRAM_PREFIX@setup.png : setup.png
+	cp $^ $@
+
diff --git a/rpm.spec.in b/rpm.spec.in
index f9c001bb..137a9517 100644
--- a/rpm.spec.in
+++ b/rpm.spec.in
@@ -51,4 +51,6 @@ rm -rf $RPM_BUILD_ROOT
 %doc %{_mandir}/man6/*
 /usr/share/doc/@PACKAGE@/*
 /usr/games/*
+/usr/share/icons/*
+/usr/share/applications/*

diff --git a/setup/.gitignore b/setup/.gitignore
index 37c8e4c1..ff78f4c5 100644
--- a/setup/.gitignore
+++ b/setup/.gitignore
@@ -1,7 +1,10 @@
 Makefile.in
 Makefile
 .deps
-chocolate-setup
+setup-manifest.xml
+setup.desktop
+*-setup
+*-setup.desktop
 *.rc
 *.exe
 tags
diff --git a/setup/Makefile.am b/setup/Makefile.am
index 96003ce0..37bea567 100644
--- a/setup/Makefile.am
+++ b/setup/Makefile.am
@@ -36,6 +36,12 @@ endif
                        @SDLMIXER_LIBS@               \
                        @LDFLAGS@

+appdir = $(prefix)/share/applications
+app_DATA = @PROGRAM_PREFIX@setup.desktop
+
+@PROGRAM_PREFIX@setup.desktop : setup.desktop
+	cp $^ $@
+
 .rc.o:
 	$(WINDRES) $^ -o $@
 %.o : %.rc
diff --git a/setup/setup.desktop.in b/setup/setup.desktop.in
new file mode 100644
index 00000000..79fb38be
--- /dev/null
+++ b/setup/setup.desktop.in
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Name=@PACKAGE_NAME@ Setup
+Exec=@PROGRAM_PREFIX@setup
+Icon=@PROGRAM_PREFIX@setup
+Type=Application
+Comment=Setup tool for @PACKAGE_NAME@
+Categories=Settings;ConsoleOnly;
diff --git a/src/Makefile.am b/src/Makefile.am
index 7a690cf1..3a2eeca6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -185,6 +185,16 @@ EXTRA_DIST =                        \
         icon.c                      \
         doom-screensaver.desktop.in

+appdir = $(prefix)/share/applications
+app_DATA = @PROGRAM_PREFIX@doom.desktop              \
+           @PROGRAM_PREFIX@doom-screensaver.desktop
+
+@PROGRAM_PREFIX@doom-screensaver.desktop: doom-screensaver.desktop
+	cp $^ $@
+
+@PROGRAM_PREFIX@doom.desktop : doom.desktop
+	cp $^ $@
+
 .rc.o:
 	$(WINDRES) $^ -o $@
 %.o : %.rc
diff --git a/src/doom-screensaver.desktop.in b/src/doom-screensaver.desktop.in
index 1d6e3303..59a087e4 100644
--- a/src/doom-screensaver.desktop.in
+++ b/src/doom-screensaver.desktop.in
@@ -1,8 +1,8 @@

 [Desktop Entry]
 Encoding=UTF-8
-Name=Doom
-Comment=DOOM by Id Software.
+Name=@PACKAGE_NAME@
+Comment=@PACKAGE_SHORTDESC@
 TryExec=@PACKAGE_PREFIX@doom
 Exec=@PACKAGE_PREFIX@doom
 StartupNotify=false
diff --git a/src/doom.desktop.in b/src/doom.desktop.in
new file mode 100644
index 00000000..44b76e62
--- /dev/null
+++ b/src/doom.desktop.in
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Name=@PACKAGE_NAME@
+Exec=@PROGRAM_PREFIX@doom
+Icon=@PROGRAM_PREFIX@doom
+Type=Application
+Comment=@PACKAGE_SHORTDESC@
+Categories=Game;ActionGame;