forked from KSPModdingLibs/KSPBuildTools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathKSPCommon.props
More file actions
132 lines (117 loc) · 6.05 KB
/
KSPCommon.props
File metadata and controls
132 lines (117 loc) · 6.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<KSPCommonPropsImported>true</KSPCommonPropsImported>
</PropertyGroup>
<!-- disable default .net framework imports; use the ones from KSP instead. There are a few differences that are sometimes important. -->
<PropertyGroup>
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
</PropertyGroup>
<!-- default CKAN compatibility versions -->
<PropertyGroup>
<CKANCompatibleVersions Condition="('$(CKANCompatibleVersions)' == '')">1.12 1.11 1.10 1.9 1.8</CKANCompatibleVersions>
</PropertyGroup>
<!--Parse KSP platform-specific paths -->
<!-- These can be overwritten by user and props files -->
<PropertyGroup Condition=" '$(ManagedRelativePath)' == '' ">
<ManagedRelativePath Condition="$([MSBuild]::IsOsPlatform('Windows'))">KSP_x64_Data\Managed</ManagedRelativePath>
<ManagedRelativePath Condition="$([MSBuild]::IsOsPlatform('OSX'))">KSP.app\Contents\Resources\Data\Managed</ManagedRelativePath>
<ManagedRelativePath Condition="$([MSBuild]::IsOsPlatform('Linux'))">KSP_Data\Managed</ManagedRelativePath>
</PropertyGroup>
<PropertyGroup>
<KSPExecutable Condition="$([MSBuild]::IsOsPlatform('Windows'))">KSP_x64.exe</KSPExecutable>
<KSPExecutable Condition="$([MSBuild]::IsOsPlatform('OSX'))">KSP.app/Contents/MacOS/KSP</KSPExecutable>
<KSPExecutable Condition="$([MSBuild]::IsOsPlatform('Linux'))">KSP.x86_64</KSPExecutable>
<SteamKSPRoot Condition="($([MSBuild]::IsOsPlatform('Windows')))">C:\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program</SteamKSPRoot>
<SteamKSPRoot Condition="($([MSBuild]::IsOsPlatform('OSX')))">$(HOME)/Library/Application Support/Steam/steamapps/common/Kerbal Space Program</SteamKSPRoot>
</PropertyGroup>
<!-- Calculate mod paths -->
<!-- These can be overwritten by user, csproj, and props files -->
<PropertyGroup>
<!-- The root directory of the mod repository -->
<RepoRootPath Condition=" '$(RepoRootPath)' == '' ">$(SolutionDir.TrimEnd([System.IO.Path]::DirectorySeparatorChar))</RepoRootPath>
<BinariesOutputRelativePath Condition=" '$(BinariesOutputRelativePath)' == '' ">GameData/$(SolutionName)</BinariesOutputRelativePath>
</PropertyGroup>
<!-- Import the csproj.user file. -->
<!-- This can overwrite ManagedRelativePath and KSPExecutable,
set KSPRoot and ReferencePath, and any other user-specific settings -->
<Import Project="$(MSBuildProjectFullPath).user" Condition="Exists('$(MSBuildProjectFullPath).user')"/>
<!-- Import a props.user file -->
<!-- serves the same role as the csproj.user file -->
<Import Condition=" Exists('$(SolutionDir)$(SolutionName).props.user') " Project="$(SolutionDir)$(SolutionName).props.user"/>
<!-- Import solution-wide props if it exists -->
<Import Condition=" Exists('$(SolutionDir)$(SolutionName).props') " Project="$(SolutionDir)$(SolutionName).props"/>
<PropertyGroup>
<!-- Relative path that must exist for a path to be a valid KSP Install-->
<KSPRootIdentifier>$(ManagedRelativePath)/Assembly-CSharp.dll</KSPRootIdentifier>
<KSPRootSource Condition="'$(KSPRoot)' != ''">property</KSPRootSource>
</PropertyGroup>
<PropertyGroup Condition=" '$(KSPRoot)' == '' And '$(KSP_ROOT)' != '' ">
<!-- Default KSPRoot to the "KSP_ROOT" environment variable if it exists -->
<!-- Doing this skips any checks for a valid KSP install so be careful! -->
<KSPRoot >$(KSP_ROOT)</KSPRoot>
<KSPRootSource>environment variable</KSPRootSource>
</PropertyGroup>
<ItemGroup>
<KSPRootCandidate Include="$(SolutionDir)KSP" source="solution directory"/>
<KSPRootCandidate Include="$(ReferencePath)" source="reference path"/>
<KSPRootCandidate Include="$(SteamKSPRoot)" source="steam"/>
</ItemGroup>
<PropertyGroup Condition=" '$(KSPRoot)' == '' And Exists('$(SolutionDir)KSP/$(KSPRootIdentifier)') ">
<!-- Look for KSP install in Solution dir -->
<KSPRoot >$(SolutionDir)KSP</KSPRoot>
<KSPRootSource>solution directory</KSPRootSource>
</PropertyGroup>
<PropertyGroup Condition=" '$(KSPRoot)' == '' And Exists('$(ReferencePath)/$(KSPRootIdentifier)') ">
<!-- Look for KSP install in ReferencePath -->
<KSPRoot>$(ReferencePath)</KSPRoot>
<KSPRootSource>reference path</KSPRootSource>
</PropertyGroup>
<PropertyGroup Condition=" '$(KSPRoot)' == '' And Exists('$(SteamKSPRoot)/$(KSPRootIdentifier)') ">
<!-- Look for KSP steam install-->
<KSPRoot>$(SteamKSPRoot)</KSPRoot>
<KSPRootSource>steam</KSPRootSource>
</PropertyGroup>
<PropertyGroup>
<!-- Calculate ManagedPath -->
<ManagedPath>$(KSPRoot)/$(ManagedRelativePath)</ManagedPath>
</PropertyGroup>
<!-- set the start action so that you can launch directly from VS -->
<PropertyGroup>
<StartAction>Program</StartAction>
<StartProgram>$(KSPRoot)\$(KSPExecutable)</StartProgram>
<StartWorkingDirectory>$(KSPRoot)</StartWorkingDirectory>
<DebugType>portable</DebugType>
</PropertyGroup>
<!--Import references-->
<ItemGroup>
<Reference Include="$(ManagedPath)\System.dll">
<Name>System (KSP/Mono)</Name>
<Private>False</Private>
</Reference>
<Reference Include="$(ManagedPath)\System.Core.dll">
<Name>System (KSP/Mono)</Name>
<Private>False</Private>
</Reference>
<Reference Include="$(ManagedPath)\mscorlib.dll">
<Name>System.Core (KSP/Mono)</Name>
<Private>False</Private>
</Reference>
<Reference Include="$(ManagedPath)\System.Xml.dll">
<Name>System.Xml (KSP/Mono)</Name>
<Private>False</Private>
</Reference>
<Reference Include="$(ManagedPath)\UnityEngine*.dll">
<Name>UnityEngine</Name>
<Private>False</Private>
</Reference>
<Reference Include="$(ManagedPath)\Assembly-CSharp.dll">
<Name>Assembly-CSharp</Name>
<Private>False</Private>
</Reference>
<Reference Include="$(ManagedPath)\Assembly-CSharp-firstpass.dll">
<Name>Assembly-CSharp-firstpass</Name>
<Private>False</Private>
</Reference>
</ItemGroup>
</Project>