mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-23 09:08:32 +02:00
Absolute signtool path
This commit is contained in:
@@ -5,6 +5,9 @@ const pluginRuntimeDir = path.join(__dirname, '..');
|
|||||||
const destDir = path.join(__dirname, '..', '..', 'src-tauri', 'vendored', 'plugin-runtime');
|
const destDir = path.join(__dirname, '..', '..', 'src-tauri', 'vendored', 'plugin-runtime');
|
||||||
const blobPath = path.join(pluginRuntimeDir, 'yaak-plugins.blob');
|
const blobPath = path.join(pluginRuntimeDir, 'yaak-plugins.blob');
|
||||||
|
|
||||||
|
const WIN_SIGNTOOL = 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe';
|
||||||
|
|
||||||
|
|
||||||
const DST_BIN_MAP = {
|
const DST_BIN_MAP = {
|
||||||
darwin_arm64: 'yaakplugins-aarch64-apple-darwin',
|
darwin_arm64: 'yaakplugins-aarch64-apple-darwin',
|
||||||
darwin_x64: 'yaakplugins-x86_64-apple-darwin',
|
darwin_x64: 'yaakplugins-x86_64-apple-darwin',
|
||||||
@@ -30,7 +33,7 @@ chmodSync(tmpNodePath, 0o755);
|
|||||||
console.log('Removing Node.js code signature');
|
console.log('Removing Node.js code signature');
|
||||||
try {
|
try {
|
||||||
if (process.platform === 'darwin') execSync(`codesign --remove-signature ${tmpNodePath}`);
|
if (process.platform === 'darwin') execSync(`codesign --remove-signature ${tmpNodePath}`);
|
||||||
else if (process.platform === 'win32') execSync(`signtool remove /s ${tmpNodePath}`);
|
else if (process.platform === 'win32') execSync(`${WIN_SIGNTOOL} remove /s ${tmpNodePath}`);
|
||||||
/* Nothing for Linux */
|
/* Nothing for Linux */
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log('Failed remove signature', err);
|
console.log('Failed remove signature', err);
|
||||||
@@ -52,7 +55,7 @@ unlinkSync(blobPath);
|
|||||||
console.log('Re-signing Node.js');
|
console.log('Re-signing Node.js');
|
||||||
try {
|
try {
|
||||||
if (process.platform === 'darwin') execSync(`codesign --sign - ${tmpNodePath}`);
|
if (process.platform === 'darwin') execSync(`codesign --sign - ${tmpNodePath}`);
|
||||||
else if (process.platform === 'win32') execSync(`signtool sign /fd SHA256 ${tmpNodePath}`);
|
else if (process.platform === 'win32') execSync(`${WIN_SIGNTOOL} sign /fd SHA256 ${tmpNodePath}`);
|
||||||
/* Nothing for Linux */
|
/* Nothing for Linux */
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log('Failed sign', err);
|
console.log('Failed sign', err);
|
||||||
|
|||||||
Reference in New Issue
Block a user