Re: [libav-devel] [PATCH] Add gen-rc tool for generating Windows resource files

2014-04-01 Thread Vittorio Giovara
On Mon, Mar 31, 2014 at 7:21 PM, Luca Barbato  wrote:
> On 31/03/14 15:52, Vittorio Giovara wrote:
>> Thanks for catching this, do you think you could also pick and the
>> patch that adds that too?
>>
>
> it is just a line in configure...

And a simple and nice feature for anyone willing to contribute it ^^

-- 
Vittorio
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] Add gen-rc tool for generating Windows resource files

2014-03-31 Thread Luca Barbato
On 31/03/14 15:52, Vittorio Giovara wrote:
> Thanks for catching this, do you think you could also pick and the
> patch that adds that too?
> 

it is just a line in configure...


___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] Add gen-rc tool for generating Windows resource files

2014-03-31 Thread Vittorio Giovara
On Mon, Mar 31, 2014 at 9:02 AM, James Almer  wrote:
> On 30/03/14 10:49 AM, Vittorio Giovara wrote:
>> From: Timothy Gu 
>>
>> ---
>> Anyone willing to test this on Windows would be welcome.
>> Vittorio
>>
>>  tools/gen-rc | 122 
>> +++
>>  1 file changed, 122 insertions(+)
>>  create mode 100755 tools/gen-rc
>>
>> diff --git a/tools/gen-rc b/tools/gen-rc
>> new file mode 100755
>> index 000..269f2f6
>> --- /dev/null
>> +++ b/tools/gen-rc
>> @@ -0,0 +1,122 @@
>> +#!/bin/sh
>> +#
>> +# Copyright (c) 2012 James Almer
>> +# Copyright (c) 2013 Tiancheng "Timothy" Gu
>> +#
>> +# This file is part of Libav.
>> +#
>> +# Libav is free software; you can redistribute it and/or
>> +# modify it under the terms of the GNU Lesser General Public
>> +# License as published by the Free Software Foundation; either
>> +# version 2.1 of the License, or (at your option) any later version.
>> +#
>> +# Libav is distributed in the hope that it will be useful,
>> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
>> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>> +# See the GNU Lesser General Public License for more details.
>> +#
>> +# You should have received a copy of the GNU Lesser General Public License
>> +# along with Libav; if not, write to the Free Software Foundation, Inc.,
>> +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
>> +
>> +## Help
>> +die() {
>> +cat <&2
>> +This script is used to generate Windows resources file for the Libav 
>> libraries.
>> +The output .rc file is to be compiled by windres(1). It is mainly useful for
>> +Libav developers to tweak and regenerate all resources files at once.
>> +
>> +Usage: $0  
>> +
>> +The script will output the file to '/res.rc'.
>> +
>> +Example: $0 libavcodec 'Libav codecs library'
>> +EOF
>> +exit 1
>> +}
>> +
>> +# Script to generate all:
>> +# (to remove prefix '# ' and add 'tools/' as prefix: sed -r 
>> 's/^.{2}/tools\//')
>> +# gen-rc libavutil "Libav utility library"
>> +# gen-rc libavcodec"Libav codec library"
>> +# gen-rc libavformat   "Libav container format library"
>> +# gen-rc libavdevice   "Libav device handling library"
>> +# gen-rc libavfilter   "Libav audio/video filtering library"
>> +# gen-rc libavresample "Libav audio resampling library"
>> +# gen-rc libswscale"Libav image rescaling library"
>> +
>> +## Sanity checks and argument parsing
>> +if test $# -lt 2 || test $# -gt 3; then
>> +die
>> +fi
>> +
>> +name=$1
>> +shortname=${name#lib}
>> +comment=$2
>> +capname=`echo $name | awk '{print toupper($0)}'`
>> +version=${capname}_VERSION
>> +
>> +mkdir -p "$name"
>> +output="$name/${shortname}res.rc"
>> +
>> +## REAL magic
>> +cat < $output
>> +/*
>> + * Windows resource file for $name
>> + *
>> + * Copyright (C) 2012 James Almer
>> + * Copyright (C) 2013 Tiancheng "Timothy" Gu
>> + *
>> + * This file is part of Libav.
>> + *
>> + * Libav is free software; you can redistribute it and/or
>> + * modify it under the terms of the GNU Lesser General Public
>> + * License as published by the Free Software Foundation; either
>> + * version 2.1 of the License, or (at your option) any later version.
>> + *
>> + * Libav is distributed in the hope that it will be useful,
>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
>> + * Lesser General Public License for more details.
>> + *
>> + * You should have received a copy of the GNU Lesser General Public
>> + * License along with Libav; if not, write to the Free Software
>> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
>> USA
>> + */
>> +
>> +#include "config.h"
>> +
>> +#include 
>> +
>> +#include "libavutil/version.h"
>> +
>> +#include "$name/version.h"
>> +
>> +1 VERSIONINFO
>> +FILEVERSION ${version}_MAJOR, ${version}_MINOR, ${version}_MICRO, 0
>> +PRODUCTVERSION  ${version}_MAJOR, ${version}_MINOR, ${version}_MICRO, 0
>> +FILEFLAGSMASK   VS_FFI_FILEFLAGSMASK
>> +FILEOS  VOS_NT_WINDOWS32
>> +FILETYPEVFT_DLL
>> +{
>> +BLOCK "StringFileInfo"
>> +{
>> +BLOCK "040904B0"
>> +{
>> +VALUE "CompanyName",  "Libav Project"
>> +VALUE "FileDescription",  "$comment"
>> +VALUE "FileVersion",  AV_STRINGIFY($version)
>> +VALUE "InternalName", "$name"
>> +VALUE "LegalCopyright",   "Copyright (C) 2000-" 
>> AV_STRINGIFY(CONFIG_THIS_YEAR) " Libav Project"
>
> This will fail because the commit adding CONFIG_THIS_YEAR is not in the tree.

Thanks for catching this, do you think you could also pick and the
patch that adds that too?
-- 
Vittorio
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] Add gen-rc tool for generating Windows resource files

2014-03-31 Thread James Almer
On 30/03/14 10:49 AM, Vittorio Giovara wrote:
> From: Timothy Gu 
> 
> ---
> Anyone willing to test this on Windows would be welcome.
> Vittorio
> 
>  tools/gen-rc | 122 
> +++
>  1 file changed, 122 insertions(+)
>  create mode 100755 tools/gen-rc
> 
> diff --git a/tools/gen-rc b/tools/gen-rc
> new file mode 100755
> index 000..269f2f6
> --- /dev/null
> +++ b/tools/gen-rc
> @@ -0,0 +1,122 @@
> +#!/bin/sh
> +#
> +# Copyright (c) 2012 James Almer
> +# Copyright (c) 2013 Tiancheng "Timothy" Gu
> +#
> +# This file is part of Libav.
> +#
> +# Libav is free software; you can redistribute it and/or
> +# modify it under the terms of the GNU Lesser General Public
> +# License as published by the Free Software Foundation; either
> +# version 2.1 of the License, or (at your option) any later version.
> +#
> +# Libav is distributed in the hope that it will be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> +# See the GNU Lesser General Public License for more details.
> +#
> +# You should have received a copy of the GNU Lesser General Public License
> +# along with Libav; if not, write to the Free Software Foundation, Inc.,
> +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
> +
> +## Help
> +die() {
> +cat <&2
> +This script is used to generate Windows resources file for the Libav 
> libraries.
> +The output .rc file is to be compiled by windres(1). It is mainly useful for
> +Libav developers to tweak and regenerate all resources files at once.
> +
> +Usage: $0  
> +
> +The script will output the file to '/res.rc'.
> +
> +Example: $0 libavcodec 'Libav codecs library'
> +EOF
> +exit 1
> +}
> +
> +# Script to generate all:
> +# (to remove prefix '# ' and add 'tools/' as prefix: sed -r 
> 's/^.{2}/tools\//')
> +# gen-rc libavutil "Libav utility library"
> +# gen-rc libavcodec"Libav codec library"
> +# gen-rc libavformat   "Libav container format library"
> +# gen-rc libavdevice   "Libav device handling library"
> +# gen-rc libavfilter   "Libav audio/video filtering library"
> +# gen-rc libavresample "Libav audio resampling library"
> +# gen-rc libswscale"Libav image rescaling library"
> +
> +## Sanity checks and argument parsing
> +if test $# -lt 2 || test $# -gt 3; then
> +die
> +fi
> +
> +name=$1
> +shortname=${name#lib}
> +comment=$2
> +capname=`echo $name | awk '{print toupper($0)}'`
> +version=${capname}_VERSION
> +
> +mkdir -p "$name"
> +output="$name/${shortname}res.rc"
> +
> +## REAL magic
> +cat < $output
> +/*
> + * Windows resource file for $name
> + *
> + * Copyright (C) 2012 James Almer
> + * Copyright (C) 2013 Tiancheng "Timothy" Gu
> + *
> + * This file is part of Libav.
> + *
> + * Libav is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2.1 of the License, or (at your option) any later version.
> + *
> + * Libav is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with Libav; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
> USA
> + */
> +
> +#include "config.h"
> +
> +#include 
> +
> +#include "libavutil/version.h"
> +
> +#include "$name/version.h"
> +
> +1 VERSIONINFO
> +FILEVERSION ${version}_MAJOR, ${version}_MINOR, ${version}_MICRO, 0
> +PRODUCTVERSION  ${version}_MAJOR, ${version}_MINOR, ${version}_MICRO, 0
> +FILEFLAGSMASK   VS_FFI_FILEFLAGSMASK
> +FILEOS  VOS_NT_WINDOWS32
> +FILETYPEVFT_DLL
> +{
> +BLOCK "StringFileInfo"
> +{
> +BLOCK "040904B0"
> +{
> +VALUE "CompanyName",  "Libav Project"
> +VALUE "FileDescription",  "$comment"
> +VALUE "FileVersion",  AV_STRINGIFY($version)
> +VALUE "InternalName", "$name"
> +VALUE "LegalCopyright",   "Copyright (C) 2000-" 
> AV_STRINGIFY(CONFIG_THIS_YEAR) " Libav Project"

This will fail because the commit adding CONFIG_THIS_YEAR is not in the tree.
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


[libav-devel] [PATCH] Add gen-rc tool for generating Windows resource files

2014-03-30 Thread Vittorio Giovara
From: Timothy Gu 

---
Anyone willing to test this on Windows would be welcome.
Vittorio

 tools/gen-rc | 122 +++
 1 file changed, 122 insertions(+)
 create mode 100755 tools/gen-rc

diff --git a/tools/gen-rc b/tools/gen-rc
new file mode 100755
index 000..269f2f6
--- /dev/null
+++ b/tools/gen-rc
@@ -0,0 +1,122 @@
+#!/bin/sh
+#
+# Copyright (c) 2012 James Almer
+# Copyright (c) 2013 Tiancheng "Timothy" Gu
+#
+# This file is part of Libav.
+#
+# Libav is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# Libav is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with Libav; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+## Help
+die() {
+cat <&2
+This script is used to generate Windows resources file for the Libav libraries.
+The output .rc file is to be compiled by windres(1). It is mainly useful for
+Libav developers to tweak and regenerate all resources files at once.
+
+Usage: $0  
+
+The script will output the file to '/res.rc'.
+
+Example: $0 libavcodec 'Libav codecs library'
+EOF
+exit 1
+}
+
+# Script to generate all:
+# (to remove prefix '# ' and add 'tools/' as prefix: sed -r 's/^.{2}/tools\//')
+# gen-rc libavutil "Libav utility library"
+# gen-rc libavcodec"Libav codec library"
+# gen-rc libavformat   "Libav container format library"
+# gen-rc libavdevice   "Libav device handling library"
+# gen-rc libavfilter   "Libav audio/video filtering library"
+# gen-rc libavresample "Libav audio resampling library"
+# gen-rc libswscale"Libav image rescaling library"
+
+## Sanity checks and argument parsing
+if test $# -lt 2 || test $# -gt 3; then
+die
+fi
+
+name=$1
+shortname=${name#lib}
+comment=$2
+capname=`echo $name | awk '{print toupper($0)}'`
+version=${capname}_VERSION
+
+mkdir -p "$name"
+output="$name/${shortname}res.rc"
+
+## REAL magic
+cat < $output
+/*
+ * Windows resource file for $name
+ *
+ * Copyright (C) 2012 James Almer
+ * Copyright (C) 2013 Tiancheng "Timothy" Gu
+ *
+ * This file is part of Libav.
+ *
+ * Libav is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * Libav is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Libav; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "config.h"
+
+#include 
+
+#include "libavutil/version.h"
+
+#include "$name/version.h"
+
+1 VERSIONINFO
+FILEVERSION ${version}_MAJOR, ${version}_MINOR, ${version}_MICRO, 0
+PRODUCTVERSION  ${version}_MAJOR, ${version}_MINOR, ${version}_MICRO, 0
+FILEFLAGSMASK   VS_FFI_FILEFLAGSMASK
+FILEOS  VOS_NT_WINDOWS32
+FILETYPEVFT_DLL
+{
+BLOCK "StringFileInfo"
+{
+BLOCK "040904B0"
+{
+VALUE "CompanyName",  "Libav Project"
+VALUE "FileDescription",  "$comment"
+VALUE "FileVersion",  AV_STRINGIFY($version)
+VALUE "InternalName", "$name"
+VALUE "LegalCopyright",   "Copyright (C) 2000-" 
AV_STRINGIFY(CONFIG_THIS_YEAR) " Libav Project"
+VALUE "OriginalFilename", "$shortname" BUILDSUF "-" 
AV_STRINGIFY(${version}_MAJOR) SLIBSUF
+VALUE "ProductName",  "Libav"
+VALUE "ProductVersion",   LIBAV_VERSION
+}
+}
+
+BLOCK "VarFileInfo"
+{
+VALUE "Translation", 0x0409, 0x04B0
+}
+}
+EOF
-- 
1.8.3.4 (Apple Git-47)

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel