-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Windows payload and installer projects
Add two projects for building (and signing) the Windows payload and installer (using Inno setup).
- Loading branch information
1 parent
b358326
commit 7a1fde5
Showing
22 changed files
with
287 additions
and
62 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
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
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
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,21 @@ | ||
steps: | ||
- script: | | ||
xcopy "out\windows\Installer.Windows\bin\$(configuration)\net461" "$(Build.StagingDirectory)\publish\" | ||
xcopy "out\windows\Payload.Windows\bin\$(configuration)\net461" "$(Build.StagingDirectory)\publish\payload\" | ||
mkdir "$(Build.StagingDirectory)\publish\payload.sym\" | ||
move "$(Build.StagingDirectory)\publish\payload\*.pdb" "$(Build.StagingDirectory)\publish\payload.sym\" | ||
displayName: Prepare final build artifact | ||
- task: PublishPipelineArtifact@0 | ||
displayName: Publish unsigned installer artifacts | ||
condition: and(succeeded(), ne(variables['SignType'], 'real')) | ||
inputs: | ||
artifactName: 'Installer.Windows.Unsigned' | ||
targetPath: '$(Build.StagingDirectory)\publish' | ||
|
||
- task: PublishPipelineArtifact@0 | ||
displayName: Publish signed installer artifacts | ||
condition: and(succeeded(), eq(variables['SignType'], 'real')) | ||
inputs: | ||
artifactName: 'Installer.Windows.Signed' | ||
targetPath: '$(Build.StagingDirectory)\publish' |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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,62 @@ | ||
<Project> | ||
<!-- Implicit SDK props import --> | ||
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" /> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net461</TargetFramework> | ||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo> | ||
<PayloadPath>$(PlatformOutPath)Payload.Windows\bin\$(Configuration)\$(TargetFramework)\</PayloadPath> | ||
<EnableDefaultItems>false</EnableDefaultItems> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<None Include="Setup.iss" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="../Payload.Windows/Payload.Windows.csproj" ReferenceOutputAssembly="false" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Tools.InnoSetup" Version="5.6.1" /> | ||
<PackageReference Include="MicroBuild.Core" Version="0.2.0"> | ||
<PrivateAssets>all</PrivateAssets> | ||
</PackageReference> | ||
</ItemGroup> | ||
|
||
<!-- Since the installer file name includes the generated build number from Nerdbank.GitVersioning | ||
we must create the FilesToSign item inside of a target that depends on GetBuildVersion and runs | ||
before we attempt to sign any files or validate they exist. --> | ||
<Target Name="CreateFilesToSignItems" DependsOnTargets="GetBuildVersion" BeforeTargets="PrepareForRun"> | ||
<ItemGroup> | ||
<FilesToSign Include="$(OutDir)gcmcore-windows-$(BuildVersion).exe"> | ||
<Authenticode>Microsoft</Authenticode> | ||
<InProject>false</InProject> | ||
</FilesToSign> | ||
</ItemGroup> | ||
</Target> | ||
|
||
<!-- Implicit SDK targets import (so we can override the default targets below) --> | ||
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" /> | ||
|
||
<!-- Check all the files to sign exist --> | ||
<Target Name="ValidateSigningDependencies" AfterTargets="PrepareForRun" Inputs="@(FilesToSign)" Outputs="$(OutDir)validatesign.timestamp"> | ||
<Error Text="File to sign not found: %(FilesToSign.Identity)" Condition="!Exists('%(FilesToSign.Identity)')" /> | ||
<WriteLinesToFile File="$(OutDir)validatesign.timestamp" Lines="@(FilesToSign)" Overwrite="true" /> | ||
</Target> | ||
|
||
<Target Name="CoreCompile" Condition="'$(OSPlatform)'=='windows'"> | ||
<PropertyGroup> | ||
<InnoSetupCommand>$(NuGetPackageRoot)Tools.InnoSetup\5.6.1\tools\ISCC.exe /DPayloadDir=$(PayloadPath) Setup.iss /O$(OutputPath)</InnoSetupCommand> | ||
</PropertyGroup> | ||
<Message Text="$(InnoSetupCommand)" Importance="High" /> | ||
<Exec Command="$(InnoSetupCommand)" /> | ||
</Target> | ||
|
||
<!-- We don't produce or copy any dependent files for this project --> | ||
<Target Name="CopyFilesToOutputDirectory" /> | ||
<Target Name="CoreClean"> | ||
<RemoveDir Directories="$(ProjectOutPath)" /> | ||
</Target> | ||
|
||
</Project> |
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,83 @@ | ||
; This script requires Inno Setup Compiler 5.6.1 or later to compile | ||
; The Inno Setup Compiler (and IDE) can be found at http://www.jrsoftware.org/isinfo.php | ||
; General documentation on how to use InnoSetup scripts: http://www.jrsoftware.org/ishelp/index.php | ||
|
||
; Ensure minimum Inno Setup tooling version | ||
#if VER < EncodeVer(5,6,1) | ||
#error Update your Inno Setup version (5.6.1 or newer) | ||
#endif | ||
|
||
#ifndef PayloadDir | ||
#error Payload directory path property 'PayloadDir' must be specified | ||
#endif | ||
|
||
#ifnexist PayloadDir + "\git-credential-manager.exe" | ||
#error Payload files are missing | ||
#endif | ||
|
||
; Define core properties | ||
#define GcmName "Git Credential Manager" | ||
#define GcmPublisher "Microsoft Corporation" | ||
#define GcmPublisherUrl "https://www.microsoft.com" | ||
#define GcmCopyright "Copyright (c) Microsoft 2019" | ||
#define GcmUrl "https://github.com/microsoft/Git-Credential-Manager-Core" | ||
#define GcmReadme "https://github.com/microsoft/Git-Credential-Manager-Core/blob/master/README.md" | ||
#define GcmRepoRoot "..\..\.." | ||
#define GcmAssets GcmRepoRoot + "\assets" | ||
|
||
; Generate the GCM version version from the CLI executable | ||
#define VerMajor | ||
#define VerMinor | ||
#define VerBuild | ||
#define VerRevision | ||
#expr ParseVersion(PayloadDir + "\git-credential-manager.exe", VerMajor, VerMinor, VerBuild, VerRevision) | ||
#define GcmVersion str(VerMajor) + "." + str(VerMinor) + "." + str(VerBuild) + "." + str(VerRevision) | ||
|
||
[Setup] | ||
AppId={{fdfae50a-1bc1-4ead-9228-1e1c275e8d12}} | ||
AppName={#GcmName} | ||
AppVersion={#GcmVersion} | ||
AppVerName={#GcmName} {#GcmVersion} | ||
AppPublisher={#GcmPublisher} | ||
AppPublisherURL={#GcmPublisherUrl} | ||
AppSupportURL={#GcmUrl} | ||
AppUpdatesURL={#GcmUrl} | ||
AppContact={#GcmUrl} | ||
AppCopyright={#GcmCopyright} | ||
AppReadmeFile={#GcmReadme} | ||
VersionInfoVersion={#GcmVersion} | ||
LicenseFile={#GcmRepoRoot}\LICENSE | ||
OutputBaseFilename=gcmcore-windows-{#GcmVersion} | ||
DefaultDirName={pf}\{#GcmName} | ||
DisableReadyPage=yes | ||
Compression=lzma2 | ||
SolidCompression=yes | ||
MinVersion=6.1.7600 | ||
DisableDirPage=yes | ||
ArchitecturesInstallIn64BitMode=x64 | ||
UninstallDisplayIcon={app}\git-credential-manager.exe | ||
SetupIconFile={#GcmAssets}\gcmicon.ico | ||
WizardImageFile={#GcmAssets}\gcmicon128.bmp | ||
WizardSmallImageFile={#GcmAssets}\gcmicon64.bmp | ||
WizardImageStretch=no | ||
WindowResizable=no | ||
|
||
[Languages] | ||
Name: "english"; MessagesFile: "compiler:Default.isl"; | ||
|
||
[Types] | ||
Name: "full"; Description: "Full installation"; Flags: iscustom; | ||
|
||
[Components] | ||
; TODO | ||
|
||
[Files] | ||
Source: "{#PayloadDir}\git-credential-manager.exe"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "{#PayloadDir}\GitHub.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "{#PayloadDir}\GitHub.UI.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "{#PayloadDir}\GitHub.Authentication.Helper.exe"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "{#PayloadDir}\Microsoft.Authentication.Helper.exe"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "{#PayloadDir}\Microsoft.Authentication.Helper.exe.config"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "{#PayloadDir}\Microsoft.AzureRepos.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "{#PayloadDir}\Microsoft.Git.CredentialManager.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "{#PayloadDir}\Microsoft.IdentityModel.Clients.ActiveDirectory.dll"; DestDir: "{app}"; Flags: ignoreversion |
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,69 @@ | ||
<Project> | ||
<!-- Implicit SDK props import --> | ||
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" /> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net461</TargetFramework> | ||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\shared\Git-Credential-Manager\Git-Credential-Manager.csproj" /> | ||
<ProjectReference Include="..\GitHub.Authentication.Helper.Windows\GitHub.Authentication.Helper.Windows.csproj" /> | ||
<ProjectReference Include="..\Microsoft.Authentication.Helper.Windows\Microsoft.Authentication.Helper.Windows.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="MicroBuild.Core" Version="0.2.0"> | ||
<PrivateAssets>all</PrivateAssets> | ||
</PackageReference> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<FilesToSign Include=" | ||
$(OutDir)git-credential-manager.exe; | ||
$(OutDir)GitHub.dll; | ||
$(OutDir)GitHub.UI.dll; | ||
$(OutDir)GitHub.Authentication.Helper.exe; | ||
$(OutDir)Microsoft.AzureRepos.dll; | ||
$(OutDir)Microsoft.Git.CredentialManager.dll; | ||
$(OutDir)Microsoft.Authentication.Helper.exe;"> | ||
<Authenticode>Microsoft</Authenticode> | ||
<InProject>false</InProject> | ||
</FilesToSign> | ||
</ItemGroup> | ||
|
||
<!-- Implicit SDK targets import (so we can override the default targets below) --> | ||
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" /> | ||
|
||
<!-- Check all the files to sign exist --> | ||
<Target Name="ValidateSigningDependencies" | ||
AfterTargets="PrepareForRun" | ||
Inputs="@(FilesToSign)" | ||
Outputs="$(OutDir)validatesign.timestamp"> | ||
<Error Text="File to sign not found: %(FilesToSign.Identity)" | ||
Condition="!Exists('%(FilesToSign.Identity)')" /> | ||
<WriteLinesToFile File="$(OutDir)validatesign.timestamp" | ||
Lines="@(FilesToSign)" | ||
Overwrite="true" /> | ||
</Target> | ||
|
||
<!-- We don't want to produce a binary with this project --> | ||
<Target Name="CoreCompile" /> | ||
|
||
<!-- We only want to copy the dependent projects' outputs; no binary is produced for this project --> | ||
<Target Name="CopyFilesToOutputDirectory" | ||
DependsOnTargets=" | ||
ComputeIntermediateSatelliteAssemblies; | ||
_CopyFilesMarkedCopyLocal; | ||
_CopySourceItemsToOutputDirectory; | ||
_CopyAppConfigFile; | ||
_CopyManifestFiles; | ||
_CheckForCompileOutputs; | ||
_SGenCheckForOutputs" /> | ||
|
||
<Target Name="CoreClean"> | ||
<RemoveDir Directories="$(ProjectOutPath)" /> | ||
</Target> | ||
|
||
</Project> |
Oops, something went wrong.
[{"description":"treehash per file","signed_content":{"payload":"eyJjb250ZW50X2hhc2hlcyI6W3siYmxvY2tfc2l6ZSI6NDA5NiwiZGlnZXN0Ijoic2hhMjU2IiwiZmlsZXMiOlt7InBhdGgiOiJMSUNFTlNFIiwicm9vdF9oYXNoIjoicjdVVTVDYVZsQ05MTXNoenVpelR6SWlTNkRhR0VUZTFNYVFLRWpLQ0RGayJ9LHsicGF0aCI6Il9wbGF0Zm9ybV9zcGVjaWZpYy93aW5feDY0L3dpZGV2aW5lY2RtLmRsbCIsInJvb3RfaGFzaCI6IkVqY3NqTklldnFmakwzWThRUGc2ZDZRT1JnX19ndGhqYXY4ZVM2SW1XdkUifSx7InBhdGgiOiJfcGxhdGZvcm1fc3BlY2lmaWMvd2luX3g2NC93aWRldmluZWNkbS5kbGwuc2lnIiwicm9vdF9oYXNoIjoiYS1nSjBXNEpSRGh1UmM5Z1hxNE0wczlHOFJIUnB2NlpuLXlCUFN3M2hvTSJ9LHsicGF0aCI6Im1hbmlmZXN0Lmpzb24iLCJyb290X2hhc2giOiJhS1BYeXhEekFCOUF2Rmc3Zl84Qmc0bGFZZE85RzNvY05PWUMzMjhQaUFZIn1dLCJmb3JtYXQiOiJ0cmVlaGFzaCIsImhhc2hfYmxvY2tfc2l6ZSI6NDA5Nn1dLCJpdGVtX2lkIjoib2ltb21wZWNhZ25hamRlamdubmppam9iZWJhZWlnZWsiLCJpdGVtX3ZlcnNpb24iOiI0LjEwLjI3MTAuMCIsInByb3RvY29sX3ZlcnNpb24iOjF9","signatures":[{"header":{"kid":"publisher"},"protected":"eyJhbGciOiJSUzI1NiJ9","signature":"FUvdiI064SKMGXa9MTsd7hg2J2Xta-5dpOztcsWhp9N0zZmzgMTKfX6exBp47NdEEjkEqjsXbHwk9gMdaUQKqwnMl3Ypz409AFSayAD_dVWeZlBt2sht1IjKHiScdFru19CRlCOKPnQM6RHfGCUcI9qEZ4CRjXpnWUFsQSAXWTY"},{"header":{"kid":"webstore"},"protected":"eyJhbGciOiJSUzI1NiJ9","signature":"g8wUECoEuO6yA0gH9cQnbF9LeZ8ole9B4p7T44oNBkSyVlfrEsy4S-HD6Sl3c-pqMbl1Uc8Wl5o5P5s04d58qJQOe9o3MO3pxm_G9n81BWEc9UcuLimQd17WbtWwPOjd2o37dSr5-fA84MpOKdhFEQvvtxkg0Wjpzj78GYtPxqNFUFVeeJUk_sm-Y_OINt9CAvpsU2Ocq18S6JSYtCawXMh4iSvM9nXnDNJUkOOHV2pj2GdwIrYeJyd-KfVm-SGsoX0wwSyjmF5S0Woy6TmRx6ST7e9Kku63MT2HNJMkDpWr-GQJouxffeyTH7NpGVZ58-pG-jOeGpcLTd9hqRqtWA"}]}}