mirror of
https://github.com/zadam/trilium.git
synced 2025-10-05 13:05:50 +08:00
chore(dx/desktop): read electron version from package.json
This commit is contained in:
parent
e18a8556c1
commit
1258d0cf7d
1 changed files with 2 additions and 2 deletions
|
@ -3,6 +3,7 @@ import { cpSync, existsSync, mkdirSync, readFileSync, rmSync } from "fs";
|
|||
import { execSync } from "child_process";
|
||||
import { rebuild } from "@electron/rebuild"
|
||||
import { isNixOS, resetPath } from "../../../scripts/utils.mjs";
|
||||
import packageJson from "../package.json" with { type: "json" };
|
||||
|
||||
const desktopProjectRoot = join(import.meta.dirname, "..");
|
||||
const workspaceRoot = join(desktopProjectRoot, "../..");
|
||||
|
@ -36,8 +37,6 @@ function rebuildNativeDependencies() {
|
|||
if (isNixOS()) {
|
||||
console.log("Patching ELF...");
|
||||
|
||||
|
||||
|
||||
return execSync(`nix-shell -p auto-patchelf gcc.cc.lib --run "auto-patchelf --paths node_modules/better-sqlite3/build/Release/better_sqlite3.node --libs ${libStdPath}"`, {
|
||||
cwd: desktopProjectRoot,
|
||||
stdio: "inherit"
|
||||
|
@ -58,6 +57,7 @@ function determineElectronVersion() {
|
|||
}
|
||||
} else {
|
||||
console.log("Using Electron version from package.json");
|
||||
return packageJson.devDependencies.electron;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue