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 #57867 is a reply to message #57866] Thu, 23 December 2021 13:08 Go to previous messageGo to next message
Tom1
Messages: 1212
Registered: March 2007
Senior Contributor
I guess this is just about what you were looking for. Please test.

BR,

Tom
Re: TheIDE support for Visual Studio Build Tools 2022? [message #57868 is a reply to message #57867] Thu, 23 December 2021 15:20 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 1075
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello Tom and Mirek,

Thank you for patch, however I created it by myself Smile The PR is available here. I also added one fix. I had installer installed in x86 profiles directory (inside Microsoft Visual Studio directory) and my Visual Studio lands in x64 program files. In order to fix that I changed DirFinder constructor to detect both x86 and normal program files directories.

I tested with Visual Studio Professional 2022 and everything works as expected.

Klugier


U++ - one framework to rule them all.
Re: TheIDE support for Visual Studio Build Tools 2022? [message #57871 is a reply to message #57868] Thu, 23 December 2021 17:07 Go to previous messageGo to next message
Tom1
Messages: 1212
Registered: March 2007
Senior Contributor
Well, that's strange. I mean, I already added support for x64 program files before... So it sounds you have not been able to update to head before doing your additions.

BR,

Tom
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 message
Klugier is currently offline  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

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


Current Time: Thu Mar 28 21:29:05 CET 2024

Total time taken to generate the page: 0.01821 seconds