Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Ensure RNSVG.dll is built with proper publisher/versioning infor…
…mation via new resource file. (#2191) On Windows, RNSVG.dll is getting flagged by AppLocker on many of our user's devices because it is missing proper publisher/versioning information in its metadata. This forces users to manually add this DLL to AppLocker's allow-list during some update/installation scenarios. The RNSVG.sln file also currently fails to build from Visual Studio directly, because the fmt project is not explicitly included from the react-native-windows Node package. Test Plan For testing, I opened RNSVG.sln in Visual Studio on Windows (with Node packages installed and other build prerequisites) and built it for Debug|x64. Without my change, building the solution fails to build directly from Visual Studio (since it fails to link fmt.lib when building the Microsoft.ReactNative project). Even when building from the terminal using MSBuild, RNSVG.dll properties do not contain proper publisher/versioning details. With my change, building the solution in Visual Studio succeeds and RNSVG.dll contains the correct publisher/versioning details in its properties. These can be viewed via File Explorer.
- Loading branch information
Showing
6 changed files
with
169 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
// Microsoft Visual C++ generated resource script. | ||
// | ||
#include "resource.h" | ||
#include "versionoverrides.rc" | ||
|
||
#define APSTUDIO_READONLY_SYMBOLS | ||
///////////////////////////////////////////////////////////////////////////// | ||
// | ||
// Generated from the TEXTINCLUDE 2 resource. | ||
// | ||
#include "winres.h" | ||
|
||
///////////////////////////////////////////////////////////////////////////// | ||
#undef APSTUDIO_READONLY_SYMBOLS | ||
|
||
///////////////////////////////////////////////////////////////////////////// | ||
// English (United States) resources | ||
|
||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) | ||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US | ||
|
||
#ifdef APSTUDIO_INVOKED | ||
///////////////////////////////////////////////////////////////////////////// | ||
// | ||
// TEXTINCLUDE | ||
// | ||
|
||
1 TEXTINCLUDE | ||
BEGIN | ||
"resource.h\0" | ||
END | ||
|
||
2 TEXTINCLUDE | ||
BEGIN | ||
"#include ""winres.h""\r\n" | ||
"\0" | ||
END | ||
|
||
3 TEXTINCLUDE | ||
BEGIN | ||
"\r\n" | ||
"\0" | ||
END | ||
|
||
#endif // APSTUDIO_INVOKED | ||
|
||
|
||
///////////////////////////////////////////////////////////////////////////// | ||
// | ||
// Version | ||
// | ||
|
||
VS_VERSION_INFO VERSIONINFO | ||
FILEVERSION RC_VER | ||
PRODUCTVERSION RC_VER | ||
FILEFLAGSMASK 0x3fL | ||
#ifdef _DEBUG | ||
FILEFLAGS 0x1L | ||
#else | ||
FILEFLAGS 0x0L | ||
#endif | ||
FILEOS 0x40004L | ||
FILETYPE 0x2L | ||
FILESUBTYPE 0x0L | ||
BEGIN | ||
BLOCK "StringFileInfo" | ||
BEGIN | ||
BLOCK "040904b0" | ||
BEGIN | ||
VALUE "CompanyName", "software-mansion" | ||
VALUE "FileDescription", "RNSVG.dll provides SVG support to React Native on Windows." | ||
VALUE "FileVersion", RC_FILE_VER | ||
VALUE "InternalName", "RNSVG.dll" | ||
VALUE "LegalCopyright", "Copyright (C) 2023" | ||
VALUE "OriginalFilename", "RNSVG.dll" | ||
VALUE "ProductName", "react-native-svg" | ||
VALUE "ProductVersion", RC_PRODUCT_VER | ||
END | ||
END | ||
BLOCK "VarFileInfo" | ||
BEGIN | ||
VALUE "Translation", 0x409, 1200 | ||
END | ||
END | ||
|
||
#endif // English (United States) resources | ||
///////////////////////////////////////////////////////////////////////////// | ||
|
||
|
||
|
||
#ifndef APSTUDIO_INVOKED | ||
///////////////////////////////////////////////////////////////////////////// | ||
// | ||
// Generated from the TEXTINCLUDE 3 resource. | ||
// | ||
|
||
|
||
///////////////////////////////////////////////////////////////////////////// | ||
#endif // not APSTUDIO_INVOKED |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
//{{NO_DEPENDENCIES}} | ||
// Microsoft Visual C++ generated include file. | ||
// Used by RNSVG.rc | ||
|
||
// Next default values for new objects | ||
// | ||
#ifdef APSTUDIO_INVOKED | ||
#ifndef APSTUDIO_READONLY_SYMBOLS | ||
#define _APS_NEXT_RESOURCE_VALUE 101 | ||
#define _APS_NEXT_COMMAND_VALUE 40001 | ||
#define _APS_NEXT_CONTROL_VALUE 1001 | ||
#define _APS_NEXT_SYMED_VALUE 101 | ||
#endif | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// Placeholder resource file to be overwritten at build-time. | ||
// | ||
#define RC_VER 14,1,0 | ||
#define RC_FILE_VER "14.1.0" | ||
#define RC_PRODUCT_VER "14.1.0" |