Claude 2fe362e0a9 build: linux mingw cross-compile fixes (partial)
Enables the Linux -> win-x64 MinGW cross-compile path that got broken
after recent merges. Still INCOMPLETE — build fails later at missing
DirectX IME headers (DIMM.h) and likely more vendor SDK compat issues.
Commit captures the mechanical fixes so Jakub can adopt/iterate.

Changes:

1. toolchains/linux-mingw64.cmake — MinGW cross-compile toolchain
   (Windows x86_64 target, mingw-w64 gcc/g++/windres, lld linker).

2. CMakeLists.txt:
   - MSVC-only flags (/MP, /Zi, /DEBUG linker flag) gated behind
     if(MSVC) — they break MinGW gcc which treats /MP as filename.
   - UNICODE / _UNICODE defined globally (was inside if(MSVC), but
     WIN32_FIND_DATA etc. need it everywhere).
   - __int64 -> long long compile definition for non-MSVC compilers
     so the Granny SDK header parses.
   - -mssse3 compile option for non-MSVC so _mm_shuffle_epi8 in
     EterLib/GrpImageTexture.cpp inlines correctly.

3. Include fixes for Linux case-sensitive filesystem and stricter
   GCC standard library:
   - Poly/StdAfx.h: backslash in include path -> forward slash.
   - EterBase/Stl.h: <SSTREAM> -> <sstream>.
   - EterBase/Utils.h: add <cmath> so cos() in templates resolves.
   - AudioLib/MaSoundInstance.h: add <cstdint> so uint8_t vector
     template argument is valid.
   - AudioLib/Type.h: add <cstdint> for uint32_t.
   - extern/include/utf8.h: add <cstdint> for uint8_t/uint16_t.
   - EffectLib/Type.h: typedef typename std::vector<...>::iterator
     (dependent-name C++11+ compliance).

Not committed (needs manual recreation per checkout, or git-tracking
them needs buy-in):
   - 60+ stdafx case-variant symlinks (stdafx.h, StdAfx.h, Stdafx.h)
   - 7 directory case symlinks (Eterlib, eterLib, eterBase, Gamelib,
     gamelib, Eterbase, eterbase)
   - header case-variant symlinks in individual dirs

Still failing at:
   - src/EterLib/IME.h:7 wanting DIMM.h (DirectX IME, not in extern/
     and not shipped with mingw-w64). Needs either a shim header, a
     #ifdef _MSC_VER guard, or vendoring the Microsoft DirectX IME SDK.

Work done over ~2h trying to get a fresh release cycle through from
Linux. Stopping here because each fix exposes another vendor/compat
issue that benefits from Jakub's context of the build history.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 23:54:55 +02:00
2025-08-18 19:46:48 +02:00
2026-02-08 22:40:02 +01:00
2025-12-14 05:12:39 +02:00
2026-04-14 09:08:35 +02:00
2026-04-14 09:08:35 +02:00

M2Dev Client Source

build

This repository contains the source code necessary to compile the game client executable.

How to build (short version)

cmake -S . -B build

cmake --build build

For more installation/configuration, check out the instructions below.


📋 Changelog

🐛 Bug fixes

  • Affect tooltips: ALL affects now display realtime countdowns, titles and are wrapped in tooltips! Realtime countdowns does not apply to infinite affects such as the Exorcism Scroll, the Concentrated Reading and the Medal of the Dragon (Death penalty prevention)
  • AFFECT_FIRE: The Continuous Fire debuff has been added to the affects dictionary by name.





Installation/Configuration

This is the third part of the entire project and it's about the client binary, the executable of the game.

Below you will find a comprehensive guide on how to configure all the necessary components from scratch.

This guide is made using a Windows environment as the main environment and cannot work in non-Windows operating systems!

This guide also uses the latest versions for all software demonstrated as of its creation date at February 4, 2026.

© All copyrights reserved to the owners/developers of any third party software demonstrated in this guide other than this project/group of projects.


📋 Order of projects configuration

If one or more of the previous items is not yet configured please come back to this section after you complete their configuration steps.


🧱 Software Prerequisites

Please make sure that you have installed the following software in your machine before continuing:

  • Visual Studio  Visual Studio:  The software used to edit and compile the source code. Download

  • Visual Studio Code  Visual Studio Code (VS Code):  A lighter alternative to Visual Studio, harder to build the project in this software but it is recommended for code editing. Download

  • Git  Git:  Used to clone the repositories in your Windows machine. Download

  • CMake  CMake:  Required for setting up and configuring the build of the source code. Download

  • Notepad++  Notepad++ (optional but recommended):  Helps with quick, last minute edits. Download



👁️ Required Visual Studio packages

Make sure you have installed these packages with Visual Studio Installer in order to compile C++ codebases:

Packages

Note: Windows 11 SDK's can be replaced by Windows 10 SDK's, but it is recommended to install one of them.



⬇️ Obtaining the Client Source

To build the source for the first time, you first need to clone it. In your command prompt, cd into your desired location or create a new folder wherever you want and download the project using Git.

Here's how

Open up your terminal inside or cd into your desired folder and type this command:

git clone https://github.com/d1str4ught/m2dev-client-src.git

You have successfully obtained the Client Source project!



🛠️ Building the Source Code

Building the project is extremely simple, if all Visual Studio components are being installed correctly.

Instructions

Open up your terminal inside, or cd in your project's root working directory and initialize the build with this command:

cmake -S . -B build

A new build folder has been created in your project's root directory. This folder contains all the build files and configurations, along with the sln file to open the project in Visual Studio.

Double click on that file to launch Visual Studio and load the project.

In the Solution Explorer, select all the projects minus the container folders, right click on one of the selected items, and click Properties

Next, make sure that the following settings are adjusted like this:

  1. Windows SDK Version should be the latest of Windows 10. It is not recommended to select any Windows 11 versions yet if avalable.
  2. Platform Toolset is the most important part for your build to succeed! Select the highest number you see. v145 is for Visual Studio 2026. If you are running Visual Studio 2022 you won't have that, you will have v143, select that one, same goes for older Visual Studio versions.
  3. C++ Language Standard should be C++20 as it is the new standard defined in the CMakeList.txt files as well. Might as well set it like that for all dependencies.
  4. C Language Standard should be C17 as it is the new standard defined in the CMakeList.txt files as well. Might as well set it like that for all dependencies.

Once done, click Apply and then OK to close this dialog.

After that, in the toolbar at the top of the window, select your desired output configuration:

Finally, click on the Build option at the top and select Build Solution, or simply press CTRL+SHIFT+B in your keyboard with all the projects selected.

Note: if this is NOT your first build after executing the cmake -S . -B build command for this workspace, it is recommended to click Clean Solution before Build Solution.


Where to find your compiled binaries:

Inside the build folder in your cloned repository, you should have a bin folder and inside that, you should have a Debug, Release, RelWithDebInfo or MinSizeRel folder, depending on your build configuration selection.

In that folder you should be seeing all your binaries:

If you did NOT install the Client project yet, you are done here.

If you HAVE the Client project installed, paste these 2 .exe files in these locations inside the Server project:

  • Metin2_<Debug|Release|RelWithDebInfo|MinSizeRel>.exe: inside root folder of the Client project
  • PackMaker.exe: inside assets\PackMaker.exe

You have successfully built the Client Source!







🔥 The Client Source part of the guide is complete!



Next steps

You should now be finally ready to proceed to Client project packing and entering the game for the first time!

NEW: We are now on Discord, feel free to check us out!

Description
No description provided
Readme 110 MiB
Languages
C 87.7%
C++ 12.3%