Rigs-of-rods安装
- 安装git
首先下载git,下载地址:https://git-scm.com/download/win,安装git
- 安装cmake
下载cmake,下载地址:https://cmake.org/download/,安装cmake
- 安装vs2022
- 下载ror的依赖库
git clone https://github.com/RigsOfRods/ror-dependencies,
cmake编译
然后用vs2022打开工程,这个我们就很熟悉了,我是编译的时候用vs2022没有编译过,又下载了vs2017编译过的,,打开ror-dependencies.sln,编译后,openal一直编译不过,直接下载单独下载release版本。
- 下载openal
下载openal的1.23.1版本,下载地址https://openal-soft.org/#download
- 下载conan
conan的下载路径如下:Conan 2.0 - C and C++ Open Source Package Manager
在安装路径下打开conan.conf,修改revisions_enabled = True
- 下载并编译ror
下载和编译的官网如下(windows):Compile (Windows) · RigsOfRods/rigs-of-rods Wiki · GitHub
下载代码:
git clone --recursive https://github.com/RigsOfRods/rigs-of-rods.git C:\dev\rigsofrods-source(下载路径根据自己的路径修改)
打开cmake,选中编译路径和生成路径,然后点击Config,Generate,
在build路径下打开,根据编译情况加入第三方的.h路径和lib路径,最终能够编译通过。
Include路径如下:
全部的lib如下:
Ws2_32.lib
..\..\bin\Debug\version_info_d.lib
E:\download\ror4\ror-dependencies\Dependencies_Windows_Visual-Studio-17-2022\lib\OGRE\Codec_FreeImage_d.lib
E:\download\ror4\ror-dependencies\Dependencies_Windows_Visual-Studio-17-2022\lib\OGRE\Codec_STBI_d.lib
E:\download\ror4\ror-dependencies\Dependencies_Windows_Visual-Studio-17-2022\lib\OGRE\Plugin_CgProgramManager_d.lib
E:\download\ror4\ror-dependencies\Dependencies_Windows_Visual-Studio-17-2022\lib\OGRE\Plugin_OctreeSceneManager_d.lib
E:\download\ror4\ror-dependencies\Dependencies_Windows_Visual-Studio-17-2022\lib\OGRE\Plugin_ParticleFX_d.lib
E:\download\ror4\ror-dependencies\Dependencies_Windows_Visual-Studio-17-2022\lib\OGRE\RenderSystem_Direct3D9_d.lib
E:\download\ror4\ror-dependencies\Dependencies_Windows_Visual-Studio-17-2022\lib\OGRE\RenderSystem_Direct3D11_d.lib
E:\download\ror4\ror-dependencies\Dependencies_Windows_Visual-Studio-17-2022\lib\OGRE\RenderSystem_GL_d.lib
E:\download\ror4\ror-dependencies\Build\fmt\Debug\fmtd.lib
E:/download/ror4/ror-dependencies/Dependencies_Windows_Visual-Studio-17-2022/lib/SocketW.lib
E:\download\ror4\ror-dependencies\Build\angelscript\Debug\angelscriptd.lib
..\..\bin\Debug\angelscript_addons_d.lib
E:\download\ror4\ror-dependencies\Build\mygui\lib\Debug\MyGUIEngine_d.lib
E:\download\ror4\ror-dependencies\Build\mygui\lib\Debug\MyGUI.OgrePlatform_d.lib
kernel32.lib
user32.lib
gdi32.lib
winspool.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
comdlg32.lib
advapi32.lib
E:\download\ror4\ror-dependencies\Dependencies_Windows_Visual-Studio-17-2022\lib\libcurl-d_imp.lib
E:\download\rorThirdLib\openal-soft-1.23.1-bin\openal-soft-1.23.1-bin\libs\Win64\OpenAL32.lib
E:\download\ror4\ror-dependencies\Dependencies_Windows_Visual-Studio-17-2022\lib\OgreBites_d.lib
E:\download\ror4\ror-dependencies\Dependencies_Windows_Visual-Studio-17-2022\lib\OgreGLSupport_d.lib
E:\download\ror4\ror-dependencies\Dependencies_Windows_Visual-Studio-17-2022\lib\OgreHLMS_d.lib
E:\download\ror4\ror-dependencies\Dependencies_Windows_Visual-Studio-17-2022\lib\OgreMain_d.lib
E:\download\ror4\ror-dependencies\Dependencies_Windows_Visual-Studio-17-2022\lib\OgreMeshLodGenerator_d.lib
E:\download\ror4\ror-dependencies\Dependencies_Windows_Visual-Studio-17-2022\lib\OgreOverlay_d.lib
E:\download\ror4\ror-dependencies\Dependencies_Windows_Visual-Studio-17-2022\lib\OgrePaging_d.lib
E:\download\ror4\ror-dependencies\Dependencies_Windows_Visual-Studio-17-2022\lib\OgreProperty_d.lib
E:\download\ror4\ror-dependencies\Dependencies_Windows_Visual-Studio-17-2022\lib\OgreRTShaderSystem_d.lib
E:\download\ror4\ror-dependencies\Dependencies_Windows_Visual-Studio-17-2022\lib\OgreTerrain_d.lib
E:\download\ror4\ror-dependencies\Dependencies_Windows_Visual-Studio-17-2022\lib\FreeImage.lib
E:\download\ror4\ror-dependencies\Dependencies_Windows_Visual-Studio-17-2022\lib\FreeImage_d.lib
E:\download\ror4\ror-dependencies\Dependencies_Windows_Visual-Studio-17-2022\lib\freetype.lib
E:\download\ror4\ror-dependencies\Dependencies_Windows_Visual-Studio-17-2022\lib\freetype_d.lib
E:\download\ror4\ror-dependencies\Dependencies_Windows_Visual-Studio-17-2022\lib\OIS_d.lib
E:\download\ror4\ror-dependencies\Dependencies_Windows_Visual-Studio-17-2022\lib\zlib.lib
E:\download\ror4\ror-dependencies\Dependencies_Windows_Visual-Studio-17-2022\lib\zlib_d.lib
E:\download\ror4\ror-dependencies\Dependencies_Windows_Visual-Studio-17-2022\lib\zziplib.lib
E:\download\ror4\ror-dependencies\Dependencies_Windows_Visual-Studio-17-2022\lib\zziplib_d.lib
E:\download\ror4\ror-dependencies\Dependencies_Windows_Visual-Studio-17-2022\lib\Debug\cg.lib
8、运行ror
编译好的exe运行后老是提示缺少这个库,那个库,可以安装windows的release版本安装后把整个文件拷贝到编译的路径下。
Windows的release版本下载路径:ror-website
安装后路径(E:\Program Files\Rigs of Rods)如下,把该路径下的所有文件拷贝到编译路径下:E:\download\ror4\rigs-of-rods\build\bin
- 预编译命令
如果编译完成后还是运行不起来,尝试比较下面的预编译值,编译后就可以通过vs2022运行了。
WIN32
_WINDOWS
_CRT_SECURE_NO_WARNINGS
USE_MUMBLE
WIN32_LEAN_AND_MEAN
NOMINMAX
USE_SOCKETW
USE_ANGELSCRIPT
AS_USE_NAMESPACE
CMAKE_INTDIR="Debug"
USE_CURL
USE_OPENAL
_WIN32