|
52 | 52 | <PropertyGroup>
|
53 | 53 | <!-- Relative path that must exist for a path to be a valid KSP Install-->
|
54 | 54 | <KSPRootIdentifier>$(ManagedRelativePath)/Assembly-CSharp.dll</KSPRootIdentifier>
|
| 55 | + <KSPRootSource Condition="'$(KSPRoot)' != ''">property</KSPRootSource> |
| 56 | + </PropertyGroup> |
55 | 57 |
|
| 58 | + <PropertyGroup Condition=" '$(KSPRoot)' == '' And '$(KSP_ROOT)' != '' "> |
56 | 59 | <!-- Default KSPRoot to the "KSP_ROOT" environment variable if it exists -->
|
57 | 60 | <!-- Doing this skips any checks for a valid KSP install so be careful! -->
|
58 |
| - <KSPRoot Condition=" '$(KSPRoot)' == '' And '$(KSP_ROOT)' != '' ">$(KSP_ROOT)</KSPRoot> |
| 61 | + <KSPRoot >$(KSP_ROOT)</KSPRoot> |
| 62 | + <KSPRootSource>environment variable</KSPRootSource> |
| 63 | + </PropertyGroup> |
| 64 | + <ItemGroup> |
| 65 | + <KSPRootCandidate Include="$(SolutionDir)KSP" source="solution directory"/> |
| 66 | + <KSPRootCandidate Include="$(ReferencePath)" source="reference path"/> |
| 67 | + <KSPRootCandidate Include="$(SteamKSPRoot)" source="steam"/> |
| 68 | + </ItemGroup> |
59 | 69 |
|
| 70 | + <PropertyGroup Condition=" '$(KSPRoot)' == '' And Exists('$(SolutionDir)KSP/$(KSPRootIdentifier)') "> |
60 | 71 | <!-- Look for KSP install in Solution dir -->
|
61 |
| - <KSPRoot Condition=" '$(KSPRoot)' == '' And Exists('$(SolutionDir)KSP/$(KSPRootIdentifier)') ">$(SolutionDir)KSP</KSPRoot> |
| 72 | + <KSPRoot >$(SolutionDir)KSP</KSPRoot> |
| 73 | + <KSPRootSource>solution directory</KSPRootSource> |
| 74 | + </PropertyGroup> |
62 | 75 |
|
| 76 | + <PropertyGroup Condition=" '$(KSPRoot)' == '' And Exists('$(ReferencePath)/$(KSPRootIdentifier)') "> |
63 | 77 | <!-- Look for KSP install in ReferencePath -->
|
64 |
| - <KSPRoot Condition=" '$(KSPRoot)' == '' And Exists('$(ReferencePath)/$(KSPRootIdentifier)') ">$(ReferencePath)</KSPRoot> |
| 78 | + <KSPRoot>$(ReferencePath)</KSPRoot> |
| 79 | + <KSPRootSource>reference path</KSPRootSource> |
| 80 | + </PropertyGroup> |
65 | 81 |
|
| 82 | + <PropertyGroup Condition=" '$(KSPRoot)' == '' And Exists('$(SteamKSPRoot)/$(KSPRootIdentifier)') "> |
66 | 83 | <!-- Look for KSP steam install-->
|
67 |
| - <KSPRoot Condition=" '$(KSPRoot)' == '' And Exists('$(SteamKSPRoot)/$(KSPRootIdentifier)') ">$(SteamKSPRoot)</KSPRoot> |
| 84 | + <KSPRoot>$(SteamKSPRoot)</KSPRoot> |
| 85 | + <KSPRootSource>steam</KSPRootSource> |
| 86 | + </PropertyGroup> |
68 | 87 |
|
| 88 | + <PropertyGroup> |
69 | 89 | <!-- Calculate ManagedPath -->
|
70 | 90 | <ManagedPath>$(KSPRoot)/$(ManagedRelativePath)</ManagedPath>
|
71 | 91 | </PropertyGroup>
|
|
0 commit comments