Initial commit
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+43
@@ -0,0 +1,43 @@
|
||||
NAME
|
||||
electron-windows-sign -- code signing for Electron apps on Windows.
|
||||
|
||||
SYNOPSIS
|
||||
electron-windows-sign app [options ...]
|
||||
|
||||
DESCRIPTION
|
||||
app
|
||||
Path to the application to sign. It must be a directory.
|
||||
|
||||
certificate-file
|
||||
Path to the certificate file (.pfx) to use for signing.
|
||||
|
||||
certificate-password
|
||||
Password to use for the certificate.
|
||||
|
||||
sign-tool-path
|
||||
Path to the signtool.exe binary. If not specified, the tool will attempt
|
||||
use a built-in version.
|
||||
|
||||
timestamp-server
|
||||
URL of the timestamp server to use. If not specified, the tool will
|
||||
attempt to use a built-in server (http://timestamp.digicert.com)
|
||||
|
||||
description
|
||||
Description to use for the signed files. Passed as /d to signtool.exe.
|
||||
|
||||
website
|
||||
URL of the website to use for the signed files. Passed as /du to
|
||||
signtool.exe.
|
||||
|
||||
sign-with-params
|
||||
Additional parameters to pass to signtool.exe. This can be used to
|
||||
specify additional certificates to use for cross-signing.
|
||||
|
||||
automatically-select-certificate
|
||||
Automatically select the best certificate to use for signing. On by default.
|
||||
|
||||
help
|
||||
Print this usage information.
|
||||
|
||||
debug
|
||||
Print additional debug information.
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const args = require('minimist')(process.argv.slice(2), {
|
||||
string: [
|
||||
'certificate-file',
|
||||
'certificate-password',
|
||||
'sign-tool-path',
|
||||
'timestamp-server',
|
||||
'description',
|
||||
'website',
|
||||
'sign-with-params'
|
||||
],
|
||||
boolean: [
|
||||
'help',
|
||||
'debug'
|
||||
],
|
||||
default: {
|
||||
'automatically-select-certificate': true
|
||||
}
|
||||
});
|
||||
const usage = fs.readFileSync(path.join(__dirname, 'electron-windows-sign-usage.txt')).toString();
|
||||
const sign = require('../').sign;
|
||||
|
||||
args.app = args._.shift();
|
||||
|
||||
if (!args.app || args.help) {
|
||||
console.log(usage);
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
// Remove excess arguments
|
||||
delete args._;
|
||||
delete args.help;
|
||||
|
||||
sign(args, function done(err) {
|
||||
if (err) {
|
||||
console.error('Sign failed:');
|
||||
if (err.message) console.error(err.message);
|
||||
else if (err.stack) console.error(err.stack);
|
||||
else console.log(err);
|
||||
process.exit(1);
|
||||
}
|
||||
console.log('Application signed:', args.app);
|
||||
process.exit(0);
|
||||
});
|
||||
Reference in New Issue
Block a user