bibendovsky / rtcw

Return to Castle Wolfenstein (SP/MP/ET)
31 stars 0 forks source link

Compiling #9

Open Anders1980 opened 8 months ago

Anders1980 commented 8 months ago

In which program should I collect your sources?

bibendovsky commented 8 months ago

You need CMake to build the port.

Dependencies:

Anders1980 commented 8 months ago

Tell me, where are the project files for building in Visual Studio? Unfortunately, I couldn't see them

bibendovsky commented 8 months ago

Tell me, where are the project files for building in Visual Studio? Unfortunately, I couldn't see them

There are no any project file in the port. You have to use CMake to generate the project file for appropriate environment (Visual Studio, MSYS2, .etc).

I will try to describe the steps brifely on how to compile 32-bit port with Visual Studio 2022.

Download the dependencies:

Create a base directory, for example C:/rtcw_port. In the base directory create another two subdirectories - _build and _install. Now extract all dependencies and port's source code into the base directory.

Here is a list of subdirectories in the base one after the extraction:

Run c:\rtcw_port\cmake-3.28.1-windows-i386\bin\cmake-gui.exe.

Set two paths. Click Configure. 001

Select the generator and the platform. Click Finish. 002

You will get an error. Just ignore it. 003

Set path for CMake install prefix and path to SDL. Click Configure. 004

You will get the error again. Just ignore it and set path to SDL_net. Click Configure. 005

You will get the error again. Just ignore it. Mark checkbox Advanced. Set paths to cURL components. Click Configure. 006

Now you should get only a deprecation warning in the log ("Compatibility with CMake < 3.5"). Click Generate, and then Open Project. Visual Studio should open. In the solution explorer open context menu on project INSTALL and click Rebuild. On successfull build you will get executables and DLLs in directory c:\rtcw_port_install. 007

The last step is to place essential dependencies along with the executables.

Dependencies: 1) c:\rtcw_port\curl-8.5.0_4-win32-mingw\bin\libcurl.dll 2) c:\rtcw_port\SDL2-2.28.5\lib\x86\SDL2.dll 3) c:\rtcw_port\SDL2_net-2.2.0\lib\x86\SDL2_net.dll

Copy 1 into c:\rtcw_port_install\et. Copy 2 and 3 into c:\rtcw_port_install\et and c:\rtcw_port_install\sp-mp respectively.