windows build fixes
Some checks failed
demo.yaml / windows build fixes (push) Failing after 0s

This commit is contained in:
Jorijn van der Graaf 2026-03-01 15:58:08 +01:00
commit aac3785738
3 changed files with 15 additions and 7 deletions

View file

@ -123,18 +123,21 @@ namespace Crafter {
}
void BuildMsvcStdPcm(const Project& project, const Configuration& config) {
std::cout << "bruh 1" << std::endl;
fs::path exeDir = GetPath();
std::cout << "bruh 2" << std::endl;
fs::create_directories(exeDir/config.target);
std::cout << "bruh 3" << std::endl;
std::string stdPcm = std::format("{}\\{}\\std.pcm", exeDir.string(), config.target);
std::string stdcppm = std::format("{}\\{}\\std.cppm", exeDir.string(), config.target);
std::string vsPath = "C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\vswhere.exe";
std::string command = vsPath + " -latest -property installationPath";
std::cout << stdPcm << std::endl;
std::cout << stdcppm << std::endl;
std::string directoryPath = RunCommand("C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\vswhere.exe -latest -property installationPath") + "\\VC\\Tools";
std::cout << directoryPath << std::endl;
std::vector<std::string> folders;
// Iterate through the directory and collect all subdirectories
@ -144,13 +147,19 @@ namespace Crafter {
}
}
std::cout << "bruh 4" << std::endl;
// Sort the folders by version in descending order
std::sort(folders.begin(), folders.end(), [](const std::string& a, const std::string& b) {
return std::lexicographical_compare(b.begin(), b.end(), a.begin(), a.end());
});
std::cout << "bruh 5" << std::endl;
std::string msvcVersion = folders.front();
std::cout << msvcVersion << std::endl;
clDir = std::format("{}\\MSVC\\{}\\bin\\Hostx64\\x64", directoryPath, msvcVersion);
clangClDir = std::format("{}\\Llvm\\x64\\bin", directoryPath);