Installation - JonnyOrman/CRYMIUM GitHub Wiki
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.
Install the CRYMIUM plugin
- Find the built
Crymium.dllplugin (e.g. C:/git/CRYMIUM/bin/win_x64/Crymium.dll) - Copy
Crymium.dllinto the CRYENGINE bin directory (e.g. C:/Program Files (x86)/Crytek/CRYENGINE Launcher/Crytek/CRYENGINE_5.6/bin/win_x64)
Install the renderer sub process
- 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
Add CRYMIUM to a CRYENGINE project
Create a CRYENGINE project
- Open the CRYENGINE Launcher and create a new Third Person Shooter C++ project.
- Close the CRYENGINE Editor window that opens.
Generate the CRYENGINE project's CMakeLists.txt file and modify it for CRYMIUM
- In the newly created project's root directory right click
Game.cryprojectand selectGenerate Solution. This will generate aCMakeLists.txtfile in the project'sCodedirectory. - Close the console window that opens.
- Open the newly created
Code/CMakeLists.txtfile 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
Add the CRYMIUM plugin to the project
- Open your project's
Game.cryprojectfile 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" ]
}
]
Build the project
- In the CRYENGINE project directory, open a command prompt and create a build directory:
mkdir build
- Change to the new
builddirectory:
cd build
- Use CMake to create a solution for the project:
cmake -G "Visual Studio 16" -A x64 ../code
- Open
build/Game.slnin Visual Studio. - In the main menu select Build > Build Solution.
- Right click
GameLauncherin the Solution Explorer and selectDebug > Start New Instanceto make sure the game works.
CRYMIUM is now installed and ready to use in your project!