UE4SS-RE / RE-UE4SS

Injectable LUA scripting system, SDK generator, live property editor and other dumping utilities for UE4/5 games
http://docs.ue4ss.com/
MIT License
1.39k stars 187 forks source link

[Improvement] Increase flexibility of xmake target settings for mod authors. #525

Open bitonality opened 6 months ago

bitonality commented 6 months ago

Streamline and document the process of when mod authors want to deviate from the default ue4ss.mod options.

Current def:


-- This rule is meant to be used by mod targets.
-- Logic that should ONLY apply to mods should be defined in this rule.
-- All other common logic is inherited from the ue4ss.base rule.
-- Example:
-- target("ExampleMod")
--   add_rules("ue4ss.mod")
--   add_includeirs(".")
--   add_files("dllmain.cpp")
rule("ue4ss.mod")
    add_deps("ue4ss.base", {order = true})
    after_load(function(target)
        target:set("kind", "shared")
        target:set("languages", "cxx20")
        target:set("exceptions", "cxx")
        target:add("deps", "UE4SS")
        target:set("group", "mods")
    end)

    on_install(function(target)
        import("mods.install").install(target)
    end)

I need to document how mod authors can alter these settings and save their own custom rules if they want. I'm envisioning allowing users to create an extension of ue4ss.mod like ue4ss.mod.cxx_latest or ue4ss.mod.custom_runtime etc. They'll then be able to use their custom rules in any mods in their UE4SS mono-repo.