- headers in core and implementations in http were working but only coincidentally
- no way to export any of the platforms if needed because CORE_API was correct for generic platform but would have link errors because all platforms were in HTTP_API
- fixed up platform http calls to reference http module
#platformnotify josh.adams
#codereview sam.zamani, david.nikdel, dmitry.rekman
[CL 2646887 by Josh Markiewicz in Main branch]
- No longer assumes a US-QWERTY layout (uses SDL equivalent of Windows VK_ values, not raw keyboard scancodes)
- Fixes various keys not working for odd reasons (we lost bits downcasting from uint32 to uint16, causing key values to change or overlap other keys).
(Fixes UE-11582 and UE-14143 and probably others.)
Misc:
- Reverted to using WarpMouseInWindow due to reports that Global is not always reliable.
- Added a workaround for relative mouse movement being wrong in some cases.
#platformnotify Josh.Adams
#codereview Ryan.Gordon, Josh.Adams, Marc.Audy
[CL 2625112 by Dmitry Rekman in Main branch]
Lots of shadow variable issues in header files
Type narrowing mismatches between integer types.
Fixed some variable names which conflicted with private members, this works around a bug in VC14
Commiting some of Jeff's code changes from 2605975
#platformnotify Josh.Adams
#CodeReview Jeff.Campeau
[CL 2613285 by Terence Burns in Main branch]
- don't include debuggin info / minify development builds - cuts development binary size from 200Mb to 69Mb.
- generate symbols file
- modify template to download this symbols file on the fly on a crash and use it generate an unmangled and unminified callstack. ( we now have real callstacks for shippign builds!)
#codereview josh.adams , james.moran
[CL 2556055 by Ankit Khare in Main branch]
These changes allow UE4 to compile and run (in Debug) on Clang 3.7 alpha (r231657 only!)
- Disabled editor source file discovery (crashes with Clang currently)
- Disabled FThreadIdleStats in UnrealHeaderTool with Clang on Windows (causes link errors due to inlining bugs with Clang and DLL imports)
- Use MSVC linker by default, even when compiling with Clang (can be tweaked with bAllowClangLinker)
- Enabled shadow variable warnings on Windows with Clang
- Limited max size of reflection code source files (Clang on Windows crashes with huge source files)
- Fixed UE4 deprecation warnings not showing up when using Clang on Windows
- Make sure initialization list order only triggers a warning on Clang for Windows
Other changes:
- Fixed issues with pushed pragmas not getting popped (PRAGMA_ENABLE_DEPRECATION_WARNINGS)
- Removed EMIT_DEPRECATED_WARNING_MESSAGE, wasn't used
- Fixed various third party library includes not being treated as system headers (prevents compiler warnings)
To test Clang on Windows (beta!!):
- Get latest UE4 main branch (4.9)
- Install LLVM+Clang for Windows version r231657. It's a quick install, you don't need to compile anything yourself.
- Open UEBuildWindows.cs, and change bCompileWithClang to true. Be careful not to check that in. We'll probably make this config-driven later, after the Clang toolchain gets more mature.
- Switch to Debug Editor configuration. (See below for more info.)
- Rebuild the game or engine
Notes:
- You must use Clang r231657 (3.7.0 alpha). There are no other releases that I've found that are able to compile UE4 successfully. Most of the newer releases crash during compiling, and older releases aren't able to digest Windows header files well enough.
- Compiling in Development currently will not work due to bugs with Clangs handling of inlining and DLL exports. Monolithic builds should work, though.
- Occasionally you may see runtime crashes (stack overflows or access violations) when running UE4 compiled with Clang on Windows. These may very well be bugs in Clang (remember, we're using an alpha release of Clang 3.7.0.) Unfortunately without better debugger support, it can be difficult to workaround these
- When debugging, you will only have functions and line numbers, no variables or parameters. Clang only has preliminary support for Microsoft's PDB format currently.
XGE is fully supported with Clang on Windows. Best case rebuild times I've seen are 3.5 minutes in Debug.
- Shared PCHs aren't supported yet (similar to on Mac and Linux), so iterative compile times may be slower compared to Visual C++. However the Clang compiler is actually quite fast for rebuilds, probably because of missing debug info though.
- There may be some compiler warnings that are different between Mac/Linux and Windows. We haven't done a line-by-line comparison yet.
- Build products and executables for Clang and VC++ overlap on disk. So you have to rebuild to switch back and forth. Sorry.
- Clang on Windows has a few bugs that we've had to work around. You might see some strange things from time to time. Every new release of Clang has different behavior on Windows.
- We still use the VC++ Linker, even when compiling using Clang. The new Clang linker (lld.exe) can be enabled with bAllowClangLinker but it will crash when linking some modules. It also doesn't produce usable debug symbols by Visual Studio (yet).
#codereview mikolaj.sieluzycki
[CL 2532260 by Mike Fricker in Main branch]
UPLAT-685 (Remove Virtual File System to reduce run-time memory overhead and allow for larger worlds in HTML5)
#codereview josh.adams, james.moran
[CL 2505577 by Ankit Khare in Main branch]
Rob asked me to back out GENERATED_*_BODY -> GENERATED_BODY change for now until the "_Validate and _Implementation auto-generation" discussion is over.
#codereview Robert.Manuszewski
[CL 2481343 by Jaroslaw Palczynski in Main branch]
- Moved HighQualityLightmap support check to IOSTargetPlatform so it can check project settings for Metal support
- Fixed some issues running on an x86_64 device
- Cleaned up some unused functions in TargetPlatform
#codereview niklas.smedberg
[CL 2478853 by Josh Adams in Main branch]
New define: PLATFORM_COMPILER_HAS_DEFAULT_FUNCTION_TEMPLATE_ARGUMENTS, indicating whether function templates can have default template args or whether workarounds are needed. This is effectively a global version of ENABLE_TFUNCTIONREF_WORKAROUND from TFunction. Only needed for VS 2012, once we drop that we can remove this.
Now constructs from T* instead of (templated) U*. It cast to a T* anyway, so would have failed to compile with anything that couldn't already bind to a T* arg, so the template was pointless.
As a result no constructor from TYPE_OF_NULL is needed (calls the T* constructor with NULL), so it has been removed. nullptr also now works!
Comparison operators have been made symmetrical (TLazyObjectPtr can now be the right-hand argument as well) and comparisons with nullptr now compile
Implicit upcasting is now enabled in the constructor and assignment, so "TLazyObjectPtr<Base> mybaselazyptr = TLazyObjectPtr<Derived>()" now works, as does passing a TLazyObjectPtr<Derived> to a function that expects a TLazyObjectPtr<Base>. As this is always safe, this works even if the object isn't currently loaded!
The constructor from a TWeakObjectPtr has been removed because it didn't even compile
#codereview Steve.Robb
[CL 2471454 by Gareth Martin in Main branch]
Implement LaunchURL for HTML5. UE-10852
Possible fix for bogus mouse coordinates in Safari
#codereview Ankit.Khare
[CL 2461964 by James Moran in Main branch]
- Fixes to the Mac HTML5 Device selection. .app files now work correctly.
- Re-enabled HTML5 in Mac Editor.
- Added HTML5LaunchHelper executable to clean up the process of LaunchOn for HTML5.
- Improve HTML5 SDK Settings Editor interface. Only the emscripten install directory is needed now, SDK version are automatically picked up and selected for use.
- Change UnrealPak to also account for bytes saved (>64KB) and percentage size of original file (<90%) when choosing to automatically turn off compression.
- Added Server Port option for HTML5 deploy to stop clashes on port 8000
- Adding more logging for use during debugging & tracing.
- Added an option to turn on HTML5 tracing api and added calls to the api.
- Fix up check() macros to throw alert messages and be more clear that something has gone wrong on HTML5.
#codereview Ankit.Khare
[CL 2452979 by James Moran in Main branch]