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: 1076 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
|
|
|
|
|
TheIDE support for Visual Studio Build Tools 2022?
By: Tom1 on Mon, 13 December 2021 10:04
|
|
|
Re: TheIDE support for Visual Studio Build Tools 2022?
By: mirek on Sun, 19 December 2021 15:16
|
|
|
Re: TheIDE support for Visual Studio Build Tools 2022?
By: Lance on Sun, 19 December 2021 15:44
|
|
|
Re: TheIDE support for Visual Studio Build Tools 2022?
By: Lance on Sun, 19 December 2021 15:54
|
|
|
Re: TheIDE support for Visual Studio Build Tools 2022?
By: Tom1 on Mon, 20 December 2021 09:26
|
|
|
Re: TheIDE support for Visual Studio Build Tools 2022?
By: Lance on Mon, 20 December 2021 13:35
|
|
|
Re: TheIDE support for Visual Studio Build Tools 2022?
By: Tom1 on Mon, 20 December 2021 14:17
|
|
|
Re: TheIDE support for Visual Studio Build Tools 2022?
By: Lance on Mon, 20 December 2021 17:02
|
|
|
Re: TheIDE support for Visual Studio Build Tools 2022?
By: Tom1 on Mon, 20 December 2021 17:58
|
|
|
Re: TheIDE support for Visual Studio Build Tools 2022?
By: Tom1 on Tue, 21 December 2021 09:09
|
|
|
Re: TheIDE support for Visual Studio Build Tools 2022?
By: mirek on Tue, 21 December 2021 09:26
|
|
|
Re: TheIDE support for Visual Studio Build Tools 2022?
By: Tom1 on Tue, 21 December 2021 09:44
|
|
|
Re: TheIDE support for Visual Studio Build Tools 2022?
By: Klugier on Tue, 21 December 2021 12:56
|
|
|
Re: TheIDE support for Visual Studio Build Tools 2022?
By: Tom1 on Tue, 21 December 2021 13:15
|
|
|
Re: TheIDE support for Visual Studio Build Tools 2022?
By: mirek on Thu, 23 December 2021 08:25
|
|
|
Re: TheIDE support for Visual Studio Build Tools 2022?
By: Klugier on Thu, 23 December 2021 11:42
|
|
|
Re: TheIDE support for Visual Studio Build Tools 2022?
By: Tom1 on Thu, 23 December 2021 12:58
|
|
|
Re: TheIDE support for Visual Studio Build Tools 2022?
By: Tom1 on Thu, 23 December 2021 13:08
|
|
|
Re: TheIDE support for Visual Studio Build Tools 2022?
By: Klugier on Thu, 23 December 2021 15:20
|
|
|
Re: TheIDE support for Visual Studio Build Tools 2022?
By: Tom1 on Thu, 23 December 2021 17:07
|
|
|
Re: TheIDE support for Visual Studio Build Tools 2022?
By: Klugier on Thu, 23 December 2021 17:35
|
|
|
Re: TheIDE support for Visual Studio Build Tools 2022?
By: Tom1 on Mon, 20 December 2021 09:08
|
|
|
Re: TheIDE support for Visual Studio Build Tools 2022?
By: mirek on Mon, 20 December 2021 09:40
|
|
|
Re: TheIDE support for Visual Studio Build Tools 2022?
By: Tom1 on Mon, 20 December 2021 10:17
|
Goto Forum:
Current Time: Fri May 10 16:43:09 CEST 2024
Total time taken to generate the page: 0.03154 seconds
|