98 Commits

Author SHA1 Message Date
Kein
5087a03b39 PR #11750: Fixes VisualStudioSourceCodeAccessor raw CoCreateInstance call
#rb Paul.Chipchase, Martin.Ridgers
#jira UE-212297
#rnx

### Original change
- Add a call to ::CoInitialize in FVisualStudioSourceCodeAccessor::AddVisualStudioVersionUsingVisualStudioSetupAPI. The submitted had some use case where this could be called without CoInitialize already being in scope which was causing issues.

### Additional changes
- Added a new struct FCoInitializeScope that calls ::CoInitialize in it's constructor and ::CoUninitialize in it's destructor so that we can keep things in sync and reduce deplicate code such as logging an error if the call fails.
- - Replaced all existing manual calls to ::CoInitialize/::CoUninitialize with this struct.
- ::RefreshAvailability makes serveral calls to AddVisualStudioVersionUsingVisualStudioSetupAPI which in turn will call ::CoInitialize/::CoUninitialize, if we wrap the entire method in a FCoInitializeScope then we will only initialize and destroy once and the calls inside of AddVisualStudioVersionUsingVisualStudioSetupAPI just inc/dec the internal ref count.
-- In practice, since this is all called on the GameThread some other system will have called ::CoInitialize and maintained it's reference count so this makes no difference, but if a stand alone program wanted to use this module it might help.

[CL 35048631 by Kein in ue5-main branch]
2024-07-24 03:43:16 -04:00
marc audy
763a611985 Fix C4072 warnings
#rnx

[CL 29852844 by marc audy in ue5-main branch]
2023-11-20 17:26:53 -05:00
joe kirchoff
73351e628e UnrealBuildTool: Remove VS2019 as a supported source code access ide
#jira UE-190039

[CL 28384888 by joe kirchoff in ue5-main branch]
2023-10-02 13:37:03 -04:00
david harvey
bdb4199eeb Remove unnecessary WindowsHWrapper.h & MinWindows.h include - both files will be automatically included by AllowWindowsPlatformTypes.h
#jira UE-152863
#rnx
#rb Josh.Adams

[CL 26912096 by david harvey in ue5-main branch]
2023-08-08 05:50:53 -04:00
joe kirchoff
7813f72545 When opening code in a solution also check any running instances of Visual Studio to find the best solution to use
#rnx
#jira UE-188820

[CL 26239561 by joe kirchoff in ue5-main branch]
2023-06-26 14:28:31 -04:00
joe kirchoff
e63f39e009 UnrealBuildTool: Fix failure to open/browse to source file in Visual Studio
* Write PrimaryProjectPath.txt with the location of the solution, this could be different than the root depending on project gen arguments
* Update SourceCodeAccessor accordingly to get the correct path to the solution, maintaining old defaults if the PrimaryProjectPath.txt file is not found

#rnx
#jira UE-114382

[CL 25935357 by joe kirchoff in ue5-main branch]
2023-06-12 15:33:56 -04:00
joe kirchoff
90ee0e778b [Backout] - CL25209946
#fyi Joe.Kirchoff
Original CL Desc
-----------------------------------------------------------------
UnrealBuildTool: Fix failure to open/browse to source file in Visual Studio
* Always update PrimaryProjectName.txt when a project specific solution is generated
* -Game solution is always placed under the project directory, update SourceCodeAccessor according, this code was out of date

#rnx
#jira UE-114382
#preflight 6449c0c4401d328ad93a635b

[CL 25732405 by joe kirchoff in ue5-main branch]
2023-06-01 13:38:36 -04:00
jamie dale
9be46c3709 Move the definition of FVisualStudioSourceCodeAccessor::RetrieveSolutionForFileOpenRequests outside of the WITH_VISUALSTUDIO_DTE block
This function is shared by the DTE and non-DTE code paths, so needs to be available when WITH_VISUALSTUDIO_DTE is false to avoid a linker error

#jira
[FYI] jonathan.bard, billy.beanland
#rnx

[CL 25675909 by jamie dale in ue5-main branch]
2023-05-30 09:17:27 -04:00
jonathan bard
15e511b2a1 Fixed static analysis
#rnx
#rb trivial
#preflight trivial

[CL 25646962 by jonathan bard in ue5-main branch]
2023-05-26 12:46:03 -04:00
jonathan bard
18934d0686 Try and select the best solution when opening files via VS code accessors
#rb ionut.matasaru, johan.berg
#jira UE-162780

[CL 25607002 by jonathan bard in ue5-main branch]
2023-05-24 13:08:24 -04:00
Joe Kirchoff
d0a2767ece UnrealBuildTool: Fix failure to open/browse to source file in Visual Studio
* Always update PrimaryProjectName.txt when a project specific solution is generated
* -Game solution is always placed under the project directory, update SourceCodeAccessor according, this code was out of date

#rnx
#jira UE-114382
#preflight 6449c0c4401d328ad93a635b

[CL 25209946 by Joe Kirchoff in ue5-main branch]
2023-04-26 20:42:54 -04:00
joe kirchoff
e4b870ac3b Update external modules to add include paths to PublicSystemIncludePaths rather than PublicIncludePaths
#rnx
#rb trivial

[CL 22876134 by joe kirchoff in ue5-main branch]
2022-10-31 20:55:55 -04:00
bryan sefcik
7b9e5abbcc Pass 1 on plugins:
Removed redundant private include paths from build.cs files.
Fixed include paths to be relative to the private or public folders.
Hid or removed includes that reached into other private module folders.
Updated PublicInclude paths when necessary.

#jira
#preflight 631b93c6967ffc68fb2c32df

[CL 21935609 by bryan sefcik in ue5-main branch]
2022-09-10 00:03:16 -04:00
Tim Smith
0ad177d3af Added tagging for unassigned allocations
#rb self
#jira UE-153910
#preflight 62fa5e6bb66d5d93137aada8

[CL 21387777 by Tim Smith in ue5-main branch]
2022-08-15 12:06:33 -04:00
Joe Kirchoff
52f52353ba Update terminology. Requires UGS update
#jira UE-158506
#jira UE-158507
#rnx
#rb trivial
#preflight 62c8a7958558075f42ac341d

[CL 21101128 by Joe Kirchoff in ue5-main branch]
2022-07-14 19:18:03 -04:00
Martin Sevigny
6f118cb922 Add ShortNames to Code Access plugins to reduce the pressure on path length. Problem reported on UDN.
#rb jonathan.adamczewski
#jira none
#preflight 625811d4d3793ebff60dd484

[CL 19754066 by Martin Sevigny in ue5-main branch]
2022-04-14 08:26:14 -04:00
Joe Kirchoff
ef9cb95ddf Deprecate VS2017 source code accessor
#rnx
#rb trivial
#jira UE-97614
#preflight 624b404dc667881bf42bbddc

[CL 19613373 by Joe Kirchoff in ue5-main branch]
2022-04-04 15:06:27 -04:00
aurel cordonnier
34f55d3a4a Merge from Release-Engine-Test @ 17946149 to UE5/Main
This represents UE4/Main @17911760, Release-5.0 @17915875 and Dev-PerfTest @17914035

[CL 17949667 by aurel cordonnier in ue5-main branch]
2021-10-27 15:14:40 -04:00
Joe Kirchoff
a1d7a8c3c7 Support VisualStudio2022 as a source code accessor and compilier
Note: _MSC_VER is still 1929 with the VS2022 preview, I expect it to be 1930 eventually when the compiler version is bumped which should match the versioning scheme for every other VS release

#rb none
#preflight 60d0c0d878c3b00001e335d9

[CL 16730633 by Joe Kirchoff in ue5-main branch]
2021-06-21 14:04:04 -04:00
aurel cordonnier
8eebe8841f Merge UE5/RET @ 16305968 to UE5/Main
This represents UE4/Main @ 16261013 and Dev-PerfTest @ 16259937

[CL 16306996 by aurel cordonnier in ue5-main branch]
2021-05-12 18:10:03 -04:00
Marc Audy
01b7c9f4f5 Merge UE5/RES @ 15958325 to UE5/Main
This represents UE4/Main @ 15913390 and Dev-PerfTest @ 15913304

[CL 15958515 by Marc Audy in ue5-main branch]
2021-04-08 14:32:07 -04:00
ben marsh
7427752f6c Various UE4->UE5 renames.
#rb none
#jira UE-111511, UE-111448, UE-111128, UE-111287, UE-111198, UE-111657
#preflight 605b8cec0c31c10001599547

#ROBOMERGE-OWNER: ben.marsh
#ROBOMERGE-AUTHOR: ben.marsh
#ROBOMERGE-SOURCE: CL 15807072 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v783-15756269)
#ROBOMERGE-CONFLICT from-shelf

[CL 15813821 by ben marsh in ue5-main branch]
2021-03-24 20:52:19 -04:00
Francis Hurteau
c374467a62 Fixed open source file when creating new code class with visual studio when regenerating the project which causes a modal that prevents opening the .h and .cpp files
#jira UE-103400
#rb Jamie.Dale

[CL 14848603 by Francis Hurteau in ue5-main branch]
2020-12-03 16:04:15 -04:00
projectgheist
ff9899876e PR #4292: UE-53233: VS GoToLine exception handling (Contributed by projectgheist)
[CL 14631830 by projectgheist in ue5-main branch]
2020-11-02 14:58:56 -04:00
geoff evans
b658d442a1 Jira: Seeing a 1-2 second delay when opening File Menu in editor
Use FUProjectDictionary singleton to eliminate needless Refresh() inside DoesSolutionExist()/GetSolutionPath() queries.

The code accessors want to discover the active game project solution/project, which should exist at editor launch time. We don't need the more recent refreshes from the temporary stack instances of FUProjectDictionary.

#jira UE-96246

[CL 14283901 by geoff evans in ue5-main branch]
2020-09-09 16:34:38 -04:00