Skip to content

Commit 9e1e39d

Browse files
committed
Fix for #8658 Deploy missing MSVC runtime libraries
1 parent cee7854 commit 9e1e39d

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

builds/install/arch-specific/win32/BuildExecutableInstall.bat

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,14 +232,18 @@ if "%FB2_SNAPSHOT%"=="1" (
232232
:: these version numbers. %MSVC_RUNTIME_FILE_VERSION% should represent 140.
233233
:: %MSVC_RUNTIME_LIBRARY_VERSION% is based on the Visual Studio version used.
234234
:: These variables are set in setenvvar.bat.
235-
@for %%f in ( msvcp%MSVC_RUNTIME_FILE_VERSION%.dll vcruntime%MSVC_RUNTIME_FILE_VERSION%.dll ) do (
235+
:: Note 2: 32-bit vcruntime140_1.dll does not exist, hence the test for file existence
236+
@for %%f in ( msvcp%MSVC_RUNTIME_FILE_VERSION%.dll msvcp%MSVC_RUNTIME_FILE_VERSION%_1.dll vcruntime%MSVC_RUNTIME_FILE_VERSION%.dll vcruntime%MSVC_RUNTIME_FILE_VERSION%_1.dll ) do (
237+
if exist "%VCToolsRedistDir%\%VSCMD_ARG_TGT_ARCH%\Microsoft.VC%MSVC_RUNTIME_LIBRARY_VERSION%.CRT\%%f" (
236238
echo Copying "%VCToolsRedistDir%\%VSCMD_ARG_TGT_ARCH%\Microsoft.VC%MSVC_RUNTIME_LIBRARY_VERSION%.CRT\%%f"
237239
copy "%VCToolsRedistDir%\%VSCMD_ARG_TGT_ARCH%\Microsoft.VC%MSVC_RUNTIME_LIBRARY_VERSION%.CRT\%%f" %FB_OUTPUT_DIR%\ >nul
238240
if ERRORLEVEL 1 (
239-
call :ERROR Copying "%VCToolsRedistDir%\%VSCMD_ARG_TGT_ARCH%\Microsoft.VC%MSVC_RUNTIME_LIBRARY_VERSION%.CRT\%%f" failed with error %ERRLEV% & goto :EOF
241+
call :ERROR Copying "%VCToolsRedistDir%\%VSCMD_ARG_TGT_ARCH%\Microsoft.VC%MSVC_RUNTIME_LIBRARY_VERSION%.CRT\%%f" failed with error %ERRLEV% & goto :EOF
240242
)
243+
)
241244
)
242245

246+
243247
@if "%VSCMD_ARG_TGT_ARCH%"=="x86" (
244248
echo Generating fbclient_bor.lib
245249
where /Q implib.exe
@@ -250,6 +254,7 @@ if "%FB2_SNAPSHOT%"=="1" (
250254
)
251255
)
252256

257+
253258
@if "%FBBUILD_SHIP_PDB%"=="ship_pdb" (
254259
echo Copying pdb files...
255260
copy %FB_TEMP_DIR%\%FBBUILD_BUILDTYPE%\chacha\chacha.pdb %FB_OUTPUT_DIR%\plugins\ > nul

builds/install/arch-specific/win32/FirebirdInstall.iss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -560,12 +560,12 @@ Source: {#WOW64Dir}\zlib1.dll; DestDir: {app}\WOW64; Components: ClientComponent
560560
;We just install the runtimes into the install dir.
561561

562562
#if Int(msvc_runtime_major_version,14) >= 14
563-
Source: {#FilesDir}\{#msvcr_filename}{#msvc_runtime_file_version}.dll; DestDir: {app}; Components: ClientComponent; Flags: sharedfile;
564-
Source: {#FilesDir}\msvcp{#msvc_runtime_file_version}.dll; DestDir: {app}; Components: ClientComponent; Flags: sharedfile;
563+
Source: {#FilesDir}\{#msvcr_filename}{#msvc_runtime_file_version}*.dll; DestDir: {app}; Components: ClientComponent; Flags: sharedfile;
564+
Source: {#FilesDir}\msvcp{#msvc_runtime_file_version}*.dll; DestDir: {app}; Components: ClientComponent; Flags: sharedfile;
565565
#if PlatformTarget == "x64"
566566
;If we are installing on x64 we need some 32-bit libraries for compatibility with 32-bit applications
567-
Source: {#WOW64Dir}\{#msvcr_filename}{#msvc_runtime_file_version}.dll; DestDir: {app}\WOW64; Components: ClientComponent; Flags: sharedfile;
568-
Source: {#WOW64Dir}\msvcp{#msvc_runtime_file_version}.dll; DestDir: {app}\WOW64; Components: ClientComponent; Flags: sharedfile;
567+
Source: {#WOW64Dir}\{#msvcr_filename}{#msvc_runtime_file_version}*.dll; DestDir: {app}\WOW64; Components: ClientComponent; Flags: sharedfile;
568+
Source: {#WOW64Dir}\msvcp{#msvc_runtime_file_version}*.dll; DestDir: {app}\WOW64; Components: ClientComponent; Flags: sharedfile;
569569
#endif
570570
#endif /* #if Int(msvc_runtime_major_version,14) >= 10 */
571571

0 commit comments

Comments
 (0)