[FFmpeg-devel] [PATCH] Add versioning information to dlls
Thu May 22 18:50:40 CEST 2008
>>>> + cat <<EOF >$TMPRC
>>>> +#include <WinVer.h>
>>>> +#include "version.h"
>>>> +VS_VERSION_INFO VERSIONINFO
>>>> + FILEVERSION $version_commas
>>>> + PRODUCTVERSION $version_commas
>>>> + FILEFLAGSMASK 0x17L
>>>> + FILEFLAGS 0x0L
>>>> + FILEOS VOS__WINDOWS32
>>>> + FILETYPE VFT_DLL
>>>> + FILESUBTYPE 0x0L
>>>> + BLOCK "StringFileInfo"
>>>> + BEGIN
>>>> + BLOCK "040904b0"
>>>> + BEGIN
>>>> + VALUE "Comments", "$license_str"
>>>> + "Source code is available at http://ffmpeg.org"
>>>> + VALUE "CompanyName", "FFmpeg"
>>>> + VALUE "FileDescription", "$description"
>>>> + VALUE "FileVersion", "$version"
>>>> + VALUE "InternalName", "$name"
>>>> + VALUE "LegalCopyright", "(C) 2000-2008 Fabrice Bellard, et al."
>>>> + VALUE "LegalTrademarks", "FFmpeg"
>>>> + VALUE "OriginalFilename", "$dllname-$major.dll"
>>> Get the version information from av*.h
>> that would be for $version, $major and $version_commas correct?
> Actually the versions come from those files, see get_version.
At configure time rather than compile time. If the version is updated
but configure is not run again, the old version information will
persist. *** Oh, it seems the build system is not ready at all for this
kind of change. It hardcodes the filenames to the version found at
configure time. So I guess this is not a problem for now.
>>> You can also let the dependency files (.d) check for version.h and
>>> av*.h. Just add a rule for %.d: %.rc, add the extra objs to DEPS, and
>>> make a DEPEND_CMD for .rc files that treats them as C files (-xc flag
>>> for gcc). That way you can avoid SLIB_EXTRA_DEP.
>> Can you elaborate?
Currently you set SLIB_EXTRA_DEP to version.h manually. That means: if
version.h is changed, recreate whatever files depended on them (in this
case SLIB_EXTRA_OBJS). When I wrote the first patch, there was no good
file dependency control like there is now. We can let the current
dependency control check for whatever files SLIB_EXTRA_OBJS depends on.
It automatically scans the file for includes or whatever.
To get that for .rc files, add a rule that creates .d files for .rc
files (just look at all the "%.d: %.*" rules in common.mak).
One problem that arises is that gcc doesn't know .rc files are actually
.c-like files that can be preprocessed correctly, so you have to find a
way for DEPEND_CMD (for the "%.d: %.rc" rule) to add the "-xc" flag to
the gcc invocation.
After that is done, add $(SLIB_EXTRA_OBJS:.o=.d) to DEPS in common.mak
so that dllinfo.d files are created. Then it should be safe to remove
More information about the ffmpeg-devel