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 libswscale "FFmpeg image rescaling library"
47 # gen-rc libswresample "FFmpeg audio resampling library"
49 ## Sanity checks and argument parsing
50 if test $# -lt 2 || test $# -gt 3; then
57 capname=`echo $name | awk '{print toupper($0)}'`
58 version=${capname}_VERSION
61 output="$name/${shortname}res.rc"
66 * Windows resource file for $name
68 * Copyright (C) 2012 James Almer
69 * Copyright (C) 2013 Tiancheng "Timothy" Gu
71 * This file is part of FFmpeg.
73 * FFmpeg is free software; you can redistribute it and/or
74 * modify it under the terms of the GNU Lesser General Public
75 * License as published by the Free Software Foundation; either
76 * version 2.1 of the License, or (at your option) any later version.
78 * FFmpeg is distributed in the hope that it will be useful,
79 * but WITHOUT ANY WARRANTY; without even the implied warranty of
80 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
81 * Lesser General Public License for more details.
83 * You should have received a copy of the GNU Lesser General Public
84 * License along with FFmpeg; if not, write to the Free Software
85 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
89 #include "$name/version.h"
90 #include "libavutil/ffversion.h"
94 FILEVERSION ${version}_MAJOR, ${version}_MINOR, ${version}_MICRO, 0
95 PRODUCTVERSION ${version}_MAJOR, ${version}_MINOR, ${version}_MICRO, 0
96 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
97 FILEOS VOS_NT_WINDOWS32
100 BLOCK "StringFileInfo"
104 VALUE "CompanyName", "FFmpeg Project"
105 VALUE "FileDescription", "$comment"
106 VALUE "FileVersion", AV_STRINGIFY($version)
107 VALUE "InternalName", "$name"
108 VALUE "LegalCopyright", "Copyright (C) 2000-" AV_STRINGIFY(CONFIG_THIS_YEAR) " FFmpeg Project"
109 VALUE "OriginalFilename", "$shortname" BUILDSUF "-" AV_STRINGIFY(${version}_MAJOR) SLIBSUF
110 VALUE "ProductName", "FFmpeg"
111 VALUE "ProductVersion", FFMPEG_VERSION
117 VALUE "Translation", 0x0409, 0x04B0