Build against sibling ../sdk by default
Point the sdk submodule at https://git.slcydia.fun/4v5u09Z5a4Yuc/metin2-SDK.git and default AVA2_SDK_ROOT to an SDK checkout beside the repository (../sdk), falling back to the pinned submodule when it is absent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
7236edf747
commit
efb7c120c0
+1
-1
@@ -1,3 +1,3 @@
|
|||||||
[submodule "sdk"]
|
[submodule "sdk"]
|
||||||
path = sdk
|
path = sdk
|
||||||
url = http://192.168.21.200:8418/4v5u09Z5a4Yuc/metin2-SDK.git
|
url = https://git.slcydia.fun/4v5u09Z5a4Yuc/metin2-SDK.git
|
||||||
|
|||||||
+10
-2
@@ -4,11 +4,19 @@ set(CMAKE_CXX_STANDARD 20)
|
|||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||||
include(CTest)
|
include(CTest)
|
||||||
set(AVA2_SDK_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/sdk" CACHE PATH "Metin2 SDK source directory")
|
# Default: the SDK checkout beside this repository (../sdk); fall back to the pinned submodule.
|
||||||
|
get_filename_component(_ava2_sibling_sdk "${CMAKE_CURRENT_SOURCE_DIR}/../sdk" ABSOLUTE)
|
||||||
|
if(EXISTS "${_ava2_sibling_sdk}/gr2/CMakeLists.txt" AND EXISTS "${_ava2_sibling_sdk}/speedtree/CMakeLists.txt")
|
||||||
|
set(_ava2_default_sdk "${_ava2_sibling_sdk}")
|
||||||
|
else()
|
||||||
|
set(_ava2_default_sdk "${CMAKE_CURRENT_SOURCE_DIR}/sdk")
|
||||||
|
endif()
|
||||||
|
set(AVA2_SDK_ROOT "${_ava2_default_sdk}" CACHE PATH "Metin2 SDK source directory")
|
||||||
if(NOT EXISTS "${AVA2_SDK_ROOT}/gr2/CMakeLists.txt" OR
|
if(NOT EXISTS "${AVA2_SDK_ROOT}/gr2/CMakeLists.txt" OR
|
||||||
NOT EXISTS "${AVA2_SDK_ROOT}/speedtree/CMakeLists.txt")
|
NOT EXISTS "${AVA2_SDK_ROOT}/speedtree/CMakeLists.txt")
|
||||||
message(FATAL_ERROR "SDK missing. Run git submodule update --init --recursive or set AVA2_SDK_ROOT.")
|
message(FATAL_ERROR "SDK missing. Clone it beside this repository as ../sdk, run git submodule update --init --recursive, or set AVA2_SDK_ROOT.")
|
||||||
endif()
|
endif()
|
||||||
|
message(STATUS "AVA2 SDK: ${AVA2_SDK_ROOT}")
|
||||||
add_subdirectory("${AVA2_SDK_ROOT}/speedtree" ${CMAKE_CURRENT_BINARY_DIR}/sdk_speedtree)
|
add_subdirectory("${AVA2_SDK_ROOT}/speedtree" ${CMAKE_CURRENT_BINARY_DIR}/sdk_speedtree)
|
||||||
add_subdirectory("${AVA2_SDK_ROOT}/gr2" ${CMAKE_CURRENT_BINARY_DIR}/sdk_gr2)
|
add_subdirectory("${AVA2_SDK_ROOT}/gr2" ${CMAKE_CURRENT_BINARY_DIR}/sdk_gr2)
|
||||||
add_subdirectory(shared/codepage)
|
add_subdirectory(shared/codepage)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
Independent AVA2 port, Android arm64 first with macOS arm64 for development. The host, login/selection transport, supported loading/game socket bridge and Python 2 bootstrap are implemented. It is not yet a playable client.
|
Independent AVA2 port, Android arm64 first with macOS arm64 for development. The host, login/selection transport, supported loading/game socket bridge and Python 2 bootstrap are implemented. It is not yet a playable client.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
git submodule update --init --recursive
|
git submodule update --init --recursive # only when ../sdk is not checked out
|
||||||
cmake -S . -B build/dev -DCMAKE_BUILD_TYPE=Debug
|
cmake -S . -B build/dev -DCMAKE_BUILD_TYPE=Debug
|
||||||
cmake --build build/dev -j 8
|
cmake --build build/dev -j 8
|
||||||
ctest --test-dir build/dev --output-on-failure
|
ctest --test-dir build/dev --output-on-failure
|
||||||
@@ -21,10 +21,12 @@ See [port status](docs/PORT-PLAN.md), [login implementation and verification](do
|
|||||||
|
|
||||||
Windows equivalence is tracked in [the parity audit](docs/WINDOWS-PARITY.md). Preview characters require `--preview-data`; game previews do not prove server gameplay. The static [placeholder inventory](docs/WINDOWS-PARITY-INVENTORY.json) is regenerated with `python3 tools/audit_windows_parity.py`.
|
Windows equivalence is tracked in [the parity audit](docs/WINDOWS-PARITY.md). Preview characters require `--preview-data`; game previews do not prove server gameplay. The static [placeholder inventory](docs/WINDOWS-PARITY-INVENTORY.json) is regenerated with `python3 tools/audit_windows_parity.py`.
|
||||||
|
|
||||||
The SDK is maintained in its own Git repository and pinned by the `sdk` submodule.
|
The SDK is maintained in its own Git repository
|
||||||
Clone with `git clone --recurse-submodules`, or run the initialization command above
|
(https://git.slcydia.fun/4v5u09Z5a4Yuc/metin2-SDK.git). By default CMake uses an SDK
|
||||||
before configuring. To develop against an existing SDK checkout, configure with
|
checkout beside this repository (`../sdk`, i.e. `chakan` and `sdk` in the same parent
|
||||||
`-DAVA2_SDK_ROOT=/absolute/path/to/sdk`; normal builds use the pinned submodule.
|
directory). Without it, the build falls back to the pinned `sdk` submodule: clone with
|
||||||
|
`git clone --recurse-submodules` or run the initialization command above. Any other
|
||||||
|
checkout can be selected with `-DAVA2_SDK_ROOT=/absolute/path/to/sdk`.
|
||||||
|
|
||||||
Keep build outputs in `build/dev`, `build/release`, or another named directory
|
Keep build outputs in `build/dev`, `build/release`, or another named directory
|
||||||
under `build/`, rather than configuring directly into `build/`. Put diagnostic
|
under `build/`, rather than configuring directly into `build/`. Put diagnostic
|
||||||
|
|||||||
Reference in New Issue
Block a user