aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAvuton Olrich <avuton@gmail.com>2012-02-18 03:33:49 -0800
committerAvuton Olrich <avuton@gmail.com>2012-02-23 06:32:30 -0800
commit07429761382dc2dfc277bacf8b897a0d51402ab8 (patch)
tree83f95e10f68b539b6e0858e799843306431919d8
parent1a63663c85b7e043c75310d8cc11e61c85087724 (diff)
downloadmpd-07429761382dc2dfc277bacf8b897a0d51402ab8.tar.gz
mpd-07429761382dc2dfc277bacf8b897a0d51402ab8.tar.xz
mpd-07429761382dc2dfc277bacf8b897a0d51402ab8.zip
win32: Add a Windows OS resource file and icon
-rw-r--r--Makefile.am17
-rw-r--r--configure.ac19
-rw-r--r--src/win/mpd.icobin0 -> 353118 bytes
-rw-r--r--src/win/mpd_win32_rc.rc.in34
4 files changed, 69 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index a78d1b4bc..4f9a30780 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -353,6 +353,20 @@ src_mpd_SOURCES = \
src/stored_playlist.c \
src/timer.c
+#
+# Windows resource file
+#
+
+src/win/mpd_win32_rc.$(OBJEXT): src/win/mpd_win32_rc.rc
+ $(WINDRES) -i $< -o $@
+
+if HAVE_WINDOWS
+noinst_DATA = src/win/mpd_win32_rc.rc
+
+src_mpd_DEPENDENCIES = src/win/mpd_win32_rc.$(OBJEXT)
+src_mpd_LDFLAGS = -Wl,src/win/mpd_win32_rc.$(OBJEXT)
+endif
+
if ENABLE_DESPOTIFY
src_mpd_SOURCES += \
src/despotify_utils.c
@@ -1309,4 +1323,5 @@ endif
EXTRA_DIST = $(doc_DATA) autogen.sh \
$(wildcard scripts/*.sh) \
- $(man_MANS) $(DOCBOOK_FILES) doc/mpdconf.example doc/doxygen.conf
+ $(man_MANS) $(DOCBOOK_FILES) doc/mpdconf.example doc/doxygen.conf \
+ src/win/mpd_win32_rc.rc.in
diff --git a/configure.ac b/configure.ac
index f1de64575..95bc0183b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,12 @@
AC_PREREQ(2.60)
+
AC_INIT(mpd, 0.17~git, musicpd-dev-team@lists.sourceforge.net)
+
+VERSION_MAJOR=0
+VERSION_MINOR=17
+VERSION_REVISION=0
+VERSION_EXTRA=0
+
AC_CONFIG_SRCDIR([src/main.c])
AM_INIT_AUTOMAKE([foreign 1.11 dist-bzip2 subdir-objects])
AM_SILENT_RULES
@@ -58,6 +65,12 @@ AC_SUBST(AM_CPPFLAGS,"")
AC_SUBST(AM_CFLAGS,"")
AC_SUBST(AM_CXXFLAGS,"")
+## Used for the windows resource file
+AC_SUBST(VERSION_MAJOR)
+AC_SUBST(VERSION_MINOR)
+AC_SUBST(VERSION_REVISION)
+AC_SUBST(VERSION_EXTRA)
+
dnl ---------------------------------------------------------------------------
dnl OS Specific Defaults
dnl ---------------------------------------------------------------------------
@@ -65,10 +78,16 @@ AC_CANONICAL_HOST
case "$host_os" in
mingw32* | windows*)
+ AC_CONFIG_FILES([
+ src/win/mpd_win32_rc.rc
+ ])
+ AC_CHECK_TOOL(WINDRES, windres)
AM_CPPFLAGS="$AM_CPPFLAGS -DWINVER=0x0501"
LIBS="$LIBS -lws2_32"
+ HAVE_WINDOWS=1
;;
esac
+AM_CONDITIONAL([HAVE_WINDOWS], [test $HAVE_WINDOWS -eq 1])
if test -z "$prefix" || test "x$prefix" = xNONE; then
local_lib=
diff --git a/src/win/mpd.ico b/src/win/mpd.ico
new file mode 100644
index 000000000..86fd9fe43
--- /dev/null
+++ b/src/win/mpd.ico
Binary files differ
diff --git a/src/win/mpd_win32_rc.rc.in b/src/win/mpd_win32_rc.rc.in
new file mode 100644
index 000000000..a31118a0c
--- /dev/null
+++ b/src/win/mpd_win32_rc.rc.in
@@ -0,0 +1,34 @@
+#include <windows.h>
+
+#define VERSION_NUMBER @VERSION_MAJOR@,@VERSION_MINOR@,@VERSION_REVISION@,@VERSION_EXTRA@
+#define VERSION_NUMBER_STR "@VERSION_MAJOR@,@VERSION_MINOR@,@VERSION_REVISION@,@VERSION_EXTRA@"
+
+MPD_ICON ICON "@top_srcdir@/src/win/mpd.ico"
+
+1 VERSIONINFO
+FILETYPE VFT_APP
+FILEOS VOS__WINDOWS32
+PRODUCTVERSION VERSION_NUMBER
+
+FILEVERSION VERSION_NUMBER
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904B0"
+ BEGIN
+ VALUE "CompanyName", "Music Player Daemon Project"
+ VALUE "ProductName", "Music Player Daemon"
+ VALUE "ProductVersion", VERSION_NUMBER_STR
+ VALUE "InternalName", "mpd"
+ VALUE "OriginalFilename", "mpd.exe"
+ VALUE "FileVersion", "@VERSION@"
+ VALUE "FileDescription", "Music Player Daemon @VERSION@"
+ VALUE "LegalCopyright", "Copyright \251 The Music Player Daemon Project"
+ END
+ END
+
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END