[Ffmpeg-devel] [PATCH] Dll information for mingw32 builds

Måns Rullgård mru
Fri Dec 22 18:41:52 CET 2006


ramiro at lisha.ufsc.br writes:

> Hello,
>
> This new patch implements dll information for Windows builds. It creates
> the .rc files on-the-fly in *configure* (much like the pkgconfig files).
> It's much simpler than changing all the version information and creating
> copies of similar files...
>
> Also works if make is done from a different folder.

[...]

> @@ -1801,10 +1808,11 @@
>  fi
>  echo ".align is power-of-two" $asmalign_pot
>  if test "$gpl" = "no" ; then
> -    echo "License: LGPL"
> +    license="LGPL"
>  else
> -    echo "License: GPL"
> +    license="GPL"
>  fi
> +echo "License: $license"
>  
>  echo "Creating config.mak and config.h..."
>  

Unrelated.

> @@ -1946,6 +1954,8 @@
>    echo "SLIBNAME_WITH_VERSION=${SLIBNAME_WITH_VERSION}" >> config.mak
>    echo "SLIBNAME_WITH_MAJOR=${SLIBNAME_WITH_MAJOR}" >> config.mak
>    echo "SLIB_EXTRA_CMD=${SLIB_EXTRA_CMD}" >> config.mak
> +  echo "SLIB_EXTRA_OBJS=${SLIB_EXTRA_OBJS}" >> config.mak
> +  echo "SLIB_EXTRA_DEP=${SLIB_EXTRA_DEP}" >> config.mak
>    echo "SLIB_INSTALL_EXTRA_CMD=${SLIB_INSTALL_EXTRA_CMD}" >> config.mak
>  fi
>  echo "LIB_INSTALL_EXTRA_CMD=${LIB_INSTALL_EXTRA_CMD}" >> config.mak
> @@ -2051,6 +2061,60 @@
>      done
>  fi
>  
> +# create dllinfo.rc files
> +if test "$dllinfo" = "yes"; then
> +    dllinfo_generate(){

IMHO defining this function outside the if..fi block would look cleaner.

> +    name=$1
> +    comment=$2
> +    version=$3
> +    major=${version%%.*}
> +    version_commas=`echo $version | sed s/\\\\./,/g`,0

Replace that sed with "tr . ,".

> +            VALUE "CompanyName",      "\000"
> +            VALUE "FileDescription",  "$comment\000"
> +            VALUE "FileVersion",      "$version\000"
> +            VALUE "InternalName",     "$name\000"

Is windows really so braindead that it requires an extra null
character at the end of those strings?  Not that I'm surprised or
anything...

> -lib:
> +lib: $(SLIB_EXTRA_DEP)

This is wrong.

BTW, what is this stuff good for?

-- 
M?ns Rullg?rd
mru at inprovide.com




More information about the ffmpeg-devel mailing list