configure.ac | 118 +++++++++++++++++++++++++++++------------------------------ 1 file changed, 59 insertions(+), 59 deletions(-)
New commits: commit d9d976cd0ab0b52647e562d5c9cc3e492f71ee5d Author: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> AuthorDate: Thu Apr 18 12:56:50 2024 +0200 Commit: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> CommitDate: Fri Apr 26 14:01:00 2024 +0200 use unix paths for dir tests and prefer PathFormat… over manual cygpath calls. Since PathFormat checks whether the path is 8.3 compatible/in case of spaces or other incompatible characters remove some superfluous checks also drop a workaround for VS2017 (minimum requried version is 2019) Change-Id: I2d098cf323c96862c06acf7605abacbefe8a35ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166333 Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> Tested-by: Jenkins diff --git a/configure.ac b/configure.ac index 7aa526693862..554ccc8bc683 100644 --- a/configure.ac +++ b/configure.ac @@ -4142,7 +4142,8 @@ win_get_env_from_vsdevcmdbat() { local WRAPPERBATCHFILEPATH="`mktemp -t wrpXXXXXX.bat`" printf '@set VSCMD_SKIP_SENDTELEMETRY=1 ' > $WRAPPERBATCHFILEPATH - printf '@call "%s/../Common7/Tools/VsDevCmd.bat" /no_logo ' "$(cygpath -w $VC_PRODUCT_DIR)" >> $WRAPPERBATCHFILEPATH + PathFormat "$VC_PRODUCT_DIR" + printf '@call "%s/../Common7/Tools/VsDevCmd.bat" /no_logo ' "$formatted_path" >> $WRAPPERBATCHFILEPATH # use 'echo.%ENV%' syntax (instead of 'echo %ENV%') to avoid outputting "ECHO is off." in case when ENV is empty or a space printf '@setlocal @echo.%%%s%% @endlocal ' "$1" >> $WRAPPERBATCHFILEPATH local result @@ -4177,7 +4178,7 @@ find_ucrt() ide_env_file="${ide_env_dir}VsDevCmd.bat" if test -f "$ide_env_file"; then PathFormat "$(win_get_env_from_vsdevcmdbat UniversalCRTSdkDir)" - UCRTSDKDIR=$formatted_path + UCRTSDKDIR=$formatted_path_unix UCRTVERSION=$(win_get_env_from_vsdevcmdbat UCRTVersion) dnl Hack needed at least by tml: if test "$UCRTVERSION" = 10.0.15063.0 \ @@ -4371,9 +4372,9 @@ if test "$_os" = "WINNT"; then fi # Find the version of devenv.exe - # MSVC 2017 devenv does not start properly from a DOS 8.3 path - DEVENV=$(cygpath -lm "$VC_PRODUCT_DIR/../Common7/IDE/devenv.exe") - DEVENV_unix=$(cygpath -u "$DEVENV") + PathFormat "$VC_PRODUCT_DIR/../Common7/IDE/devenv.exe" + DEVENV="$formatted_path" + DEVENV_unix="$formatted_path_unix" if test ! -e "$DEVENV_unix"; then AC_MSG_WARN([No devenv.exe found - this is expected for VC++ Build Tools]) fi @@ -4398,11 +4399,10 @@ if test "$_os" = "WINNT"; then # Remove /cl.exe from CC case insensitive AC_MSG_NOTICE([found Visual C++ $vcyear]) - main_include_dir=`cygpath -d -m "$COMPATH/Include"` - CPPFLAGS="$CPPFLAGS -I$main_include_dir" - PathFormat "$COMPATH" - COMPATH=`win_short_path_for_make "$formatted_path"` + COMPATH="$formatted_path" + COMPATH_unix="$formatted_path_unix" + CPPFLAGS="$CPPFLAGS -I$COMPATH/Include" VCVER=$vcnumwithdot VCTOOLSET=$vctoolset @@ -6733,15 +6733,10 @@ find_winsdk_version() winsdkbinsubdir="$regvalue".0 winsdklibsubdir=$winsdkbinsubdir local tmppath="$winsdktest\Include\$winsdklibsubdir" - local tmppath_unix=$(cygpath -u "$tmppath") + PathFormat "$tmppath" + local tmppath_unix=$formatted_path_unix # test exist the SDK path - if test -d "$tmppath_unix"; then - # when path is convertible to a short path then path is okay - cygpath -d "$tmppath" >/dev/null 2>&1 - if test $? -ne 0; then - AC_MSG_ERROR([Windows SDK doesn't have a 8.3 name, see NtfsDisable8dot3NameCreation]) - fi - else + if test ! -d "$tmppath_unix"; then AC_MSG_ERROR([The Windows SDK not found, check the installation]) fi fi @@ -6847,8 +6842,8 @@ if test "$_os" = "WINNT"; then # normalize if found if test -n "$WINDOWS_SDK_HOME"; then - WINDOWS_SDK_HOME=`cygpath -d "$WINDOWS_SDK_HOME"` - WINDOWS_SDK_HOME=`cygpath -u "$WINDOWS_SDK_HOME"` + PathFormat "$WINDOWS_SDK_HOME" + WINDOWS_SDK_HOME=$formatted_path_unix fi WINDOWS_SDK_LIB_SUBDIR=$winsdklibsubdir @@ -6916,9 +6911,9 @@ the Windows SDK are installed.]) WINDOWS_SDK_HOME_unix="$formatted_path_unix" if test "$build_os" = "cygwin" -o "$build_os" = "wsl"; then SOLARINC="$SOLARINC -I$WINDOWS_SDK_HOME/include -I$COMPATH/Include" - if test -d "$WINDOWS_SDK_HOME/include/um"; then + if test -d "$WINDOWS_SDK_HOME_unix/include/um"; then SOLARINC="$SOLARINC -I$WINDOWS_SDK_HOME/include/um -I$WINDOWS_SDK_HOME/include/shared" - elif test -d "$WINDOWS_SDK_HOME/Include/$winsdklibsubdir/um"; then + elif test -d "$WINDOWS_SDK_HOME_unix/Include/$winsdklibsubdir/um"; then SOLARINC="$SOLARINC -I$WINDOWS_SDK_HOME/Include/$winsdklibsubdir/um -I$WINDOWS_SDK_HOME/Include/$winsdklibsubdir/shared" fi fi @@ -6931,20 +6926,18 @@ the Windows SDK are installed.]) dnl better, but I do not know under which conditions exactly it is needed by dnl msiglobal.pm: if test -z "$WINDOWS_SDK_WILANGID" -a -n "$WINDOWS_SDK_HOME"; then - WINDOWS_SDK_WILANGID=$WINDOWS_SDK_HOME/Samples/sysmgmt/msi/scripts/WiLangId.vbs - WINDOWS_SDK_WILANGID_unix=$(cygpath -u "$WINDOWS_SDK_WILANGID") + WINDOWS_SDK_WILANGID_unix=$WINDOWS_SDK_HOME_unix/Samples/sysmgmt/msi/scripts/WiLangId.vbs if ! test -e "$WINDOWS_SDK_WILANGID_unix" ; then - WINDOWS_SDK_WILANGID="${WINDOWS_SDK_HOME}/bin/${WINDOWS_SDK_LIB_SUBDIR}/${WIN_BUILD_ARCH}/WiLangId.vbs" - WINDOWS_SDK_WILANGID_unix=$(cygpath -u "$WINDOWS_SDK_WILANGID") + WINDOWS_SDK_WILANGID_unix="${WINDOWS_SDK_HOME_unix}/bin/${WINDOWS_SDK_LIB_SUBDIR}/${WIN_BUILD_ARCH}/WiLangId.vbs" fi if ! test -e "$WINDOWS_SDK_WILANGID_unix" ; then - WINDOWS_SDK_WILANGID=$WINDOWS_SDK_HOME/bin/$WIN_BUILD_ARCH/WiLangId.vbs - WINDOWS_SDK_WILANGID_unix=$(cygpath -u "$WINDOWS_SDK_WILANGID") + WINDOWS_SDK_WILANGID_unix=$WINDOWS_SDK_HOME_unix/bin/$WIN_BUILD_ARCH/WiLangId.vbs fi if ! test -e "$WINDOWS_SDK_WILANGID_unix" ; then - WINDOWS_SDK_WILANGID=$(cygpath -sm "C:/Program Files (x86)/Windows Kits/8.1/bin/$WIN_BUILD_ARCH/WiLangId.vbs") - WINDOWS_SDK_WILANGID_unix=$(cygpath -u "$WINDOWS_SDK_WILANGID") + WINDOWS_SDK_WILANGID_unix="C:/Program Files (x86)/Windows Kits/8.1/bin/$WIN_BUILD_ARCH/WiLangId.vbs" fi + PathFormat "$WINDOWS_SDK_WILANGID_unix" + WINDOWS_SDK_WILANGID="$formatted_path" fi if test -n "$with_lang" -a "$with_lang" != "en-US"; then if test -n "$with_package_format" -a "$with_package_format" != no; then @@ -6976,13 +6969,13 @@ if test "$build_os" = "cygwin" -o "$build_os" = "wsl"; then if test -n "$winsdkbinsubdir" \ -a -f "$winsdktest_unix/Bin/$winsdkbinsubdir/$WIN_BUILD_ARCH/midl.exe" then - MIDL_PATH=$winsdktest/Bin/$winsdkbinsubdir/$WIN_BUILD_ARCH + MIDL_PATH=$winsdktest_unix/Bin/$winsdkbinsubdir/$WIN_BUILD_ARCH WINDOWS_SDK_BINDIR_NO_ARCH=$WINDOWS_SDK_HOME_unix/Bin/$winsdkbinsubdir elif test -f "$winsdktest_unix/Bin/$WIN_BUILD_ARCH/midl.exe"; then - MIDL_PATH=$winsdktest/Bin/$WIN_BUILD_ARCH + MIDL_PATH=$winsdktest_unix/Bin/$WIN_BUILD_ARCH WINDOWS_SDK_BINDIR_NO_ARCH=$WINDOWS_SDK_HOME_unix/Bin elif test -f "$winsdktest_unix/Bin/midl.exe"; then - MIDL_PATH=$winsdktest/Bin + MIDL_PATH=$winsdktest_unix/Bin WINDOWS_SDK_BINDIR_NO_ARCH=$WINDOWS_SDK_HOME_unix/Bin fi PathFormat "$MIDL_PATH" @@ -8667,12 +8660,15 @@ if test $_os = "WINNT"; then dnl explicitly disabled UCRT_REDISTDIR="" else - if ! test -f "$UCRT_REDISTDIR/Windows6.1-KB2999226-x64.msu" -a \ - -f "$UCRT_REDISTDIR/Windows6.1-KB2999226-x86.msu" -a \ - -f "$UCRT_REDISTDIR/Windows8.1-KB2999226-x64.msu" -a \ - -f "$UCRT_REDISTDIR/Windows8.1-KB2999226-x86.msu" -a \ - -f "$UCRT_REDISTDIR/Windows8-RT-KB2999226-x64.msu" -a \ - -f "$UCRT_REDISTDIR/Windows8-RT-KB2999226-x86.msu"; then + PathFormat "$UCRT_REDISTDIR" + UCRT_REDISTDIR="$formatted_path" + UCRT_REDISTDIR_unix="$formatted_path_unix" + if ! test -f "$UCRT_REDISTDIR_unix/Windows6.1-KB2999226-x64.msu" -a \ + -f "$UCRT_REDISTDIR_unix/Windows6.1-KB2999226-x86.msu" -a \ + -f "$UCRT_REDISTDIR_unix/Windows8.1-KB2999226-x64.msu" -a \ + -f "$UCRT_REDISTDIR_unix/Windows8.1-KB2999226-x86.msu" -a \ + -f "$UCRT_REDISTDIR_unix/Windows8-RT-KB2999226-x64.msu" -a \ + -f "$UCRT_REDISTDIR_unix/Windows8-RT-KB2999226-x86.msu"; then UCRT_REDISTDIR="" if test -n "$PKGFORMAT"; then for i in $PKGFORMAT; do @@ -14101,7 +14097,8 @@ if test "$ENABLE_JAVA" != "" -a "$NEED_ANT" = "TRUE" -a "$cross_compiling" != "y else if test "$_os" = "WINNT"; then # AC_PATH_PROGS needs unix path - with_ant_home=`cygpath -u "$with_ant_home"` + PathFormat "$with_ant_home" + with_ant_home="$formatted_path_unix" fi AbsolutePath "$with_ant_home" with_ant_home=$absolute_path @@ -15179,10 +15176,10 @@ AC_MSG_NOTICE([setting up the build environment variables...]) AC_SUBST(COMPATH) if test "$build_os" = "cygwin" -o "$build_os" = wsl; then - if test -d "$COMPATH/atlmfc/lib/spectre"; then + if test -d "$COMPATH_unix/atlmfc/lib/spectre"; then ATL_LIB="$COMPATH/atlmfc/lib/spectre" ATL_INCLUDE="$COMPATH/atlmfc/include" - elif test -d "$COMPATH/atlmfc/lib"; then + elif test -d "$COMPATH_unix/atlmfc/lib"; then ATL_LIB="$COMPATH/atlmfc/lib" ATL_INCLUDE="$COMPATH/atlmfc/include" else commit 8cb68694c8ac58c1ae85f3bc36f7bf81707e4783 Author: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> AuthorDate: Thu Apr 18 12:37:38 2024 +0200 Commit: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> CommitDate: Fri Apr 26 14:00:50 2024 +0200 configure.ac: split registry path from registry key in preparation for an upcoming change to read values using reg.exe Also fixes a bug in determining UCRTVERSION from the Windows SDK's ProductVersion registry value (misses trailing .0) Change-Id: I66236ba6bf38393e6f7c7ab83706657a6e96769c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166332 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> diff --git a/configure.ac b/configure.ac index 4aa7b05bbbb5..7aa526693862 100644 --- a/configure.ac +++ b/configure.ac @@ -3935,11 +3935,11 @@ reg_get_value() unset regvalue if test "$build_os" = "wsl"; then - regvalue=$($WSL_LO_HELPER --read-registry $1 "$2" 2>/dev/null) + regvalue=$($WSL_LO_HELPER --read-registry $1 "$2/$3" 2>/dev/null) return fi - local _regentry="/proc/registry${1}/${2}" + local _regentry="/proc/registry${1}/${2}/${3}" if test -f "$_regentry"; then # Stop bash complaining about # Registry keys read via /proc/registry* are always @@ -3953,13 +3953,13 @@ reg_get_value() # Get a value from the 32-bit side of the Registry reg_get_value_32() { - reg_get_value "32" "$1" + reg_get_value "32" "$1" "$2" } # Get a value from the 64-bit side of the Registry reg_get_value_64() { - reg_get_value "64" "$1" + reg_get_value "64" "$1" "$2" } reg_list_values() @@ -4158,12 +4158,15 @@ win_get_env_from_vsdevcmdbat() find_ucrt() { - reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/Windows/v10.0/InstallationFolder" + reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/Windows/v10.0" "InstallationFolder" if test -n "$regvalue"; then PathFormat "$regvalue" UCRTSDKDIR=$formatted_path_unix - reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/Windows/v10.0/ProductVersion" - UCRTVERSION=$regvalue + reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/Windows/v10.0" "ProductVersion" + if test -n "$regvalue"; then + UCRTVERSION="$regvalue".0 + fi + # Rest if not exist if ! test -d "${UCRTSDKDIR}Include/$UCRTVERSION/ucrt"; then UCRTSDKDIR= @@ -4352,7 +4355,7 @@ if test "$_os" = "WINNT"; then AC_MSG_CHECKING([for MSBuild.exe location for: $vcnumwithdot]) # Find the proper version of MSBuild.exe to use based on the VS version - reg_get_value_32 HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/MSBuild/$vcnumwithdot/MSBuildOverrideTasksPath + reg_get_value_32 HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/MSBuild/$vcnumwithdot MSBuildOverrideTasksPath if test -z "$regvalue" ; then if test "$WIN_BUILD_ARCH" != "x64"; then regvalue="$VC_PRODUCT_DIR/../MSBuild/Current/Bin" @@ -6649,7 +6652,7 @@ find_csc() unset csctest - reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/NET Framework Setup/NDP/v4/Client/InstallPath" + reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/NET Framework Setup/NDP/v4/Client" "InstallPath" if test -n "$regvalue"; then csctest=$regvalue return @@ -6664,7 +6667,7 @@ find_al() # We need this check to detect 4.6.1 or above. for ver in 4.8.1 4.8 4.7.2 4.7.1 4.7 4.6.2 4.6.1; do - reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/NETFXSDK/$ver/WinSDK-NetFx40Tools/InstallationFolder" + reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/NETFXSDK/$ver/WinSDK-NetFx40Tools" "InstallationFolder" PathFormat "$regvalue" if test -n "$regvalue" -a \( -f "$formatted_path_unix/al.exe" -o -f "$formatted_path_unix/bin/al.exe" \); then altest=$regvalue @@ -6674,7 +6677,7 @@ find_al() reg_list_values_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/Windows" for x in $reglist; do - reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/Windows/$x/WinSDK-NetFx40Tools/InstallationFolder" + reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/Windows/$x/WinSDK-NetFx40Tools" "InstallationFolder" PathFormat "$regvalue" if test -n "$regvalue" -a \( -f "$formatted_path_unix/al.exe" -o -f "$formatted_path_unix/bin/al.exe" \); then altest=$regvalue @@ -6688,7 +6691,7 @@ find_dotnetsdk() unset frametest for ver in 4.8.1 4.8 4.7.2 4.7.1 4.7 4.6.2 4.6.1 4.6; do - reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/NETFXSDK/$ver/KitsInstallationFolder" + reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/NETFXSDK/$ver" "KitsInstallationFolder" if test -n "$regvalue"; then frametest=$regvalue return @@ -6706,7 +6709,7 @@ find_winsdk_version() case "$1" in 8.0|8.0A) - reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows Kits/Installed Roots/KitsRoot" + reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows Kits/Installed Roots" "KitsRoot" if test -n "$regvalue"; then winsdktest=$regvalue winsdklibsubdir=win8 @@ -6714,7 +6717,7 @@ find_winsdk_version() fi ;; 8.1|8.1A) - reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows Kits/Installed Roots/KitsRoot81" + reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows Kits/Installed Roots" "KitsRoot81" if test -n "$regvalue"; then winsdktest=$regvalue winsdklibsubdir=winv6.3 @@ -6722,10 +6725,10 @@ find_winsdk_version() fi ;; 10.0) - reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/Windows/v${1}/InstallationFolder" + reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/Windows/v${1}" "InstallationFolder" if test -n "$regvalue"; then winsdktest=$regvalue - reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/Windows/v${1}/ProductVersion" + reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/Windows/v${1}" "ProductVersion" if test -n "$regvalue"; then winsdkbinsubdir="$regvalue".0 winsdklibsubdir=$winsdkbinsubdir @@ -8701,10 +8704,10 @@ if test "$ENABLE_JAVA" != ""; then if test -z "$with_jdk_home"; then dnl See <https://docs.oracle.com/javase/9/migrate/toc.htm#JSMIG-GUID-EEED398E-AE37-4D12- dnl AB10-49F82F720027> section "Windows Registry Key Changes": - reg_get_value "$WIN_HOST_BITS" "HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/JDK/CurrentVersion" + reg_get_value "$WIN_HOST_BITS" "HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/JDK" "CurrentVersion" if test -n "$regvalue"; then ver=$regvalue - reg_get_value "$WIN_HOST_BITS" "HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/JDK/$ver/JavaHome" + reg_get_value "$WIN_HOST_BITS" "HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/JDK/$ver" "JavaHome" with_jdk_home=$regvalue fi howfound="found automatically"