Skip to content

xmake lua helper scripts#2

Open
bitonality wants to merge 12 commits intoUE4SS-RE:devfrom
bitonality:main
Open

xmake lua helper scripts#2
bitonality wants to merge 12 commits intoUE4SS-RE:devfrom
bitonality:main

Conversation

@bitonality
Copy link

Added a couple xmake tasks to streamline the mod authoring process. See the readme for usage.

Differences from the old bat scripts are

  • Semantic version checking instead of sorting the git tags alphabetically
  • Idempotent behavior when running the newmod command with the same parameters
  • Added a /Mods/ directory to remove the need to append includes("NewMod") whenever someone makes a new mod. This makes the gitignore situation simpler and allows for mod removal to just require deleting the /Mods/NewMod/ dir instead of having to manually remove includes("NewMod") from xmake.lua
  • New ue4ss management command to allow modders to more easily swap between release tags/branches
  • Cross platform compatibility

```bash
.\build_and_install_mod.bat YourModName "Path\To\Your\Game\UE4SS\Install\Directory" Build__Configuration
```
Running `xmake newmod CoolMod` will generate `/Mods/CoolMod/...` in your repository and automatically link it with the xmake system. If you have VS2022 installed then the `newmod` command will also automatically generate a VS project which can be located at `/vsxmake2022/UE4SSCppTemplate.sln`.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The .sln inside vsxmake2022 is called UE4SS-<my mod name>.sln

@Buckminsterfullerene02
Copy link
Member

Need to delete the existing bats

@Buckminsterfullerene02
Copy link
Member

Buckminsterfullerene02 commented Apr 13, 2024

Need to edit this docs page https://docs.ue4ss.com/dev/guides/installing-a-c++-mod.html#automation as it mentions the bat

import("core.base.task")

function main()
task.run("build", option.get("name"), "-y")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't seem like the -y option is actually passed in because it still prompts me.

@Yangff
Copy link

Yangff commented May 30, 2024

two suggestions:

  1. Have a out of tree mode for the source code, just create an includes("/home/yangff/Project/RE-UE4SS") file in the RE-UE4SS folder.
  2. Getting exec dir of the mod (or install dir) using a config file so that you don't need to specify that everytime. The config file should be gitignored so it will be get into the repo.

@Yangff
Copy link

Yangff commented May 30, 2024

set_toolchains only really works at the top level xmake.lua. In the case of a mod, the package doesn't use the compiler configured by set_toolchains.
Not sure if any other configurations are affected by it.

inkydragon added a commit to game-a11y/BlackMyth-A11y that referenced this pull request Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants