libvesktop: native dbus module for autostart & app badge (#1180)
Both setAppBadge and autoStart at system boot now use dbus calls. This means that autoStart will work in Flatpak
This commit is contained in:
@@ -25,6 +25,9 @@ const NodeCommonOpts: BuildOptions = {
|
||||
platform: "node",
|
||||
external: ["electron"],
|
||||
target: ["esnext"],
|
||||
loader: {
|
||||
".node": "file"
|
||||
},
|
||||
define: {
|
||||
IS_DEV: JSON.stringify(isDev)
|
||||
}
|
||||
@@ -50,8 +53,29 @@ async function copyVenmic() {
|
||||
]).catch(() => console.warn("Failed to copy venmic. Building without venmic support"));
|
||||
}
|
||||
|
||||
async function copyLibVesktop() {
|
||||
if (process.platform !== "linux") return;
|
||||
|
||||
try {
|
||||
await copyFile(
|
||||
"./packages/libvesktop/build/Release/vesktop.node",
|
||||
`./static/dist/libvesktop-${process.arch}.node`
|
||||
);
|
||||
console.log("Using local libvesktop build");
|
||||
} catch {
|
||||
console.log(
|
||||
"Using prebuilt libvesktop binaries. Run `pnpm buildLibVesktop` and build again to build from source - see README.md for more details"
|
||||
);
|
||||
return Promise.all([
|
||||
copyFile("./packages/libvesktop/prebuilds/vesktop-x64.node", "./static/dist/libvesktop-x64.node"),
|
||||
copyFile("./packages/libvesktop/prebuilds/vesktop-arm64.node", "./static/dist/libvesktop-arm64.node")
|
||||
]).catch(() => console.warn("Failed to copy libvesktop. Building without libvesktop support"));
|
||||
}
|
||||
}
|
||||
|
||||
await Promise.all([
|
||||
copyVenmic(),
|
||||
copyLibVesktop(),
|
||||
createContext({
|
||||
...NodeCommonOpts,
|
||||
entryPoints: ["src/main/index.ts"],
|
||||
|
||||
Reference in New Issue
Block a user