Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: 22.12.0
node-version: 20
cache: npm
cache-dependency-path: app/package-lock.json

Expand Down Expand Up @@ -116,7 +116,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: 22.12.0
node-version: 20
cache: npm
cache-dependency-path: app/package-lock.json

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: 22.12.0
node-version: 20
cache: npm
cache-dependency-path: app/package-lock.json

Expand All @@ -73,7 +73,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: 22.12.0
node-version: 20
cache: npm
cache-dependency-path: app/package-lock.json

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: 22.12.0
node-version: 20
cache: npm
cache-dependency-path: app/package-lock.json

Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: 22.12.0
node-version: 20
cache: npm
cache-dependency-path: app/package-lock.json

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22.12.0
node-version: 22
cache: npm
cache-dependency-path: app/package-lock.json

Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.24)
project(metalsharp VERSION 0.49.0 LANGUAGES C CXX OBJC OBJCXX)
project(metalsharp VERSION 0.46.7 LANGUAGES C CXX OBJC OBJCXX)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
Expand Down
19 changes: 2 additions & 17 deletions app/build/notarize.cjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const path = require("node:path");
const { execFileSync } = require("node:child_process");
const { notarize } = require("@electron/notarize");

function hasPasswordCredentials() {
Expand All @@ -10,25 +9,11 @@ function hasApiKeyCredentials() {
return Boolean(process.env.APPLE_API_KEY && process.env.APPLE_API_KEY_ID && process.env.APPLE_API_ISSUER);
}

function adhocSignApp(appPath) {
const entitlements = path.join(__dirname, "entitlements.mac.plist");
const args = ["--force", "--deep", "--sign", "-", "--options", "runtime"];
if (entitlements) {
args.push("--entitlements", entitlements);
}
args.push(appPath);

execFileSync("/usr/bin/codesign", args, { stdio: "inherit" });
execFileSync("/usr/bin/codesign", ["--verify", "--deep", "--strict", "--verbose=4", appPath], { stdio: "inherit" });
}

exports.default = async function notarizeMetalSharp(context) {
if (context.electronPlatformName !== "darwin") {
return;
}

const appName = context.packager.appInfo.productFilename;
const appPath = path.join(context.appOutDir, `${appName}.app`);
const requireNotarization = process.env.METALSHARP_REQUIRE_NOTARIZATION === "1";
if (!hasPasswordCredentials() && !hasApiKeyCredentials()) {
const message =
Expand All @@ -37,11 +22,11 @@ exports.default = async function notarizeMetalSharp(context) {
throw new Error(message);
}
console.log(message);
console.log("Apple Developer ID unavailable; applying ad-hoc app bundle signature for local Gatekeeper integrity.");
adhocSignApp(appPath);
return;
}

const appName = context.packager.appInfo.productFilename;
const appPath = path.join(context.appOutDir, `${appName}.app`);
const baseOptions = {
appBundleId: context.packager.appInfo.appId,
appPath,
Expand Down
Loading
Loading