Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/butr/bannerlord.moduleloader
Library that provides an universal loader for distributing multiple implementations for different game versions within one module.
https://github.com/butr/bannerlord.moduleloader
bannerlord mount-and-blade-bannerlord roslyn-generator
Last synced: 6 days ago
JSON representation
Library that provides an universal loader for distributing multiple implementations for different game versions within one module.
- Host: GitHub
- URL: https://github.com/butr/bannerlord.moduleloader
- Owner: BUTR
- Created: 2022-01-12T20:15:50.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-09-11T07:25:45.000Z (about 1 year ago)
- Last Synced: 2024-11-06T01:18:40.928Z (7 days ago)
- Topics: bannerlord, mount-and-blade-bannerlord, roslyn-generator
- Language: C#
- Homepage:
- Size: 88.9 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Bannerlord.ModuleLoader
Uses the new C# 9 Source Generator (could have used an MSBuild task) to generate a loader library for the implementation-loader technique.
## Requirements
* Will add a requirement to the `Bannerlord.Harmony` module.
* Requires the `ModuleId` and `ModuleName` MSBuild property widely used in our BUTR stack. Should be the same as the mod's Module Id and Name.
* Requires standard `MSBuildProjectFullPath` and `OutputPath` properties. Tampering with them will break the injector.## Installation
Install the [Bannerlord.ModuleLoader.Injector](https://github.com/BUTR/Bannerlord.ModuleLoader.Injector) package.## Usage
Each build will create `Bannerlord.ModuleLoader.$(ModuleId).dll|.pdb` files.```xml
```> **ℹ️ NOTE**
> The `$moduleid$` and `$modulename$` properties is from BUTR's [Bannerlord.BuildResources](https://github.com/BUTR/Bannerlord.BuildResources), it injects MSBuild's $(ModuleId) and $(ModuleName) properties.
> Just replace it with the actual Module Id if you don't use the package!> **⚠️ ATTENTION**
> If the Module Id contains invalid C# identity symbols (like dot '.'), override the `SubModuleClassType` property manually, replacing each invalid char as underscore `_`.