/pidgin/main: 7f49bc843ce1: cross-win32: add version information...

Tomasz Wasilczyk twasilczyk at pidgin.im
Wed Apr 16 22:03:26 EDT 2014


Changeset: 7f49bc843ce1772e622a19ebd80a3b2819f3cff3
Author:	 Tomasz Wasilczyk <twasilczyk at pidgin.im>
Date:	 2014-04-17 04:03 +0200
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/7f49bc843ce1

Description:

cross-win32: add version information to Pidgin/libpurple binaries

diffstat:

 configure.ac                      |   4 ++++
 libpurple/Makefile.am             |  12 ++++++++++--
 libpurple/win32/libpurplerc.rc.in |   6 +++---
 pidgin/Makefile.am                |  17 ++++++++++-------
 pidgin/Makefile.mingw             |   5 ++---
 pidgin/win32/pidgin_dll_rc.rc.in  |   8 ++++----
 pidgin/win32/pidgin_exe_rc.rc.in  |   8 ++++----
 7 files changed, 37 insertions(+), 23 deletions(-)

diffs (186 lines):

diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -129,6 +129,7 @@ case "$host" in
 		DNSAPI_LIBS="-ldnsapi"
 		PLUGIN_LDFLAGS="-avoid-version -no-undefined"
 		AC_SUBST(DNSAPI_LIBS)
+		AC_CHECK_TOOL(WINDRES, windres)
 		AC_DEFINE(IS_WIN32_CROSS_COMPILED, 1,
 			[Define to 1, when building with autotools (not necessarily
 			cross-compiling) for windows. It's a temporary hack to remain
@@ -3008,6 +3009,8 @@ AC_CONFIG_FILES([Makefile
 		   pidgin/plugins/perl/common/Makefile.PL
 		   pidgin/plugins/ticker/Makefile
 		   pidgin/themes/Makefile
+		   pidgin/win32/pidgin_dll_rc.rc
+		   pidgin/win32/pidgin_exe_rc.rc
 		   libpurple/example/Makefile
 		   libpurple/gconf/Makefile
 		   libpurple/purple-3.pc
@@ -3040,6 +3043,7 @@ AC_CONFIG_FILES([Makefile
 		   libpurple/tests/Makefile
 		   libpurple/purple.h
 		   libpurple/version.h
+		   libpurple/win32/libpurplerc.rc
 		   share/sounds/Makefile
 		   share/ca-certs/Makefile
 		   finch/finch.pc
diff --git a/libpurple/Makefile.am b/libpurple/Makefile.am
--- a/libpurple/Makefile.am
+++ b/libpurple/Makefile.am
@@ -211,11 +211,18 @@ purple_coresources += \
 	win32/giowin32.c \
 	win32/libc_interface.c \
 	win32/win32dep.c
+
 purple_coreheaders += \
 	win32/libc_interface.h \
 	win32/libc_internal.h \
 	win32/win32dep.h \
 	win32/wpurpleerror.h
+
+.rc.o: %.rc
+	$(AM_V_GEN)$(WINDRES) -I$(top_srcdir)/libpurple -i $< -o $@
+
+LIBPURPLE_WIN32RES = win32/libpurplerc.o
+LIBPURPLE_WIN32RES_LDFLAGS = -Wl,$(LIBPURPLE_WIN32RES)
 endif
 
 purple_mediaheaders = \
@@ -395,9 +402,10 @@ mediainclude_HEADERS = \
 	$(addprefix $(srcdir)/media/, $(purple_mediaheaders))
 
 libpurple_la_DEPENDENCIES = \
-	$(STATIC_LINK_LIBS)
+	$(STATIC_LINK_LIBS) $(LIBPURPLE_WIN32RES)
 
-libpurple_la_LDFLAGS = -export-dynamic -version-info $(PURPLE_LT_VERSION_INFO) -no-undefined
+libpurple_la_LDFLAGS = -export-dynamic -version-info $(PURPLE_LT_VERSION_INFO) \
+	-no-undefined $(LIBPURPLE_WIN32RES_LDFLAGS)
 libpurple_la_LIBADD = \
 	$(STATIC_LINK_LIBS) \
 	$(DBUS_LIBS) \
diff --git a/libpurple/win32/libpurplerc.rc.in b/libpurple/win32/libpurplerc.rc.in
--- a/libpurple/win32/libpurplerc.rc.in
+++ b/libpurple/win32/libpurplerc.rc.in
@@ -15,12 +15,12 @@ VS_VERSION_INFO VERSIONINFO
       BLOCK "040904B0"
       BEGIN
         VALUE "CompanyName", "The Pidgin developer community"
-        VALUE "FileDescription", "LibPurple Library"
+        VALUE "FileDescription", "libpurple library"
         VALUE "FileVersion", "@PURPLE_VERSION@"
         VALUE "InternalName", "libpurple"
-        VALUE "LegalCopyright", "Copyright (C) 1998-2010 The Pidgin developer community (See the COPYRIGHT file in the source distribution)."
+        VALUE "LegalCopyright", "Copyright (C) 1998-2014 The Pidgin developer community (See the COPYRIGHT file in the source distribution)."
         VALUE "OriginalFilename", "libpurple.dll"
-        VALUE "ProductName", "LibPurple"
+        VALUE "ProductName", "libpurple"
         VALUE "ProductVersion", "@PURPLE_VERSION@"
       END
     END
diff --git a/pidgin/Makefile.am b/pidgin/Makefile.am
--- a/pidgin/Makefile.am
+++ b/pidgin/Makefile.am
@@ -156,18 +156,21 @@ libpidgin_la_SOURCES += \
 #	win32/MinimizeToTray.c
 #	win32/MinimizeToTray.h
 
-# Files not yet handled:
-#	win32/pidgin_dll_rc.rc
-#	win32/pidgin_exe_rc.rc
-
 pidgin_SOURCES += \
-	win32/winpidgin.c
+	win32/winpidgin.c \
+	win32/pidgin_exe_rc.rc
 
 libpidgin_la_headers += \
 	win32/gtkwin32dep.h \
 	win32/resource.h \
 	win32/untar.h \
 	win32/wspell.h
+
+.rc.o: %.rc
+	$(AM_V_GEN)$(WINDRES) -I$(top_srcdir)/libpurple -i $< -o $@
+
+LIBPIDGIN_WIN32RES = win32/pidgin_dll_rc.o
+LIBPIDGIN_WIN32RES_LDFLAGS = -Wl,$(LIBPIDGIN_WIN32RES)
 endif
 
 libpidginincludedir=$(includedir)/pidgin
@@ -187,8 +190,8 @@ CLEANFILES = gtkdebug.html.h
 
 gtkdebug.c: gtkdebug.html.h
 
-libpidgin_la_DEPENDENCIES = @LIBOBJS@
-libpidgin_la_LDFLAGS = -export-dynamic -no-undefined
+libpidgin_la_DEPENDENCIES = @LIBOBJS@ $(LIBPIDGIN_WIN32RES)
+libpidgin_la_LDFLAGS = -export-dynamic -no-undefined $(LIBPIDGIN_WIN32RES_LDFLAGS)
 libpidgin_la_LIBADD = \
 	@LIBOBJS@ \
 	$(GLIB_LIBS) \
diff --git a/pidgin/Makefile.mingw b/pidgin/Makefile.mingw
--- a/pidgin/Makefile.mingw
+++ b/pidgin/Makefile.mingw
@@ -152,8 +152,7 @@ gtkdialogs.c: $(PIDGIN_REVISION_H)
 
 win32/pidgin_exe_rc.rc: win32/pidgin_exe_rc.rc.in $(PIDGIN_TREE_TOP)/VERSION
 	@echo -e "  GEN\t$@"
-	@sed -e 's/@PIDGIN_VERSION@/$(PIDGIN_VERSION)/g' \
-	    -e 's/@ORIGINAL_FILENAME@/$(EXE_NAME)/' \
+	@sed -e 's/@PURPLE_VERSION@/$(PIDGIN_VERSION)/g' \
 	    $@.in > $@
 
 install_shallow: $(PIDGIN_INSTALL_DIR) $(EXE_TARGET).exe $(PIDGIN_TARGET).dll
@@ -168,7 +167,7 @@ install: install_shallow all
 
 win32/pidgin_dll_rc.rc: win32/pidgin_dll_rc.rc.in $(PIDGIN_TREE_TOP)/VERSION
 	@echo -e "  GEN\t$@"
-	@sed -e 's/@PIDGIN_VERSION@/$(PIDGIN_VERSION)/g' \
+	@sed -e 's/@PURPLE_VERSION@/$(PIDGIN_VERSION)/g' \
 	    $@.in > $@
 
 $(EXE_OBJECTS) $(PIDGIN_OBJECTS): $(PIDGIN_CONFIG_H)
diff --git a/pidgin/win32/pidgin_dll_rc.rc.in b/pidgin/win32/pidgin_dll_rc.rc.in
--- a/pidgin/win32/pidgin_dll_rc.rc.in
+++ b/pidgin/win32/pidgin_dll_rc.rc.in
@@ -16,13 +16,13 @@ VS_VERSION_INFO VERSIONINFO
       BLOCK "040904B0"
       BEGIN
         VALUE "CompanyName", "The Pidgin developer community"
-        VALUE "FileDescription", "GTK+ Pidgin Library"
-        VALUE "FileVersion", "@PIDGIN_VERSION@"
+        VALUE "FileDescription", "Pidgin UI library"
+        VALUE "FileVersion", "@PURPLE_VERSION@"
         VALUE "InternalName", "libpidgin"
-        VALUE "LegalCopyright", "Copyright (C) 1998-2010 The Pidgin developer community (See the COPYRIGHT file in the source distribution)."
+        VALUE "LegalCopyright", "Copyright (C) 1998-2014 The Pidgin developer community (See the COPYRIGHT file in the source distribution)."
         VALUE "OriginalFilename", "pidgin.dll"
         VALUE "ProductName", "Pidgin"
-        VALUE "ProductVersion", "@PIDGIN_VERSION@"
+        VALUE "ProductVersion", "@PURPLE_VERSION@"
       END
     END
     BLOCK "VarFileInfo"
diff --git a/pidgin/win32/pidgin_exe_rc.rc.in b/pidgin/win32/pidgin_exe_rc.rc.in
--- a/pidgin/win32/pidgin_exe_rc.rc.in
+++ b/pidgin/win32/pidgin_exe_rc.rc.in
@@ -17,12 +17,12 @@ VS_VERSION_INFO VERSIONINFO
       BEGIN
         VALUE "CompanyName", "The Pidgin developer community"
         VALUE "FileDescription", "Pidgin"
-        VALUE "FileVersion", "@PIDGIN_VERSION@"
+        VALUE "FileVersion", "@PURPLE_VERSION@"
         VALUE "InternalName", "pidgin"
-        VALUE "LegalCopyright", "Copyright (C) 1998-2010 The Pidgin developer community (See the COPYRIGHT file in the source distribution)."
-        VALUE "OriginalFilename", "@ORIGINAL_FILENAME@"
+        VALUE "LegalCopyright", "Copyright (C) 1998-2014 The Pidgin developer community (See the COPYRIGHT file in the source distribution)."
+        VALUE "OriginalFilename", "pidgin.exe"
         VALUE "ProductName", "Pidgin"
-        VALUE "ProductVersion", "@PIDGIN_VERSION@"
+        VALUE "ProductVersion", "@PURPLE_VERSION@"
       END
     END
     BLOCK "VarFileInfo"



More information about the Commits mailing list