Skip to content

Commit 9249913

Browse files
committed
csproj and build system updates
1 parent 9a65809 commit 9249913

File tree

3 files changed

+44
-44
lines changed

3 files changed

+44
-44
lines changed

ProbeControlRoom/ProbeControlRoom.csproj

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
44
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
55
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
66
<ProjectGuid>{6BB6BF04-C58F-47EE-A4BB-3CADA7850606}</ProjectGuid>
77
<OutputType>Library</OutputType>
88
<RootNamespace>ProbeControlRoom</RootNamespace>
99
<AssemblyName>ProbeControlRoomRecontrolled</AssemblyName>
10-
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
10+
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
11+
<TargetFrameworkProfile />
1112
</PropertyGroup>
1213
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1314
<DebugSymbols>true</DebugSymbols>
14-
<DebugType>full</DebugType>
15+
<DebugType>portable</DebugType>
1516
<Optimize>false</Optimize>
1617
<OutputPath>bin\Debug</OutputPath>
1718
<DefineConstants>DEBUG;</DefineConstants>
@@ -37,13 +38,19 @@
3738
<Command type="AfterBuild" command="PostBuild.bat ${TargetFile} ${ProjectConfig}" workingdir="${ProjectDir}" pauseExternalConsole="True" />
3839
</CustomCommands>
3940
</CustomCommands>
41+
<DebugType>portable</DebugType>
42+
<DebugSymbols>true</DebugSymbols>
43+
</PropertyGroup>
44+
<PropertyGroup>
45+
<RunPostBuildEvent>Always</RunPostBuildEvent>
4046
</PropertyGroup>
4147
<ItemGroup>
4248
<Compile Include="AssemblyVersion.cs">
4349
<AutoGen>True</AutoGen>
4450
<DesignTime>True</DesignTime>
4551
<DependentUpon>AssemblyVersion.tt</DependentUpon>
4652
</Compile>
53+
<Compile Include="CivilianKerbal.cs" />
4754
<Compile Include="InstallChecker.cs" />
4855
<Compile Include="Properties\AssemblyInfo.cs" />
4956
<Compile Include="ProbeControlRoom.cs" />
@@ -69,36 +76,27 @@
6976
<Reference Include="$(KSPDIR)\KSP_x64_Data\Managed\UnityEngine*.dll">
7077
<Private>False</Private>
7178
</Reference>
79+
<Reference Include="Assembly-CSharp, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
80+
<SpecificVersion>False</SpecificVersion>
81+
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\KSP Stripped\KSP_x64_Data\Managed\Assembly-CSharp.dll</HintPath>
82+
</Reference>
7283
<Reference Include="System" />
7384
<Reference Include="System" />
7485
<Reference Include="ToolbarControl">
7586
<HintPath>$(KSPDIR)\GameData\001_ToolbarControl\Plugins\ToolbarControl.dll</HintPath>
7687
</Reference>
88+
<Reference Include="UnityEngine, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
89+
<SpecificVersion>False</SpecificVersion>
90+
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program\KSP_x64_Data\Managed\UnityEngine.dll</HintPath>
91+
</Reference>
92+
<Reference Include="UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
93+
<SpecificVersion>False</SpecificVersion>
94+
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\KSP Stripped\KSP_x64_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
95+
</Reference>
7796
</ItemGroup>
7897
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
7998
<PropertyGroup>
80-
<PostBuildEvent>set KSPDIR=$(KSPDIR)
81-
82-
IF "%25KSPDIR%25"=="" (
83-
84-
ECHO Configuration error - KSPDIR not specified in project.
85-
86-
ECHO Either set KSPDIR environment variable or edit BetterLoadSaveGame.Common.props
87-
88-
PAUSE
89-
90-
GOTO DONE
91-
92-
)
93-
94-
start /D $(SolutionDir) /WAIT deploy.bat $(TargetDir) $(TargetFileName) $(TargetName)
95-
96-
if $(ConfigurationName) == Release (
97-
98-
start /D $(SolutionDir) /WAIT buildRelease.bat $(TargetDir) $(TargetFileName) $(TargetName)
99-
100-
)
101-
</PostBuildEvent>
99+
<PostBuildEvent>xcopy /Y $(TargetDir)$(TargetName).* $(SolutionDir)GameData\$(ProjectName)\Plugins\$(TargetName).*</PostBuildEvent>
102100
</PropertyGroup>
103101
<PropertyGroup>
104102
<PreBuildEvent>"$(DevEnvDir)\texttransform.exe" "$(ProjectDir)AssemblyVersion.tt"

ProbeControlRoomToolbar/AssemblyVersion.tt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,13 @@
2828
int i2 = 0;
2929
string s;
3030

31-
string versionfile = @"D:\Users\jbb\github\KSP-ProbeControlRoom\ProbeControlRoom.version";
31+
string RootDirectory = System.IO.Path.GetDirectoryName(Host.TemplateFile) + @"\..\";
32+
33+
//
34+
// Update the following with the name of the .version file which is in the root directory
35+
//
36+
string versionfile = RootDirectory + "ProbeControlRoom.version";
37+
3238
if (!File.Exists(versionfile))
3339
{
3440
Write("File: " + versionfile + " missing\n");

ProbeControlRoomToolbar/ProbeControlRoomToolbar.csproj

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
44
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
55
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
66
<ProjectGuid>{F85B9451-74D5-4C48-8647-76A779ADD3FF}</ProjectGuid>
77
<OutputType>Library</OutputType>
88
<RootNamespace>ProbeControlRoomToolbar</RootNamespace>
99
<AssemblyName>ProbeControlRoomToolbar</AssemblyName>
10-
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
10+
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
11+
<TargetFrameworkProfile />
1112
</PropertyGroup>
1213
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1314
<DebugSymbols>true</DebugSymbols>
@@ -38,6 +39,9 @@
3839
</CustomCommands>
3940
</CustomCommands>
4041
</PropertyGroup>
42+
<PropertyGroup>
43+
<RunPostBuildEvent>Always</RunPostBuildEvent>
44+
</PropertyGroup>
4145
<ItemGroup>
4246
<Compile Include="AssemblyVersion.cs">
4347
<AutoGen>True</AutoGen>
@@ -63,28 +67,20 @@
6367
</ProjectReference>
6468
</ItemGroup>
6569
<ItemGroup>
66-
<Reference Include="$(KSPDIR)\KSP_x64_Data\Managed\Assembly*.dll">
67-
<Private>False</Private>
70+
<Reference Include="$(KSPDIR)\KSP_x64_Data\Managed\Assembly*.dll">
71+
<Private>False</Private>
6872
</Reference>
6973
<Reference Include="$(KSPDIR)\KSP_x64_Data\Managed\UnityEngine*.dll">
70-
<Private>False</Private>
74+
<Private>False</Private>
7175
</Reference>
72-
<Reference Include="System" />
76+
<Reference Include="System" />
7377
</ItemGroup>
7478
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
7579
<PropertyGroup>
76-
<PostBuildEvent>
77-
start /D D:\Users\jbb\github\KSP-ProbeControlRoom/WAIT deploy.bat $(TargetDir) $(TargetFileName)
78-
79-
if $(ConfigurationName) == Release (
80-
start /D D:\Users\jbb\github\KSP-ProbeControlRoom/WAIT buildRelease.bat $(TargetDir) $(TargetFileName)
81-
)
82-
</PostBuildEvent>
80+
<PostBuildEvent>xcopy /Y $(TargetDir)$(TargetName).* $(SolutionDir)GameData\$(SolutionName)\Plugins\$(TargetName).*</PostBuildEvent>
8381
</PropertyGroup>
8482
<PropertyGroup>
85-
<PreBuildEvent>
86-
set textTemplatingPath="%25ProgramFiles(x86)%25\Microsoft Visual Studio\2017\Community\Common7\IDE \texttransform.exe"
87-
88-
%25textTemplatingPath%25 "$(ProjectDir)AssemblyVersion.tt"</PreBuildEvent>
83+
<PreBuildEvent>"$(DevEnvDir)\texttransform.exe" "$(ProjectDir)AssemblyVersion.tt"
84+
</PreBuildEvent>
8985
</PropertyGroup>
90-
</Project>
86+
</Project>

0 commit comments

Comments
 (0)