diff options
Diffstat (limited to 'vesktop-patches/0001-Venmic-Build-from-Git-sources-instead-of-using-prebu.patch')
-rw-r--r-- | vesktop-patches/0001-Venmic-Build-from-Git-sources-instead-of-using-prebu.patch | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/vesktop-patches/0001-Venmic-Build-from-Git-sources-instead-of-using-prebu.patch b/vesktop-patches/0001-Venmic-Build-from-Git-sources-instead-of-using-prebu.patch new file mode 100644 index 0000000..266f9f3 --- /dev/null +++ b/vesktop-patches/0001-Venmic-Build-from-Git-sources-instead-of-using-prebu.patch @@ -0,0 +1,103 @@ +From 075f1ff4d817086f72c197f7f7a7b48e04d24c28 Mon Sep 17 00:00:00 2001 +From: 1024x2 <2pow11@gmail.com> +Date: Tue, 13 Aug 2024 20:11:12 +0100 +Subject: [PATCH 1/3] Venmic: Build from Git sources instead of using prebuilts + +have we learned nothing from jia tan????? +--- + package.json | 2 +- + pnpm-lock.yaml | 11 ++++++----- + scripts/build/build.mts | 14 ++++---------- + src/main/venmic.ts | 2 +- + 4 files changed, 12 insertions(+), 17 deletions(-) + +diff --git a/package.json b/package.json +index ca5cf49..3c2b1e7 100644 +--- a/package.json ++++ b/package.json +@@ -28,7 +28,7 @@ + "electron-updater": "^6.2.1" + }, + "optionalDependencies": { +- "@vencord/venmic": "^6.1.0" ++ "@vencord/venmic": "github:vencord/Venmic#5481a9277da95656c79ae69c4ea1146ce10cc2d7" + }, + "devDependencies": { + "@fal-works/esbuild-plugin-global-externals": "^2.1.2", +diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml +index e67ad18..ce125a4 100644 +--- a/pnpm-lock.yaml ++++ b/pnpm-lock.yaml +@@ -21,8 +21,8 @@ importers: + version: 6.2.1 + optionalDependencies: + '@vencord/venmic': +- specifier: ^6.1.0 +- version: 6.1.0 ++ specifier: github:vencord/Venmic#5481a9277da95656c79ae69c4ea1146ce10cc2d7 ++ version: https://codeload.github.com/vencord/Venmic/tar.gz/5481a9277da95656c79ae69c4ea1146ce10cc2d7 + devDependencies: + '@fal-works/esbuild-plugin-global-externals': + specifier: ^2.1.2 +@@ -634,8 +634,9 @@ packages: + '@vencord/types@1.8.4': + resolution: {integrity: sha512-ogLqIOHVO+5zxKUVxAfGIAUZoEfIomrlg6f0cZ/2yd5vBAn1fA9Gi/NASoKfHZuJt8ZcYw329bgn0ah/VufqMg==} + +- '@vencord/venmic@6.1.0': +- resolution: {integrity: sha512-YiCtzml/W8tYbGhu3jm5jfbbEnl2slKKARNK0jO+8qV979k9eFnfIRTxvhMN/SWq1h8ZNJdXVwvXpffQwq0RuA==} ++ '@vencord/venmic@https://codeload.github.com/vencord/Venmic/tar.gz/5481a9277da95656c79ae69c4ea1146ce10cc2d7': ++ resolution: {tarball: https://codeload.github.com/vencord/Venmic/tar.gz/5481a9277da95656c79ae69c4ea1146ce10cc2d7} ++ version: 6.1.0 + engines: {node: '>=14.15'} + os: [linux] + +@@ -3382,7 +3383,7 @@ snapshots: + standalone-electron-types: 1.0.0 + type-fest: 3.13.1 + +- '@vencord/venmic@6.1.0': ++ '@vencord/venmic@https://codeload.github.com/vencord/Venmic/tar.gz/5481a9277da95656c79ae69c4ea1146ce10cc2d7': + dependencies: + cmake-js: 7.3.0 + node-addon-api: 8.1.0 +diff --git a/scripts/build/build.mts b/scripts/build/build.mts +index 243381b..effa353 100644 +--- a/scripts/build/build.mts ++++ b/scripts/build/build.mts +@@ -37,16 +37,10 @@ async function createContext(options: BuildOptions) { + async function copyVenmic() { + if (process.platform !== "linux") return; + +- return Promise.all([ +- copyFile( +- "./node_modules/@vencord/venmic/prebuilds/venmic-addon-linux-x64/node-napi-v7.node", +- "./static/dist/venmic-x64.node" +- ), +- copyFile( +- "./node_modules/@vencord/venmic/prebuilds/venmic-addon-linux-arm64/node-napi-v7.node", +- "./static/dist/venmic-arm64.node" +- ) +- ]).catch(() => console.warn("Failed to copy venmic. Building without venmic support")); ++ return copyFile( ++ "./node_modules/@vencord/venmic/build/Release/venmic-addon.node", ++ "./static/dist/venmic.node" ++ ).catch(() => console.warn("Failed to copy venmic. Building without venmic support")); + } + + await Promise.all([ +diff --git a/src/main/venmic.ts b/src/main/venmic.ts +index c127e90..948c281 100644 +--- a/src/main/venmic.ts ++++ b/src/main/venmic.ts +@@ -29,7 +29,7 @@ function importVenmic() { + imported = true; + + try { +- PatchBay = (require(join(STATIC_DIR, `dist/venmic-${process.arch}.node`)) as typeof import("@vencord/venmic")) ++ PatchBay = (require(join(STATIC_DIR, `dist/venmic.node`)) as typeof import("@vencord/venmic")) + .PatchBay; + + hasPipewirePulse = PatchBay.hasPipeWire(); +-- +2.45.2 + |