You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Documentation/developer-setup-osx.md
+13-82Lines changed: 13 additions & 82 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,10 +6,12 @@ Detailed instructions for setting up a Cesium for Unreal development environment
6
6
# Prerequisities
7
7
8
8
- Install CMake (version 3.15 or newer) from https://cmake.org/install/
9
-
- Install Xcode 14.2+ from https://developer.apple.com/xcode/resources/
9
+
- Install Xcode 14.1+ from https://developer.apple.com/xcode/resources/
10
10
- For best JPEG-decoding performance, you must have [nasm](https://www.nasm.us/) installed so that CMake can find it. Everything will work fine without it, just slower.
11
11
- Install the minimum supported version of Unreal Engine (version 5.4 as of this writing) from https://www.unrealengine.com/en-US/download
12
12
13
+
These instructions are intended for Unreal Engine 5.4. The process is similar for newer versions of Unreal Engine. Supported Xcode versions are specified in `/Users/Shared/Epic Games/UE_5.4/Engine/Config/Apple/Apple_SDK.json`.
14
+
13
15
# Cloning the git repos
14
16
15
17
The following illustrates the recommended directory layout for developers:
Unreal Engine 5.3 requires a version of Xcode _no later_ than Xcode 15.x. This means that Xcode 16, which is the earliest version supported on macOS 15.3 Sequoia, cannot be used to build a UE 5.3 project without some tricks. You will see an error like this when you attempt to generate project files:
41
-
42
-
> Exception while generating include data for UnrealEditor: Platform Mac is not a valid platform to build. Check that the SDK is installed properly.
43
-
44
-
We have a few options:
45
-
46
-
1. Use an earlier version of macOS
47
-
2. Use a later version of Unreal Engine
48
-
3.[Hack UnrealBuildTool to allow us to build for UE 5.3 using Xcode 16](#modify-unrealbuildtool-for-xcode-16)
49
-
4.[Hack Xcode 15.4 to run on macOS 15.2 Sequoia](#modify-xcode-for-sequoia)
50
-
51
-
## Modify UnrealBuildTool for Xcode 16
52
-
53
-
The source code for the UnrealBuildTool is installed with Unreal Engine, which makes it easy to modify it for our purposes. The file to edit in Unreal Engine 5.3 is here (or equivalent on your system):
> The path to the `dotnet` executable may be different in different Unreal Engine versions. You can also install a system `dotnet` if desired with `brew install dotnet`.
80
-
81
-
This will build UnrealBuildTool to the place all of Unreal's build scripts expect to find it. You should now be able to [generate project files](#building-cesium-for-unreal) successfully.
82
-
83
-
However, because this version of Unreal Engine has not been tested on this Xcode version, you may run into compiler errors, and these may be easy or difficult to fix. With Unreal Engine 5.3 and Xcode 16.2, you'll likely see errors like this:
84
-
85
-
> /Users/Shared/Epic Games/UE_5.3/Engine/Source/Runtime/RenderCore/Public/ShaderParameterStructDeclaration.h:22:3: encoding prefix 'u' on an unevaluated string literal has no effect and is incompatible with c++2c [-Werror,-Winvalid-unevaluated-string]
86
-
87
-
We can "fix" this by suppressing this warning. Open `/Users/Shared/Epic Games/UE_5.3/Engine/Source/Runtime/Core/Public/Apple/ApplePlatformCompilerPreSetup.h` and add a line to disable this warning:
It's possible to run Xcode 15.4 on macOS 15.3 Sequoia, and probably later versions:
96
-
97
-
* Download Xcode 15.4 from https://developer.apple.com/download/all/.
98
-
* Extract the download to your home directory:
99
-
100
-
```
101
-
cd
102
-
xip -x ./Downloads/Xcode_15.4.xip
103
-
mv Xcode.app Xcode_15.4.app
104
-
```
105
-
106
-
* Launch this version of Xcode:
107
-
108
-
```
109
-
./Xcode_15.4.app/Contents/MacOS/Xcode
110
-
```
111
-
112
-
* Xcode should launch and ask you to select or create a project. Choose `Xcode` on the menu at the top and then `Settings`. Click the `Locations` tab.
113
-
* Under `Command Line Tools` choose `Xcode_15 15.4`.
114
-
115
40
# Building cesium-native
116
41
117
42
The cesium-native libraries and their dependencies use CMake and must be built separately from Cesium for Unreal. Cesium for Unreal supports both Intel and Apple Silicon processors. In development, we usually just want to build for the host's architecture, which is done as follows:
118
43
44
+
(It may be helpful to place these commands in a shell script for future use.)
This will install the built libraries to one of these subdirectories of `~/dev/cesium-unreal-samples/Plugins/cesium-unreal/Source/ThirdParty/lib/`, depending on your configuration and processor architecture:
134
64
135
65
*`Darwin-arm64-Debug` - Debug configuration for Apple Silicon.
@@ -190,6 +120,7 @@ Configure the CMake project in the `~/dev/cesium-unreal-samples/Plugins/cesium-u
190
120
Execute the following commands to build and install a Release version of cesium-native:
> Your Mac is set to use CommandLineTools for its build tools (/Library/Developer/CommandLineTools). Unreal expects Xcode as the build tools. Please install Xcode if it's not already, then do one of the following:
219
150
> - Run Xcode, go to Settings, and in the Locations tab, choose your Xcode in Command Line Tools dropdown.
220
151
> - In Terminal, run 'sudo xcode-select -s /Applications/Xcode.app' (or an alternate location if you installed Xcode to a non-standard location)
221
-
> Either way, you will need to enter your Mac password.
152
+
> Either way, you will need to enter your Mac password.
222
153
223
154
In which case, do what it says.
224
155
225
156
If you see a message like this:
226
157
227
158
> Exception while generating include data for UnrealEditor: Platform Mac is not a valid platform to build. Check that the SDK is installed properly.
228
159
229
-
It probably means Unreal doesn't like your Xcode version. Be sure that Xcode is installed and that you have followed the [Xcode setup instructions](#setting-up-xcode).
160
+
It probably means Unreal doesn't like your Xcode version. Be sure that a supported version of Xcode is installed.
230
161
231
162
If the project file generation succeeds, you should see a file named `CesiumForUnrealSamples (Mac).xcworkspace` in the same directory as your uproject. Double-click it to open Xcode.
232
163
@@ -247,7 +178,7 @@ To get a call stack from a crash on an iOS device...
247
178
- Copy this file to a separate directory.
248
179
- Convert it to a .crash file using https://github.com/tomieq/AppleCrashScripts and convertFromJSON.swift. The input path must be a relative path, not an absolute one. So run it in the directory where you copied the ips file above.
- Run symbolicatecrash, which comes with Xcode but is buried here /Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/
181
+
- Run `symbolicatecrash`, which comes with Xcode but is buried here /Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/Resources/
0 commit comments