-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
OS: Windows 11 Pro
I cobbled up a batch script that generates the key automatically last year and it still works as of today, however, with the xz utils incident several months ago, I wanna be on the safe side and have the script eventually be able to build the KG from source automatically without installing the entire Visual Studio. I'm no developer, just casually learning how to write batch script; it's a bit of a struggle for me to figure it out.
-
Downloaded source zip and extracted to C:
-
Downloaded hMSBuild.bat and moved it to
C:\Windows -
Installed VS2022 Build Tools along + some per this issue for it to stop throwing an error "vcpkg install error:in triplet x64-windows: Unable to find a valid Visual Studio instance Could not locate a complete Visual Studio instance"
> winget install Microsoft.VisualStudio.2022.BuildTools --silent --override "--wait --quiet --add ProductLang En-us --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.Windows10SDK --add Microsoft.VisualStudio.Component.Windows11SDK --add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended"
-
Rebooted
-
Installed git
-
Installed vcpkg
> git clone https://github.com/microsoft/vcpkg
> .\vcpkg\bootstrap-vcpkg.bat
- Installed mpir
.\vcpkg\vcpkg install mpir --triplet=x64-windows
- Not sure what this does but ran it anyway
> vcpkg integrate install
- Go to the extracted files
> cd C:\winrar-keygen-master
- Ran:
> hmsbuild winrar-keygen.sln
Build fails. See log below. What am I doing wrong? How can I simplify the process and ensure that only the necessary stuff are installed?
hMSBuild: "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\amd64\MSBuild.exe"
MSBuild version 17.10.4+10fbfbf2e for .NET Framework
Build started 6/21/2024 12:16:07 PM.
Project "C:\winrar-keygen-master\winrar-keygen.sln" on node 1 (default targets).
ValidateSolutionConfiguration:
Building solution configuration "Debug|x64".
Project "C:\winrar-keygen-master\winrar-keygen.sln" (1) is building "C:\winrar-keygen-master\winrar-keygen.vcxproj" (2)
on node 1 (default targets).
PrepareForBuild:
Creating directory "C:\winrar-keygen-master\obj\x64-Debug\".
Structured output is enabled. The formatting of compiler diagnostics will reflect the error hierarchy. See https://ak
a.ms/cpp/structured-output for more details.
Creating directory "C:\winrar-keygen-master\bin\x64-Debug\".
Creating directory "C:\winrar-keygen-master\obj\x64-Debug\winrar-keygen.tlog\".
InitializeBuildStatus:
Creating "C:\winrar-keygen-master\obj\x64-Debug\winrar-keygen.tlog\unsuccessfulbuild" because "AlwaysCreate" was spec
ified.
Touching "C:\winrar-keygen-master\obj\x64-Debug\winrar-keygen.tlog\unsuccessfulbuild".
VcpkgTripletSelection:
Using triplet "x64-windows-static" from "C:\Users\0\vcpkg\installed\x64-windows-static\"
Using normalized configuration "Debug"
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.40.33807\bin\HostX64\x64\CL.exe /c /I
"C:\Users\0\vcpkg\installed\x64-windows-static\include" /ZI /JMC /nologo /W3 /WX- /diagnostics:column /sdl /Od /D _DE
BUG /D _CONSOLE /D _UNICODE /D UNICODE /Gm- /EHsc /RTC1 /MTd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /std
:c++17 /permissive- /Fo"C:\winrar-keygen-master\obj\x64-Debug\\" /Fd"C:\winrar-keygen-master\obj\x64-Debug\vc143.pdb"
/external:W3 /Gd /TP /FC /errorReport:queue /utf-8 _tmain.cpp
_tmain.cpp
C:\winrar-keygen-master\BigInteger.hpp(4,10): error C1083: Cannot open include file: 'gmp.h': No such file or directory
[C:\winrar-keygen-master\winrar-keygen.vcxproj]
(compiling source file '_tmain.cpp')
Done Building Project "C:\winrar-keygen-master\winrar-keygen.vcxproj" (default targets) -- FAILED.
Done Building Project "C:\winrar-keygen-master\winrar-keygen.sln" (default targets) -- FAILED.
Build FAILED.
"C:\winrar-keygen-master\winrar-keygen.sln" (default target) (1) ->
"C:\winrar-keygen-master\winrar-keygen.vcxproj" (default target) (2) ->
(ClCompile target) ->
C:\winrar-keygen-master\BigInteger.hpp(4,10): error C1083: Cannot open include file: 'gmp.h': No such file or directo
ry [C:\winrar-keygen-master\winrar-keygen.vcxproj]
0 Warning(s)
1 Error(s)