From 2fcf255f92eaad9cc4abb93458bcd35d1d4965f0 Mon Sep 17 00:00:00 2001 From: Tuxinal <24763016+tuxinal@users.noreply.github.com> Date: Sun, 18 Aug 2024 19:43:28 +0330 Subject: [PATCH] separate venbind copy function --- scripts/build/build.mts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/scripts/build/build.mts b/scripts/build/build.mts index fa832e3..4758d31 100644 --- a/scripts/build/build.mts +++ b/scripts/build/build.mts @@ -45,16 +45,22 @@ async function copyVenmic() { copyFile( "./node_modules/@vencord/venmic/prebuilds/venmic-addon-linux-arm64/node-napi-v7.node", "./static/dist/venmic-arm64.node" - ), - copyFile( - "./node_modules/venbind/prebuilds/linux-x86_64/venbind-linux-x86_64.node", - "./static/dist/venbind-linux-x86_64.node" ) ]).catch(() => console.warn("Failed to copy venmic. Building without venmic support")); } +async function copyVenbind() { + return Promise.all([ + copyFile( + "./node_modules/venbind/prebuilds/linux-x86_64/venbind-linux-x86_64.node", + "./static/dist/venbind-linux-x86_64.node" + ) + ]).catch(() => console.warn("Failed to copy venbind. Building without venbind support")); +} + await Promise.all([ copyVenmic(), + copyVenbind(), createContext({ ...NodeCommonOpts, entryPoints: ["src/main/index.ts"],