|
7 | 7 | <!-- default settings for KSPBT targets and references --> |
8 | 8 | <PropertyGroup> |
9 | 9 | <!-- reference unity and KSP assemblies unless explicitly disabled --> |
10 | | - <ReferenceKSPSystemAssemblies Condition=" '$(ReferenceKSPSystemAssemblies)' == '' ">true</ReferenceKSPSystemAssemblies> |
11 | | - <ReferenceKSPUnityAssemblies Condition=" '$(ReferenceKSPUnityAssemblies)' == '' ">true</ReferenceKSPUnityAssemblies> |
12 | | - <ReferenceKSPGameAssemblies Condition=" '$(ReferenceKSPGameAssemblies)' == '' ">true</ReferenceKSPGameAssemblies> |
13 | | - |
| 10 | + <KSPBTReferenceSystemAssemblies Condition=" '$(KSPBTReferenceSystemAssemblies)' == '' ">true</KSPBTReferenceSystemAssemblies> |
| 11 | + <KSPBTReferenceUnityAssemblies Condition=" '$(KSPBTReferenceUnityAssemblies)' == '' ">true</KSPBTReferenceUnityAssemblies> |
| 12 | + <KSPBTReferenceGameAssemblies Condition=" '$(KSPBTReferenceGameAssemblies)' == '' ">true</KSPBTReferenceGameAssemblies> |
14 | 13 |
|
15 | 14 | <!-- Copy DLLs to mod folder --> |
16 | | - <CopyDLLsToPluginFolder Condition=" '$(CopyDLLsToPluginFolder)' == '' ">true</CopyDLLsToPluginFolder> |
| 15 | + <KSPBTCopyDLLsToPluginFolder Condition=" '$(KSPBTCopyDLLsToPluginFolder)' == '' ">true</KSPBTCopyDLLsToPluginFolder> |
17 | 16 |
|
18 | 17 |
|
19 | | - <GenerateKSPAssemblyAttribute Condition=" '$(GenerateKSPAssemblyAttribute)' == '' ">true</GenerateKSPAssemblyAttribute> |
| 18 | + <KSPBTGenerateAssemblyAttribute Condition=" '$(KSPBTGenerateAssemblyAttribute)' == '' ">true</KSPBTGenerateAssemblyAttribute> |
20 | 19 |
|
21 | | - <GenerateKSPAssemblyDependencyAttributes Condition=" '$(GenerateKSPAssemblyDependencyAttributes)' == '' ">true</GenerateKSPAssemblyDependencyAttributes> |
| 20 | + <KSPBTGenerateDependencyAttributes Condition=" '$(KSPBTGenerateDependencyAttributes)' == '' ">true</KSPBTGenerateDependencyAttributes> |
22 | 21 |
|
23 | | - <GenerateKSPVersionFile Condition=" '$(GenerateKSPVersionFile)' == '' ">true</GenerateKSPVersionFile> |
| 22 | + <KSPBTGenerateVersionFile Condition=" '$(KSPBTGenerateVersionFile)' == '' ">true</KSPBTGenerateVersionFile> |
24 | 23 |
|
25 | 24 | <!-- default CKAN compatibility versions --> |
26 | 25 | <CKANCompatibleVersions Condition=" '$(CKANCompatibleVersions)' == '' ">1.12 1.11 1.10 1.9 1.8</CKANCompatibleVersions> |
27 | 26 | </PropertyGroup> |
28 | 27 |
|
29 | 28 | <!--Parse KSP platform-specific paths --> |
30 | 29 | <!-- These can be overwritten by user and props files --> |
31 | | - <PropertyGroup Condition=" '$(KSPManagedRelativePath)' == '' "> |
32 | | - <KSPManagedRelativePath Condition=" $([MSBuild]::IsOsPlatform('Windows')) ">KSP_x64_Data/Managed</KSPManagedRelativePath> |
33 | | - <KSPManagedRelativePath Condition=" $([MSBuild]::IsOsPlatform('OSX')) ">KSP.app/Contents/Resources/Data/Managed</KSPManagedRelativePath> |
34 | | - <KSPManagedRelativePath Condition=" $([MSBuild]::IsOsPlatform('Linux')) ">KSP_Data/Managed</KSPManagedRelativePath> |
| 30 | + <PropertyGroup Condition=" '$(KSPBTManagedRelativePath)' == '' "> |
| 31 | + <KSPBTManagedRelativePath Condition=" $([MSBuild]::IsOsPlatform('Windows')) ">KSP_x64_Data/Managed</KSPBTManagedRelativePath> |
| 32 | + <KSPBTManagedRelativePath Condition=" $([MSBuild]::IsOsPlatform('OSX')) ">KSP.app/Contents/Resources/Data/Managed</KSPBTManagedRelativePath> |
| 33 | + <KSPBTManagedRelativePath Condition=" $([MSBuild]::IsOsPlatform('Linux')) ">KSP_Data/Managed</KSPBTManagedRelativePath> |
35 | 34 | </PropertyGroup> |
36 | 35 |
|
37 | 36 | <PropertyGroup> |
38 | | - <KSPExecutable Condition=" $([MSBuild]::IsOsPlatform('Windows')) ">KSP_x64.exe</KSPExecutable> |
39 | | - <KSPExecutable Condition=" $([MSBuild]::IsOsPlatform('OSX')) ">KSP.app/Contents/MacOS/KSP</KSPExecutable> |
40 | | - <KSPExecutable Condition=" $([MSBuild]::IsOsPlatform('Linux')) ">KSP.x86_64</KSPExecutable> |
41 | | - <SteamKSPRoot Condition=" $([MSBuild]::IsOsPlatform('Windows')) ">C:\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program</SteamKSPRoot> |
42 | | - <SteamKSPRoot Condition=" $([MSBuild]::IsOsPlatform('OSX')) ">$(HOME)/Library/Application Support/Steam/steamapps/common/Kerbal Space Program</SteamKSPRoot> |
| 37 | + <KSPBTGameExecutable Condition=" $([MSBuild]::IsOsPlatform('Windows')) ">KSP_x64.exe</KSPBTGameExecutable> |
| 38 | + <KSPBTGameExecutable Condition=" $([MSBuild]::IsOsPlatform('OSX')) ">KSP.app/Contents/MacOS/KSP</KSPBTGameExecutable> |
| 39 | + <KSPBTGameExecutable Condition=" $([MSBuild]::IsOsPlatform('Linux')) ">KSP.x86_64</KSPBTGameExecutable> |
| 40 | + <KSPBTSteamGameRoot Condition=" $([MSBuild]::IsOsPlatform('Windows')) ">C:\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program</KSPBTSteamGameRoot> |
| 41 | + <KSPBTSteamGameRoot Condition=" $([MSBuild]::IsOsPlatform('OSX')) ">$(HOME)/Library/Application Support/Steam/steamapps/common/Kerbal Space Program</KSPBTSteamGameRoot> |
43 | 42 | </PropertyGroup> |
44 | 43 |
|
45 | 44 | <!-- Calculate mod paths --> |
46 | 45 | <!-- These can be overwritten by user, csproj, and props files --> |
47 | 46 | <PropertyGroup> |
48 | 47 | <!-- The root directory of the mod, the folder that gets placed in GameData --> |
49 | | - <KSPModRoot Condition=" '$(KSPModRoot)' == '' ">$(MSBuildProjectDirectory)/../GameData/$(MSBuildProjectName)/</KSPModRoot> |
50 | | - <!-- The folder to place resulting DLLs into, relative to KSPModRoot --> |
51 | | - <KSPModPluginFolder Condition=" '$(KSPModPluginFolder)' == '' "/> |
| 48 | + <KSPBTModRoot Condition=" '$(KSPBTModRoot)' == '' ">$(MSBuildProjectDirectory)/../GameData/$(MSBuildProjectName)/</KSPBTModRoot> |
| 49 | + <!-- The folder to place resulting DLLs into, relative to KSPBTModRoot --> |
| 50 | + <KSPBTModPluginFolder Condition=" '$(KSPBTModPluginFolder)' == '' "/> |
52 | 51 | </PropertyGroup> |
53 | 52 |
|
54 | 53 | <!-- Import the csproj.user file. --> |
55 | | - <!-- This can overwrite KSPManagedRelativePath and KSPExecutable, |
56 | | - set KSPRoot and ReferencePath, and any other user-specific settings --> |
| 54 | + <!-- This can overwrite KSPBTManagedRelativePath and KSPBTGameExecutable, |
| 55 | + set KSPBTGameRoot and ReferencePath, and any other user-specific settings --> |
57 | 56 | <Import Project="$(MSBuildProjectFullPath).user" Condition="Exists('$(MSBuildProjectFullPath).user')"/> |
58 | 57 |
|
59 | 58 | <!-- Import a props.user file --> |
|
65 | 64 |
|
66 | 65 | <!-- Relative path that must exist for a path to be a valid KSP Install--> |
67 | 66 | <PropertyGroup> |
68 | | - <KSPRootIdentifier>$(KSPManagedRelativePath)/Assembly-CSharp.dll</KSPRootIdentifier> |
69 | | - <KSPRootSource Condition="'$(KSPRoot)' != ''">property</KSPRootSource> |
| 67 | + <KSPBTGameIdentifier>$(KSPBTManagedRelativePath)/Assembly-CSharp.dll</KSPBTGameIdentifier> |
| 68 | + <KSPBTGameRootSource Condition="'$(KSPBTGameRoot)' != ''">property</KSPBTGameRootSource> |
70 | 69 | </PropertyGroup> |
71 | 70 |
|
72 | | - <!-- Default KSPRoot to the "KSP_ROOT" environment variable if it exists --> |
| 71 | + <!-- Default KSPBTGameRoot to the "KSP_ROOT" environment variable if it exists --> |
73 | 72 | <!-- Doing this skips any checks for a valid KSP install so be careful! --> |
74 | | - <PropertyGroup Condition=" '$(KSPRoot)' == '' And '$(KSP_ROOT)' != '' "> |
75 | | - <KSPRoot>$(KSP_ROOT)</KSPRoot> |
76 | | - <KSPRootSource>environment variable</KSPRootSource> |
| 73 | + <PropertyGroup Condition=" '$(KSPBTGameRoot)' == '' And '$(KSP_ROOT)' != '' "> |
| 74 | + <KSPBTGameRoot>$(KSP_ROOT)</KSPBTGameRoot> |
| 75 | + <KSPBTGameRootSource>environment variable</KSPBTGameRootSource> |
77 | 76 | </PropertyGroup> |
78 | 77 | <ItemGroup> |
79 | | - <KSPRootCandidate Include="$(SolutionDir)KSP" source="solution directory"/> |
80 | | - <KSPRootCandidate Include="$(ReferencePath)" source="reference path"/> |
81 | | - <KSPRootCandidate Include="$(SteamKSPRoot)" source="steam"/> |
| 78 | + <KSPBTGameRootCandidate Include="$(SolutionDir)KSP" source="solution directory"/> |
| 79 | + <KSPBTGameRootCandidate Include="$(ReferencePath)" source="reference path"/> |
| 80 | + <KSPBTGameRootCandidate Include="$(KSPBTSteamGameRoot)" source="steam"/> |
82 | 81 | </ItemGroup> |
83 | 82 |
|
84 | 83 | <!-- Look for KSP install in Solution dir --> |
85 | | - <PropertyGroup Condition=" '$(KSPRoot)' == '' And Exists('$(SolutionDir)KSP/$(KSPRootIdentifier)') "> |
86 | | - <KSPRoot>$(SolutionDir)KSP</KSPRoot> |
87 | | - <KSPRootSource>solution directory</KSPRootSource> |
| 84 | + <PropertyGroup Condition=" '$(KSPBTGameRoot)' == '' And Exists('$(SolutionDir)KSP/$(KSPBTGameIdentifier)') "> |
| 85 | + <KSPBTGameRoot>$(SolutionDir)KSP</KSPBTGameRoot> |
| 86 | + <KSPBTGameRootSource>solution directory</KSPBTGameRootSource> |
88 | 87 | </PropertyGroup> |
89 | 88 |
|
90 | 89 | <!-- Look for KSP install in ReferencePath --> |
91 | | - <PropertyGroup Condition=" '$(KSPRoot)' == '' And Exists('$(ReferencePath)/$(KSPRootIdentifier)') "> |
92 | | - <KSPRoot>$(ReferencePath)</KSPRoot> |
93 | | - <KSPRootSource>reference path</KSPRootSource> |
| 90 | + <PropertyGroup Condition=" '$(KSPBTGameRoot)' == '' And Exists('$(ReferencePath)/$(KSPBTGameIdentifier)') "> |
| 91 | + <KSPBTGameRoot>$(ReferencePath)</KSPBTGameRoot> |
| 92 | + <KSPBTGameRootSource>reference path</KSPBTGameRootSource> |
94 | 93 | </PropertyGroup> |
95 | 94 |
|
96 | 95 | <!-- Look for KSP steam install--> |
97 | | - <PropertyGroup Condition=" '$(KSPRoot)' == '' And Exists('$(SteamKSPRoot)/$(KSPRootIdentifier)') "> |
98 | | - <KSPRoot>$(SteamKSPRoot)</KSPRoot> |
99 | | - <KSPRootSource>steam</KSPRootSource> |
| 96 | + <PropertyGroup Condition=" '$(KSPBTGameRoot)' == '' And Exists('$(KSPBTSteamGameRoot)/$(KSPBTGameIdentifier)') "> |
| 97 | + <KSPBTGameRoot>$(KSPBTSteamGameRoot)</KSPBTGameRoot> |
| 98 | + <KSPBTGameRootSource>steam</KSPBTGameRootSource> |
100 | 99 | </PropertyGroup> |
101 | 100 |
|
102 | | - <!-- Calculate ManagedPath --> |
103 | | - <PropertyGroup Condition=" '$(ManagedPath)' == ''"> |
104 | | - <ManagedPath>$(KSPRoot)/$(KSPManagedRelativePath)</ManagedPath> |
| 101 | + <!-- Calculate KSPBTManagedPath --> |
| 102 | + <PropertyGroup Condition=" '$(KSPBTManagedPath)' == ''"> |
| 103 | + <KSPBTManagedPath>$(KSPBTGameRoot)/$(KSPBTManagedRelativePath)</KSPBTManagedPath> |
105 | 104 | </PropertyGroup> |
106 | 105 |
|
107 | 106 | <!-- set the start action so that you can launch directly from VS --> |
108 | 107 | <PropertyGroup> |
109 | 108 | <StartAction>Program</StartAction> |
110 | | - <StartProgram>$(KSPRoot)/$(KSPExecutable)</StartProgram> |
111 | | - <StartWorkingDirectory>$(KSPRoot)</StartWorkingDirectory> |
| 109 | + <StartProgram>$(KSPBTGameRoot)/$(KSPBTGameExecutable)</StartProgram> |
| 110 | + <StartWorkingDirectory>$(KSPBTGameRoot)</StartWorkingDirectory> |
112 | 111 | <DebugType>portable</DebugType> |
113 | 112 | </PropertyGroup> |
114 | 113 |
|
115 | 114 | <!-- Prevent the compiler from acquiring or referencing any external reference assemblies --> |
116 | | - <PropertyGroup Condition=" '$(ReferenceKSPSystemAssemblies)' == 'true' "> |
| 115 | + <PropertyGroup Condition=" '$(KSPBTReferenceSystemAssemblies)' == 'true' "> |
117 | 116 | <!-- Do not download the .NET Framework Target Pack NuGet package automatically --> |
118 | 117 | <DisableTransitiveFrameworkReferenceDownloads>true</DisableTransitiveFrameworkReferenceDownloads> |
119 | 118 | <!-- Instruct the compiler to not automatically reference mscorlib --> |
120 | 119 | <NoStandardLib>true</NoStandardLib> |
121 | 120 | <!-- Prevent the GetReferenceAssemblyPaths task in Microsoft.Common.CurrentVersion.targets |
122 | 121 | from attempting to locate an external copy of the reference assemblies. --> |
123 | 122 | <AutomaticallyUseReferenceAssemblyPackages>false</AutomaticallyUseReferenceAssemblyPackages> |
124 | | - <FrameworkPathOverride>$(ManagedPath)</FrameworkPathOverride> |
| 123 | + <FrameworkPathOverride>$(KSPBTManagedPath)</FrameworkPathOverride> |
125 | 124 | <DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences> |
126 | 125 | </PropertyGroup> |
127 | 126 |
|
128 | 127 |
|
129 | 128 | <!-- Import references --> |
130 | | - <ItemGroup Condition=" '$(ReferenceKSPSystemAssemblies)' == 'true' "> |
131 | | - <Reference Include="$(ManagedPath)/System.dll"> |
| 129 | + <ItemGroup Condition=" '$(KSPBTReferenceSystemAssemblies)' == 'true' "> |
| 130 | + <Reference Include="$(KSPBTManagedPath)/System.dll"> |
132 | 131 | <Name>System (KSP/Mono)</Name> |
133 | 132 | <Private>False</Private> |
134 | 133 | </Reference> |
135 | | - <Reference Include="$(ManagedPath)/System.Core.dll"> |
| 134 | + <Reference Include="$(KSPBTManagedPath)/System.Core.dll"> |
136 | 135 | <Name>System (KSP/Mono)</Name> |
137 | 136 | <Private>False</Private> |
138 | 137 | </Reference> |
139 | | - <Reference Include="$(ManagedPath)/mscorlib.dll"> |
| 138 | + <Reference Include="$(KSPBTManagedPath)/mscorlib.dll"> |
140 | 139 | <Name>System.Core (KSP/Mono)</Name> |
141 | 140 | <Private>False</Private> |
142 | 141 | </Reference> |
143 | | - <Reference Include="$(ManagedPath)/System.Xml.dll"> |
| 142 | + <Reference Include="$(KSPBTManagedPath)/System.Xml.dll"> |
144 | 143 | <Name>System.Xml (KSP/Mono)</Name> |
145 | 144 | <Private>False</Private> |
146 | 145 | </Reference> |
147 | 146 | </ItemGroup> |
148 | | - <ItemGroup Condition=" '$(ReferenceKSPUnityAssemblies)' == 'true' "> |
149 | | - <Reference Include="$(ManagedPath)/UnityEngine*.dll"> |
| 147 | + <ItemGroup Condition=" '$(KSPBTReferenceUnityAssemblies)' == 'true' "> |
| 148 | + <Reference Include="$(KSPBTManagedPath)/UnityEngine*.dll"> |
150 | 149 | <Name>UnityEngine</Name> |
151 | 150 | <Private>False</Private> |
152 | 151 | </Reference> |
153 | 152 | </ItemGroup> |
154 | | - <ItemGroup Condition=" '$(ReferenceKSPGameAssemblies)' == 'true' "> |
155 | | - <Reference Include="$(ManagedPath)/Assembly-CSharp.dll"> |
| 153 | + <ItemGroup Condition=" '$(KSPBTReferenceGameAssemblies)' == 'true' "> |
| 154 | + <Reference Include="$(KSPBTManagedPath)/Assembly-CSharp.dll"> |
156 | 155 | <Name>Assembly-CSharp</Name> |
157 | 156 | <Private>False</Private> |
158 | 157 | </Reference> |
159 | | - <Reference Include="$(ManagedPath)/Assembly-CSharp-firstpass.dll"> |
| 158 | + <Reference Include="$(KSPBTManagedPath)/Assembly-CSharp-firstpass.dll"> |
160 | 159 | <Name>Assembly-CSharp-firstpass</Name> |
161 | 160 | <Private>False</Private> |
162 | 161 | </Reference> |
|
0 commit comments