126 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 pribele
d5b4ee5b26 Undo //UE5/Main/... changelist 25345352
#preflight 6459589d4c3ec54e6e25b190

[CL 25376938 by joe pribele in ue5-main branch]
2023-05-08 16:29:06 -04:00
joe pribele
e7570fba80 fix forVisualStudioSourceCodeAccess being used on non windows platforms
#preflight 645424fd4c3ec54e6e0bcd22
#preflight 6454370ed77a82d6a734d8dd

[CL 25345352 by joe pribele in ue5-main branch]
2023-05-04 19:13:44 -04:00
joe pribele
45f40d1389 Undo //UE5/Main/Engine/Plugins/Developer/VisualStudioSourceCodeAccess/... changelist 25336010
#preflight 6453f7674574b81df481a036

[CL 25339481 by joe pribele in ue5-main branch]
2023-05-04 14:35:53 -04:00
MalikuMane
1c75c940a3 PR #10127: Add missing SupportedTargetPlatforms for VisualStudioSourceCodeAccess (Contributed by MalikuMane)
https://jira.it.epicgames.com/browse/UE-177285


#ushell-cherrypick of 24250895 by UnrealBot
#preflight 6453cea61c2846595c68cbf1
#rb tim.smith

[CL 25336010 by MalikuMane in ue5-main branch]
2023-05-04 11:35:37 -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
Robb Surridge
610c467639 Update vendor links for built-in plugins to use secure protocol.
#jira UE-166823
#rb lauren.barnes
#preflight 6352b20b7261e565c476ec3b

[CL 22690089 by Robb Surridge in ue5-main branch]
2022-10-21 11:04:07 -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
aurel cordonnier
a12d56ff31 Merge from Release-Engine-Staging @ 17791557 to Release-Engine-Test
This represents UE4/Main @17774255, Release-5.0 @17791557 and Dev-PerfTest @17789485

[CL 17794212 by aurel cordonnier in ue5-release-engine-test branch]
2021-10-12 21:21:22 -04:00
joe kirchoff
d030dcdf10 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

#ROBOMERGE-SOURCE: CL 16730633 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)

[CL 16730641 by joe kirchoff in ue5-release-engine-test branch]
2021-06-21 14:05:15 -04:00