-
Notifications
You must be signed in to change notification settings - Fork 2
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
1 changed file
with
34 additions
and
0 deletions.
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
Param( | ||
[string]$Version = "0.0.1", | ||
[string]$Cert = "cb9a86724771546a51851651d18e811a72f6e133" | ||
) | ||
|
||
$ErrorActionPreference='Stop' | ||
rm -r -force O -EA:Ignore | ||
|
||
### This must be run from the EWDK environment. | ||
### It expects that you gave SDK 10.0.22000.0 available. | ||
msbuild .\FrameworkWindowsUtils.sln ` | ||
/p:Platform=x64`;Configuration=Release ` | ||
/p:OutDir=$PWD\O ` | ||
/p:TestCertificate=$Cert ` | ||
/m | ||
If ($LASTEXITCODE -Ne 0) { throw "Failed to Build" } | ||
|
||
$BaseName="CrosEC-${Version}-$(git describe --always --abbrev)" | ||
$Archive="${BaseName}.zip" | ||
$DistDir="_dist\$BaseName" | ||
|
||
rm -r -force _dist -EA:Ignore | ||
mkdir $DistDir | out-null | ||
mkdir "$DistDir\debug" | out-null | ||
cp O\*.exe $DistDir | ||
cp O\*.pdb "$DistDir\debug" | ||
cp O\CrosEC\* $DistDir | ||
|
||
signtool sign /sha1 $Cert /fd SHA256 /t http://timestamp.digicert.com (Get-Item $DistDir\*.exe | Select -Expand FullName) | ||
If ($LASTEXITCODE -Ne 0) { throw "Failed to Sign" } | ||
|
||
rm -force $Archive -EA:Ignore | ||
tar -c --format zip --strip-components=1 -f $Archive _dist | ||
If ($LASTEXITCODE -Ne 0) { throw "Failed to Archive" } |