[vlc-devel] commit: Add version number to libvlc(core).dll (Christophe Mutricy )
git version control
git at videolan.org
Sun Aug 3 01:37:04 CEST 2008
vlc | branch: master | Christophe Mutricy <xtophe at videolan.org> | Sat Aug 2 19:04:36 2008 +0100| [dff7657dde79566de3bed4a81b9e0eead71345e2] | committer: Christophe Mutricy
Add version number to libvlc(core).dll
And generate the .rc with config.status rather than clutering the
Makefile
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=dff7657dde79566de3bed4a81b9e0eead71345e2
---
configure.ac | 11 ++++++++++-
projects/activex/Makefile.am | 4 ++--
projects/activex/{axvlc_rc.rc => axvlc_rc.rc.in} | 18 +++++-------------
projects/mozilla/Makefile.am | 6 ++----
projects/mozilla/{npvlc_rc.rc => npvlc_rc.rc.in} | 20 ++++++--------------
share/{vlc_win32_rc.rc => vlc_win32_rc.rc.in} | 17 +++++------------
src/Makefile.am | 13 +++++++++++--
7 files changed, 41 insertions(+), 48 deletions(-)
diff --git a/configure.ac b/configure.ac
index 77e5043..1bc0cd7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5733,7 +5733,13 @@ else
fi
AC_DEFINE_UNQUOTED(VLC_COMPILE_DOMAIN, "`dnsdomainname 2>/dev/null || domainname 2>/dev/null || echo unknown`", [domain of the host which ran configure])
AC_DEFINE_UNQUOTED(VLC_COMPILER, "`$CC -v 2>&1 | tail -n 1`", [compiler])
-
+dnl Win32 need s a numerical version_extra.
+case $( echo ${VERSION_EXTRA}|wc -m ) in
+ "1") VERSION_EXTRA_RC="0";;
+ "2") VERSION_EXTRA_RC=$( echo ${VERSION_EXTRA}|tr "abcdefghi" "123456789") ;;
+ *) VERSION_EXTRA_RC="99"
+esac
+AC_SUBST(VERSION_EXTRA_RC)
dnl
dnl Handle substvars that use $(top_srcdir)
dnl
@@ -5796,7 +5802,10 @@ AC_CONFIG_FILES([
projects/mozilla/Makefile
m4/Makefile
po/Makefile.in
+ projects/activex/axvlc_rc.rc
+ projects/mozilla/npvlc_rc.rc
share/Makefile
+ share/vlc_win32_rc.rc
src/Makefile
test/Makefile
])
diff --git a/projects/activex/Makefile.am b/projects/activex/Makefile.am
index 7c0c8b4..2d0d20a 100644
--- a/projects/activex/Makefile.am
+++ b/projects/activex/Makefile.am
@@ -48,7 +48,7 @@ SOURCES_activex = \
$(NULL)
DIST_rsrc = \
- axvlc_rc.rc \
+ axvlc_rc.rc.in \
$(NULL)
DIST_misc = \
@@ -83,7 +83,7 @@ DATA_axvlc_rc = $(noinst_axvlc_rc_DATA)
noinst_axvlc_rc_DATA = axvlc_rc.$(OBJEXT)
noinst_axvlc_rcdir =
axvlc_rc.$(OBJEXT): axvlc_rc.rc inplace.bmp axvlc.tlb
- $(WINDRES) -DVERSION=$(VERSION) -DVERSION_NUMBER=`echo $(VERSION).0.0.0 | sed 's/[^0-9]*\([0-9]*\)[^.]*\.*\([0-9]*\)[^.]*\.*\([0-9]*\)[^.]*\.*\([0-9]*\).*/\1,\2,\3,\4/'` --include-dir $(srcdir) -i $< -o $@
+ $(WINDRES) --include-dir $(srcdir) -i $< -o $@
DATA_axvlc_tlb = $(axvlc_tlb_DATA)
noinst_axvlc_tlb_DATA = axvlc.tlb
diff --git a/projects/activex/axvlc_rc.rc b/projects/activex/axvlc_rc.rc.in
similarity index 50%
rename from projects/activex/axvlc_rc.rc
rename to projects/activex/axvlc_rc.rc.in
index f4580bc..f3cf3a8 100644
--- a/projects/activex/axvlc_rc.rc
+++ b/projects/activex/axvlc_rc.rc.in
@@ -1,12 +1,4 @@
-#ifndef VERSION_NUMBER
-#define VERSION_NUMBER 0,0,0,0
-#endif
-#ifndef VERSION
-#define VERSION 0.0.0
-#endif
-
-#define STRINGIFY( z ) UGLY_KLUDGE( z )
-#define UGLY_KLUDGE( z ) #z
+#define VERSION_NUMBER @VERSION_MAJOR@, at VERSION_MINOR@, at VERSION_REVISION@, at VERSION_EXTRA_RC@
1 BITMAP "vlc16x16.bmp"
1 VERSIONINFO
@@ -19,10 +11,10 @@ BEGIN
BEGIN
BLOCK "040904E4"
BEGIN
- VALUE "CompanyName", "VideoLAN Team"
- VALUE "FileVersion", STRINGIFY( VERSION )
- VALUE "FileDescription", "VLC media player"
- VALUE "LegalCopyright", "(c) 1996-2007 VideoLAN"
+ VALUE "CompanyName", "the VideoLAN Team"
+ VALUE "FileVersion", "@VERSION@"
+ VALUE "FileDescription", "VLC media player (Activex Plugin)"
+ VALUE "LegalCopyright", "(c) @COPYRIGHT_YEARS@ the VideoLAN Team"
VALUE "OLESelfRegister", "\0"
END
END
diff --git a/projects/mozilla/Makefile.am b/projects/mozilla/Makefile.am
index 1cac822..25e0df2 100644
--- a/projects/mozilla/Makefile.am
+++ b/projects/mozilla/Makefile.am
@@ -4,7 +4,7 @@
MOSTLYCLEANFILES =
CLEANFILES = $(BUILT_SOURCES)
-EXTRA_DIST = $(DIST_sources) install.js npvlc_rc.rc vlc.r
+EXTRA_DIST = $(DIST_sources) install.js npvlc_rc.rc.in vlc.r
SOURCES_mozilla_common = \
vlcshell.cpp \
@@ -49,9 +49,7 @@ noinst_npvlc_rc_DATA = npvlc_rc.$(OBJEXT)
noinst_npvlc_rcdir =
npvlc_rc.$(OBJEXT): npvlc_rc.rc
- $(WINDRES) -DVERSION=$(VERSION) \
- -DVERSION_NUMBER=`echo $(VERSION).0.0.0 | sed 's/\([0-9]*\)[^.]*\.*\([0-9]*\)[^.]*\.*\([0-9]*\)[^.]*\.*\([0-9]*\).*/\1,\2,\3,\4/'` \
- --include-dir $(srcdir) -i $< -o $@
+ $(WINDRES) --include-dir $(srcdir) -i $< -o $@
else
if HAVE_DARWIN
diff --git a/projects/mozilla/npvlc_rc.rc b/projects/mozilla/npvlc_rc.rc.in
similarity index 76%
rename from projects/mozilla/npvlc_rc.rc
rename to projects/mozilla/npvlc_rc.rc.in
index 27357e7..995bc29 100644
--- a/projects/mozilla/npvlc_rc.rc
+++ b/projects/mozilla/npvlc_rc.rc.in
@@ -2,15 +2,7 @@
//
// VLC Plugin description.
//
-#ifndef VERSION_NUMBER
-#define VERSION_NUMBER 0,0,0,0
-#endif
-#ifndef VERSION
-#define VERSION 0.0.0
-#endif
-
-#define STRINGIFY( z ) UGLY_KLUDGE( z )
-#define UGLY_KLUDGE( z ) #z
+#define VERSION_NUMBER @VERSION_MAJOR@, at VERSION_MINOR@, at VERSION_REVISION@, at VERSION_EXTRA_RC@
//VS_VERSION_INFO VERSIONINFO
1 VERSIONINFO
@@ -32,13 +24,13 @@ BEGIN
BLOCK "040904e4"
BEGIN
VALUE "ProductName", "VLC Multimedia Plug-in\0"
- VALUE "ProductVersion", STRINGIFY( VERSION )
+ VALUE "ProductVersion", "@VERSION@"
VALUE "OriginalFilename", "npvlc.dll\0"
- VALUE "FileVersion", STRINGIFY( VERSION )
- VALUE "FileDescription", "Version " STRINGIFY( VERSION ) ", copyright 1996-2007 The VideoLAN Team<br><a href=""http://www.videolan.org/"">http://www.videolan.org/</a>\0"
+ VALUE "FileVersion", "@VERSION@"
+ VALUE "FileDescription", "Version @VERSION@, copyright @COPYRIGHT_YEARS@ The VideoLAN Team<br><a href=""http://www.videolan.org/"">http://www.videolan.org/</a>\0"
VALUE "InternalName", "npvlc\0"
- VALUE "CompanyName", "VideoLAN Team\0"
- VALUE "LegalCopyright", "Copyright \251 1996-2006 The VideoLAN Team\0"
+ VALUE "CompanyName", "the VideoLAN Team\0"
+ VALUE "LegalCopyright", "Copyright \251 @COPYRIGHT_YEARS@ The VideoLAN Team\0"
VALUE "MIMEType", "audio/mpeg|audio/x-mpeg|video/mpeg|video/x-mpeg|video/mpeg-system|video/x-mpeg-system|video/mpeg4|audio/mpeg4|application/mpeg4-iod|application/mpeg4-muxcodetable|video/x-msvideo|video/quicktime|application/x-ogg|application/ogg|application/x-vlc-plugin|video/x-ms-asf-plugin|video/x-ms-asf|application/x-mplayer2|video/x-ms-wmv|application/x-google-vlc-plugin|audio/wav|audio/x-wav|audio/3gpp|video/3gpp|audio/3gpp2|video/3gpp2|video/divx|video/flv|video/x-flv|video/x-matroska|audio/x-matroska\0"
VALUE "FileExtents", "mp2,mp3,mpga,mpega|mp2,mp3,mpga,mpega|mpg,mpeg,mpe|mpg,mpeg,mpe|mpg,mpeg,vob|mpg,mpeg,vob|mp4,mpg4|mp4,mpg4|mp4,mpg4|mp4,mpg4|avi|mov,qt|ogg|ogg|vlc|asf,asx|asf,asx||wmv||wav|wav|3gp,3gpp|3gp,3gpp|3g2,3gpp2|3g2,3gpp2|divx|flv|flv|mkv|mka\0"
VALUE "FileOpenName", "MPEG audio|MPEG audio|MPEG video|MPEG video|MPEG video|MPEG video|MPEG-4 video|MPEG-4 audio|MPEG-4 video|MPEG-4 video|AVI video|QuickTime video|Ogg stream|Ogg stream|VLC plug-in|Windows Media video|Windows Media video|Windows Media plug-in|Windows Media video|Google VLC plug-in|WAV audio|WAV audio|3GPP audio|3GPP video|3GPP2 audio|3GPP2 video|DivX video|FLV video|FLV video|Matroska video|Matroska audio\0"
diff --git a/share/vlc_win32_rc.rc b/share/vlc_win32_rc.rc.in
similarity index 51%
rename from share/vlc_win32_rc.rc
rename to share/vlc_win32_rc.rc.in
index ed040c1..d7c5ef7 100644
--- a/share/vlc_win32_rc.rc
+++ b/share/vlc_win32_rc.rc.in
@@ -1,13 +1,6 @@
-VLC_ICON ICON "vlc48x48.ico"
-#ifndef VERSION_NUMBER
-#define VERSION_NUMBER 0,0,0,0
-#endif
-#ifndef VERSION
-#define VERSION 0.0.0
-#endif
+#define VERSION_NUMBER @VERSION_MAJOR@, at VERSION_MINOR@, at VERSION_REVISION@, at VERSION_EXTRA_RC@
-#define STRINGIFY( z ) UGLY_KLUDGE( z )
-#define UGLY_KLUDGE( z ) #z
+VLC_ICON ICON "vlc48x48.ico"
1 VERSIONINFO
FILETYPE 1
@@ -19,10 +12,10 @@ BEGIN
BEGIN
BLOCK "040904E4"
BEGIN
- VALUE "CompanyName", "VideoLAN Team"
- VALUE "FileVersion", STRINGIFY( VERSION )
+ VALUE "CompanyName", "the VideoLAN Team"
+ VALUE "FileVersion", "@VERSION@"
VALUE "FileDescription", "VLC media player"
- VALUE "LegalCopyright", "(c) 1996-2006 VideoLAN"
+ VALUE "LegalCopyright", "(c) @COPYRIGHT_YEARS@ the VideoLAN Team"
END
END
BLOCK "VarFileInfo"
diff --git a/src/Makefile.am b/src/Makefile.am
index fd718ca..c439480 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -181,6 +181,10 @@ libvlccore_la_LDFLAGS = `$(VLC_CONFIG) --ldflags libvlc` $(AM_LDFLAGS) \
-version-info 0:1:0
libvlccore_la_LIBADD = `$(VLC_CONFIG) -libs libvlc` $(AM_LIBADD) $(LTLIBINTL)
libvlccore_la_DEPENDENCIES = libvlccore.sym
+if HAVE_WIN32
+libvlccore_la_DEPENDENCIES += $(DATA_win32_rc)
+libvlccore_la_LDFLAGS += -Wl,$(DATA_win32_rc)
+endif
libvlc_la_SOURCES = $(SOURCES_libvlc_control)
libvlc_la_LIBADD = libvlccore.la
@@ -190,6 +194,11 @@ libvlc_la_LDFLAGS = $(AM_LDFLAGS) \
-version-info 2:1:0 \
-export-symbols $(srcdir)/libvlc.sym
libvlc_la_DEPENDENCIES = libvlc.sym libvlccore.la
+if HAVE_WIN32
+libvlc_la_DEPENDENCIES += $(DATA_win32_rc)
+libvlc_la_LDFLAGS += -Wl,$(DATA_win32_rc)
+endif
+
EXTRA_libvlccore_la_SOURCES = \
$(SOURCES_libvlc_beos) \
@@ -471,8 +480,8 @@ if HAVE_WIN32
DATA_win32_rc = $(noinst_DATA)
noinst_DATA = vlc_win32_rc.$(OBJEXT)
-vlc_win32_rc.$(OBJEXT): $(top_srcdir)/share/vlc_win32_rc.rc
- $(WINDRES) -DVERSION=$(VERSION) -DVERSION_NUMBER=`echo $(VERSION).0.0.0 | sed 's/\([0-9]*\)[^.]*\.*\([0-9]*\)[^.]*\.*\([0-9]*\)[^.]*\.*\([0-9]*\).*/\1,\2,\3,\4/'` --include-dir $(top_srcdir)/share -i $< -o $@
+vlc_win32_rc.$(OBJEXT): $(top_builddir)/share/vlc_win32_rc.rc
+ $(WINDRES) --include-dir $(top_srcdir)/share -i $< -o $@
endif
endif
More information about the vlc-devel
mailing list