-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some rough improvements to codesign logic
- Loading branch information
Showing
5 changed files
with
52 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,23 @@ | ||
# Thanks https://github.com/electron-userland/electron-builder/issues/3629#issuecomment-473238513 | ||
Set-PSDebug -Trace 1 | ||
# Set-PSDebug -Trace 1 | ||
$ErrorActionPreference = "Stop" | ||
# dir cert:/LocalMachine | ||
|
||
dir cert:/LocalMachine | ||
# $WINDOWS_SDK_VER = '10.0.17763.0' | ||
$WINDOWS_SDK_VER = '10.0.22000.0' | ||
|
||
$Password = ConvertTo-SecureString -String $Env:WIN_CSC_KEY_PASSWORD -AsPlainText -Force | ||
Import-PfxCertificate -FilePath cert.pfx -CertStoreLocation Cert:\LocalMachine\My -Password $Password | ||
Start-Process -NoNewWindow -Wait 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' -ArgumentList "sign -v -sm -s My -n `"$Env:WIN_CSC_SUBJECTNAME`" -d `"$Env:WIN_CSC_DESC`" `"$Env:WIN_INSTALLER_PATH`"" | ||
# Remember what the Path was before so we can clean it up after exiting | ||
$PREV_PATH = $env:PATH | ||
|
||
$env:PATH += ";C:/Program Files (x86)/Windows Kits/10/bin/$WINDOWS_SDK_VER/x64/" | ||
|
||
# $Password = ConvertTo-SecureString -String $Env:WIN_CSC_KEY_PASSWORD -AsPlainText -Force | ||
# Import-PfxCertificate -FilePath cert.pfx -CertStoreLocation Cert:\LocalMachine\My -Password $Password | ||
|
||
# Passing in $args allows the caller to specify multiple files to be signed at once | ||
signtool.exe sign /tr $env:TimestampServer /td sha256 /fd sha256 /n $Env:WIN_CSC_SUBJECTNAME $args | ||
signtool.exe verify /pa $args | ||
# Start-Process -NoNewWindow -Wait 'signtool.exe' -ArgumentList "sign /tr `"$env:TimestampServer`" /td sha256 /fd sha256 /n `"$Env:WIN_CSC_SUBJECTNAME`" `"$File`"" | ||
# Start-Process -NoNewWindow -Wait 'signtool.exe' -ArgumentList "verify /pa `"$File`"" | ||
|
||
$env:PATH = $PREV_PATH |
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,23 @@ | ||
# Thanks https://github.com/electron-userland/electron-builder/issues/3629#issuecomment-473238513 | ||
if [ $RUNNER_OS = Windows ]; then | ||
set -e | ||
|
||
|
||
# curl -v -L "$WIN_CSC_LINK" --output cert.pfx | ||
|
||
# powershell Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope LocalMachine | ||
# powershell Get-ExecutionPolicy -List | ||
|
||
ROOT_DIR=${GITHUB_WORKSPACE:-.} | ||
ARTIFACT_FOLDER=$ROOT_DIR/target/release-artifacts | ||
|
||
powershell $ROOT_DIR/ci/codesign.ps1 $ARTIFACT_FOLDER/wooting_analog_sdk.dll $ARTIFACT_FOLDER/wooting_analog_plugin.dll $ARTIFACT_FOLDER/wooting_analog_wrapper.dll $ARTIFACT_FOLDER/wooting-analog-sdk-updater.exe $ARTIFACT_FOLDER/wooting_analog_test_plugin.dll $ARTIFACT_FOLDER/wooting-analog-virtual-control.exe | ||
|
||
# powershell $ROOT_DIR/ci/codesign.ps1 $ARTIFACT_FOLDER/wooting_analog_sdk.dll | ||
# powershell $ROOT_DIR/ci/codesign.ps1 $ARTIFACT_FOLDER/wooting_analog_plugin.dll | ||
# powershell $ROOT_DIR/ci/codesign.ps1 $ARTIFACT_FOLDER/wooting_analog_wrapper.dll | ||
# powershell $ROOT_DIR/ci/codesign.ps1 $ARTIFACT_FOLDER/wooting-analog-sdk-updater.exe | ||
|
||
# powershell $ROOT_DIR/ci/codesign.ps1 $ARTIFACT_FOLDER/wooting_analog_test_plugin.dll | ||
# powershell $ROOT_DIR/ci/codesign.ps1 $ARTIFACT_FOLDER/wooting-analog-virtual-control.exe | ||
fi |
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