Skip to content

Commit 696cd4c

Browse files
committed
Set up versioning and KSPAssembly attributes with KSPBuildTools
1 parent a8040de commit 696cd4c

File tree

8 files changed

+28
-44
lines changed

8 files changed

+28
-44
lines changed

SCANmechjeb/Properties/AssemblyInfo.cs

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,6 @@
1818
// The following GUID is for the ID of the typelib if this project is exposed to COM
1919
[assembly: Guid("a96b8661-cfef-40ab-8798-f701b97808c4")]
2020

21-
// Version information for an assembly consists of the following four values:
22-
//
23-
// Major Version
24-
// Minor Version
25-
// Build Number
26-
// Revision
27-
//
28-
// You can specify all the values or you can default the Build and Revision Numbers
29-
// by using the '*' as shown below:
30-
// [assembly: AssemblyVersion("1.0.*")]
31-
//[assembly: AssemblyVersion("1.20.4.0")]
32-
//[assembly: AssemblyFileVersion("1.20.4.0")]
33-
//[assembly: AssemblyInformationalVersion ("v20.4")]
34-
35-
[assembly: KSPAssembly ("SCANmechjeb", 0, 5)]
36-
[assembly: KSPAssemblyDependency ("SCANsat", 1, 20)]
37-
[assembly: KSPAssemblyDependency("MechJeb2", 2, 5)]
21+
// ideally this should get generated from KSPBuildTools
22+
// https://github.com/KSPModdingLibs/KSPBuildTools/issues/46
23+
[assembly: KSPAssemblyDependency ("SCANsat", 21, 0)]

SCANmechjeb/SCANmechjeb.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,17 @@
55
<AssemblyName>SCANmechjeb</AssemblyName>
66
<TargetFramework>net4.8</TargetFramework>
77
</PropertyGroup>
8+
<PropertyGroup>
9+
<GenerateKSPAssemblyAttribute>true</GenerateKSPAssemblyAttribute>
10+
<GenerateKSPAssemblyDependencyAttributes>true</GenerateKSPAssemblyDependencyAttributes>
11+
</PropertyGroup>
812
<ItemGroup>
913
<Reference Include="MechJeb2">
1014
<SpecificVersion>False</SpecificVersion>
1115
<HintPath>$(KSPRoot)\GameData\MechJeb2\Plugins\MechJeb2.dll</HintPath>
1216
<Private>False</Private>
1317
<CKANIdentifier>MechJeb2</CKANIdentifier>
18+
<KSPAssemblyVersion>2.5</KSPAssemblyVersion>
1419
</Reference>
1520
</ItemGroup>
1621
<ItemGroup>

SCANsat.Unity/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,3 @@
99
[assembly: AssemblyCopyright("Copyright © 2016")]
1010
[assembly: AssemblyTrademark("")]
1111
[assembly: AssemblyCulture("")]
12-
13-
//// Setting ComVisible to false makes the types in this assembly not visible
14-
//// to COM components. If you need to access a type in this assembly from
15-
//// COM, set the ComVisible attribute to true on that type.
16-
//[assembly: ComVisible(false)]
17-
18-
//// The following GUID is for the ID of the typelib if this project is exposed to COM
19-
//[assembly: Guid("0c523d04-a52e-48bb-85b6-d75e8b7a63b9")]
20-
21-
//[assembly: AssemblyVersion("1.20.4.0")]
22-
//[assembly: AssemblyFileVersion("1.20.4.0")]

SCANsat.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="SCANsat.version.props" />
34
<PropertyGroup>
45
<BinariesOutputRelativePath>GameData/SCANsat/Plugins</BinariesOutputRelativePath>
56
</PropertyGroup>

SCANsat.sln

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,22 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 17
44
VisualStudioVersion = 17.11.35312.102
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SCANsat", "SCANsat\SCANsat.csproj", "{3AE13948-477D-4375-8AB4-B45664966D9E}"
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SCANsat", "SCANsat\SCANsat.csproj", "{3AE13948-477D-4375-8AB4-B45664966D9E}"
77
EndProject
8-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SCANmechjeb", "SCANmechjeb\SCANmechjeb.csproj", "{A2B942AF-3AB2-4A9F-9211-FFC47364128D}"
8+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SCANmechjeb", "SCANmechjeb\SCANmechjeb.csproj", "{A2B942AF-3AB2-4A9F-9211-FFC47364128D}"
99
EndProject
10-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SCANsat.Unity", "SCANsat.Unity\SCANsat.Unity.csproj", "{4ED5E40D-273A-4643-9009-04C1DD02F3E2}"
10+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SCANsat.Unity", "SCANsat.Unity\SCANsat.Unity.csproj", "{4ED5E40D-273A-4643-9009-04C1DD02F3E2}"
1111
EndProject
1212
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{63914E47-3B9A-4298-BAA4-362B47D8F105}"
1313
ProjectSection(SolutionItems) = preProject
14+
.gitignore = .gitignore
15+
CHANGELOG.md = CHANGELOG.md
16+
CONTRIBUTING.md = CONTRIBUTING.md
17+
LICENSE.txt = LICENSE.txt
1418
README.md = README.md
19+
SCANsat.props = SCANsat.props
1520
SCANsat.props.user = SCANsat.props.user
21+
SCANsat.version.props = SCANsat.version.props
1622
EndProjectSection
1723
EndProject
1824
Global

SCANsat.version.props

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<Version>21.0.0.0</Version>
5+
</PropertyGroup>
6+
</Project>

SCANsat/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,3 @@
77
[assembly: AssemblyCopyright ("Danny")]
88
[assembly: AssemblyTrademark ("")]
99
[assembly: AssemblyCulture ("")]
10-
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
11-
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
12-
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
13-
14-
// TODO: need to figure out whether to continue with 1.20.x or 20.x or what
15-
16-
//[assembly: AssemblyVersion ("1.20.4.0")]
17-
//[assembly: AssemblyFileVersion ("1.20.4.0")]
18-
//[assembly: AssemblyInformationalVersion ("v20.4")]
19-
20-
[assembly: KSPAssembly ("SCANsat", 1, 20)]
21-
22-

SCANsat/SCANsat.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
<AssemblyName>SCANsat</AssemblyName>
66
<TargetFramework>net4.8</TargetFramework>
77
</PropertyGroup>
8+
<PropertyGroup>
9+
<GenerateKSPAssemblyAttribute>true</GenerateKSPAssemblyAttribute>
10+
<GenerateKSPAssemblyDependencyAttributes>true</GenerateKSPAssemblyDependencyAttributes>
11+
</PropertyGroup>
812
<ItemGroup>
913
<PackageReference Include="KSPBuildTools" Version="0.0.3-alpha.4" />
1014
</ItemGroup>

0 commit comments

Comments
 (0)