2979d06f1c
Align control/presentation with presentation screen rect and darkness z-order; sync window titles and session window cleanup. Pack Win/Mac/Linux with npmRebuild disabled and release-native-prep for classic-level and sharp. Co-authored-by: Cursor <cursoragent@cursor.com>
36 lines
1.2 KiB
JavaScript
36 lines
1.2 KiB
JavaScript
/**
|
||
* Перед `electron-builder --mac`: npm ставит sharp только под CPU хоста.
|
||
* В release идут x64 и arm64 — в .app должны быть оба набора @img/sharp-darwin-*.
|
||
*/
|
||
import path from 'node:path';
|
||
import { fileURLToPath } from 'node:url';
|
||
|
||
import {
|
||
ensureReleaseNativeDeps,
|
||
MAC_SHARP_IMG_PACKAGES,
|
||
sharpImgPackagesToInstall,
|
||
} from './release-native-prep.mjs';
|
||
|
||
/** @deprecated use sharpImgPackagesToInstall(root, MAC_SHARP_IMG_PACKAGES) */
|
||
export function macSharpImgPackagesToInstall(root) {
|
||
return sharpImgPackagesToInstall(root, MAC_SHARP_IMG_PACKAGES);
|
||
}
|
||
|
||
/**
|
||
* @param {string} root
|
||
* @param {{ runInstall?: boolean }} [opts]
|
||
*/
|
||
export function ensureMacSharpBinaries(root, opts = {}) {
|
||
ensureReleaseNativeDeps(root, 'mac', opts);
|
||
}
|
||
|
||
const isMain = process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url);
|
||
if (isMain) {
|
||
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
||
if (process.platform !== 'darwin') {
|
||
console.warn('[release-mac-prep] skipped: not macOS (no dual-arch sharp prep needed here)');
|
||
process.exit(0);
|
||
}
|
||
ensureMacSharpBinaries(root);
|
||
}
|