Skip to content

Commit 16b8fbb

Browse files
committed
switch to KSPBuildTools
1 parent a2eb650 commit 16b8fbb

File tree

2 files changed

+26
-54
lines changed

2 files changed

+26
-54
lines changed

AvionicsSystems.csproj

Lines changed: 21 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="packages\KSPBuildTools.0.0.2\build\KSPBuildTools.props" Condition="Exists('packages\KSPBuildTools.0.0.2\build\KSPBuildTools.props')" />
4+
<Import Project="packages\JsonPoke.1.2.0\build\JsonPoke.props" Condition="Exists('packages\JsonPoke.1.2.0\build\JsonPoke.props')" />
35
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
46
<PropertyGroup>
57
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -12,6 +14,8 @@
1214
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
1315
<FileAlignment>512</FileAlignment>
1416
<TargetFrameworkProfile />
17+
<NuGetPackageImportStamp>
18+
</NuGetPackageImportStamp>
1519
</PropertyGroup>
1620
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1721
<DebugSymbols>true</DebugSymbols>
@@ -32,57 +36,13 @@
3236
<WarningLevel>4</WarningLevel>
3337
<Prefer32Bit>false</Prefer32Bit>
3438
</PropertyGroup>
39+
<PropertyGroup>
40+
<BinariesOutputRelativePath>GameData\MOARdV\AvionicsSystems</BinariesOutputRelativePath>
41+
</PropertyGroup>
3542
<ItemGroup>
36-
<Reference Include="Assembly-CSharp">
37-
<HintPath>D:\Games\KSP-IVA\KSP_x64_Data\Managed\Assembly-CSharp.dll</HintPath>
38-
</Reference>
39-
<Reference Include="Assembly-CSharp-firstpass">
40-
<HintPath>D:\Games\KSP-IVA\KSP_x64_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
41-
</Reference>
4243
<Reference Include="MoonSharp.Interpreter">
4344
<HintPath>GameData\MOARdV\AvionicsSystems\MoonSharp.Interpreter.dll</HintPath>
4445
</Reference>
45-
<Reference Include="System" />
46-
<Reference Include="System.Core" />
47-
<Reference Include="UnityEngine">
48-
<HintPath>D:\Games\KSP-IVA\KSP_x64_Data\Managed\UnityEngine.dll</HintPath>
49-
</Reference>
50-
<Reference Include="UnityEngine.AnimationModule">
51-
<HintPath>D:\Games\KSP-IVA\KSP_x64_Data\Managed\UnityEngine.AnimationModule.dll</HintPath>
52-
</Reference>
53-
<Reference Include="UnityEngine.AssetBundleModule">
54-
<HintPath>D:\Games\KSP-IVA\KSP_x64_Data\Managed\UnityEngine.AssetBundleModule.dll</HintPath>
55-
</Reference>
56-
<Reference Include="UnityEngine.AudioModule">
57-
<HintPath>D:\Games\KSP-IVA\KSP_x64_Data\Managed\UnityEngine.AudioModule.dll</HintPath>
58-
</Reference>
59-
<Reference Include="UnityEngine.CoreModule">
60-
<HintPath>D:\Games\KSP-IVA\KSP_x64_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
61-
</Reference>
62-
<Reference Include="UnityEngine.IMGUIModule">
63-
<HintPath>D:\Games\KSP-IVA\KSP_x64_Data\Managed\UnityEngine.IMGUIModule.dll</HintPath>
64-
</Reference>
65-
<Reference Include="UnityEngine.InputLegacyModule">
66-
<HintPath>D:\Games\KSP-IVA\KSP_x64_Data\Managed\UnityEngine.InputLegacyModule.dll</HintPath>
67-
</Reference>
68-
<Reference Include="UnityEngine.PhysicsModule">
69-
<HintPath>D:\Games\KSP-IVA\KSP_x64_Data\Managed\UnityEngine.PhysicsModule.dll</HintPath>
70-
</Reference>
71-
<Reference Include="UnityEngine.TextRenderingModule">
72-
<HintPath>D:\Games\KSP-IVA\KSP_x64_Data\Managed\UnityEngine.TextRenderingModule.dll</HintPath>
73-
</Reference>
74-
<Reference Include="UnityEngine.UI">
75-
<HintPath>D:\Games\KSP-IVA\KSP_x64_Data\Managed\UnityEngine.UI.dll</HintPath>
76-
</Reference>
77-
<Reference Include="UnityEngine.UIModule">
78-
<HintPath>D:\Games\KSP-IVA\KSP_x64_Data\Managed\UnityEngine.UIModule.dll</HintPath>
79-
</Reference>
80-
<Reference Include="UnityEngine.UnityWebRequestAssetBundleModule">
81-
<HintPath>D:\Games\KSP-IVA\KSP_x64_Data\Managed\UnityEngine.UnityWebRequestAssetBundleModule.dll</HintPath>
82-
</Reference>
83-
<Reference Include="UnityEngine.UnityWebRequestModule">
84-
<HintPath>D:\Games\KSP-IVA\KSP_x64_Data\Managed\UnityEngine.UnityWebRequestModule.dll</HintPath>
85-
</Reference>
8646
</ItemGroup>
8747
<ItemGroup>
8848
<Compile Include="Source\ApproachSolverBW.cs" />
@@ -187,14 +147,21 @@
187147
<Compile Include="Source\Variable.cs" />
188148
<Compile Include="Source\VariableRegistrar.cs" />
189149
</ItemGroup>
190-
<ItemGroup />
150+
<ItemGroup>
151+
<None Include="packages.config" />
152+
</ItemGroup>
191153
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
192-
<PropertyGroup>
193-
<PostBuildEvent>copy $(TargetPath) "D:\Games\KSP-IVA\GameData\MOARdV\AvionicsSystems"
194-
copy $(TargetPath) $(SolutionDir)GameData\MOARdV\AvionicsSystems\
195-
$(SolutionDir)Documentor\$(OutDir)Documentor.exe $(SolutionDir)Source\MASIFAR.cs $(SolutionDir)Source\MASIKAC.cs $(SolutionDir)Source\MASIChatterer.cs $(SolutionDir)Source\MASIEngine.cs $(SolutionDir)Source\MASIMechJeb.cs $(SolutionDir)Source\MASINavigation.cs $(SolutionDir)Source\MASIRealChute.cs $(SolutionDir)Source\MASITransfer.cs $(SolutionDir)Source\MASFlightComputerProxy.cs $(SolutionDir)Source\MASFlightComputerProxy2.cs $(SolutionDir)Source\MASFlightComputerProxy3.cs $(SolutionDir)Source\MASIVTOL.cs $(SolutionDir)Source\MASIKerbalEngineer.cs
196-
</PostBuildEvent>
197-
</PropertyGroup>
154+
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
155+
<PropertyGroup>
156+
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
157+
</PropertyGroup>
158+
<Error Condition="!Exists('packages\JsonPoke.1.2.0\build\JsonPoke.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\JsonPoke.1.2.0\build\JsonPoke.props'))" />
159+
<Error Condition="!Exists('packages\JsonPoke.1.2.0\build\JsonPoke.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\JsonPoke.1.2.0\build\JsonPoke.targets'))" />
160+
<Error Condition="!Exists('packages\KSPBuildTools.0.0.2\build\KSPBuildTools.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\KSPBuildTools.0.0.2\build\KSPBuildTools.props'))" />
161+
<Error Condition="!Exists('packages\KSPBuildTools.0.0.2\build\KSPBuildTools.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\KSPBuildTools.0.0.2\build\KSPBuildTools.targets'))" />
162+
</Target>
163+
<Import Project="packages\JsonPoke.1.2.0\build\JsonPoke.targets" Condition="Exists('packages\JsonPoke.1.2.0\build\JsonPoke.targets')" />
164+
<Import Project="packages\KSPBuildTools.0.0.2\build\KSPBuildTools.targets" Condition="Exists('packages\KSPBuildTools.0.0.2\build\KSPBuildTools.targets')" />
198165
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
199166
Other similar extension points exist, see Microsoft.Common.targets.
200167
<Target Name="BeforeBuild">

packages.config

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="JsonPoke" version="1.2.0" targetFramework="net48" />
4+
<package id="KSPBuildTools" version="0.0.2" targetFramework="net48" />
5+
</packages>

0 commit comments

Comments
 (0)