Commit Graph

64 Commits

Author SHA1 Message Date
Ben Marsh
95416220b5 Include subdirectories when searching for module manifests. Fixes missing target platforms in the editor.
#codereview Dmitriy.Dyomin

[CL 2643391 by Ben Marsh in Main branch]
2015-08-04 10:13:20 -04:00
Ben Marsh
59caf3712e Fix shadow variable warnings on Mac.
[CL 2641844 by Ben Marsh in Main branch]
2015-08-03 09:32:02 -04:00
Ben Marsh
3733f73569 When compiling a modular target, write out a manifest of build products to each output directory listing the valid modules in that directory and their version. Allows faster switching of changelists when using UGS (because it's no longer necessary to re-link all modules), and safeguards against stale DLLs from a different target causing loader errors. Uses compiled-in API version if BUILT_FROM_CHANGELIST is non-zero.
[CL 2641800 by Ben Marsh in Main branch]
2015-08-03 08:47:15 -04:00
Ben Marsh
5c7b33a646 Use the MODULE_API_VERSION define directly when checking that DLLs are the right version, so we can set the compatible engine changelist without needing to rebuild every module.
[CL 2625363 by Ben Marsh in Main branch]
2015-07-18 18:16:17 -04:00
Steve Robb
72dec33d8f ensureOnce is now ensure.
ensure is now ensureAlways.
Redundant ensureMsg removed and replaced with ensureMsgf.
'debug ensureAlways' command added.

#codereview robert.manuszewski
#platformnotify josh.adams

[CL 2616422 by Steve Robb in Main branch]
2015-07-10 05:31:32 -04:00
Robert Manuszewski
01c08b6d47 Call PreUnloadCallback before Shutdown for Modules
(modified PR #1243 Contributed by FineRedMist)

[CL 2600341 by Robert Manuszewski in Main branch]
2015-06-25 06:19:58 -04:00
Robert Manuszewski
80e99b7b60 Improving editor startup times by a few (3-4) seconds (that's 20%-30% in tested cases).
[CL 2598787 by Robert Manuszewski in Main branch]
2015-06-24 09:40:50 -04:00
Ben Marsh
b6c1ba5261 Check for XMPP existing before trying to load it. Fixes warnings if you don't have XMPP (because it's in a /NotForLicensees/ folder), which also happens for everything we build in Rocket.
#codereview Josh.Markiewicz

[CL 2595865 by Ben Marsh in Main branch]
2015-06-22 14:42:11 -04:00
Bob Tellez
5d2fd8b7fb [AUTOMERGE]
#UE4 Reducing dependencies on Version.h

#platformnotify Josh.Adams

--------
Integrated using branch Ue4-To-UE4-Fortnite-Simple (reversed) of change#2585810 by Bob.Tellez on 2015/06/12 11:30:33.

[CL 2585846 by Bob Tellez in Main branch]
2015-06-12 12:01:23 -04:00
Mike Fricker
ca778ab7f2 Undeprecated some module manager functions until we design a proper alternative
(See CL 2562810 for more context)

[CL 2582703 by Mike Fricker in Main branch]
2015-06-10 10:19:18 -04:00
Justin Sargent
273cde1704 Merging using UE4-To-UE4-LauncherDev
#platformnotify Josh.Adams

[CL 2581810 by Justin Sargent in Main branch]
2015-06-09 16:41:53 -04:00
Mike Fricker
44140db36d Deprecated PreUnloadCallback and PostLoadCallback for modules
- PreUnloadCallback() was not called in all cases a module could be unloaded (Buggy!)
- PostLoadCallback() was never called for modules unless the module happened to be loaded with LoadModuleWithCallback().  (Very confusing!)
- These functions were really just called when dynamically unloading and loading modules (not hot reload, and not when starting up or shutting down.)  This was very confusing.  For the most part you can achieve the same result by overriding StartupModule() and ShutdownModule().
- Additional context: CL 1607584 and https://udn.unrealengine.com/questions/246629/why-is-preunloadcallback-not-called-in-unloadmodul.html

[CL 2562810 by Mike Fricker in Main branch]
2015-05-22 12:22:47 -04:00
Steve Robb
87c0faf865 Makefile is invalidated by .uproject file changes.
Change to makefile timestamp checks to use FileInfo instead of FileItem to avoid some time offset issues.
Misc cleanups in some module reload code.

#codereview robert.manuszewski,ben.marsh

[CL 2557832 by Steve Robb in Main branch]
2015-05-19 18:19:46 -04:00
Robert Manuszewski
74a9602e7f Fixing module manager not finding latest hot-reload DLLs when starting up the editor.
UE-13842

[CL 2545600 by Robert Manuszewski in Main branch]
2015-05-11 12:53:27 -04:00
Robert Manuszewski
5a2d29850d Hot-reload will now always call ShutdownModule even when abondoning DLLs
[CL 2540682 by Robert Manuszewski in Main branch]
2015-05-07 03:23:51 -04:00
Mikolaj Sieluzycki
86b198fe24 Add critical section guarding adding modules to module manager.
[CL 2520862 by Mikolaj Sieluzycki in Main branch]
2015-04-22 08:19:04 -04:00
Jaroslaw Surowiec
dc2e623bdd Core - Stats for module manager
[CL 2519098 by Jaroslaw Surowiec in Main branch]
2015-04-21 09:08:49 -04:00
Marc Audy
4562acb429 Fix shadow variables
[CL 2507160 by Marc Audy in Main branch]
2015-04-09 15:23:52 -04:00
Robert Manuszewski
8fe5db30e3 Merging UE4-Streaming to UE4
- Linkers are no longer UObjects. Renamed ULinker, ULinkerLoad and ULinkerSave to FLinker, FLinkerLoad, FLinkerSave respectively
- Linkers are now associated with their UPackages
- Linker version is now stored in UPackages
- Async loading is now performed on a separate thread (if platform supports it and only in cooked builds), with the exception of PostLoad which is still done on the game thread
- Added UObject::IsPostLoadThreadSafe() function to determine if PostLoad is thread safe and can be executed on the async loading thread (defaults to false)
- UObject creation is now thread safe and can be performed on any thread
- Move many of the linker/UObject globals into FUObjectThreadContext (TLS)
- GetAsyncLoadPercentage() now takes PostLoad into account
- More async loading stats
- Added AtomicallySetFlags/ClearFlags to UObject
- Made FModuleManager thread safe.
- Added FGCScopeGuard as means of preventing GC from executing from non-game thread
- It's possible to disable async loading thread through ini settings.
- Cancelling async loading will now also trigger GC
- Implemented a basic version of async streaming priorities.

Change 2410813 by Mikolaj Sieluzycki:
	Change Sleep in while loop to ConditionalSleep in FMultiReaderSingleWriterGT
Change 2410734 by Mikolaj Sieluzycki:
	Make FModuleManager thread safe.
Change 2399879 by Mikolaj Sieluzycki:
	Basic version of async streaming priorities.
Change 2410707 by Mikolaj Sieluzycki:
	Implement conditional and no stat versions of sleep.
Change 2371939 by Robert Manuszewski:
	Async Loading Improvements: adding more stats (accumulators)
Change 2372403 by Robert Manuszewski:
	Fixing compile errors when STATs are not enabled
Change 2371526 by Robert Manuszewski:
	AsyncLoading Improvements (WIP)
Change 2407198 by Robert Manuszewski:
	Re-implementing delegate fixes for Async Loading
Change 2407425 by Robert Manuszewski:
	Re-implementing cancelling async loading in the async loading branch.
Change 2484362 by Robert Manuszewski:
	Making it possible to disable async loading thread through ini settings.
Change 2484744 by Robert Manuszewski:
	Minimizing locks in GC and other threads when handling UObjects
Change 2480190 by Robert Manuszewski:
	Fixing infinite stall after canceling async loading in non-cooked builds
Change 2484268 by Robert Manuszewski:
	Fixing crash when allocating permanent object pool.
Change 2489761 by Robert Manuszewski:
	Fixing BulkData using linker archive on the main thread even if the linker was created on the async loading thread.
Change 2493624 by Robert Manuszewski:
	Cancelling async loading will now also trigger GC
Change 2487881 by Robert Manuszewski:
	Making ShaderIdMap operations thread safe.
Change 2488067 by Robert Manuszewski:
	Fixing GetAsyncLoadPercentage. It will now also respect PostLoad.
Change 2458640 by Robert Manuszewski:
	Fixing crash in PIE
Change 2458825 by Robert Manuszewski:
	Fixing a few crashes when streaming and the package is missing.
Change 2476935 by Robert Manuszewski:
	Fixing crash while async loading ANavigationData
Change 2477361 by Robert Manuszewski:
	Fixing crashes in cooked game
Change 2480095 by Robert Manuszewski:
	Making FUObjectArray more thread safe
Change 2475443 by Robert Manuszewski:
	Re-enabling single-threaded async loading path for the editor and platforms that don't support multithreading.
Change 2475458 by Robert Manuszewski:
	Making sure bulk data is only loaded on a separate thread if it's not being loaded on the async loading thread.
Change 2476661 by Robert Manuszewski:
	Fixing FlushAsyncLoading not flushing everything
Change 2401089 by Jaroslaw Surowiec:
	Core - Added AtomicallySetFlags/ClearFlags to UObject, added a comment to ThisThreadAtomicallyClearedRFUnreachable

[CL 2498249 by Robert Manuszewski in Main branch]
2015-04-01 03:03:18 -04:00
Marcus Wassmer
2100241e41 Temp workaround for COTF failures for monolithic platforms.
#codereview matthew.griffin

[CL 2496181 by Marcus Wassmer in Main branch]
2015-03-30 17:05:35 -04:00
Marc Audy
5250ddb48c Made a number of string operations in key files with symbols CaseSensitive
Removed some duplicated checks in FPaths::IsRelative

[CL 2493680 by Marc Audy in Main branch]
2015-03-27 09:49:05 -04:00
Matthew Griffin
6de5ee48a4 Added checks on distribution level for modules and the direct dependencies of binaries
Changed Module Manager so that it adds restricted directories to modified PATH if they exist, removed unnecessary recursive use of FindModulePathsInDirectory
Updated setup of any projects that were flagged up using this system
Added old locations of restricted output to junk manifest
Added Util function to get min/max of IComparable types (used for enums)

[CL 2493565 by Matthew Griffin in Main branch]
2015-03-27 07:15:32 -04:00
Ben Marsh
a31ea34e13 Change ModuleManager to automatically scan NotForLicensees/NoRedist/CarefullyRedist subfolders when looking for modules, and add Mac support for putting dylibs in subfolders.
#codereview Michael.Trepka, Matthew.Griffin

[CL 2486529 by Ben Marsh in Main branch]
2015-03-20 15:01:51 -04:00
Mark Satterthwaite
88751c6da8 Rewritten debug symbol handling for OS X to allow creation of dSYM bundles & symbol stripping of executables.
- The MacToolChain will emit dSYMs and strip executables when the UBT configuration enables bGeneratedSYMFile, just like iOS.
- Symbol stripping requires generating dSYMs to prevent creation of non-debuggable builds whose crash reports would be unresolvable.
- To avoid a dependency on the Private framework CoreSymbolication all symbols from that framework are loaded dynamically & can only be used within programs, not the game or the editor, as CoreSymbolication is incompatible with non-ANSI malloc implementations.
- Added an initial platform-agnostic API for querying debug symbol info, including a generic database format that can be queried on otherwise incompatible platforms.
- Added UnrealAtoS that emulates Apple's atos to resolve symbols using the generic database or the platform API (CoreSymbolication on OS X) which on OS X is used by the editor to gather symbol info for CodeView.
- Added DSymExporter which will export Apple debug symbol data from Mach-O binaries, including the payload within a .dSYM bundle, to the generic format so that the crash report server may one day read the data without needing a Mac to symbolicate reports.
- Initial SymbolDebugger & MinidumpDiagnostics support on OS X.
#codereview michael.trepka, Jaroslaw.Surowiec, lee.clark, peter.sauerbrei

[CL 2466299 by Mark Satterthwaite in Main branch]
2015-03-02 10:21:50 -05:00
Mikolaj Sieluzycki
2b91780fed Fix adding static mesh to a level in Fortnite.
[CL 2452973 by Mikolaj Sieluzycki in Main branch]
2015-02-20 04:16:36 -05:00