Skip to content

Commit aa9fa1f

Browse files
committed
Adding build file. Changing version prior to first release.
1 parent 1af82a4 commit aa9fa1f

File tree

3 files changed

+61
-24
lines changed

3 files changed

+61
-24
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
*.nuget.targets
44
bin/
55
obj/
6+
out/
67
*.suo
78
*.user
89
*.vs/
Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,16 @@
11
using System.Reflection;
2-
using System.Runtime.CompilerServices;
32
using System.Runtime.InteropServices;
43

5-
// General Information about an assembly is controlled through the following
6-
// set of attributes. Change these attribute values to modify the information
7-
// associated with an assembly.
84
[assembly: AssemblyTitle("AuthenticodeLint")]
95
[assembly: AssemblyDescription("")]
106
[assembly: AssemblyConfiguration("")]
11-
[assembly: AssemblyCompany("")]
7+
[assembly: AssemblyCompany("Kevin Jones")]
128
[assembly: AssemblyProduct("AuthenticodeLint")]
13-
[assembly: AssemblyCopyright("Copyright © 2016")]
9+
[assembly: AssemblyCopyright("Copyright © Kevin Jones 2016")]
1410
[assembly: AssemblyTrademark("")]
1511
[assembly: AssemblyCulture("")]
16-
17-
// Setting ComVisible to false makes the types in this assembly not visible
18-
// to COM components. If you need to access a type in this assembly from
19-
// COM, set the ComVisible attribute to true on that type.
2012
[assembly: ComVisible(false)]
21-
22-
// The following GUID is for the ID of the typelib if this project is exposed to COM
2313
[assembly: Guid("ff77faed-3274-4c0e-bda0-98d8a5fa831e")]
2414

25-
// Version information for an assembly consists of the following four values:
26-
//
27-
// Major Version
28-
// Minor Version
29-
// Build Number
30-
// Revision
31-
//
32-
// You can specify all the values or you can default the Build and Revision Numbers
33-
// by using the '*' as shown below:
34-
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.0.0.0")]
36-
[assembly: AssemblyFileVersion("1.0.0.0")]
15+
[assembly: AssemblyVersion("0.2.0.0")]
16+
[assembly: AssemblyFileVersion("0.2.0.0")]

build/build.proj

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<ProductName>Authenticode Lint</ProductName>
5+
<ProductUrl>https://vcsjones.com/authlint</ProductUrl>
6+
<ProductCompanyName>Kevin Jones</ProductCompanyName>
7+
</PropertyGroup>
8+
<PropertyGroup>
9+
<OutputDir>$(MSBuildThisFileDirectory)..\out\</OutputDir>
10+
<OutZip>$(OutputDir)AuthenticodeLint.zip</OutZip>
11+
</PropertyGroup>
12+
<Target Name="Build" DependsOnTargets="Clean">
13+
<ItemGroup>
14+
<AuthenticodeLintSolution Include="$(MSBuildThisFileDirectory)..\AuthenticodeLint\AuthenticodeLint.csproj">
15+
<Properties>OutputPath=$(OutputDir);Configuration=Release</Properties>
16+
</AuthenticodeLintSolution>
17+
</ItemGroup>
18+
<MSBuild Targets="Rebuild" Projects="@(AuthenticodeLintSolution)">
19+
<Output ItemName="ProjectOutputs" TaskParameter="TargetOutputs"/>
20+
</MSBuild>
21+
</Target>
22+
<Target Name="Sign" DependsOnTargets="Build">
23+
<Exec Command="signtool.exe sign /d &quot;$(ProductName)&quot; /du $(ProductUrl) /n &quot;$(ProductCompanyName)&quot; /t http://timestamp.digicert.com /fd SHA1 &quot;@(ProjectOutputs)&quot;" />
24+
<Exec Command="signtool.exe sign /as /d &quot;$(ProductName)&quot; /du $(ProductUrl) /n &quot;$(ProductCompanyName)&quot; /tr http://timestamp.digicert.com /fd SHA256 /td SHA256 &quot;@(ProjectOutputs)&quot;" />
25+
<!-- Run tool on itself -->
26+
<Exec Command="&quot;@(ProjectOutputs)&quot; -in &quot;@(ProjectOutputs)&quot;" />
27+
</Target>
28+
<Target Name="Package" DependsOnTargets="Sign">
29+
<Zip InputDirectory="$(OutputDir)" OutputFile="$(OutZip)" />
30+
</Target>
31+
<Target Name="Clean">
32+
<RemoveDir Directories="$(OutputDir)" Condition="Exists($(OutputDir))" />
33+
</Target>
34+
35+
<UsingTask
36+
TaskName="Zip"
37+
TaskFactory="CodeTaskFactory"
38+
AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
39+
<ParameterGroup>
40+
<InputDirectory ParameterType="System.String" Required="true" />
41+
<OutputFile ParameterType="System.String" Required="true" />
42+
</ParameterGroup>
43+
<Task>
44+
<Reference Include="System.IO.Compression.FileSystem" />
45+
<Using Namespace="System.IO" />
46+
<Using Namespace="System.IO.Compression" />
47+
<Code Type="Fragment" Language="cs">
48+
<![CDATA[
49+
var path = Path.Combine(Path.GetTempPath(), System.Guid.NewGuid().ToString("D") + ".zip");
50+
ZipFile.CreateFromDirectory(InputDirectory, path);
51+
File.Move(path, OutputFile);
52+
]]>
53+
</Code>
54+
</Task>
55+
</UsingTask>
56+
</Project>

0 commit comments

Comments
 (0)