immutable / unity-immutable-sdk

Unity SDK for Immutable's products.
Apache License 2.0
13 stars 7 forks source link

Windows Standalone: Increased build size, duplicate cef related DLLs included in build #215

Closed rowbot-11 closed 3 months ago

rowbot-11 commented 4 months ago

Description

Windows Standalone builds include duplicates of the following cef related DLLs adding 187 MB to a passport enabled build.

image The image above is the output of a passport enabled build

Cause

Unity: Passport DLL Platform/Import settings

All cef DLLs imported in the package are enabled for WindowsStandalone, OSXStandalone and LinuxStandalone. These are referenced and exported automatically when built to ../{PLATFORM_TARGET}/{PROJECT_NAME}_Data/Plugins/x86_64/

UnityWebBrowser: EngineManagerPostprocess.cs

UnityWebBrowser post process script copies cef engine and related DLLs from Packages/com.immutable.passport/Runtime/ThirdParty/UnityWebBrowser.Engine.Cef.Win-x64/Engine/ to ../{PLATFORM_TARGET}/{PROJECT_NAME}_Data/ImmutableSDK/Runtime/UWB/

Possible solution

Assumption: UnityWebBrowser requires cef DLLs in the same directory as UnityWebBrowser.Engine.Cef.exe Solution: Change EngineManagerPostprocess.OnPostprocessBuild(BuildReport report).buildUwbPath to ../{PLATFORM_TARGET}/{PROJECT_NAME}_Data/Plugins/x86_64/ from {buildDataPath}/ImmutableSDK/Runtime/UWB/ to avoid DLL duplication.

github-actions[bot] commented 3 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.