-
Notifications
You must be signed in to change notification settings - Fork 179
Compile (Windows)
Download and install all required software first:
- Visual Studio 2022 Community (In the "Workloads" tab enable Desktop development with C++)
- Git
- CMake
- Conan
- Latest RoR sources: Clone them with git:
git clone --recursive https://github.com/RigsOfRods/rigs-of-rods.git C:\dev\rigsofrods-source
(Replace C:\dev\rigsofrods-source
with where you want the source to be located)
Notes:
Make sure that you installed cmake with the "add to path" option enabled, otherwise you will get errors when building RoR
After installing Conan, open a Command Prompt/PowerShell window and run the following command to add our conan remote:
conan remote add ror-conan https://git.anotherfoxguy.com/api/packages/rorbot/conan
(Restart your computer after installing all the above tools)
-
Start cmake from the Windows start menu: START-->Programs-->CMake-->cmake-gui
-
Where is the source code:
C:\dev\rigsofrods-source\
-
Where to build the binaries:
C:\dev\rigsofrods-source\build
-
Click the Add Entry button and add the following values:
- Name:
CMAKE_PROJECT_TOP_LEVEL_INCLUDES
- Type:
filepath
- Value:
cmake/conan_provider.cmake
- Name:
-
Click the
Configure
button.- Generator:
Visual Studio 17 2022
- Platform:
x64
- Select
Use default native compilers
.
- Generator:
-
Say
yes
if it asked if the directory should be created. -
Click
Configure
twice until all entries are white -
Click
Generate
and close CMake
-
Navigate in Windows Explorer to the folder
C:\dev\rigsofrods-source\build
and open the file RoR.sln. Visual Studio should open. (if you are asked, open with Visual Studio for C++ or Visual Studio 2022) -
In Visual Studio, do the following: Set build-type to Release and then from the menu: Build -> build Solution.
-
The compilation is done when you can read something like the following in the bottom text output window:
========== Build: succeeded ==========
Done! After building you will find RoR ready to use in the bin directory. You can navigate with the Windows Explorer to C:\dev\rigsofrods-source\bin\
and use it the same way as game directory if it was installed there.
Note: the only difference is that the resources will reside one directory higher, but RoR should figure that out itself.
- If the compile step is ok but you don't see any executable or the log writes some missing libs, it may be something wrong with the linking step.
- It may happen that RoR won't start in the bin directory. Simply put the new executable into main release folder and try launch from there. If it doesn't, you simply missed something.
- These compile steps and hints are valid only with Visual Studio and Windows, although they may be similar for other configurations.
- If you need any help compiling or have any other questions, join our discord(https://discord.gg/rigsofrods) and ask your question in the #development channel