cesium-unreal icon indicating copy to clipboard operation
cesium-unreal copied to clipboard

Use the vcpkg-enabled version of cesium-native.

Open kring opened this issue 1 year ago • 2 comments

This depends on CesiumGS/cesium-native#820.

To do:

  • [x] Create an overlay triplet for Unreal so the above steps aren't necessary.
  • [x] Get all the platforms building on CI.
  • [ ] Test the Editor on all platforms:
    • [x] Windows
    • [ ] macOS
    • [x] Linux
  • [ ] Test packaging for all platforms
    • [x] Windows
    • [ ] macOS
    • [x] Linux
    • [x] Android
    • [ ] iOS
  • [ ] Create overlay ports for abseil and sqlite that rename our symbols to avoid conflicts with the same libraries included in other Unreal plugins.
  • [x] Investigate why the distributions are bigger. Probably because of this.

CC @jherico (thanks for all your work on this on the cesium-native side!)

kring avatar Jun 06 '24 11:06 kring

I finally got around to trying to use the CI-produced Windows binaries on my system, and of course they immediately crash on startup. The immediate problem is the lovely new MSVC 14.40 compiler that GitHub recently rolled out on the windows-2022 runner, which apparently generates code that crashes the first time your code tries to use std::mutex if your MSVCRT runtime is an older version. The real problem, though, is that vcpkg is not building with MSVC 14.34, which is the version UE 5.2 and 5.3 use and therefore is also the version that cesium-native and all of its dependencies must use (UE 5.4 uses 14.38, but MSVC versions are backward compatible so it's fine for us to compile with 14.34 even in UE 5.4). Should be fixable by setting the VCPKG_PLATFORM_TOOLSET_VERSION variable in the x64-windows-unreal.cmake triplet file.

kring avatar Jun 17 '24 09:06 kring

Just dropping a reminder for myself here that this PR also removes the debug section compression on Linux. The compressed debug sections cause linker errors when cross-compiling for Linux from Windows:

PackagingResults: Error: C:/Program Files/Epic Games/UE_5.2/Engine/Plugins/Marketplace/CesiumForUnreal/Intermediate/Build/Linux/x64/UnrealGame/Development/CesiumRuntime/Module.CesiumRuntime.2_of_11.cpp.o:(.debug_gnu_pubtypes) is compressed with ELFCOMPRESS_ZLIB, but lld is not built with zlib support

Now that the binaries aren't so enormous, compressing the debug sections isn't as essential.

kring avatar Jun 30 '24 23:06 kring

This is working well and I believe it's finally ready for review!

kring avatar Jul 25 '24 16:07 kring

Final testing across all platforms:

❌ means I cannot test because I don't have access to the necessary hardware.

  • Editor
    • [x] Windows x64
    • [x] Linux x64
    • [x] macOS Universal on x64
    • [ ] ❌ macOS Universal on ARM64
  • Build Game from Windows
    • [x] Windows x64
    • [x] Android ARM64
  • Build Game from macOS
    • [x] macOS Universal
    • [ ] iOS ARM64 - waiting on acceptance of new Apple Developer license agreement. An iOS device might be required to even build, too.
  • Build Game from Linux
    • [x] Linux x64
  • Run Game
    • [x] Windows x64
    • [x] Linux x64
    • [x] macOS Universal on x64
    • [ ] ❌ macOS Universal on ARM64
    • [ ] ❌ iOS ARM64
    • [x] Android ARM64 (tested on Pixel 6 Pro)

kring avatar Aug 15 '24 08:08 kring

Reminder for myself: I need to update CHANGES.md.

kring avatar Aug 16 '24 02:08 kring

I've addressed the review feedback and tested every platform that I'm currently able to test. Let's not wait for the testing on the remaining platforms and instead get this into main as soon as possible.

kring avatar Aug 16 '24 08:08 kring

Thanks @kring ! Merging now 💪

j9liu avatar Aug 16 '24 14:08 j9liu