Games built with recent versions of Unreal Engine (e.g. Backrooms Escape Together, Ratshaker, Abiotic Factor) refuse to start unless msvcp140_2 and vcruntime140_1 have version resources.
I took this opportunity to factor out the version numbers into their own include file so they'll be easier to change if we need to bump them in the future.
These version resources will likely stop MS redists from installing via winetricks, but we already bit that bullet with !6943, which added one to msvcp140.
-- v2: msvcp140_codecvt_ids: Add a version resource. msvcp140_atomic_wait: Add a version resource. msvcp140_2: Add a version resource. msvcp140_1: Add a version resource. vcruntime140_1: Add a version resource. vcruntime140: Add a version resource.
From: Tim Clem tclem@codeweavers.com
--- dlls/vcruntime140/Makefile.in | 3 ++- dlls/vcruntime140/version.rc | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 dlls/vcruntime140/version.rc
diff --git a/dlls/vcruntime140/Makefile.in b/dlls/vcruntime140/Makefile.in index 1f99225ffe8..e49bbc2b19d 100644 --- a/dlls/vcruntime140/Makefile.in +++ b/dlls/vcruntime140/Makefile.in @@ -2,4 +2,5 @@ MODULE = vcruntime140.dll IMPORTLIB = vcruntime140
SOURCES = \ - misc.c + misc.c \ + version.rc diff --git a/dlls/vcruntime140/version.rc b/dlls/vcruntime140/version.rc new file mode 100644 index 00000000000..fad57cd5ed2 --- /dev/null +++ b/dlls/vcruntime140/version.rc @@ -0,0 +1,26 @@ +/* + * Copyright 2024 Louis Lenders + * + * This library 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. + * + * This library 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 this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#define WINE_FILEDESCRIPTION_STR "Wine runtime library" +#define WINE_FILENAME_STR "vcruntime140.dll" +#define WINE_FILEVERSION 14,42,34433,0 +#define WINE_FILEVERSION_STR "14.42.34433.0" +#define WINE_PRODUCTVERSION 14,42,34433,0 +#define WINE_PRODUCTVERSION_STR "14.42.34433.0" + +#include "wine/wine_common_ver.rc"
From: Tim Clem tclem@codeweavers.com
--- dlls/vcruntime140_1/Makefile.in | 3 ++- dlls/vcruntime140_1/version.rc | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 dlls/vcruntime140_1/version.rc
diff --git a/dlls/vcruntime140_1/Makefile.in b/dlls/vcruntime140_1/Makefile.in index d7ed54cc588..caf50b641b4 100644 --- a/dlls/vcruntime140_1/Makefile.in +++ b/dlls/vcruntime140_1/Makefile.in @@ -6,4 +6,5 @@ SOURCES = \ except_arm64ec.c \ except_x86_64.c \ handler4.c \ - main.c + main.c \ + version.rc diff --git a/dlls/vcruntime140_1/version.rc b/dlls/vcruntime140_1/version.rc new file mode 100644 index 00000000000..b63dab5fc8f --- /dev/null +++ b/dlls/vcruntime140_1/version.rc @@ -0,0 +1,26 @@ +/* + * Copyright 2024 Louis Lenders + * + * This library 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. + * + * This library 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 this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#define WINE_FILEDESCRIPTION_STR "Wine runtime library" +#define WINE_FILENAME_STR "vcruntime140_1.dll" +#define WINE_FILEVERSION 14,42,34433,0 +#define WINE_FILEVERSION_STR "14.42.34433.0" +#define WINE_PRODUCTVERSION 14,42,34433,0 +#define WINE_PRODUCTVERSION_STR "14.42.34433.0" + +#include "wine/wine_common_ver.rc"
From: Tim Clem tclem@codeweavers.com
--- dlls/msvcp140_1/Makefile.in | 3 ++- dlls/msvcp140_1/version.rc | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 dlls/msvcp140_1/version.rc
diff --git a/dlls/msvcp140_1/Makefile.in b/dlls/msvcp140_1/Makefile.in index cb13b2a37b7..101a2124729 100644 --- a/dlls/msvcp140_1/Makefile.in +++ b/dlls/msvcp140_1/Makefile.in @@ -2,4 +2,5 @@ MODULE = msvcp140_1.dll PARENTSRC = ../msvcp90
SOURCES = \ - msvcp140_1.c + msvcp140_1.c \ + version.rc diff --git a/dlls/msvcp140_1/version.rc b/dlls/msvcp140_1/version.rc new file mode 100644 index 00000000000..3107e57c8bf --- /dev/null +++ b/dlls/msvcp140_1/version.rc @@ -0,0 +1,26 @@ +/* + * Copyright 2024 Louis Lenders + * + * This library 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. + * + * This library 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 this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#define WINE_FILEDESCRIPTION_STR "Wine runtime library" +#define WINE_FILENAME_STR "msvcp140_1.dll" +#define WINE_FILEVERSION 14,42,34433,0 +#define WINE_FILEVERSION_STR "14.42.34433.0" +#define WINE_PRODUCTVERSION 14,42,34433,0 +#define WINE_PRODUCTVERSION_STR "14.42.34433.0" + +#include "wine/wine_common_ver.rc"
From: Tim Clem tclem@codeweavers.com
--- dlls/msvcp140_2/Makefile.in | 3 ++- dlls/msvcp140_2/version.rc | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 dlls/msvcp140_2/version.rc
diff --git a/dlls/msvcp140_2/Makefile.in b/dlls/msvcp140_2/Makefile.in index 0f75819198f..5258d5c0a02 100644 --- a/dlls/msvcp140_2/Makefile.in +++ b/dlls/msvcp140_2/Makefile.in @@ -1,4 +1,5 @@ MODULE = msvcp140_2.dll
SOURCES = \ - math.c + math.c \ + version.rc diff --git a/dlls/msvcp140_2/version.rc b/dlls/msvcp140_2/version.rc new file mode 100644 index 00000000000..a6c24f8f9a4 --- /dev/null +++ b/dlls/msvcp140_2/version.rc @@ -0,0 +1,26 @@ +/* + * Copyright 2024 Louis Lenders + * + * This library 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. + * + * This library 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 this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#define WINE_FILEDESCRIPTION_STR "Wine runtime library" +#define WINE_FILENAME_STR "msvcp140_2.dll" +#define WINE_FILEVERSION 14,42,34433,0 +#define WINE_FILEVERSION_STR "14.42.34433.0" +#define WINE_PRODUCTVERSION 14,42,34433,0 +#define WINE_PRODUCTVERSION_STR "14.42.34433.0" + +#include "wine/wine_common_ver.rc"
From: Tim Clem tclem@codeweavers.com
--- dlls/msvcp140_atomic_wait/Makefile.in | 3 ++- dlls/msvcp140_atomic_wait/version.rc | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 dlls/msvcp140_atomic_wait/version.rc
diff --git a/dlls/msvcp140_atomic_wait/Makefile.in b/dlls/msvcp140_atomic_wait/Makefile.in index 81b21c812c1..4cf7ec59038 100644 --- a/dlls/msvcp140_atomic_wait/Makefile.in +++ b/dlls/msvcp140_atomic_wait/Makefile.in @@ -2,4 +2,5 @@ MODULE = msvcp140_atomic_wait.dll IMPORTS = kernelbase msvcp140
SOURCES = \ - main.c + main.c \ + version.rc diff --git a/dlls/msvcp140_atomic_wait/version.rc b/dlls/msvcp140_atomic_wait/version.rc new file mode 100644 index 00000000000..37e2e2f7578 --- /dev/null +++ b/dlls/msvcp140_atomic_wait/version.rc @@ -0,0 +1,26 @@ +/* + * Copyright 2024 Louis Lenders + * + * This library 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. + * + * This library 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 this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#define WINE_FILEDESCRIPTION_STR "Wine runtime library" +#define WINE_FILENAME_STR "msvcp140_atomic_wait.dll" +#define WINE_FILEVERSION 14,42,34433,0 +#define WINE_FILEVERSION_STR "14.42.34433.0" +#define WINE_PRODUCTVERSION 14,42,34433,0 +#define WINE_PRODUCTVERSION_STR "14.42.34433.0" + +#include "wine/wine_common_ver.rc"
From: Tim Clem tclem@codeweavers.com
--- dlls/msvcp140_codecvt_ids/Makefile.in | 3 ++- dlls/msvcp140_codecvt_ids/version.rc | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 dlls/msvcp140_codecvt_ids/version.rc
diff --git a/dlls/msvcp140_codecvt_ids/Makefile.in b/dlls/msvcp140_codecvt_ids/Makefile.in index 08590232f8e..15784a709ea 100644 --- a/dlls/msvcp140_codecvt_ids/Makefile.in +++ b/dlls/msvcp140_codecvt_ids/Makefile.in @@ -1,4 +1,5 @@ MODULE = msvcp140_codecvt_ids.dll
SOURCES = \ - main.c + main.c \ + version.rc diff --git a/dlls/msvcp140_codecvt_ids/version.rc b/dlls/msvcp140_codecvt_ids/version.rc new file mode 100644 index 00000000000..2f24ced58f5 --- /dev/null +++ b/dlls/msvcp140_codecvt_ids/version.rc @@ -0,0 +1,26 @@ +/* + * Copyright 2024 Louis Lenders + * + * This library 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. + * + * This library 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 this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#define WINE_FILEDESCRIPTION_STR "Wine runtime library" +#define WINE_FILENAME_STR "msvcp140_codecvt_ids.dll" +#define WINE_FILEVERSION 14,42,34433,0 +#define WINE_FILEVERSION_STR "14.42.34433.0" +#define WINE_PRODUCTVERSION 14,42,34433,0 +#define WINE_PRODUCTVERSION_STR "14.42.34433.0" + +#include "wine/wine_common_ver.rc"
On Mon Jun 9 19:33:00 2025 +0000, Alexandre Julliard wrote:
I don't think we need a global header for this, particularly since it only applies to this specific msvcrt version.
Ok, v2 has full rc files for each DLL.
I think it's better to only add version resources to msvcp140_2 and vcruntime140_1 (I'm assuming these are the only ones needed by the app). Version resources are preventing native dlls from being installed (if builtin version is higher).
Piotr Caban (@piotr) commented about dlls/vcruntime140/version.rc:
+/*
- Copyright 2024 Louis Lenders
```suggestion:-0+0 * Copyright 2025 Tim Clem``