Skip to content

Commit

Permalink
Merge pull request #277 from BUTR/dev
Browse files Browse the repository at this point in the history
v2.8.1
  • Loading branch information
Aragas authored Dec 28, 2023
2 parents ccac153 + 9a9b2d1 commit d95dd9d
Show file tree
Hide file tree
Showing 22 changed files with 154 additions and 141 deletions.
21 changes: 8 additions & 13 deletions .github/workflows/docfx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,34 +23,29 @@ env:

jobs:
docfx:
name: DocFX documentation
name: DocFX Documentation
runs-on: ubuntu-latest
steps:
- name: DocFX Setup
uses: butr/actions-docfx-setup@v3.0
uses: butr/actions-docfx-setup@v3
with:
github-token: ${{secrets.GITHUB_TOKEN}}

- name: Build Bannerlord.UIExtenderEx
run: >-
dotnet build src/Bannerlord.UIExtenderEx/Bannerlord.UIExtenderEx.csproj;
run: dotnet build src/Bannerlord.UIExtenderEx/Bannerlord.UIExtenderEx.csproj;
shell: pwsh

- name: Run DocFX
run: >-
Copy-Item "README.md" -Destination "docs/index.md";
if ($${{runner.os == 'Windows'}}) {
docfx.console/tools/docfx.exe metadata docs/docfx.json;
docfx.console/tools/docfx.exe build docs/docfx.json;
}
else {
mono docfx.console/tools/docfx.exe metadata docs/docfx.json;
mono docfx.console/tools/docfx.exe build docs/docfx.json;
}
New-Item -Type dir "docs/images";
Copy-Item "resources/BUTR48.svg" -Destination "docs/images/BUTR48.svg";
docfx metadata docs/docfx.json;
docfx build docs/docfx.json;
shell: pwsh

- name: Deploy DocFX
uses: crazy-max/ghaction-github-pages@v3
uses: crazy-max/ghaction-github-pages@v4
with:
target_branch: gh-pages
build_dir: docs/_site
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dotnet-format-daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Code Formatting
uses: butr/actions-code-format-setup@v1.5
uses: butr/actions-code-format-setup@v1
with:
workspace: "src/Bannerlord.UIExtenderEx.sln"
github-token: ${{ secrets.GITHUB_TOKEN }}
8 changes: 4 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
mod_description: ${{ steps.changelog.outputs.mod_description }}
steps:
- name: Setup
uses: butr/actions-common-setup@v2.1
uses: butr/actions-common-setup@v2
with:
github-token: ${{secrets.GITHUB_TOKEN}}

Expand All @@ -45,7 +45,7 @@ jobs:
echo "::set-output name=mod_description::$desc"
- name: Upload Bannerlord folder
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: bannerlord
path: ./bannerlord/
Expand Down Expand Up @@ -75,8 +75,8 @@ jobs:
mod_description: ${{ needs.build-module.outputs.mod_description }}
artifact_name: bannerlord
secrets:
NEXUSMODS_APIKEY: ${{ secrets.NEXUSMODS_APIKEY }}
NEXUSMODS_COOKIES: ${{ secrets.NEXUSMODS_COOKIES }}
NEXUSMODS_APIKEY: ${{ secrets.ARAGAS_NEXUSMODS_API_KEY }}
NEXUSMODS_COOKIES: ${{ secrets.ARAGAS_NEXUSMODS_COOKIE_SID_DEVELOP }}

###########################
# STEAM #
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
runs-on: windows-latest
steps:
- name: Tests Setup
uses: butr/actions-tests-setup@v1.5.6
uses: butr/actions-tests-setup@v1
with:
github-token: ${{secrets.GITHUB_TOKEN}}
steam-login: ${{secrets.STEAM_LOGIN}}
Expand All @@ -61,7 +61,7 @@ jobs:
shell: pwsh

- name: ReportGenerator
uses: danielpalme/ReportGenerator-GitHub-Action@5.1.19
uses: danielpalme/ReportGenerator-GitHub-Action@5.2.0
with:
reports: 'coverage_uiextenderex_debug.xml;coverage_uiextenderex_release.xml'
targetdir: 'coveragereport'
Expand All @@ -70,13 +70,13 @@ jobs:
tag: '${{ github.run_number }}_${{ github.run_id }}' # Optional tag or build version.

- name: Upload ReportGenerator to GitHub
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coveragereport

- name: Upload ReportGenerator to CodeCov
uses: codecov/codecov-action@v3.1.1
uses: codecov/codecov-action@v3.1.4
with:
token: ${{secrets.CODECOV_TOKEN}}
file: coveragereport/Cobertura.xml
Expand Down
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,22 @@
<img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fnexusmods-downloads-ayuqql60xfxb.runkit.sh%2F%3Ftype%3Dviews%26gameId%3D3174%26modId%3D2102" />
</a>
</br>
<a href="https://steamcommunity.com/sharedfiles/filedetails/?id=2859222409">
<img alt="Steam Mod Configuration Menu" src="https://img.shields.io/badge/Steam-UIExtenderEx-blue.svg" />
</a>
<a href="https://steamcommunity.com/sharedfiles/filedetails/?id=2859222409">
<img alt="Steam Downloads" src="https://img.shields.io/steam/downloads/2859222409?label=Downloads&color=blue">
</a>
<a href="https://steamcommunity.com/sharedfiles/filedetails/?id=2859222409">
<img alt="Steam Views" src="https://img.shields.io/steam/views/2859222409?label=Views&color=blue">
</a>
<a href="https://steamcommunity.com/sharedfiles/filedetails/?id=2859222409">
<img alt="Steam Subscriptions" src="https://img.shields.io/steam/subscriptions/2859222409?label=Subscriptions&color=blue">
</a>
<a href="https://steamcommunity.com/sharedfiles/filedetails/?id=2859222409">
<img alt="Steam Favorites" src="https://img.shields.io/steam/favorites/2859222409?label=Favorites&color=blue">
</a>
</br>
</p>

A library that enables multiple mods to alter standard game interface.
Expand All @@ -60,3 +76,20 @@ This mod is a dependency mod that does not provide anything by itself. You need

## Usage
Check the [``Articles``](https://butr.github.io/Bannerlord.UIExtenderEx/articles/v2/Overview.html) section of our documentation!

## Current State of AutoGens
The game uses two Prefab systems - static (pre-compiled XML) C# prefabs and dynamically serialized XML prefabs.
The XML prefabs were introduced with the Early Access.
The C# prefabs were introduced in the middle of Early Access. Most likely for Console releases, since they use the `Mono` runtime.

We call AutoGens the XML prefabs that are pre-compiled into C# prefabs. The pre-compilation is achieved by using `TaleWorlds.MountAndBlade.GauntletUI.CodeGenerator.exe`.
It generates C# code based on the XML file. The C# code can then be compiled into an assembly (`.dll` file) that can be loaded by the game.
This has the following benefits:
* We have ready-to-use prefabs at the very start of the game, removing the serialization step of the XML prefabs, which reduces the load time.
* We have static (typed) access to anything within the prefab. We do not need to use reflection to get/set data, which, again, speeds up the game. This is particularly noticeable on the `Mono` runtime.

In summary, AutoGens are faster than the raw XML prefabs. The most performance is gained on the `Mono` runtime. On .NET (Core) the difference is more or less neglectable.

UIExtenderEx modifies the raw XML prefabs. Since the game does not use XML prefabs and instead relies on the AutoGens, our modifications will not affect the game.
Currently, we just disable AutoGens globally. We are not able to do the pre-compilation at runtime. The issues are mostly not at our side - the `CodeGenerator` that the game provides doesn't support
such scenarios.
13 changes: 7 additions & 6 deletions build/common.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@
<!--Development Variables-->
<PropertyGroup>
<!--Module Version-->
<Version>2.8.0</Version>
<Version>2.8.1</Version>
<!--Harmony Version-->
<HarmonyVersion>2.2.2</HarmonyVersion>
<HarmonyExtensionsVersion>3.2.0.77</HarmonyExtensionsVersion>
<HarmonyAnalyzerVersion>1.0.1.44</HarmonyAnalyzerVersion>
<BuildResourcesVersion>1.0.1.92</BuildResourcesVersion>
<BUTRSharedVersion>3.0.0.135</BUTRSharedVersion>
<BUTRModuleManagerVersion>5.0.198</BUTRModuleManagerVersion>
<HarmonyAnalyzerVersion>1.0.1.50</HarmonyAnalyzerVersion>
<BuildResourcesVersion>1.1.0.104</BuildResourcesVersion>
<BUTRSharedVersion>3.0.0.138</BUTRSharedVersion>
<BUTRModuleManagerVersion>5.0.221</BUTRModuleManagerVersion>
<MCMVersion>5.5.3</MCMVersion>
<!--Current Bannerlord Version-->
<GameVersion>1.0.0</GameVersion>
<GameVersionWithPrefix>v$(GameVersion)</GameVersionWithPrefix>
<!--Bannerlord's Root Folder. Leave empty if you want it to be tried to be autoresolved.-->
<GameFolder Condition="$(Configuration) == 'Stable_Debug' OR $(Configuration) == 'Stable_Release'">$(BANNERLORD_STABLE_DIR)</GameFolder>
<GameFolder Condition="$(Configuration) == 'Beta_Debug' OR $(Configuration) == 'Beta_Release'">$(BANNERLORD_BETA_DIR)</GameFolder>
Expand Down Expand Up @@ -52,7 +53,7 @@
</PropertyGroup>
<!--SorceLink-->
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All"/>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All"/>
</ItemGroup>
<!--CI Builds-->
<ItemGroup Condition="$(TargetFramework) == 'net472' AND $(OS) != 'Windows_NT'">
Expand Down
5 changes: 5 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
---------------------------------------------------------------------------------------------------
Version: 2.8.1
Game Versions: v1.0.0,v1.0.1,v1.0.2,v1.0.3,v1.1.0,v1.1.1,v1.1.2,v1.1.3,v1.1.4,v1.1.5,v1.1.6,v1.2.8
* Added UpdateInfo
* Added Japanese translation
---------------------------------------------------------------------------------------------------
Version: 2.8.0
Game Versions: v1.0.0,v1.0.1,v1.0.2,v1.0.3,v1.1.0,v1.1.1,v1.1.2
* Switched back to Lib.Harmony
Expand Down
1 change: 1 addition & 0 deletions docs/CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uiextenderex.butr.link
1 change: 1 addition & 0 deletions docs/articles/toc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
items:
- name: APIv2
href: v2/toc.yml
homepage: v2/Overview.md
Expand Down
41 changes: 14 additions & 27 deletions docs/docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,46 +21,33 @@
],
"content": [
{
"files": [
"api/**.yml",
"api/index.md"
]
},
{
"files": [
"articles/**.md",
"articles/**/toc.yml",
"toc.yml",
"*.md"
]
"files": [ "**/**.{md,yml}" ],
"exclude": [ "_site/**", "obj/**" ]
}
],
"resource": [
{
"files": [
"langwordMapping.yml",
"images/**"
]
},
{
"src": "../",
"files": [ "resources/**" ]
"files": [ "**/images/**", "codesnippet/**", "CNAME" ],
"exclude": [ "_site/**", "obj/**" ]
}
],
"overwrite": [ ],
"dest": "_site",
"globalMetadata": {
"_enableSearch": "true",
"_appTitle": "UIExtenderEx Documentation",
"_appFooter": "© 2020 BUTR",
"_appName": "UIExtenderEx",
"_appLogoPath": "images/BUTR48.svg",
"_appFooter": "© 2020-2023 Bannerlord's Unofficial Tools & Resources",
},
"globalMetadataFiles": [],
"fileMetadataFiles": [],
"template": [
"default",
"_template/dark-theme"
"modern",
// https://github.com/dotnet/docfx/issues/8578
// "_template/last-modified"
],
"postProcessors": ["ExtractSearchIndex"],
"markdownEngineName": "markdig"
"postProcessors": [
"ExtractSearchIndex",
// "LastModifiedPostProcessor"
]
}
}
1 change: 1 addition & 0 deletions docs/filterConfig.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
### YamlMime:ManagedReference
apiRules:
- exclude:
uidRegex: ^HarmonyLib\.BUTR\.Extensions$
Expand Down
61 changes: 0 additions & 61 deletions docs/langwordMapping.yml

This file was deleted.

8 changes: 2 additions & 6 deletions docs/toc.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
- name: UIExtenderEx
href: index.md

- name: Articles
href: articles/
homepage: articles/index.md

- name: API Documentation
href: api/
Expand All @@ -12,6 +8,6 @@
dropdown: true
items:
- name: Official Documentation
href: http://docs.modding.bannerlord.com/
href: https://docs.modding.bannerlord.com/
- name: Community Documentation
href: https://docs.bannerlordmodding.com
href: https://docs.bannerlordmodding.com/
Loading

0 comments on commit d95dd9d

Please sign in to comment.