Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling #9

Open
Anders1980 opened this issue Jan 6, 2024 · 3 comments
Open

Compiling #9

Anders1980 opened this issue Jan 6, 2024 · 3 comments
Labels

Comments

@Anders1980
Copy link

In which program should I collect your sources?

@bibendovsky
Copy link
Owner

You need CMake to build the port.

Dependencies:

  • C++17 compatible compiler (Visual C++ 16 (Visual Studio 2019) or higher, GCC 9.1 or higher)
  • SDL v2.0.4 or higher but less than v3
  • SDL_net v2.0.1 or higher but less than v3
  • cURL v7 or higher

@Anders1980
Copy link
Author

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

@bibendovsky
Copy link
Owner

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:

  • cmake-3.28.1-windows-i386
  • curl-8.5.0_4-win32-mingw
  • rtcw
  • SDL2-2.28.5
  • SDL2_net-2.2.0
  • _build
  • _install

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants