3 # Copyright (c) 2012 James Almer
4 # Copyright (c) 2013 Tiancheng "Timothy" Gu
6 # This file is part of FFmpeg.
8 # FFmpeg is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU Lesser General Public
10 # License as published by the Free Software Foundation; either
11 # version 2.1 of the License, or (at your option) any later version.
13 # FFmpeg is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16 # See the GNU Lesser General Public License for more details.
18 # You should have received a copy of the GNU Lesser General Public License
19 # along with FFmpeg; if not, write to the Free Software Foundation, Inc.,
20 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
25 This script is used to generate Windows resources file for the FFmpeg libraries.
26 The output .rc file is to be compiled by windres(1). It is mainly useful for
27 FFmpeg developers to tweak and regenerate all resources files at once.
29 Usage: $0 <libname> <comment>
31 The script will output the file to '<libname>/<libname-without-lib>res.rc'.
33 Example: $0 libavcodec 'FFmpeg codecs library'
38 # Script to generate all:
39 # (to remove prefix '# ' and add 'tools/' as prefix: sed -r 's/^.{2}/tools\//')
40 # gen-rc libavutil "FFmpeg utility library"
41 # gen-rc libavcodec "FFmpeg codec library"
42 # gen-rc libavformat "FFmpeg container format library"
43 # gen-rc libavdevice "FFmpeg device handling library"
44 # gen-rc libavfilter "FFmpeg audio/video filtering library"
45 # gen-rc libpostproc "FFmpeg postprocessing library"
46 # gen-rc libavresample "Libav audio resampling library"
47 # gen-rc libswscale "FFmpeg image rescaling library"
48 # gen-rc libswresample "FFmpeg audio resampling library"
50 ## Sanity checks and argument parsing
51 if test $# -lt 2 || test $# -gt 3; then
58 capname=`echo $name | awk '{print toupper($0)}'`
59 version=${capname}_VERSION
62 output="$name/${shortname}res.rc"
67 * Windows resource file for $name
69 * Copyright (C) 2012 James Almer
70 * Copyright (C) 2013 Tiancheng "Timothy" Gu
72 * This file is part of FFmpeg.
74 * FFmpeg is free software; you can redistribute it and/or
75 * modify it under the terms of the GNU Lesser General Public
76 * License as published by the Free Software Foundation; either
77 * version 2.1 of the License, or (at your option) any later version.
79 * FFmpeg is distributed in the hope that it will be useful,
80 * but WITHOUT ANY WARRANTY; without even the implied warranty of
81 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
82 * Lesser General Public License for more details.
84 * You should have received a copy of the GNU Lesser General Public
85 * License along with FFmpeg; if not, write to the Free Software
86 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
90 #include "$name/version.h"
91 #include "libavutil/ffversion.h"
95 FILEVERSION ${version}_MAJOR, ${version}_MINOR, ${version}_MICRO, 0
96 PRODUCTVERSION ${version}_MAJOR, ${version}_MINOR, ${version}_MICRO, 0
97 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
98 FILEOS VOS_NT_WINDOWS32
101 BLOCK "StringFileInfo"
105 VALUE "CompanyName", "FFmpeg Project"
106 VALUE "FileDescription", "$comment"
107 VALUE "FileVersion", AV_STRINGIFY($version)
108 VALUE "InternalName", "$name"
109 VALUE "LegalCopyright", "Copyright (C) 2000-" AV_STRINGIFY(CONFIG_THIS_YEAR) " FFmpeg Project"
110 VALUE "OriginalFilename", "$shortname" BUILDSUF "-" AV_STRINGIFY(${version}_MAJOR) SLIBSUF
111 VALUE "ProductName", "FFmpeg"
112 VALUE "ProductVersion", FFMPEG_VERSION
118 VALUE "Translation", 0x0409, 0x04B0