Home » U++ TheIDE » U++ TheIDE: Other Features Wishlist and/or Bugs » TheIDE support for Visual Studio Build Tools 2022?
|
|
|
Re: TheIDE support for Visual Studio Build Tools 2022? [message #57872 is a reply to message #57871] |
Thu, 23 December 2021 17:35 |
|
Klugier
Messages: 1075 Registered: September 2012 Location: Poland, Kraków
|
Senior Contributor |
|
|
Hello,
That's true, however your code assumes that if there is x86 directory, then ignore x64. On my setup - when I have "Microsoft Visual Studio" in both "Program Files (x86)" and "Program Files" the detection doesn't work.
The original code was:
Array<FileSystemInfo::FileInfo> root = StdFileSystemInfo().Find(Null);
for(int i = 0; i < root.GetCount(); i++) {
if(root[i].root_style == FileSystemInfo::ROOT_FIXED) {
int drive = *root[i].filename;
String pf = GetProgramsFolderX86();
pf.Set(0, drive);
pf = AppendFileName(pf, "Microsoft Visual Studio");
if(DirectoryExists(pf)) // <- if x86 "Microsoft Visual Studio" exists skip x64 processing (this is wrong!). You could have Microsoft Visual Studio Installer in x86 and Visual Studio in x64.
GatherDirs(path, pf);
else {
pf = GetProgramsFolder();
pf.Set(0, drive);
pf = AppendFileName(pf, "Microsoft Visual Studio");
if(DirectoryExists(pf))
GatherDirs(path, pf);
}
}
}
The code in my PR is:
Array<FileSystemInfo::FileInfo> root = StdFileSystemInfo().Find(Null);
for(int i = 0; i < root.GetCount(); i++) {
if(root[i].root_style == FileSystemInfo::ROOT_FIXED) {
int drive = *root[i].filename;
// Process both x86 and x64 directories
String x86pf = GetVisualStudioFolder(drive, GetProgramsFolderX86());
if(DirectoryExists(x86pf)) {
GatherDirs(path, x86pf);
}
String pf = GetVisualStudioFolder(drive, GetProgramsFolder());
if(DirectoryExists(pf)) {
GatherDirs(path, pf);
}
}
}
Klugier
U++ - one framework to rule them all.
[Updated on: Thu, 23 December 2021 17:41] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Thu Mar 28 21:29:05 CET 2024
Total time taken to generate the page: 0.01821 seconds
|