[graphics/krita] build-tools/windows: Revert "Remove initialization of WindowsSdkDir variable"

L. E. Segovia null at kde.org
Tue Jan 24 03:27:17 GMT 2023


Git commit 393db6d64296fdbc3589059ac3e0ae081a467212 by L. E. Segovia.
Committed on 24/01/2023 at 03:26.
Pushed by lsegovia into branch 'master'.

Revert "Remove initialization of WindowsSdkDir variable"

Kampidh on IRC tested a full rebuild and ANGLE immediately errored out
on "unable to find D3D shader compiler (fxc.exe)".

This reverts commit 770398b8cd282ce6de32ddf51ff06f381a2e9a5c.

Signed-off-by: Rasyuqa A. H <qampidh at gmail.com>

CCMAIL:kimageshop at kde.org

M  +36   -0    build-tools/windows/build-msvc.cmd
M  +36   -0    build-tools/windows/build.cmd

https://invent.kde.org/graphics/krita/commit/393db6d64296fdbc3589059ac3e0ae081a467212

diff --git a/build-tools/windows/build-msvc.cmd b/build-tools/windows/build-msvc.cmd
index 37d37308fa..fac9994545 100644
--- a/build-tools/windows/build-msvc.cmd
+++ b/build-tools/windows/build-msvc.cmd
@@ -458,6 +458,42 @@ if "%PERL_DIR%" == "" (
     )
 ) else echo Perl found on %PERL_DIR%
 
+if "%ARG_SKIP_DEPS%" == "1" goto skip_windows_sdk_dir_check
+
+if "%WindowsSdkDir%" == "" if not "%ProgramFiles(x86)%" == "" set "WindowsSdkDir=%ProgramFiles(x86)%\Windows Kits\10"
+if "%WindowsSdkDir%" == "" set "WindowsSdkDir=%ProgramFiles(x86)%\Windows Kits\10"
+if exist "%WindowsSdkDir%\" (
+    pushd "%WindowsSdkDir%"
+    if exist "bin\x64\fxc.exe" (
+        set HAVE_FXC_EXE=1
+        if "%WindowsSdkVerBinPath%" == "" set "WindowsSdkVerBinPath=%WindowsSdkDir%"
+    ) else (
+        for /f "delims=" %%a in ('dir /a:d /b "bin\10.*"') do (
+            if exist "bin\%%a\x64\fxc.exe" (
+                set HAVE_FXC_EXE=1
+                if "%WindowsSdkVerBinPath%" == "" set "WindowsSdkVerBinPath=%WindowsSdkDir%\bin\%%a\"
+            )
+        )
+    )
+    popd
+)
+set QT_ENABLE_DYNAMIC_OPENGL=ON
+if not "%HAVE_FXC_EXE%" == "1" (
+    set WindowsSdkDir=
+    echo Windows SDK 10 with fxc.exe not found
+    echo Qt will *not* be built with ANGLE ^(dynamic OpenGL^) support.
+    if not "%ARG_NO_INTERACTIVE%" == "1" (
+        choice /c ny /n /m "Is this ok? [y/n] "
+        if errorlevel 3 exit 255
+        if not errorlevel 2 (
+            exit /b 102
+        )
+    )
+    set QT_ENABLE_DYNAMIC_OPENGL=OFF
+) else echo Windows SDK 10 with fxc.exe found on %WindowsSdkDir%
+
+:skip_windows_sdk_dir_check
+
 if not "%ARG_JOBS%" == "" (
     set "PARALLEL_JOBS=%ARG_JOBS%"
     set "UseMultiToolTask=true"
diff --git a/build-tools/windows/build.cmd b/build-tools/windows/build.cmd
index 66eec99a3b..09f6370e62 100644
--- a/build-tools/windows/build.cmd
+++ b/build-tools/windows/build.cmd
@@ -488,6 +488,42 @@ if "%PERL_DIR%" == "" (
     )
 ) else echo Perl found on %PERL_DIR%
 
+if "%ARG_SKIP_DEPS%" == "1" goto skip_windows_sdk_dir_check
+
+if "%WindowsSdkDir%" == "" if not "%ProgramFiles(x86)%" == "" set "WindowsSdkDir=%ProgramFiles(x86)%\Windows Kits\10"
+if "%WindowsSdkDir%" == "" set "WindowsSdkDir=%ProgramFiles(x86)%\Windows Kits\10"
+if exist "%WindowsSdkDir%\" (
+    pushd "%WindowsSdkDir%"
+    if exist "bin\x64\fxc.exe" (
+        set HAVE_FXC_EXE=1
+        if "%WindowsSdkVerBinPath%" == "" set "WindowsSdkVerBinPath=%WindowsSdkDir%"
+    ) else (
+        for /f "delims=" %%a in ('dir /a:d /b "bin\10.*"') do (
+            if exist "bin\%%a\x64\fxc.exe" (
+                set HAVE_FXC_EXE=1
+                if "%WindowsSdkVerBinPath%" == "" set "WindowsSdkVerBinPath=%WindowsSdkDir%\bin\%%a\"
+            )
+        )
+    )
+    popd
+)
+set QT_ENABLE_DYNAMIC_OPENGL=ON
+if not "%HAVE_FXC_EXE%" == "1" (
+    set WindowsSdkDir=
+    echo Windows SDK 10 with fxc.exe not found
+    echo Qt will *not* be built with ANGLE ^(dynamic OpenGL^) support.
+    if not "%ARG_NO_INTERACTIVE%" == "1" (
+        choice /c ny /n /m "Is this ok? [y/n] "
+        if errorlevel 3 exit 255
+        if not errorlevel 2 (
+            exit /b 102
+        )
+    )
+    set QT_ENABLE_DYNAMIC_OPENGL=OFF
+) else echo Windows SDK 10 with fxc.exe found on %WindowsSdkDir%
+
+:skip_windows_sdk_dir_check
+
 if not "%ARG_JOBS%" == "" (
     set "PARALLEL_JOBS=%ARG_JOBS%"
 )



More information about the kimageshop mailing list