Open hacksysteam opened 1 month ago
The latest WDK requires Windows SDK 10.0.26100, you may try add --sdk-version 10.0.26100
.
But windows.h is not there in this version and the issue only happens when we install wdk, without wdk it works
By default, Windows SDK 10.0.22621 is installed. If you install WDK also, directory 10.0.26100.0 is also created but only contains WDK not SDK. And wrappers always choose the maximum version.
Yes, that's the issue. Any idea how to fix it?
WDK and SDK version must match, so --sdk-version
should be used. A better solution IMO is to use nupkg (https://github.com/mstorsjo/msvc-wine/issues/113#issuecomment-2198478443), so that we can specify the WDK version to download .
Ah! Makes sense now. But one more thing, even if I use the older wdk link which is there in the workflow file, I still get the same issue. But it works on Ubuntu image on github actions. I'm using a Debian container and get same missing Windows.h something weird is happening
Hi @huangqinjin after merging your pull request, the issue persists.
#14 32.99 Unpacking WDK VS extension WDK.vsix
#14 33.02 Merging WDK 'Build' and 'build' directories into version 10.0.22621.0
#14 33.02 Moving WDK.Legacy.props into version 10.0.22621.0
#14 33.02 Moving WDK.props into version 10.0.22621.0
#14 33.64 Using SDK version 10.0.22621.0
#14 34.48 Using MSVC version 14.41.34120
#14 38.65 Build msvctricks ...
#14 38.74 msvctricks.cpp
#14 38.74 z:/tmp/msvc-wine/msvctricks.cpp(17): fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
this time it could select the correct SDK version as I specified in the command line.
python3 vsdownload.py --accept-license \
--dest ${MSVC_HOME} \
--host-arch x64 \
--architecture x86 x64 \
--sdk-version 10.0.22621.0 \
--cache /tmp/msvc \
--with-wdk-installers /tmp/wdk/Installers; \
bash install.sh ${MSVC_HOME};
So instead of specifying the --sdk-version
if we specify the --msvc-version
then it works with and without wdk.
Updated command:
python3 vsdownload.py --accept-license \
--dest ${MSVC_HOME} \
--host-arch x64 \
--architecture x86 x64 \
--msvc-version 17.11 \
--cache /tmp/msvc \
--with-wdk-installers /tmp/wdk/Installers; \
bash install.sh ${MSVC_HOME};
New issue, there is no msbuild.exe
in the MSVC_HOME
directory
Update: the issue is resolved, seems there was an issue with the downloaded files.
WDK_INSTALLER_URL="https://go.microsoft.com/fwlink/?linkid=2249371"
python3 ./vsdownload.py --accept-license \
--dest ${MSVC_HOME} \
--host-arch x64 \
--architecture x86 x64 \
--with-wdk-installers /tmp/wdk/Installers;
All tests passed as well.
When using the latest WDK, there are 2 (10.x) directories. The fixincludes or lowercase script does not create appropriate changes.
Failing action: https://github.com/hacksysteam/msvc-wine/actions/runs/10872722342/job/30168067508 Diff: https://github.com/hacksysteam/msvc-wine/commit/9978f9c972d1cbc0bfab58781292f28f524d557f?diff=split&w=0