code sign?

This commit is contained in:
Genteure 2018-04-14 09:10:03 +08:00
parent e6d78ed3a7
commit 14fda49bbd
8 changed files with 33 additions and 4 deletions

View File

@ -63,7 +63,7 @@
<StartupObject>BililiveRecorder.WPF.App</StartupObject> <StartupObject>BililiveRecorder.WPF.App</StartupObject>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<SignManifests>false</SignManifests> <SignManifests>true</SignManifests>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<GenerateManifests>true</GenerateManifests> <GenerateManifests>true</GenerateManifests>
@ -71,6 +71,18 @@
<PropertyGroup> <PropertyGroup>
<ApplicationIcon>ico.ico</ApplicationIcon> <ApplicationIcon>ico.ico</ApplicationIcon>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<SignAssembly>false</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<ManifestCertificateThumbprint>9097810D08593788E799F3C1DBFDDEF603D37940</ManifestCertificateThumbprint>
</PropertyGroup>
<PropertyGroup>
<ManifestKeyFile>rixCloud2Genteure.pfx</ManifestKeyFile>
</PropertyGroup>
<PropertyGroup>
<ManifestTimestampUrl>http://timestamp.comodoca.com/?td=sha256</ManifestTimestampUrl>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Microsoft.WindowsAPICodePack, Version=1.1.2.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Microsoft.WindowsAPICodePack, Version=1.1.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\WindowsAPICodePack-Core.1.1.2\lib\Microsoft.WindowsAPICodePack.dll</HintPath> <HintPath>..\packages\WindowsAPICodePack-Core.1.1.2\lib\Microsoft.WindowsAPICodePack.dll</HintPath>
@ -164,6 +176,7 @@
<LastGenOutput>Resources.Designer.cs</LastGenOutput> <LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource> </EmbeddedResource>
<None Include="BuildInfo.txt" /> <None Include="BuildInfo.txt" />
<None Include="rixCloud2Genteure.pfx" />
<Resource Include="ico.ico" /> <Resource Include="ico.ico" />
<Content Include="NLog.config"> <Content Include="NLog.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
@ -193,7 +206,7 @@
<ItemGroup> <ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.6.2"> <BootstrapperPackage Include=".NETFramework,Version=v4.6.2">
<Visible>False</Visible> <Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.6.2 %28x86 and x64%29</ProductName> <ProductName>Microsoft .NET Framework 4.6.2 %28x86 x64%29</ProductName>
<Install>true</Install> <Install>true</Install>
</BootstrapperPackage> </BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">

1
CI/VsDevCmd.ps1 Normal file
View File

@ -0,0 +1 @@
Invoke-BatchFile "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat"

View File

@ -1,5 +1,8 @@
if ($env:BILILIVERECORDER_RELEASE.ToLower() -eq "true") if ($env:BILILIVERECORDER_RELEASE.ToLower() -eq "true")
{ {
Unprotect-File './CI/rixCloud2Genteure.pfx.AES' -KeyAsPlainText "$env:codesignaes"
Copy-Item .\CI\rixCloud2Genteure.pfx .\BililiveRecorder.WPF\
msbuild /t:Publish /verbosity:minimal /p:Configuration=Release /p:ApplicationVersion="$env:p_version" /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" msbuild /t:Publish /verbosity:minimal /p:Configuration=Release /p:ApplicationVersion="$env:p_version" /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
$host.SetShouldExit($LastExitCode) $host.SetShouldExit($LastExitCode)
} }

View File

@ -1,6 +1,6 @@
if ($env:BILILIVERECORDER_RELEASE) if ($env:BILILIVERECORDER_RELEASE)
{ {
./CI/do_codesign.ps1 # ./CI/do_codesign.ps1
./CI/push_clickonce.ps1 ./CI/push_clickonce.ps1
./CI/push_master.ps1 ./CI/push_master.ps1
} }

View File

@ -1 +1,2 @@
Write-Host "do_codesign.ps1: TODO" Unprotect-File './CI/rixCloud2Genteure.pfx.AES' -KeyAsPlainText "$env:codesignaes"
Copy-Item .\CI\rixCloud2Genteure.pfx .\BililiveRecorder.WPF\

View File

@ -1,4 +1,7 @@
if ($env:APPVEYOR) { if ($env:APPVEYOR) {
Rename-Item .\BililiveRecorder.WPF\bin\Release\app.publish\setup.exe B站录播姬安装.exe
git clone --quiet --depth 1 https://github.com/Bililive/soft.danmuji.org.git C:\projects\site git clone --quiet --depth 1 https://github.com/Bililive/soft.danmuji.org.git C:\projects\site
Get-ChildItem -Path .\BililiveRecorder.WPF\bin\Release\app.publish | Copy-Item -Destination C:\projects\site\BililiveRecorder -Recurse -Container Get-ChildItem -Path .\BililiveRecorder.WPF\bin\Release\app.publish | Copy-Item -Destination C:\projects\site\BililiveRecorder -Recurse -Container
git --git-dir=C:\projects\site\.git\ --work-tree=C:\projects\site\ add -A git --git-dir=C:\projects\site\.git\ --work-tree=C:\projects\site\ add -A

Binary file not shown.

8
CI/test.ps1 Normal file
View File

@ -0,0 +1,8 @@
if ($env:BILILIVERECORDER_RELEASE.ToLower() -eq "true")
{
Write-Host "test"
}
else
{
Write-Host "Not a new release, skipping msbuild /t:Publish"
}