Environment Configuration
This section introduces the environment configuration for two development scenarios: integrating LOICollectionA as a dependency library into your own mod project (dependency integration), and developing and debugging for this repository itself (repository development).
Dependency Integration: Using LOICollectionA in Your Own mod
Before you begin, please make sure you have installed xmake and the C++ compilation environment.
TIP
The following assumes that you have already installed xmake and the C++ compilation environment and created an empty mod project
Open the
xmake.luafile in the project root directory and add the following content:luapackage("LOICollectionA") add_urls("https://github.com/loitietu/LOICollectionA.git") add_versions("1.15.0", "91d4330e6dcec905e0df491b9d32f96f5bb3ccc6") on_install(function (package) import("package.tools.xmake").install(package) end) package_end()WARNING
The commit hash in
add_versionsmust match the actual commit in theadd_urlsrepository. Please use the commit hash corresponding to the tag (such asv1.15.0) of the GitHub repository as the reference; the hash in the example comes from the v1.15.0 tag.Save and close the
xmake.luafile.
- At this point, the project is fully configured. You can use
add_requiresandadd_packagesto install the dependency library.
TIP
The above content is only an example; some parts may differ, so please modify it according to your actual situation.
Repository Development
If you want to develop modules or extend the API for LOICollectionA itself, please refer to Build and Test to set up the environment and build, and read the following documents:
- Architecture Overview — module framework, service container, and plugin lifecycle
- Module Development Guide — how to write a new module
- LOICollectionAPI Extension Guide — how to register script variables, functions, and native classes