diff mbox series

[FFmpeg-devel] windows: Remove the VS_FFI_FILEFLAGSMASK setting

Message ID 20220105122112.30960-1-martin@martin.st
State New
Headers show
Series [FFmpeg-devel] windows: Remove the VS_FFI_FILEFLAGSMASK setting | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Martin Storsjö Jan. 5, 2022, 12:21 p.m. UTC
According to the documentation, the VS_FFI_FILEFLAGSMASK mask
consists of all the following flags set:
VS_FF_DEBUG, VS_FF_PATCHED, VS_FF_PRERELEASE, VS_FF_PRIVATEBUILD,
VS_FF_SPECIALBUILD.

The documentation of these fields say e.g. this:
VS_FF_PATCHED      File has been modified and is not identical to the
                   original shipping file of the same version number.
VS_FF_PRIVATEBUILD File was not built using standard release procedures.
                   If this value is given, the StringFileInfo block must
                   contain a PrivateBuild string.

It doesn't seem like it's intentional to set all of these flags
(and setting all of them at once doesn't seem like something one
ever would want to do anyway).
---
 libavcodec/avcodecres.rc       | 1 -
 libavdevice/avdeviceres.rc     | 1 -
 libavfilter/avfilterres.rc     | 1 -
 libavformat/avformatres.rc     | 1 -
 libavutil/avutilres.rc         | 1 -
 libpostproc/postprocres.rc     | 1 -
 libswresample/swresampleres.rc | 1 -
 libswscale/swscaleres.rc       | 1 -
 tools/gen-rc                   | 1 -
 9 files changed, 9 deletions(-)

Comments

Hendrik Leppkes Jan. 5, 2022, 12:29 p.m. UTC | #1
On Wed, Jan 5, 2022 at 1:21 PM Martin Storsjö <martin@martin.st> wrote:
>
> According to the documentation, the VS_FFI_FILEFLAGSMASK mask
> consists of all the following flags set:
> VS_FF_DEBUG, VS_FF_PATCHED, VS_FF_PRERELEASE, VS_FF_PRIVATEBUILD,
> VS_FF_SPECIALBUILD.
>
> The documentation of these fields say e.g. this:
> VS_FF_PATCHED      File has been modified and is not identical to the
>                    original shipping file of the same version number.
> VS_FF_PRIVATEBUILD File was not built using standard release procedures.
>                    If this value is given, the StringFileInfo block must
>                    contain a PrivateBuild string.
>
> It doesn't seem like it's intentional to set all of these flags
> (and setting all of them at once doesn't seem like something one
> ever would want to do anyway).
>

FILEFLAGSMASK  sets the flags that are valid, not the flags that are
actually set - FILEFLAGS would do that.
So what we are actually doing is telling it all flags are valid, and
none are set (since FILEFLAGS is not set at all).

As far as I can tell, not specifying FILEFLAGSMASK is identical to
specifying it with VS_FFI_FILEFLAGSMASK, so either applying or not
should yield identical information in the binaries.

- Hendrik
James Almer Jan. 5, 2022, 12:31 p.m. UTC | #2
On 1/5/2022 9:29 AM, Hendrik Leppkes wrote:
> On Wed, Jan 5, 2022 at 1:21 PM Martin Storsjö <martin@martin.st> wrote:
>>
>> According to the documentation, the VS_FFI_FILEFLAGSMASK mask
>> consists of all the following flags set:
>> VS_FF_DEBUG, VS_FF_PATCHED, VS_FF_PRERELEASE, VS_FF_PRIVATEBUILD,
>> VS_FF_SPECIALBUILD.
>>
>> The documentation of these fields say e.g. this:
>> VS_FF_PATCHED      File has been modified and is not identical to the
>>                     original shipping file of the same version number.
>> VS_FF_PRIVATEBUILD File was not built using standard release procedures.
>>                     If this value is given, the StringFileInfo block must
>>                     contain a PrivateBuild string.
>>
>> It doesn't seem like it's intentional to set all of these flags
>> (and setting all of them at once doesn't seem like something one
>> ever would want to do anyway).
>>
> 
> FILEFLAGSMASK  sets the flags that are valid, not the flags that are
> actually set - FILEFLAGS would do that.
> So what we are actually doing is telling it all flags are valid, and
> none are set (since FILEFLAGS is not set at all).

fwiw, flagging VS_FF_DEBUG sounds like it would be nice if debug symbols 
are compiled in (the default behavior), but configure doesn't seem to 
signal it in config.mak outside of defining certain cflags and such, so 
as is it's not possible.

> 
> As far as I can tell, not specifying FILEFLAGSMASK is identical to
> specifying it with VS_FFI_FILEFLAGSMASK, so either applying or not
> should yield identical information in the binaries.
> 
> - Hendrik
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
Martin Storsjö Jan. 5, 2022, 12:36 p.m. UTC | #3
On Wed, 5 Jan 2022, Hendrik Leppkes wrote:

> On Wed, Jan 5, 2022 at 1:21 PM Martin Storsjö <martin@martin.st> wrote:
>>
>> According to the documentation, the VS_FFI_FILEFLAGSMASK mask
>> consists of all the following flags set:
>> VS_FF_DEBUG, VS_FF_PATCHED, VS_FF_PRERELEASE, VS_FF_PRIVATEBUILD,
>> VS_FF_SPECIALBUILD.
>>
>> The documentation of these fields say e.g. this:
>> VS_FF_PATCHED      File has been modified and is not identical to the
>>                    original shipping file of the same version number.
>> VS_FF_PRIVATEBUILD File was not built using standard release procedures.
>>                    If this value is given, the StringFileInfo block must
>>                    contain a PrivateBuild string.
>>
>> It doesn't seem like it's intentional to set all of these flags
>> (and setting all of them at once doesn't seem like something one
>> ever would want to do anyway).
>>
>
> FILEFLAGSMASK  sets the flags that are valid, not the flags that are
> actually set - FILEFLAGS would do that.
> So what we are actually doing is telling it all flags are valid, and
> none are set (since FILEFLAGS is not set at all).
>
> As far as I can tell, not specifying FILEFLAGSMASK is identical to
> specifying it with VS_FFI_FILEFLAGSMASK, so either applying or not
> should yield identical information in the binaries.

Oh, sorry, my bad.

Ok then, then I guess the patch description could be this:

---8<---
windows: Remove the unnecessary FILEFLAGSMASK resource version field

This field indicates what fields in FILEFLAGS (which we don't set) are 
valid. As long as we don't have any practical use of the flag, omit it for 
simplicity.
---8<---

(Or then just leave it as is as it's not wrong as I thought.)

// Martin
diff mbox series

Patch

diff --git a/libavcodec/avcodecres.rc b/libavcodec/avcodecres.rc
index 4b69686177..094fd27eb2 100644
--- a/libavcodec/avcodecres.rc
+++ b/libavcodec/avcodecres.rc
@@ -29,7 +29,6 @@ 
 1 VERSIONINFO
 FILEVERSION     LIBAVCODEC_VERSION_MAJOR, LIBAVCODEC_VERSION_MINOR, LIBAVCODEC_VERSION_MICRO, 0
 PRODUCTVERSION  LIBAVCODEC_VERSION_MAJOR, LIBAVCODEC_VERSION_MINOR, LIBAVCODEC_VERSION_MICRO, 0
-FILEFLAGSMASK   VS_FFI_FILEFLAGSMASK
 FILEOS          VOS_NT_WINDOWS32
 FILETYPE        VFT_DLL
 {
diff --git a/libavdevice/avdeviceres.rc b/libavdevice/avdeviceres.rc
index e13e73d57e..c74aa3f2d3 100644
--- a/libavdevice/avdeviceres.rc
+++ b/libavdevice/avdeviceres.rc
@@ -29,7 +29,6 @@ 
 1 VERSIONINFO
 FILEVERSION     LIBAVDEVICE_VERSION_MAJOR, LIBAVDEVICE_VERSION_MINOR, LIBAVDEVICE_VERSION_MICRO, 0
 PRODUCTVERSION  LIBAVDEVICE_VERSION_MAJOR, LIBAVDEVICE_VERSION_MINOR, LIBAVDEVICE_VERSION_MICRO, 0
-FILEFLAGSMASK   VS_FFI_FILEFLAGSMASK
 FILEOS          VOS_NT_WINDOWS32
 FILETYPE        VFT_DLL
 {
diff --git a/libavfilter/avfilterres.rc b/libavfilter/avfilterres.rc
index 8be62473e2..e0437186a9 100644
--- a/libavfilter/avfilterres.rc
+++ b/libavfilter/avfilterres.rc
@@ -29,7 +29,6 @@ 
 1 VERSIONINFO
 FILEVERSION     LIBAVFILTER_VERSION_MAJOR, LIBAVFILTER_VERSION_MINOR, LIBAVFILTER_VERSION_MICRO, 0
 PRODUCTVERSION  LIBAVFILTER_VERSION_MAJOR, LIBAVFILTER_VERSION_MINOR, LIBAVFILTER_VERSION_MICRO, 0
-FILEFLAGSMASK   VS_FFI_FILEFLAGSMASK
 FILEOS          VOS_NT_WINDOWS32
 FILETYPE        VFT_DLL
 {
diff --git a/libavformat/avformatres.rc b/libavformat/avformatres.rc
index ffe61e0d80..911b2269f2 100644
--- a/libavformat/avformatres.rc
+++ b/libavformat/avformatres.rc
@@ -29,7 +29,6 @@ 
 1 VERSIONINFO
 FILEVERSION     LIBAVFORMAT_VERSION_MAJOR, LIBAVFORMAT_VERSION_MINOR, LIBAVFORMAT_VERSION_MICRO, 0
 PRODUCTVERSION  LIBAVFORMAT_VERSION_MAJOR, LIBAVFORMAT_VERSION_MINOR, LIBAVFORMAT_VERSION_MICRO, 0
-FILEFLAGSMASK   VS_FFI_FILEFLAGSMASK
 FILEOS          VOS_NT_WINDOWS32
 FILETYPE        VFT_DLL
 {
diff --git a/libavutil/avutilres.rc b/libavutil/avutilres.rc
index 40a75eb377..e12f63db9c 100644
--- a/libavutil/avutilres.rc
+++ b/libavutil/avutilres.rc
@@ -29,7 +29,6 @@ 
 1 VERSIONINFO
 FILEVERSION     LIBAVUTIL_VERSION_MAJOR, LIBAVUTIL_VERSION_MINOR, LIBAVUTIL_VERSION_MICRO, 0
 PRODUCTVERSION  LIBAVUTIL_VERSION_MAJOR, LIBAVUTIL_VERSION_MINOR, LIBAVUTIL_VERSION_MICRO, 0
-FILEFLAGSMASK   VS_FFI_FILEFLAGSMASK
 FILEOS          VOS_NT_WINDOWS32
 FILETYPE        VFT_DLL
 {
diff --git a/libpostproc/postprocres.rc b/libpostproc/postprocres.rc
index e6104ac88b..5e6c1a6ed7 100644
--- a/libpostproc/postprocres.rc
+++ b/libpostproc/postprocres.rc
@@ -29,7 +29,6 @@ 
 1 VERSIONINFO
 FILEVERSION     LIBPOSTPROC_VERSION_MAJOR, LIBPOSTPROC_VERSION_MINOR, LIBPOSTPROC_VERSION_MICRO, 0
 PRODUCTVERSION  LIBPOSTPROC_VERSION_MAJOR, LIBPOSTPROC_VERSION_MINOR, LIBPOSTPROC_VERSION_MICRO, 0
-FILEFLAGSMASK   VS_FFI_FILEFLAGSMASK
 FILEOS          VOS_NT_WINDOWS32
 FILETYPE        VFT_DLL
 {
diff --git a/libswresample/swresampleres.rc b/libswresample/swresampleres.rc
index 1320f78b9a..f849c70276 100644
--- a/libswresample/swresampleres.rc
+++ b/libswresample/swresampleres.rc
@@ -29,7 +29,6 @@ 
 1 VERSIONINFO
 FILEVERSION     LIBSWRESAMPLE_VERSION_MAJOR, LIBSWRESAMPLE_VERSION_MINOR, LIBSWRESAMPLE_VERSION_MICRO, 0
 PRODUCTVERSION  LIBSWRESAMPLE_VERSION_MAJOR, LIBSWRESAMPLE_VERSION_MINOR, LIBSWRESAMPLE_VERSION_MICRO, 0
-FILEFLAGSMASK   VS_FFI_FILEFLAGSMASK
 FILEOS          VOS_NT_WINDOWS32
 FILETYPE        VFT_DLL
 {
diff --git a/libswscale/swscaleres.rc b/libswscale/swscaleres.rc
index 5cb8ee7023..ed8dd676b6 100644
--- a/libswscale/swscaleres.rc
+++ b/libswscale/swscaleres.rc
@@ -29,7 +29,6 @@ 
 1 VERSIONINFO
 FILEVERSION     LIBSWSCALE_VERSION_MAJOR, LIBSWSCALE_VERSION_MINOR, LIBSWSCALE_VERSION_MICRO, 0
 PRODUCTVERSION  LIBSWSCALE_VERSION_MAJOR, LIBSWSCALE_VERSION_MINOR, LIBSWSCALE_VERSION_MICRO, 0
-FILEFLAGSMASK   VS_FFI_FILEFLAGSMASK
 FILEOS          VOS_NT_WINDOWS32
 FILETYPE        VFT_DLL
 {
diff --git a/tools/gen-rc b/tools/gen-rc
index a28b013aae..37fc57eae7 100755
--- a/tools/gen-rc
+++ b/tools/gen-rc
@@ -93,7 +93,6 @@  cat <<EOF > $output
 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
 FILETYPE        VFT_DLL
 {