-
Notifications
You must be signed in to change notification settings - Fork 3
Installation
Jonathan Orman edited this page Jan 12, 2021
·
4 revisions
CRYMIUM consists of the CRYMIUM plugin and the renderer sub process. To install CRYMIUM and use it in a CRYENGINE project, we need to add both of these to our CRYENGINE installation and include CRYMIUM in the project's build.
If you have not built CRYMIUM yet, see the building guide.
- Find the built
Crymium.dll
plugin (e.g. C:/git/CRYMIUM/bin/win_x64/Crymium.dll) - Copy
Crymium.dll
into the CRYENGINE bin directory (e.g. C:/Program Files (x86)/Crytek/CRYENGINE Launcher/Crytek/CRYENGINE_5.6/bin/win_x64)
- Find the directory containing the built CRYMIUM sub process files (e.g. C:/git/CRYMIUM/build/Crymium.SubProcess/Debug)
- Copy the following contents of the directory into the CRYENGINE bin directory (e.g. C:/Program Files (x86)/Crytek/CRYENGINE Launcher/Crytek/CRYENGINE_5.6/bin/win_x64):
- locales
- swiftshader
- cef.pak
- cef_100_percent.pak
- cef_200_percent.pak
- cef_extensions.pak
- chrome_elf.dll
- Crymium.SubProcess
- d3dcompiler_47.dll
- devtools_resources.pak
- icudtl.dat
- libcef.dll
- libEGL.dll
- libGLESv2.dll
- snapshot_blob.bin
- v8_context_snapshot.bin
- Open the CRYENGINE Launcher and create a new Third Person Shooter C++ project.
- Close the CRYENGINE Editor window that opens.
- In the newly created project's root directory right click
Game.cryproject
and selectGenerate Solution
. This will generate aCMakeLists.txt
file in the project'sCode
directory. - Close the console window that opens.
- Open the newly created
Code/CMakeLists.txt
file and look for the section where the include directories are added. It should look like this:
target_include_directories(${THIS_PROJECT}
PRIVATE
"${CRYENGINE_DIR}/Code/CryEngine/CryCommon"
"${CRYENGINE_DIR}/Code/CryEngine/CryAction"
"${CRYENGINE_DIR}/Code/CryEngine/CrySchematyc/Core/Interface"
"${CRYENGINE_DIR}/Code/CryPlugins/CryDefaultEntities/Module"
)
- Add the path to the CRYMIUM code and the path to the CEF directory in your cloned CRYMIUM directory:
target_include_directories(${THIS_PROJECT}
PRIVATE
"${CRYENGINE_DIR}/Code/CryEngine/CryCommon"
"${CRYENGINE_DIR}/Code/CryEngine/CryAction"
"${CRYENGINE_DIR}/Code/CryEngine/CrySchematyc/Core/Interface"
"${CRYENGINE_DIR}/Code/CryPlugins/CryDefaultEntities/Module"
"C:/git/CRYMIUM/Code"
"C:/git/CRYMIUM/build/third_party/cef/cef_binary_79.1.27+gd2449e5+chromium-79.0.3945.117_windows64"
)
- Now find the custom section at the bottom of the file:
#BEGIN-CUSTOM
# Make any custom changes here, modifications outside of the block will be discarded on regeneration.
#END-CUSTOM
- CRYMIUM requires C++17 or higher. Add a setting in the custom section to use C++17:
#BEGIN-CUSTOM
# Make any custom changes here, modifications outside of the block will be discarded on regeneration.
set_target_properties(Game PROPERTIES CXX_STANDARD 17)
#END-CUSTOM
- Open your project's
Game.cryproject
file in a text editor and find the plugins section, which should look like this:
"plugins": [
{ "guid": "", "type": "EType::Native", "path": "CryDefaultEntities" },
{ "guid": "", "type": "EType::Native", "path": "CrySensorSystem" },
{ "guid": "", "type": "EType::Native", "path": "CryPerceptionSystem" },
{ "guid": "", "type": "EType::Native", "path": "bin/win_x64/Game.dll" },
{
"guid": "",
"type": "EType::Native",
"path": "CryGamePlatform",
"platforms": [ "PS4" ]
}
]
- Add the CRYMIUM plugin just before the Game plugin:
"plugins": [
{ "guid": "", "type": "EType::Native", "path": "CryDefaultEntities" },
{ "guid": "", "type": "EType::Native", "path": "CrySensorSystem" },
{ "guid": "", "type": "EType::Native", "path": "CryPerceptionSystem" },
{ "guid": "", "type": "EType::Native", "path": "Crymium" },
{ "guid": "", "type": "EType::Native", "path": "bin/win_x64/Game.dll" },
{
"guid": "",
"type": "EType::Native",
"path": "CryGamePlatform",
"platforms": [ "PS4" ]
}
]
- In the CRYENGINE project directory, open a command prompt and create a build directory:
mkdir build
- Change to the new
build
directory:
cd build
- Use CMake to create a solution for the project:
cmake -G "Visual Studio 16" -A x64 ../code
- Open
build/Game.sln
in Visual Studio. - In the main menu select Build > Build Solution.
- Right click
GameLauncher
in the Solution Explorer and selectDebug > Start New Instance
to make sure the game works.
CRYMIUM is now installed and ready to use in your project!