Skip to content

Commit 63dc7a1

Browse files
committed
Added basic build project
1 parent 5a6811d commit 63dc7a1

File tree

4 files changed

+71
-7
lines changed

4 files changed

+71
-7
lines changed

src/symphony-core/Build.proj

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Go" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildProjectDirectory)\Build.tasks" />
4+
<PropertyGroup>
5+
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
6+
<Platform Condition="'$(Platform)' == ''">x64</Platform>
7+
<SolutionRoot>$(MSBuildProjectDirectory)</SolutionRoot>
8+
</PropertyGroup>
9+
10+
<ItemGroup>
11+
<RegexTransform Include="$(SolutionRoot)\CommonAssemblyInfo.cs">
12+
<Find>(?&lt;major&gt;\d+)\.(?&lt;minor&gt;\d+)\.(?&lt;patch&gt;\d+)\.(?&lt;rev&gt;\d+)</Find>
13+
<ReplaceWith>$(SYMPHONY_VERSION)</ReplaceWith>
14+
</RegexTransform>
15+
</ItemGroup>
16+
17+
<Target Name="Go" DependsOnTargets="UpdateAssemblyVersion; Build">
18+
</Target>
19+
20+
<Target Name="UpdateAssemblyVersion" Condition="'$(SYMPHONY_VERSION)' != ''">
21+
<RegexTransform Items="@(RegexTransform)" />
22+
</Target>
23+
24+
<Target Name="Build">
25+
<MSBuild Projects="$(SolutionRoot)\symphony-core.sln" Targets="Build" />
26+
</Target>
27+
28+
</Project>

src/symphony-core/Build.tasks

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Go" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<UsingTask TaskName="RegexTransform" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
4+
<ParameterGroup>
5+
<Items ParameterType="Microsoft.Build.Framework.ITaskItem[]" />
6+
</ParameterGroup>
7+
<Task>
8+
<Using Namespace="System.IO" />
9+
<Using Namespace="System.Text.RegularExpressions" />
10+
<Using Namespace="Microsoft.Build.Framework" />
11+
<Code Type="Fragment" Language="cs">
12+
<![CDATA[
13+
foreach(ITaskItem item in Items) {
14+
string fileName = item.GetMetadata("FullPath");
15+
string find = item.GetMetadata("Find");
16+
string replaceWith = item.GetMetadata("ReplaceWith");
17+
18+
if(!File.Exists(fileName)) {
19+
Log.LogError(null, null, null, null, 0, 0, 0, 0, String.Format("Could not find version file: {0}", fileName), new object[0]);
20+
}
21+
string content = File.ReadAllText(fileName);
22+
File.WriteAllText(
23+
fileName,
24+
Regex.Replace(
25+
content,
26+
find,
27+
replaceWith
28+
)
29+
);
30+
}
31+
]]>
32+
</Code>
33+
</Task>
34+
</UsingTask>
35+
</Project>
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
using System.Reflection;
22
using System.Runtime.InteropServices;
33

4-
// General Information about an assembly is controlled through the following
4+
// General Information about an assembly is controlled through the following
55
// set of attributes. Change these attribute values to modify the information
66
// associated with an assembly.
77
[assembly: AssemblyCompany("Symphony DAS")]
88
[assembly: AssemblyProduct("Symphony")]
9-
[assembly: AssemblyCopyright("Copyright 2014")]
9+
[assembly: AssemblyCopyright("Copyright 2015")]
1010
[assembly: AssemblyConfiguration("")]
1111
[assembly: AssemblyTrademark("")]
1212

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
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
1515
// COM, set the ComVisible attribute to true on that type.
1616
[assembly: ComVisible(false)]
1717

1818
// Version information for an assembly consists of the following four values:
1919
//
2020
// Major Version
21-
// Minor Version
21+
// Minor Version
2222
// Build Number
2323
// Revision
2424
//
25-
// You can specify all the values or you can default the Build and Revision Numbers
25+
// You can specify all the values or you can default the Build and Revision Numbers
2626
// by using the '*' as shown below:
2727
// [assembly: AssemblyVersion("1.0.*")]
28-
[assembly: AssemblyVersion("0.0.0")]
28+
[assembly: AssemblyVersion("2.0.1.1")]

src/symphony-core/HDF5/HDF5.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
<ErrorReport>prompt</ErrorReport>
5454
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
5555
<Prefer32Bit>false</Prefer32Bit>
56+
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
5657
</PropertyGroup>
5758
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
5859
<DebugSymbols>true</DebugSymbols>

0 commit comments

Comments
 (0)