Skip to content

Commit 08ca66c

Browse files
committed
Merge branch 'master' into develop
2 parents ff452b9 + b93b6b4 commit 08ca66c

3 files changed

Lines changed: 9 additions & 21 deletions

File tree

‎electron_app/riot.im/env.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export OSSLSIGNCODE_SIGNARGS='-pkcs11module /Library/Frameworks/eToken.framework/Versions/Current/libeToken.dylib -pkcs11engine /usr/local/lib/engines/engine_pkcs11.so -certs electron_app/riot.im/New_Vector_Ltd.pem -key 0a3271cbc1ec0fd8afb37f6bbe0cd65ba08d3b4d -t http://timestamp.comodoca.com -h sha256 -verbose'
1+
export OSSLSIGNCODE_SIGNARGS='-pkcs11module /Library/Frameworks/eToken.framework/Versions/Current/libeToken.dylib -pkcs11engine /usr/local/lib/engines/engine_pkcs11.so -certs electron_app/riot.im/New_Vector_Ltd.pem -key 0a3271cbc1ec0fd8afb37f6bbe0cd65ba08d3b4d -t http://timestamp.comodoca.com -verbose'

‎scripts/electron-package.sh‎

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -131,19 +131,18 @@ pubdir="$projdir/electron_app/pub"
131131
rm -r "$pubdir" || true
132132
mkdir -p "$pubdir"
133133
rm -r "$projdir/electron_app/dist" || true
134-
mkdir -p "$projdir/electron_app/dist/unsigned/"
134+
mkdir -p "$projdir/electron_app/dist"
135135

136136
# Install packages: what the user downloads the first time,
137137
# (DMGs for mac, exe installer for windows)
138138
mkdir -p "$pubdir/install/macos"
139139
cp $distdir/*.dmg "$pubdir/install/macos/"
140140

141-
# Windows installers need signing, this comes later
142141
mkdir -p "$pubdir/install/win32/ia32/"
143-
mkdir -p "$projdir/electron_app/dist/unsigned/ia32/"
142+
cp $distdir/squirrel-windows-ia32/*.exe "$pubdir/install/win32/ia32/"
144143

145144
mkdir -p "$pubdir/install/win32/x64/"
146-
mkdir -p "$projdir/electron_app/dist/unsigned/x64/"
145+
cp $distdir/squirrel-windows/*.exe "$pubdir/install/win32/x64/"
147146

148147
# Packages for auto-update
149148
mkdir -p "$pubdir/update/macos"
@@ -165,20 +164,6 @@ cp $distdir/squirrel-windows/RELEASES "$pubdir/update/win32/x64/"
165164
# longer appears to work).
166165
cp $distdir/*_amd64.deb "$projdir/electron_app/dist/"
167166

168-
# Now we sign the windows installer executables (as opposed to the main binary which
169-
# is signed in the electron afteSign hook)
170-
echo "Signing Windows installers..."
171-
172-
exe32=( "$distdir"/squirrel-windows-ia32/*.exe )
173-
basename32=`basename "$exe32"`
174-
osslsigncode sign $OSSLSIGNCODE_SIGNARGS -pass "$token_password" -in "$exe32" -out "$projdir/electron_app/pub/install/win32/ia32/$basename32"
175-
176-
exe64=( "$distdir"/squirrel-windows/*.exe )
177-
basename64=`basename "$exe64"`
178-
osslsigncode sign $OSSLSIGNCODE_SIGNARGS -pass "$token_password" -in "$exe64" -out "$projdir/electron_app/pub/install/win32/x64/$basename64"
179-
180-
echo "Installers signed"
181-
182167
rm -rf "$builddir"
183168

184169
echo "$pubdir can now be hosted on your web server."

‎scripts/electron_winSign.js‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,22 @@ exports.default = async function(options) {
3636
'tmp_' + Math.random().toString(36).substring(2, 15) + '.exe',
3737
);
3838
const args = [
39-
'-hash', options.hash,
39+
'-h', options.hash,
4040
'-pass', tokenPassphrase,
4141
'-in', inPath,
4242
'-out', tmpFile,
4343
];
4444
if (options.isNest) args.push('-nest');
4545
cmdLine += shellescape(args);
4646

47+
let signStdout;
4748
const signproc = exec(cmdLine, {}, (error, stdout) => {
48-
console.log(stdout);
49+
signStdout = stdout;
4950
});
5051
signproc.on('exit', (code) => {
5152
if (code !== 0) {
53+
console.log("Running", cmdLine);
54+
console.log(signStdout);
5255
console.error("osslsigncode failed with code " + code);
5356
reject("osslsigncode failed with code " + code);
5457
return;

0 commit comments

Comments
 (0)