mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 02:45:54 +01:00
feat(dx/desktop): perfect way to override bettersqlite native
This commit is contained in:
@@ -9,7 +9,7 @@ const workspaceRoot = join(desktopProjectRoot, "../..");
|
||||
|
||||
function copyNativeDependencies() {
|
||||
const destPath = join(desktopProjectRoot, "node_modules/better-sqlite3");
|
||||
|
||||
|
||||
if (existsSync(destPath)) {
|
||||
rmSync(destPath, { recursive: true });
|
||||
}
|
||||
@@ -30,10 +30,7 @@ function rebuildNativeDependencies() {
|
||||
rebuild({
|
||||
projectRootPath: desktopProjectRoot,
|
||||
buildPath: desktopProjectRoot,
|
||||
// on NixOS the prebuilt native fails with "Error: libstdc++.so.6: cannot open shared object file: No such file or directory" so we need to build from source.
|
||||
force: isNixOS(),
|
||||
electronVersion: electronVersion,
|
||||
buildFromSource: true
|
||||
electronVersion
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ execSync("electron ./src/main.ts", {
|
||||
NODE_ENV: "development",
|
||||
TRILIUM_ENV: "dev",
|
||||
TRILIUM_DATA_DIR: "data",
|
||||
TRILIUM_RESOURCE_DIR: "../server/src"
|
||||
TRILIUM_RESOURCE_DIR: "../server/src",
|
||||
BETTERSQLITE3_NATIVE_PATH: join(projectRoot, "node_modules/better-sqlite3/build/Release/better_sqlite3.node")
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user