build: linux mingw cross-compile fixes (partial, stuck at DIMM.h) #5
Reference in New Issue
Block a user
Delete Branch "claude/linux-mingw-crosscompile-fixes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Kontext
Pokus dotáhnout Linux MinGW cross-compile release cycle pro m2dev-client-src. Po merge PRs #3 (biolog submit helper) a #4 (sash slot) do main se rozbila cross-compile cesta. Tohle jsou mechanické opravy co jsem aplikoval, aby se dostalo dál — build stále FAIL, ale 14 menších issues je vyřešeno. Dál potřebuje tvůj context.
Co v commitu
Viz commit message — 9 změněných souborů, plus 1 nový toolchain file. Konkrétně:
toolchains/linux-mingw64.cmake— cross-compile toolchain (MinGW x86_64, lld)CMakeLists.txt— MSVC-only flagy gated, UNICODE global,__int64=long longpro non-MSVC,-mssse3pro non-MSVC#include <cstdint>/<cmath>additions,<SSTREAM>→<sstream>,typenamepro std::vector template, backslash v include path fixCo NENÍ v commitu
Untracked artefakty co jsem lokálně vytvořil na VPS v
/home/mt2.jakubkadlec.dev/metin/repos/m2dev-client-src:src/*/složce)src/Eterlib,src/eterLib,src/eterlib,src/Eterbase,src/eterBase,src/eterbase,src/Gamelib,src/gamelibPokud chceš buildnout z clean checkoutu, tyhle potřebuješ buď dotáhnout do gitu, nebo napsat skript co je po checkout dogeneruje. Moje doporučení: lepší fix = rename skutečné soubory na lowercase (konsistentní s #include spellings) a přepsat includes. Ale to je refactor, ne quick fix.
Kde to selhává
src/EterLib/IME.h:7:DIMM.hje Microsoft DirectX IME header, není vextern/include/, není v mingw-w64 SDK. Potřebuje buď:#ifdef _MSC_VERguard kolem#include "DIMM.h"+ wrapper vIME.hMotivace
Jan chtěl release cycle (v9) aby se do live client dostaly biolog HUD + sashes + talismany co jsem včera merged přes 12 PRs. Release cycle vyžaduje:
Metin2.exe— tohle je v hájim2dev-client/assets/root/+uiscript/— zvládnu sámTakže pokud dostaneš
Metin2_Release.exebuildnutý, Claude dokončí zbytek release cyklu za 15 min.Branch
claude/linux-mingw-crosscompile-fixes, commit2fe362e. Merge / cherry-pick / ignore dle tvého uvážení.Co-Authored-By: Claude
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>View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.