aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2012-05-09 21:39:33 +0200
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2012-05-09 21:39:33 +0200
commite04ec59f272ef643eec2d70ccb37e6c48a334df0 (patch)
tree43277f985d88d3e7cfc057ba571b4f46b7fd2d5f
parentbb5445ab939bbe7006800fa63e9218221d5688f9 (diff)
downloadgtk-vlc-player-e04ec59f272ef643eec2d70ccb37e6c48a334df0.tar.gz
under Windows, include icon resource into binary
this is optional, if the resource compiler is not found, only a warning is emitted. * the icon is preliminary (it's the VLC icon)
-rw-r--r--configure.ac9
-rw-r--r--src/Makefile.am12
-rw-r--r--src/experiment-player.icobin0 -> 73164 bytes
-rw-r--r--src/icon.rc1
4 files changed, 21 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index a5cb1e9..c45ac69 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,6 +32,15 @@ AC_CHECK_PROG(XSLTPROC, xsltproc, xsltproc)
XSLT_FLAGS="--xinclude"
AC_SUBST(XSLT_FLAGS)
+case $host in
+*-*-mingw*)
+ AC_CHECK_PROG(RC, windres, windres)
+ if [[ x$RC = x ]]; then
+ AC_MSG_WARN([Resource compiler not found... Binary will not have an icon!])
+ fi
+esac
+AM_CONDITIONAL(USE_W32_RES, test x$RC != x)
+
#
# Checks for libraries.
#
diff --git a/src/Makefile.am b/src/Makefile.am
index f7cef88..cf6bf5f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -10,6 +10,10 @@ experiment_player_CPPFLAGS = -DDEFAULT_UI='"@DEFAULT_UI@"' \
experiment_player_LDFLAGS =
experiment_player_LDADD =
+if USE_W32_RES
+experiment_player_LDADD += icon.$(OBJEXT)
+endif
+
experiment_player_CPPFLAGS += -I@top_srcdir@/lib/gtk-vlc-player
experiment_player_LDADD += @top_srcdir@/lib/gtk-vlc-player/libgtk-vlc-player.la
@@ -19,4 +23,10 @@ experiment_player_LDADD += @LIBGTK_LIBS@
experiment_player_CFLAGS += @GTKAPP_CFLAGS@
experiment_player_LDFLAGS += @GTKAPP_LDFLAGS@
-dist_player_data_DATA = default.ui
+dist_player_data_DATA = default.ui \
+ experiment-player.ico
+
+EXTRA_DIST = icon.rc
+
+icon.$(OBJEXT) : icon.rc experiment-player.ico
+ @RC@ $< $@
diff --git a/src/experiment-player.ico b/src/experiment-player.ico
new file mode 100644
index 0000000..6337009
--- /dev/null
+++ b/src/experiment-player.ico
Binary files differ
diff --git a/src/icon.rc b/src/icon.rc
new file mode 100644
index 0000000..b473860
--- /dev/null
+++ b/src/icon.rc
@@ -0,0 +1 @@
+DEFAULT ICON "experiment-player.ico"