Closed MPeti1 closed 3 years ago
Process Hacker is compiled in MS VC++ 2019 because the code is written according to the C++ 20 standard.
Your link get old VC++2017 - 15.9.28307.812, but needed VC++2019 + Windows Platform SDK v10.0.19041. Also Your can use my toolkit, but here required UNIX tools cp, ln, mv, rd, tar.
What is the preferred way of finding the appropriate build tools? The 2017 one was hard to find, and I'm unable to find the 2019 version. All I find is an installer which forcibly wants to install visual studio too.
I don't have UNIX tools in my system, only through WSL
works hard to make everyone install vs
Deselect Visual Studio and instead select the Windows SDK and MSBuild package.
You can import this file using the Visual Studio installer: vsconfig.txt
{
"version": "1.0",
"components": [
"Microsoft.VisualStudio.Component.Roslyn.Compiler",
"Microsoft.VisualStudio.Component.CoreEditor",
"Microsoft.VisualStudio.Workload.CoreEditor",
"Microsoft.Component.MSBuild",
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
"Microsoft.VisualStudio.Component.Windows10SDK.19041",
"Microsoft.VisualStudio.Component.VC.Runtimes.x86.x64.Spectre"
]
}
You get the Build Tools without Visual Studio and get updates to the buildtools via the installer. This also fixes a lot of scripts/build tools that don't include support for the standalone installer.
MPeti1
In to my toolkit Your can use any source for dependices: Msys , Msys2, CygWin, GNUWin32, e.t.c. ...
Now I took the time to deal with this again, because I'm actually interested in what do I overlook in the installer. So the one I linked in the first comment is bad because it's too old. What I need is the Visual Studio 2019 installer, which I got here.
Then what I don't get: where do I deselect VS? In the installation details it doesn't have a checkbox, and on the 4 tabs (workloads, individual components, language packs, installation location) there's no option to deselect it
This is how it looks when I first open the installer. Here, with the button marked with "1", I can close this inner window, and reveal the menu where I can import the vsconfig.txt. If I do the import at the community edition's entry, I see that it'll now install both MSBuild and the SDK version mentioned by VictorVG (3), but there's still no option to deselect Visual Studio itself, or at least I don't see it
where do I deselect VS? In the installation details it doesn't have a checkbox
It was removed I guess because some users complained the installer wasn't installing the IDE because it wasn't selected by default.
You would have to use the BuildTools which doesn't include the IDE: https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=16
Aha! Thanks!
So I got the build tools, installed it with default configuration (but changed path to a drive with more space), then opened the "Installed" tab in the installer, and imported the above mentioned vsconfig file with this:
It notified me that Microsoft.VisualStudio.Component.CoreEditor
and Microsoft.VisualStudio.Workload.CoreEditor
won't be installed.
I proceded to install (to the same drive and folder as the base build tools previously) with nothing deselected at the right, and when it finished, I rebooted as requested by the installer.
Now I have these new items in the start menu:
Running build_release.cmd now does not result in the message "Unable to find Visual Studio.", but in a few error messages instead.
This problem seems to be similar to this, and they speak about some version mismatch: https://developercommunity.visualstudio.com/content/problem/1187741/unexpected-warnings-from-system-headers-with-1680.html
What should I do now?
Building... 3.0.8091.3564 (45820a13) [master]
The latest version is 3.0.8229.3702 so you're 138 commits behind master.
What should I do now?
All those issues were fixed. You need to synchronize with the repository or download the source again.
Of course, I forgot to pull the main repo.. :D
Ok, PH now builds without errors, and it also runs if I install that. Now the only problem left is that the extra plugins wont get built into the processhacker-build-bin.zip file in the output directory.
The plugins-extra
folder cloned from this repo is copied into the processhacker
folder cloned from the main repo. I read on the forum that for the extra plugins to be compiled, it's sln file needs to be opened so the IDE builds it, and after that I would need to run the build_release.cmd again.
But what is the other option if I don't have VS?
edit: tried to run msbuild
in the plugins-extra folder, but even after additionally installing C++/CLI support for v142 build tools (14.28)
, it errors out for every project: ...\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(411,5): error MSB8020: The build tools for v142 (Platform Toolset = 'v142') cannot be found. To build using the v142 build tools, please install v142 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution".
Example, use Process Hacker 3 build toolkit v1.23.
the only problem left is that the extra plugins wont get built
The plugins-extra repository contains a lot of unstable junk and won't be supported.
I don't have Visual Studio installed, but instead I have a build tools installed. According to readme.md, I've searched for
Build Tools for Visual Studio 2017
, and installed this one: https://download.visualstudio.microsoft.com/download/pr/3e542575-929e-4297-b6c6-bef34d0ee648/639c868e1219c651793aff537a1d3b77/vs_buildtools.exeIs this the correct one? If it isn't, which one should I get? Microsoft works hard to make everyone install vs for some reason