Difference between revisions of "Building PSUnreal on macOS"
Jump to navigation
Jump to search
(10 intermediate revisions by the same user not shown) | |||
Line 23: | Line 23: | ||
* Step 4: Prepare the Xcode workspace. | * Step 4: Prepare the Xcode workspace. | ||
** In the UnrealEngine directory, run the script '''Setup.command'''. It downloads 11.5GB of dependencies and may take a while. | ** In the UnrealEngine directory, run the script '''Setup.command'''. It downloads 11.5GB of dependencies and may take a while. | ||
** At the same location, run the script '''GenerateProjectFiles. | ** At the same location, run the script '''GenerateProjectFiles.command'''. It generates the '''UE4.xcworkspace''' Xcode workspace. | ||
* Step 5: Compile Unreal Engine with Xcode. | * Step 5: Compile Unreal Engine with Xcode. | ||
Line 32: | Line 32: | ||
** Compiling may take a long time, depending on your system specs. | ** Compiling may take a long time, depending on your system specs. | ||
** After the compilation finishes, select the 'Product > Run' menu item to load the editor. | ** After the compilation finishes, select the 'Product > Run' menu item to load the editor. | ||
* Step 6: set xcode tools | |||
** Open Xcode and go to Preferences>Locations and set the Command Line Tools or Unreal will give this error: "Xcode is not installed on this Mac ... Falling back to runtime text shaders, which are slower. " | |||
* Launch the Editor to test if it works | |||
** You can launch the editor with \UnrealEngine\Engine\Binaries\Mac\UE4Editor.app | |||
If you get this error: | |||
xcode command codesign failed with exit code 1 | |||
You need to access the project settings and set the code signing. | |||
== Building PSUnreal == | == Building PSUnreal == | ||
* Create PSUnreal dir | |||
> cd \ | > cd \ | ||
> mkdir PSUnreal | > mkdir PSUnreal | ||
* Install macports and svn command line | |||
** Install macports: Download https://distfiles.macports.org/MacPorts/MacPorts-2.6.2-10.15-Catalina.pkg | |||
> | > sudo port install subversion | ||
> | |||
Get the sources from the Planeshift repository. | |||
* Open a Terminal and go to you home directory with | |||
> '''cd ~'''. We will build from there; adapt if needed. | |||
Checkout the | * Checkout the sources from the PS Unreal repository with: | ||
> svn co svn://xxx.xxx.xxx/psunreal/PSUnreal PSUnreal | > svn co svn://xxx.xxx.xxx/psunreal/PSUnreal PSUnreal | ||
* Build the MariaDB Connector from source. | |||
* | ** Install prerequisites: sudo port install cmake jemalloc judy openssl boost gnutls | ||
** | |||
** Download the MariaDB Connector for C from '''https://downloads.mariadb.com/Connectors/c/connector-c-3.1.8/mariadb-connector-c-3.1.8-src.tar.gz'''. | ** Download the MariaDB Connector for C from '''https://downloads.mariadb.com/Connectors/c/connector-c-3.1.8/mariadb-connector-c-3.1.8-src.tar.gz'''. | ||
** Expand the '''tar.gz''' in your home directory. From your terminal, '''cd ~/mariadb-connector-c-3.1.8-src''', to go to the directory that contain the MariaDB Connector sources. | ** Expand the '''tar.gz''' in your home directory. From your terminal, '''cd ~/mariadb-connector-c-3.1.8-src''', to go to the directory that contain the MariaDB Connector sources. | ||
** | ** move the sources in PSUnreal: mv * /Users/luke/PSUnreal/ThirdParty/MariaDB | ||
** Generate the makefiles with '''cmake | ** Generate the makefiles with '''cmake . '''. | ||
** Build and install the connector in your PSUnreal source tree with '''make all install'''. | ** Build and install the connector in your PSUnreal source tree with '''make all install'''. | ||
* | * Build Wordnet | ||
> cd /Users/luke/PSUnreal/ThirdParty/Wordnet | |||
> gcc -shared -o Wordnet.dylib -fPIC *.c | |||
=== Build PS Unreal. === | |||
* Generate project files: | |||
> /Users/luke/UnrealEngine/GenerateProjectFiles.command -project="/Users/luke/PSUnreal/PSUnreal.uproject" -game -engine | |||
* Launch XCode and open PSUnreal.xcworkspace | |||
* Build with Product > Build menu item. |
Revision as of 02:23, 23 May 2020
Reference docs
- Downloading Unreal Engine source code: https://docs.unrealengine.com/en-US/GettingStarted/DownloadingUnrealEngine/index.html
- Compiling Unreal Engine source code: https://github.com/EpicGames/UnrealEngine/blob/release/README.md
Compiling Unreal Engine
Note: As of 2020-05-05, you need ~120GB of disk space for a compiled version of the Unreal Engine.
- Step 1: Get access to the Unreal Engine source code.
- You must be an Unreal Engine subscriber (if not, open an account there: https://www.unrealengine.com)
- You must have a GitHub account (if not, open an account there: https://github.com)
- Have associated your GitHub account with your Unreal Engine account as described on the UE4 on GitHub page.
- At this point you should be able to access the Unreal Engine repository on GitHub.
- Step 2: Get the Unreal Engine source code.
- Get the source code with: git clone -b 4.24.3-release https://github.com/EpicGames/UnrealEngine.git.
- This will create an "Unreal Engine" sub-directory where you run the command.
- Step 3: Install the latest version of Xcode.
- Install the latest version of Xcode.
- Step 4: Prepare the Xcode workspace.
- In the UnrealEngine directory, run the script Setup.command. It downloads 11.5GB of dependencies and may take a while.
- At the same location, run the script GenerateProjectFiles.command. It generates the UE4.xcworkspace Xcode workspace.
- Step 5: Compile Unreal Engine with Xcode.
- Load the UE4.xcworkspace into Xcode.
- Select the ShaderCompileWorker > My Mac target in the title bar, then build with Product > Build menu item.
- Wait for the build to complete.
- Select the UE4 > My Mac target, and build again.
- Compiling may take a long time, depending on your system specs.
- After the compilation finishes, select the 'Product > Run' menu item to load the editor.
- Step 6: set xcode tools
- Open Xcode and go to Preferences>Locations and set the Command Line Tools or Unreal will give this error: "Xcode is not installed on this Mac ... Falling back to runtime text shaders, which are slower. "
- Launch the Editor to test if it works
- You can launch the editor with \UnrealEngine\Engine\Binaries\Mac\UE4Editor.app
If you get this error:
xcode command codesign failed with exit code 1
You need to access the project settings and set the code signing.
Building PSUnreal
- Create PSUnreal dir
> cd \ > mkdir PSUnreal
- Install macports and svn command line
- Install macports: Download https://distfiles.macports.org/MacPorts/MacPorts-2.6.2-10.15-Catalina.pkg
> sudo port install subversion
Get the sources from the Planeshift repository.
- Open a Terminal and go to you home directory with
> cd ~. We will build from there; adapt if needed.
- Checkout the sources from the PS Unreal repository with:
> svn co svn://xxx.xxx.xxx/psunreal/PSUnreal PSUnreal
- Build the MariaDB Connector from source.
- Install prerequisites: sudo port install cmake jemalloc judy openssl boost gnutls
- Download the MariaDB Connector for C from https://downloads.mariadb.com/Connectors/c/connector-c-3.1.8/mariadb-connector-c-3.1.8-src.tar.gz.
- Expand the tar.gz in your home directory. From your terminal, cd ~/mariadb-connector-c-3.1.8-src, to go to the directory that contain the MariaDB Connector sources.
- move the sources in PSUnreal: mv * /Users/luke/PSUnreal/ThirdParty/MariaDB
- Generate the makefiles with cmake . .
- Build and install the connector in your PSUnreal source tree with make all install.
- Build Wordnet
> cd /Users/luke/PSUnreal/ThirdParty/Wordnet > gcc -shared -o Wordnet.dylib -fPIC *.c
Build PS Unreal.
- Generate project files:
> /Users/luke/UnrealEngine/GenerateProjectFiles.command -project="/Users/luke/PSUnreal/PSUnreal.uproject" -game -engine
- Launch XCode and open PSUnreal.xcworkspace
- Build with Product > Build menu item.