Skip to content

Commit 825588f

Browse files
committed
Break out KSP install detection to its own page
1 parent 6fe6d83 commit 825588f

File tree

4 files changed

+29
-3
lines changed

4 files changed

+29
-3
lines changed

KSPCommon.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
<Error Text="KSPBuildTools was unable to find a KSP installation. Please set the ReferencePath or KSPBT_GameRoot property
109109
in your csproj.user file to a valid KSP installation directory (the one with GameData in it)
110110
111-
See https://kspbuildtools.readthedocs.io/en/latest/msbuild/getting-started.html#locating-your-ksp-install for more information"
111+
See https://kspbuildtools.readthedocs.io/en/latest/msbuild/ksp-install.html for more information"
112112
Condition="'$(KSPBT_GameRoot)' == ''"/>
113113
<ItemGroup>
114114
<_GameRootMessage Include="KSPBT_GameRoot Candidates:"/>

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ to the .csproj file. Pinning the version is highly recommended.
2323

2424
## Usage
2525

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.
26+
Once you [have a KSP installation to link to](https://kspbuildtools.readthedocs.io/en/stable/msbuild/ksp-install.html), all the game DLLs will be automatically included in your project automatically.
2727

2828
Configure your mod's location in GameData and where to put the output DLLs
2929

docs/msbuild/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ maxdepth: 1
2121
---
2222
2323
getting-started
24-
generating-version-files
24+
ksp-install
2525
dependencies
26+
generating-version-files
2627
configuration
2728
```
2829

docs/msbuild/ksp-install.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Locating your KSP Install
2+
3+
KSPBuildTools needs to know where you have KSP installed in order to reference the game dlls. These are all specific to your own computer, and should not be included in your git repo.
4+
5+
There are several options for this. KSPBuildTools will choose in the following order. Either [autodiscovery in the solution directory](#solution-directory) or [setting a reference path in a .user file](#environment-variable) are the recommended methods for most users.
6+
7+
### KSPBT_GameRoot MSBuild Property
8+
9+
If the {confval}`KSPBT_GameRoot` MSBuild property is already set, KSPBuildTools will use it as-is. This can be set in your .csproj.user file.
10+
11+
### Environment Variable
12+
13+
Set the {envvar}`KSP_ROOT` environment variable to the root of a KSP install. This is useful for CI workflows such as those using the {gha:action}`compile` action.
14+
15+
### Solution Directory
16+
17+
KSPBuildTools will look for a "KSP" directory in your solution directory and use it if it is a valid install. It identifies valid installs by looking for `assembly-csharp.dll` in the appropriate subdirectory for your operating system.
18+
19+
### Reference Path
20+
21+
KSPBuildTools will use the `ReferencePath` MSBuild property if it is a valid KSP install. This can be set in a user file located at `{csproj path}.user`. If you use Visual Studio, it can generate this file and property for you.
22+
23+
### From Steam
24+
25+
KSPBuildTools will use the default Steam install location if it is a valid install

0 commit comments

Comments
 (0)