Skip to content
300 words 1.5 min read

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

  1. Open the xmake.lua file in the project root directory and add the following content:

    lua
    package("LOICollectionA")
        add_urls("https://github.com/Unknown-Bloom/LOICollectionA.git")
        add_versions("1.17.3", "5ef98c43b24624f376f28a1b8495732df4afa724")
    
        on_install(function (package)
            import("package.tools.xmake").install(package)
        end)
    package_end()

    WARNING

    The commit hash in add_versions must match the actual commit in the add_urls repository. Please use the commit hash corresponding to the tag (such as v1.17.3) of the GitHub repository as the reference; the hash in the example comes from the v1.17.3 tag.

  2. Save and close the xmake.lua file.

  • At this point, the project is fully configured. You can use add_requires and add_packages to 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:

LOICollectionA · A ready-to-use multifunctional plugin set for LeviLamina