Fix two compilation errors exposed when enabling tools support for any restricted platform. (#3633)

* Various fixes and empty boilerplate files required for restricted platforms.

Signed-off-by: bosnichd <bosnichd@amazon.com>

* Add comments to address review feedback.

Signed-off-by: bosnichd <bosnichd@amazon.com>

* Fix two compilation errors exposed when enabling tools support for any restricted platform.
- The simple one: remove menu commands that call OnChangeGameSpec (which has since been removed) from CryEdit.cpp
- The "I almost threw my computer out the window" one: pull PVRTC.cpp out of unity builds, because it indirectly #includes winnt.h, which typedefs wchar_t WCHAR, which causes a complilation error (Error C2632 'wchar_t' followed by 'wchar_t' is illegal ImageProcessingAtom.Editor.Static C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\winnt.h 471) if something else in the unity file has also happened to define WCHAR as wchar_t. Enabling tools support for any restricted platform resulted in this happening due to different compile definitions being set for ImageConvert.cpp and BuilderSettingManager.cpp (see Gems/Atom/Asset/ImageProcessingAtom/Code/CMakeLists.txt), which resulted in those two files being pulled out of unity builds, which resulted in the entirely unrelated PVRTC.cpp file being moved from the first thing included by a unity file to the second last thing included by a different unity file, that just happened to include something else (prior to PVRTC.cpp) which was defining WCHAR as wchar_t.

Signed-off-by: bosnichd <bosnichd@amazon.com>
This commit is contained in:
bosnichd
2021-08-27 11:33:28 -06:00
committed by GitHub
parent 9fac26e6a6
commit 9876d86d5d
2 changed files with 4 additions and 7 deletions
-7
View File
@@ -447,13 +447,6 @@ void CCryEditApp::RegisterActionHandlers()
ON_COMMAND(ID_OPEN_TRACKVIEW, OnOpenTrackView)
ON_COMMAND(ID_OPEN_UICANVASEDITOR, OnOpenUICanvasEditor)
#if defined(AZ_TOOLS_EXPAND_FOR_RESTRICTED_PLATFORMS)
#define AZ_RESTRICTED_PLATFORM_EXPANSION(CodeName, CODENAME, codename, PrivateName, PRIVATENAME, privatename, PublicName, PUBLICNAME, publicname, PublicAuxName1, PublicAuxName2, PublicAuxName3)\
ON_COMMAND_RANGE(ID_GAME_##CODENAME##_ENABLELOWSPEC, ID_GAME_##CODENAME##_ENABLEHIGHSPEC, OnChangeGameSpec)
AZ_TOOLS_EXPAND_FOR_RESTRICTED_PLATFORMS
#undef AZ_RESTRICTED_PLATFORM_EXPANSION
#endif
ON_COMMAND(ID_OPEN_QUICK_ACCESS_BAR, OnOpenQuickAccessBar)
ON_COMMAND(ID_FILE_SAVE_LEVEL, OnFileSave)