This is an automated email from the ASF dual-hosted git repository. leginee pushed a commit to branch win10-msvc-trunk in repository https://gitbox.apache.org/repos/asf/openoffice.git
commit dca6db7b11ff4927faa67c1855fe7a824e5082cf Author: Peter Kovacs <[email protected]> AuthorDate: Tue Aug 25 16:10:33 2026 +0200 scp2: a 64 bit install set does not need the 32 bit runtime vc_redist.scp copied both vcredist_x86.exe and vcredist_x64.exe into every Windows install set. A 64 bit office contains no 32 bit native code, so the x86 one is dead weight there -- it is unpacked, shipped in the download bundle, and never run. Checked rather than assumed. Scanning the x64 installed layout finds 341 x64 binaries and 11 that report I386, but none of them need the 32 bit redistributable: cli_basetypes / cli_ure / cli_uretypes / cli_oootypes / policy.1.0.* managed assemblies -- pure IL, they import mscoree and no C runtime gdiplus.dll imports msvcrt.dll, the operating system's own legacy CRT xmergesync.dll no C runtime import at all The 32 bit office keeps both, and must: it cross-builds the 64 bit shell extensions (shlxthdl_x64, ooofilt_x64, propertyhdl_x64, so_activex_x64) that 64 bit Explorer loads, and those do link the v14 runtime. BUILD_WIN64 was only ever read inside set_soenv.in's own conditionals and never written to the environment, so scp2 could not see it. Exported next to BUILD_X64. ToFile() skips empty values, so on a 32 bit build the variable simply does not exist and the .scp #ifndef takes the other branch -- no x86 behaviour change. Verified on both: x64 par/osl/vc_redist.par -> vcredist_x64.exe x86 par/osl/vc_redist.par -> vcredist_x64.exe, vcredist_x86.exe the x86 one regenerated from scratch after the change, not carried over. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VrM7EMKgiuyVcCUe9nSbZR --- main/scp2/source/ooo/makefile.mk | 5 +++++ main/scp2/source/ooo/vc_redist.scp | 11 +++++++++++ main/set_soenv.in | 1 + 3 files changed, 17 insertions(+) diff --git a/main/scp2/source/ooo/makefile.mk b/main/scp2/source/ooo/makefile.mk index 6eb29cbe48..04fe5c2985 100644 --- a/main/scp2/source/ooo/makefile.mk +++ b/main/scp2/source/ooo/makefile.mk @@ -47,6 +47,11 @@ SCPDEFS+=-DBUILD_SPECIAL SCPDEFS+=-DBUILD_X64 .ENDIF +# A 64 bit build ships no 32 bit binaries, so it needs only the x64 runtime. +.IF "$(BUILD_WIN64)"!="" +SCPDEFS+=-DBUILD_WIN64 +.ENDIF + .IF "$(PROF_EDITION)"!="" SCPDEFS+=-DPROF_EDITION .ENDIF diff --git a/main/scp2/source/ooo/vc_redist.scp b/main/scp2/source/ooo/vc_redist.scp index 4fe73bc7c1..1ebc011408 100644 --- a/main/scp2/source/ooo/vc_redist.scp +++ b/main/scp2/source/ooo/vc_redist.scp @@ -25,11 +25,22 @@ #if defined(WITH_VC_REDIST) +// A 64 bit office contains no 32 bit native code, so it never needs the 32 bit +// runtime. (The 32 bit office does need both: it cross-builds 64 bit shell +// extensions -- shlxthdl_x64, ooofilt_x64, propertyhdl_x64, so_activex_x64 -- which +// are loaded by 64 bit Explorer and friends.) +// +// The CLI assemblies in a 64 bit install do show up as I386 in their PE header, but +// they are managed: pure IL, marked architecture-neutral, and they import mscoree +// rather than any C runtime. gdiplus.dll imports msvcrt.dll, the operating system's +// own legacy CRT, not the redistributable one. +#ifndef BUILD_WIN64 ScpAction scp_Copy_vcredist_x86 Copy = "vcredist_x86.exe"; Name = "vcredist_x86.exe"; Subdir = "redist"; End +#endif ScpAction scp_Copy_vcredist_x64 Copy = "vcredist_x64.exe"; diff --git a/main/set_soenv.in b/main/set_soenv.in index 24a7647be3..1075bebb81 100644 --- a/main/set_soenv.in +++ b/main/set_soenv.in @@ -2000,6 +2000,7 @@ ToFile( "GRAPHITE_LIBS", "@GRAPHITE_LIBS@", "e"); ToFile( "GRAPHITE_CFLAGS", "@GRAPHITE_CFLAGS@", "e"); ToFile( "VC_STANDARD", "@VC_STANDARD@", "e" ); ToFile( "BUILD_X64", "@BUILD_X64@", "e" ); +ToFile( "BUILD_WIN64", "@BUILD_WIN64@", "e" ); ToFile( "ENABLE_CATEGORY_B", "@ENABLE_CATEGORY_B@", "e"); ToFile( "BUNDLED_EXTENSION_BLOBS", "@BUNDLED_EXTENSION_BLOBS@", "e"); ToFile( "BUNDLED_PREREG_EXTENSIONS", "@BUNDLED_PREREG_EXTENSIONS@", "e");
