add arm64 venmic binary
This commit is contained in:
parent
886d02f7c3
commit
b17370cc7b
4 changed files with 30 additions and 16 deletions
|
@ -26,7 +26,7 @@
|
||||||
"arrpc": "github:OpenAsar/arrpc#89f4da610ccfac93f461826a446a17cd3b23953d"
|
"arrpc": "github:OpenAsar/arrpc#89f4da610ccfac93f461826a446a17cd3b23953d"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@vencord/venmic": "^1.4.0"
|
"@vencord/venmic": "^1.6.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@fal-works/esbuild-plugin-global-externals": "^2.1.2",
|
"@fal-works/esbuild-plugin-global-externals": "^2.1.2",
|
||||||
|
|
|
@ -11,8 +11,8 @@ dependencies:
|
||||||
|
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
'@vencord/venmic':
|
'@vencord/venmic':
|
||||||
specifier: ^1.4.0
|
specifier: ^1.6.0
|
||||||
version: 1.4.0
|
version: 1.6.0
|
||||||
|
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@fal-works/esbuild-plugin-global-externals':
|
'@fal-works/esbuild-plugin-global-externals':
|
||||||
|
@ -53,7 +53,7 @@ devDependencies:
|
||||||
version: 9.0.0(eslint@8.51.0)
|
version: 9.0.0(eslint@8.51.0)
|
||||||
eslint-import-resolver-alias:
|
eslint-import-resolver-alias:
|
||||||
specifier: ^1.1.2
|
specifier: ^1.1.2
|
||||||
version: 1.1.2(eslint-plugin-import@2.28.1)
|
version: 1.1.2(eslint-plugin-import@2.29.0)
|
||||||
eslint-plugin-license-header:
|
eslint-plugin-license-header:
|
||||||
specifier: ^0.6.0
|
specifier: ^0.6.0
|
||||||
version: 0.6.0
|
version: 0.6.0
|
||||||
|
@ -960,8 +960,8 @@ packages:
|
||||||
type-fest: 3.13.1
|
type-fest: 3.13.1
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/@vencord/venmic@1.4.0:
|
/@vencord/venmic@1.6.0:
|
||||||
resolution: {integrity: sha512-rGmO4oCLrIVSLwhRH4Qib8XWFW6hcELZhSR3+NeXVV4nwVf302g1FwhUaQXk9B//HQOieCsORf2o5e2vEmBA8w==}
|
resolution: {integrity: sha512-Agh5+gDiHpqsSrrxyazeU+1JmZD286QoKj41t/omw6EmtSS8EPiENQSn7eXmXt/ooSEfa9qoXEG+Hn6hXb3rvw==}
|
||||||
engines: {node: '>=14.15'}
|
engines: {node: '>=14.15'}
|
||||||
os: [linux]
|
os: [linux]
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
|
@ -2040,13 +2040,13 @@ packages:
|
||||||
eslint: 8.51.0
|
eslint: 8.51.0
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/eslint-import-resolver-alias@1.1.2(eslint-plugin-import@2.28.1):
|
/eslint-import-resolver-alias@1.1.2(eslint-plugin-import@2.29.0):
|
||||||
resolution: {integrity: sha512-WdviM1Eu834zsfjHtcGHtGfcu+F30Od3V7I9Fi57uhBEwPkjDcii7/yW8jAT+gOhn4P/vOxxNAXbFAKsrrc15w==}
|
resolution: {integrity: sha512-WdviM1Eu834zsfjHtcGHtGfcu+F30Od3V7I9Fi57uhBEwPkjDcii7/yW8jAT+gOhn4P/vOxxNAXbFAKsrrc15w==}
|
||||||
engines: {node: '>= 4'}
|
engines: {node: '>= 4'}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
eslint-plugin-import: '>=1.4.0'
|
eslint-plugin-import: '>=1.4.0'
|
||||||
dependencies:
|
dependencies:
|
||||||
eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.7.5)(eslint@8.51.0)
|
eslint-plugin-import: 2.29.0(@typescript-eslint/parser@6.7.5)(eslint@8.51.0)
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/eslint-import-resolver-node@0.3.9:
|
/eslint-import-resolver-node@0.3.9:
|
||||||
|
@ -2088,8 +2088,8 @@ packages:
|
||||||
- supports-color
|
- supports-color
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/eslint-plugin-import@2.28.1(@typescript-eslint/parser@6.7.5)(eslint@8.51.0):
|
/eslint-plugin-import@2.29.0(@typescript-eslint/parser@6.7.5)(eslint@8.51.0):
|
||||||
resolution: {integrity: sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A==}
|
resolution: {integrity: sha512-QPOO5NO6Odv5lpoTkddtutccQjysJuFxoPS7fAHO+9m9udNHvTCPSAMW9zGAYj8lAIdr40I8yPCdUYrncXtrwg==}
|
||||||
engines: {node: '>=4'}
|
engines: {node: '>=4'}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
'@typescript-eslint/parser': '*'
|
'@typescript-eslint/parser': '*'
|
||||||
|
@ -2108,7 +2108,7 @@ packages:
|
||||||
eslint: 8.51.0
|
eslint: 8.51.0
|
||||||
eslint-import-resolver-node: 0.3.9
|
eslint-import-resolver-node: 0.3.9
|
||||||
eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.7.5)(eslint-import-resolver-node@0.3.9)(eslint@8.51.0)
|
eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.7.5)(eslint-import-resolver-node@0.3.9)(eslint@8.51.0)
|
||||||
has: 1.0.4
|
hasown: 2.0.0
|
||||||
is-core-module: 2.13.1
|
is-core-module: 2.13.1
|
||||||
is-glob: 4.0.3
|
is-glob: 4.0.3
|
||||||
minimatch: 3.1.2
|
minimatch: 3.1.2
|
||||||
|
@ -2780,6 +2780,7 @@ packages:
|
||||||
/has@1.0.4:
|
/has@1.0.4:
|
||||||
resolution: {integrity: sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==}
|
resolution: {integrity: sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==}
|
||||||
engines: {node: '>= 0.4.0'}
|
engines: {node: '>= 0.4.0'}
|
||||||
|
requiresBuild: true
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/hasown@2.0.0:
|
/hasown@2.0.0:
|
||||||
|
|
|
@ -34,12 +34,23 @@ async function createContext(options: BuildOptions) {
|
||||||
contexts.push(await context(options));
|
contexts.push(await context(options));
|
||||||
}
|
}
|
||||||
|
|
||||||
await Promise.all([
|
async function copyVenmic() {
|
||||||
process.platform === "linux" &&
|
if (process.platform !== "linux") return;
|
||||||
|
|
||||||
|
return Promise.all([
|
||||||
copyFile(
|
copyFile(
|
||||||
"./node_modules/@vencord/venmic/prebuilds/venmic-addon-linux-x64/node-napi-v7.node",
|
"./node_modules/@vencord/venmic/prebuilds/venmic-addon-linux-x64/node-napi-v7.node",
|
||||||
"./static/dist/venmic.node"
|
"./static/dist/venmic-x64.node"
|
||||||
).catch(() => console.warn("Failed to copy venmic. Building without venmic support")),
|
),
|
||||||
|
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"));
|
||||||
|
}
|
||||||
|
|
||||||
|
await Promise.all([
|
||||||
|
copyVenmic(),
|
||||||
createContext({
|
createContext({
|
||||||
...NodeCommonOpts,
|
...NodeCommonOpts,
|
||||||
entryPoints: ["src/main/index.ts"],
|
entryPoints: ["src/main/index.ts"],
|
||||||
|
|
|
@ -26,7 +26,9 @@ function obtainVenmic() {
|
||||||
if (!initialized) {
|
if (!initialized) {
|
||||||
initialized = true;
|
initialized = true;
|
||||||
try {
|
try {
|
||||||
const { PatchBay } = require(join(STATIC_DIR, "dist/venmic.node")) as typeof import("@vencord/venmic");
|
const { PatchBay } = require(
|
||||||
|
join(STATIC_DIR, `dist/venmic-${process.arch}.node`)
|
||||||
|
) as typeof import("@vencord/venmic");
|
||||||
patchBay = new PatchBay();
|
patchBay = new PatchBay();
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
console.error("Failed to initialise venmic. Make sure you're using pipewire", e);
|
console.error("Failed to initialise venmic. Make sure you're using pipewire", e);
|
||||||
|
|
Loading…
Reference in a new issue