From 55e33df8d6dde4ca0ee2a889b2e411e8101ef061 Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Tue, 23 Jul 2024 20:41:50 -0700 Subject: [PATCH] Fix NodeJS vendoring on Linux --- scripts/vendor-node.cjs | 9 ++- src-tauri/gen/schemas/linux-schema.json | 63 ------------------- .../tauri-plugin-plugin-runtime/src/nodejs.rs | 3 +- 3 files changed, 8 insertions(+), 67 deletions(-) diff --git a/scripts/vendor-node.cjs b/scripts/vendor-node.cjs index f2661bfc..47387f09 100644 --- a/scripts/vendor-node.cjs +++ b/scripts/vendor-node.cjs @@ -12,7 +12,7 @@ const WIN_X64 = 'win32_x64'; const URL_MAP = { [MAC_ARM]: 'https://nodejs.org/download/release/v22.5.1/node-v22.5.1-darwin-arm64.tar.gz', [MAC_X64]: 'https://nodejs.org/download/release/v22.5.1/node-v22.5.1-darwin-x64.tar.gz', - [LNX_X64]: 'https://nodejs.org/download/release/v22.5.1/node-v22.5.1-linux-arm64.tar.gz', + [LNX_X64]: 'https://nodejs.org/download/release/v22.5.1/node-v22.5.1-linux-x64.tar.gz', [WIN_X64]: 'https://nodejs.org/download/release/v22.5.1/node-v22.5.1-win-x64.zip', }; @@ -26,7 +26,7 @@ const DST_BIN_MAP = { const SRC_BIN_MAP = { [MAC_ARM]: 'node-v22.5.1-darwin-arm64/bin/node', [MAC_X64]: 'node-v22.5.1-darwin-x64/bin/node', - [LNX_X64]: 'node-v22.5.1-linux-arm64/bin/node', + [LNX_X64]: 'node-v22.5.1-linux-x64/bin/node', [WIN_X64]: 'node-v22.5.1-win-x64/node.exe', }; @@ -56,4 +56,7 @@ mkdirSync(dstDir, {recursive: true}); rmSync(tmpDir, {recursive: true, force: true}); console.log("Downloaded NodeJS to", binDst); -})().catch(err => console.log('Script failed:', err)); +})().catch(err => { + console.log('Script failed:', err); + process.exit(1); +}); diff --git a/src-tauri/gen/schemas/linux-schema.json b/src-tauri/gen/schemas/linux-schema.json index 4776f4b7..84b22800 100644 --- a/src-tauri/gen/schemas/linux-schema.json +++ b/src-tauri/gen/schemas/linux-schema.json @@ -2512,69 +2512,6 @@ "clipboard-manager:deny-write-text" ] }, - { - "description": "deep-link:default -> Allows reading the opened deep link via the get_current command", - "type": "string", - "enum": [ - "deep-link:default" - ] - }, - { - "description": "deep-link:allow-get-current -> Enables the get_current command without any pre-configured scope.", - "type": "string", - "enum": [ - "deep-link:allow-get-current" - ] - }, - { - "description": "deep-link:allow-is-registered -> Enables the is_registered command without any pre-configured scope.", - "type": "string", - "enum": [ - "deep-link:allow-is-registered" - ] - }, - { - "description": "deep-link:allow-register -> Enables the register command without any pre-configured scope.", - "type": "string", - "enum": [ - "deep-link:allow-register" - ] - }, - { - "description": "deep-link:allow-unregister -> Enables the unregister command without any pre-configured scope.", - "type": "string", - "enum": [ - "deep-link:allow-unregister" - ] - }, - { - "description": "deep-link:deny-get-current -> Denies the get_current command without any pre-configured scope.", - "type": "string", - "enum": [ - "deep-link:deny-get-current" - ] - }, - { - "description": "deep-link:deny-is-registered -> Denies the is_registered command without any pre-configured scope.", - "type": "string", - "enum": [ - "deep-link:deny-is-registered" - ] - }, - { - "description": "deep-link:deny-register -> Denies the register command without any pre-configured scope.", - "type": "string", - "enum": [ - "deep-link:deny-register" - ] - }, - { - "description": "deep-link:deny-unregister -> Denies the unregister command without any pre-configured scope.", - "type": "string", - "enum": [ - "deep-link:deny-unregister" - ] - }, { "type": "string", "enum": [ diff --git a/src-tauri/tauri-plugin-plugin-runtime/src/nodejs.rs b/src-tauri/tauri-plugin-plugin-runtime/src/nodejs.rs index e00768ba..ae9593ad 100644 --- a/src-tauri/tauri-plugin-plugin-runtime/src/nodejs.rs +++ b/src-tauri/tauri-plugin-plugin-runtime/src/nodejs.rs @@ -36,9 +36,10 @@ pub async fn node_start(app: &AppHandle, temp_dir: &PathBuf) -> S let plugins_dir = plugins_dir.replace("\\\\?\\", ""); info!( - "Starting plugin runtime port_file={} plugins_dir={}", + "Starting plugin runtime\n port_file={}\n plugins_dir={}\n runtime_dir={}", port_file_path.to_string_lossy(), plugins_dir, + plugin_runtime_dir.to_string_lossy(), ); let (mut rx, _child) = app