Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous messageGo to previous message
Klugier is currently offline  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

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Prossible bug in CppBuilder.cpp
Next Topic: Bug in CppBuilder module - SourceToObjName()
Goto Forum:
  


Current Time: Fri May 10 16:43:09 CEST 2024

Total time taken to generate the page: 0.03154 seconds