-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
58 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -286,3 +286,6 @@ __pycache__/ | |
*.btm.cs | ||
*.odx.cs | ||
*.xsd.cs | ||
|
||
# Build | ||
out/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<ProductName>AzureSignTool</ProductName> | ||
<ProductUrl>https://vcsjones.com/azuresigntool</ProductUrl> | ||
<ProductCompanyName>Kevin Jones</ProductCompanyName> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<OutputDir>$(MSBuildThisFileDirectory)..\out\</OutputDir> | ||
<OutZip>$(OutputDir)AzureSignTool.zip</OutZip> | ||
</PropertyGroup> | ||
<Target Name="Build" DependsOnTargets="Clean"> | ||
<ItemGroup> | ||
<AzureSignToolSolution Include="$(MSBuildThisFileDirectory)..\AzureSignTool\AzureSignTool.csproj"> | ||
<Properties>OutputPath=$(OutputDir);Configuration=Release</Properties> | ||
</AzureSignToolSolution> | ||
</ItemGroup> | ||
<MSBuild Targets="Rebuild" Projects="@(AzureSignToolSolution)"> | ||
<Output ItemName="ProjectOutputs" TaskParameter="TargetOutputs"/> | ||
</MSBuild> | ||
</Target> | ||
<Target Name="Sign" DependsOnTargets="Build"> | ||
<Exec Command="signtool.exe sign /sha1 f6672884bad63d294eacaebec3c2a619e7b72b68 /nosealwarn /d "$(ProductName)" /du $(ProductUrl) /n "$(ProductCompanyName)" /itos /ph /tr http://timestamp.digicert.com /fd SHA256 /td SHA256 "$(OutputDir)\AzureSignTool.exe"" /> | ||
<Exec Command="signtool.exe sign /sha1 f6672884bad63d294eacaebec3c2a619e7b72b68 /seal /tseal http://timestamp.digicert.com /td SHA256 "$(OutputDir)\AzureSignTool.exe"" /> | ||
</Target> | ||
<Target Name="Package" DependsOnTargets="Sign"> | ||
<Zip InputDirectory="$(OutputDir)" OutputFile="$(OutZip)" /> | ||
</Target> | ||
<Target Name="Clean"> | ||
<RemoveDir Directories="$(OutputDir)" Condition="Exists($(OutputDir))" /> | ||
</Target> | ||
|
||
<UsingTask | ||
TaskName="Zip" | ||
TaskFactory="CodeTaskFactory" | ||
AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll"> | ||
<ParameterGroup> | ||
<InputDirectory ParameterType="System.String" Required="true" /> | ||
<OutputFile ParameterType="System.String" Required="true" /> | ||
</ParameterGroup> | ||
<Task> | ||
<Reference Include="System.IO.Compression.FileSystem" /> | ||
<Using Namespace="System.IO" /> | ||
<Using Namespace="System.IO.Compression" /> | ||
<Code Type="Fragment" Language="cs"> | ||
<![CDATA[ | ||
var path = Path.Combine(Path.GetTempPath(), System.Guid.NewGuid().ToString("D") + ".zip"); | ||
ZipFile.CreateFromDirectory(InputDirectory, path); | ||
File.Move(path, OutputFile); | ||
]]> | ||
</Code> | ||
</Task> | ||
</UsingTask> | ||
</Project> |