Commit 07429761 authored by Avuton Olrich's avatar Avuton Olrich

win32: Add a Windows OS resource file and icon

parent 1a63663c
...@@ -353,6 +353,20 @@ src_mpd_SOURCES = \ ...@@ -353,6 +353,20 @@ src_mpd_SOURCES = \
src/stored_playlist.c \ src/stored_playlist.c \
src/timer.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 if ENABLE_DESPOTIFY
src_mpd_SOURCES += \ src_mpd_SOURCES += \
src/despotify_utils.c src/despotify_utils.c
...@@ -1309,4 +1323,5 @@ endif ...@@ -1309,4 +1323,5 @@ endif
EXTRA_DIST = $(doc_DATA) autogen.sh \ EXTRA_DIST = $(doc_DATA) autogen.sh \
$(wildcard scripts/*.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
AC_PREREQ(2.60) AC_PREREQ(2.60)
AC_INIT(mpd, 0.17~git, musicpd-dev-team@lists.sourceforge.net) 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]) AC_CONFIG_SRCDIR([src/main.c])
AM_INIT_AUTOMAKE([foreign 1.11 dist-bzip2 subdir-objects]) AM_INIT_AUTOMAKE([foreign 1.11 dist-bzip2 subdir-objects])
AM_SILENT_RULES AM_SILENT_RULES
...@@ -58,6 +65,12 @@ AC_SUBST(AM_CPPFLAGS,"") ...@@ -58,6 +65,12 @@ AC_SUBST(AM_CPPFLAGS,"")
AC_SUBST(AM_CFLAGS,"") AC_SUBST(AM_CFLAGS,"")
AC_SUBST(AM_CXXFLAGS,"") 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 ---------------------------------------------------------------------------
dnl OS Specific Defaults dnl OS Specific Defaults
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
...@@ -65,10 +78,16 @@ AC_CANONICAL_HOST ...@@ -65,10 +78,16 @@ AC_CANONICAL_HOST
case "$host_os" in case "$host_os" in
mingw32* | windows*) mingw32* | windows*)
AC_CONFIG_FILES([
src/win/mpd_win32_rc.rc
])
AC_CHECK_TOOL(WINDRES, windres)
AM_CPPFLAGS="$AM_CPPFLAGS -DWINVER=0x0501" AM_CPPFLAGS="$AM_CPPFLAGS -DWINVER=0x0501"
LIBS="$LIBS -lws2_32" LIBS="$LIBS -lws2_32"
HAVE_WINDOWS=1
;; ;;
esac esac
AM_CONDITIONAL([HAVE_WINDOWS], [test $HAVE_WINDOWS -eq 1])
if test -z "$prefix" || test "x$prefix" = xNONE; then if test -z "$prefix" || test "x$prefix" = xNONE; then
local_lib= local_lib=
......
#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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment