Skip to content

Commit 4cad5a2

Browse files
committed
Overhaul docs and update readme
1 parent 13a20f1 commit 4cad5a2

File tree

13 files changed

+841
-148
lines changed

13 files changed

+841
-148
lines changed

KSPBuildTools.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222
<IsPackable>true</IsPackable>
2323
<PlatformTarget>x64</PlatformTarget>
2424
<NoWarn>1701;1702;CS0649;CS1591;NU5128</NoWarn>
25-
<AssemblyCopyright>2024 KSPModdingLibs Contributors</AssemblyCopyright>
25+
<AssemblyCopyright>2025 KSPModdingLibs Contributors</AssemblyCopyright>
2626
<AssemblyName>KSPBuildTools</AssemblyName>
27-
<KSPBT_ModRoot>$(ProjectDir)</KSPBT_ModRoot>
2827
<PackageId>KSPBuildTools</PackageId>
2928
<PackageReadmeFile>README.md</PackageReadmeFile>
29+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
3030
<Title>KSP Build Tools</Title>
3131
<Description>Tools for developing mods for Kerbal Space Program</Description>
3232
<Authors>KSPModdingLibs Contributors</Authors>
@@ -38,6 +38,7 @@
3838
<None Include="KSPCommon.props" Pack="True" PackagePath="build/KSPBuildTools.props" />
3939
<None Include="KSPCommon.targets" Pack="True" PackagePath="build/KSPBuildTools.targets" />
4040
<None Include="README.md" Pack="True" PackagePath="/"/>
41+
<None Include="LICENSE.md" Pack="True" PackagePath="/"/>
4142
</ItemGroup>
4243

4344
<ItemGroup>

LICENSE

Lines changed: 0 additions & 21 deletions
This file was deleted.

LICENSE.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
The MIT License (MIT)
2+
=====================
3+
4+
Copyright © 2025 KSPModdingLibs Contributors
5+
6+
Permission is hereby granted, free of charge, to any person
7+
obtaining a copy of this software and associated documentation
8+
files (the “Software”), to deal in the Software without
9+
restriction, including without limitation the rights to use,
10+
copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
copies of the Software, and to permit persons to whom the
12+
Software is furnished to do so, subject to the following
13+
conditions:
14+
15+
The above copyright notice and this permission notice shall be
16+
included in all copies or substantial portions of the Software.
17+
18+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
19+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
20+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
22+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25+
OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,63 @@ KSP Build Tools
55
[![CI](https://github.com/KSPModdingLibs/KSPBuildTools/actions/workflows/internal-ci.yml/badge.svg)](https://github.com/KSPModdingLibs/KSPBuildTools/actions/workflows/internal-ci.yml)
66
[![NuGet Version](https://img.shields.io/nuget/vpre/KSPBuildTools)](https://www.nuget.org/packages/KSPBuildTools)
77

8-
This repository aims to provide a common set of tools for developing mods for Kerbal Space Program. Note that it's still in "alpha" stages so expect things to change or break.
8+
This repository provides a common set of tools for developing mods for Kerbal Space Program. It integrates with MSBuild to simplify setting up plugins, and integrates with CKAN to easily reference other mods. it also includes a set of CI actions for automating builds.
99

1010
[Full Documentation](https://kspbuildtools.readthedocs.io/en/)
11+
12+
## Installation
13+
14+
Run `dotnet add package KSPBuildTools` on your project, or add
15+
16+
```xml
17+
<ItemGroup>
18+
<PackageReference Include="KSPBuildTools"/>
19+
</ItemGroup>
20+
```
21+
22+
to the .csproj file. Pinning the version is highly recommended.
23+
24+
## Usage
25+
26+
Once you [have a KSP installation to link to](https://kspbuildtools.readthedocs.io/en/stable/msbuild/getting-started.html#locating-your-ksp-install), all the game DLLs will be automatically included in your project automatically.
27+
28+
Configure your mod's location in GameData and where to put the output DLLs
29+
30+
```xml
31+
<!-- DLLs will be written to ../GameData/ModName/Plugins/ -->
32+
<KSPBT_ModRoot>$(MSBuildThisFileDirectory)/../GameData/$(MSBuildProjectName)</KSPBT_ModRoot>
33+
<KSPBT_ModPluginFolder>plugins</KSPBT_ModPluginFolder>
34+
```
35+
36+
Reference dependency mods in your DLL by adding `ModReference` items to the project. They will be automatically installed using CKAN.
37+
38+
```xml
39+
<ItemGroup>
40+
<!-- Depends on Modulemanager and Harmony -->
41+
<ModReference Include="Modulemanager">
42+
<DLLPath>GameData/Modulemanager*.dll</DLLPath>
43+
<CKANIdentifier>ModuleManager</CKANIdentifier>
44+
</ModReference>
45+
<ModReference Include="0Harmony">
46+
<DLLPath>GameData/000_Harmony/0Harmony.dll</DLLPath>
47+
<CKANIdentifier>Harmony2</CKANIdentifier>
48+
</ModReference>
49+
</ItemGroup>
50+
```
51+
52+
Auto-generate version files from your project's `FileVersion`. This works well with [minver](https://github.com/adamralph/minver).
53+
54+
```xml
55+
<!-- Version Files -->
56+
<ItemGroup>
57+
<KSPVersionFile Include=".">
58+
<Destination>$(KSPBT_ModRoot)/mymod.version</Destination>
59+
<URL>https://github.com/username/repo/releases/latest/download/mymod.version</URL>
60+
<Download>https://github.com/username.repo/releases/latest</Download>
61+
</KSPVersionFile>
62+
</ItemGroup>
63+
```
64+
65+
From there you should be able to build your mod with just `dotnet build`
66+
67+
For more details, see the [MSBuild section in the docs](https://kspbuildtools.readthedocs.io/en/stable/msbuild/index.html).

docs/changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
```{include} ../CHANGELOG.md
2+
```

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
extensions = ["sphinx_gha", "myst_parser", "sphinx_copybutton", "sphinx_jinja"]
1919

2020
templates_path = ["_templates"]
21-
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
21+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", ".venv"]
2222

2323
# -- Options for HTML output -------------------------------------------------
2424
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

docs/index.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
```{include} ../README.md
2-
```
1+
# KSP Build Tools
2+
3+
KSP Build Tools provide a common set of tools for developing mods for Kerbal Space Program. It integrates with MSBuild to simplify setting up plugins, and integrates with CKAN to easily reference other mods. it also includes a set of CI actions for automating builds.
34

45
```{toctree}
56
---
@@ -10,5 +11,13 @@ msbuild/index
1011
actions/index
1112
workflows/index
1213
scripts
14+
```
1315

14-
```
16+
```{toctree}
17+
---
18+
maxdepth: 1
19+
---
20+
Source <https://github.com/KSPModdingLibs/KSPBuildTools>
21+
Changelog <changelog>
22+
License <license>
23+
```

docs/license.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
```{include} ../LICENSE.md
2+
```

docs/pyproject.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[project]
2+
name = "docs"
3+
version = "0.0.0"
4+
requires-python = ">=3.11"
5+
dependencies = [
6+
"sphinx>=8",
7+
"myst-parser>=4",
8+
"sphinx-book-theme>=1.1.4",
9+
"sphinx-copybutton>=0.5.2",
10+
"sphinx-gha>=1",
11+
"sphinx-jinja>=2"
12+
]
13+
14+
[[tool.uv.index]]
15+
url = "https://git.offworldcolonies.nexus/api/packages/drewcassidy/pypi/simple/"
16+
# not strictly required, everything here is also on PyPI
17+
18+
[tool.uv]
19+
package = false

docs/requirements.in

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)