[easytag/wip/mingw-2.1.9alpha1] Build resource and manifest into Windows binary
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag/wip/mingw-2.1.9alpha1] Build resource and manifest into Windows binary
- Date: Wed, 9 Oct 2013 08:24:33 +0000 (UTC)
commit 3f5768c382ccf356a8a6903a744aaf0815e122bb
Author: David King <amigadave amigadave com>
Date: Wed Oct 9 09:13:50 2013 +0100
Build resource and manifest into Windows binary
This adds some supplementary information into the binary, as well as the
icon.
.gitignore | 2 ++
Makefile.am | 26 +++++++++++++++++++-------
configure.ac | 6 ++++++
src/win32/easytag.rc | 4 ----
src/win32/easytag.rc.in | 31 +++++++++++++++++++++++++++++++
5 files changed, 58 insertions(+), 11 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index a51ec9b..f6b9df7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -36,4 +36,6 @@ ltmain.sh
/src/id3lib/.deps/
/src/libapetag/.deps/
/src/win32/.deps/
+/src/win32/easytag.manifest
+/src/win32/easytag.rc
stamp-h1
diff --git a/Makefile.am b/Makefile.am
index d471177..69ba60e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -109,11 +109,27 @@ easytag_headers = \
easytag_LDADD = \
$(EASYTAG_LIBS) \
- $(ID3LIB_LIBS)
+ $(ID3LIB_LIBS) \
+ $(easytag_rc)
if WINDOWS_HOST
+ICONDIR = $(srcdir)/data/icons/win32
+MANIFESTDIR = $(srcdir)/src/win32
+
+easytag_rc.$(OBJEXT): src/win32/easytag.rc src/win32/easytag.manifest data/icons/win32/easytag.ico
+ $(AM_V_GEN)$(WINDRES) -DICONDIR='\"$(ICONDIR)\"' \
+ -DMANIFESTDIR='\"$(MANIFESTDIR)\"' -i $< -o $@
+
+easytag_rc = easytag_rc.$(OBJEXT)
+
easytag_LDFLAGS = \
-Wl,--subsystem,windows
+
+easytag-$(PACKAGE_VERSION)-setup.exe: easytag-win32-installer.nsi easytag.exe Makefile
+ $(AM_V_GEN) DESTDIR=`mktemp -d` && \
+ make -C $(top_builddir) install DESTDIR=$$DESTDIR >/dev/null && \
+ makensis -NOCD -DDESTDIR=$$DESTDIR $< >/dev/null && \
+ rm -rf $$DESTDIR
endif
# NSIS installer script.
@@ -125,12 +141,6 @@ easytag-win32-installer.nsi: easytag-win32-installer.nsi.in Makefile
-e "s|\ PACKAGE_VERSION\@|$(PACKAGE_VERSION)|" \
-e "s|\ PREFIX\@|$(prefix)|" $< > $@
-easytag-$(PACKAGE_VERSION)-setup.exe: easytag-win32-installer.nsi easytag.exe Makefile
- $(AM_V_GEN) DESTDIR=`mktemp -d` && \
- make -C $(top_builddir) install DESTDIR=$$DESTDIR >/dev/null && \
- makensis -NOCD -DDESTDIR=$$DESTDIR $< >/dev/null && \
- rm -rf $$DESTDIR
-
# Create a directory stamp in the build dir. Used to workaround the case where
# a pattern rule is used for a target with a path that does not ordinarily
# exist in the build dir.
@@ -259,7 +269,9 @@ endif
CLEANFILES = \
$(check_SCRIPTS) \
$(desktop_DATA) \
+ $(easytag_rc) \
$(nodist_man_MANS) \
+ easytag-$(PACKAGE_VERSION)-setup.exe \
easytag-win32-installer.nsi
DISTCLEANFILES = \
diff --git a/configure.ac b/configure.ac
index cc1ac26..b18e4fd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -92,6 +92,11 @@ AC_MSG_RESULT([$windows_host])
AM_CONDITIONAL([WINDOWS_HOST], [test "x$windows_host" = "xyes"])
+AS_IF([test "x$windows_host" = "xyes"],
+ [AC_CHECK_TOOL([WINDRES], [windres])
+ AS_IF([test -z "$WINDRES"],
+ [AC_MSG_ERROR([windres is required when building for a Windows host])])])
+
dnl -------------------------------
dnl Configure switches.
dnl -------------------------------
@@ -331,6 +336,7 @@ AC_CONFIG_FILES([ Makefile
doc/version.xml
help/Makefile
po/Makefile.in
+ src/win32/easytag.rc
])
AC_OUTPUT
diff --git a/src/win32/easytag.rc.in b/src/win32/easytag.rc.in
new file mode 100644
index 0000000..7ef6ea3
--- /dev/null
+++ b/src/win32/easytag.rc.in
@@ -0,0 +1,31 @@
+#include "resource.h"
+
+EASYTAG_ICON ICON "data/icons/win32/easytag.ico"
+
+1 VERSIONINFO
+FILEVERSION 1,0,0,0
+PRODUCTVERSION 1,0,0,0
+
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904E4"
+ BEGIN
+ VALUE "CompanyName", "projects.gnome.org/easytag"
+ VALUE "FileDescription", "Audio file tag editor"
+ VALUE "FileVersion", "@PACKAGE_VERSION@"
+ VALUE "InternalName", "@PACKAGE_STRING@"
+ VALUE "LegalCopyright", "Copyright (C) 2000-2013 Jerome Couderc, Kip Warner, David King"
+ VALUE "OriginalFilename", "easytag.exe"
+ VALUE "ProductName", "EasyTAG"
+ VALUE "ProductVersion", "@PACKAGE_VERSION@"
+ END
+ END
+
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1252
+ END
+END
+2 ICON ICONDIR "/easytag.ico"
+3 RT_MANIFEST MANIFESTDIR "/easytag.manifest"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]