Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xmake lua helper scripts #2

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from
Open

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

README.md Outdated Show resolved Hide resolved
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.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@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 pushed 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