Unique sidecar names

This commit is contained in:
Gregory Schier
2024-07-24 07:04:14 -07:00
parent 55e33df8d6
commit 311fda887f
4 changed files with 20 additions and 20 deletions
+7 -7
View File
@@ -16,13 +16,6 @@ const URL_MAP = {
[WIN_X64]: 'https://nodejs.org/download/release/v22.5.1/node-v22.5.1-win-x64.zip', [WIN_X64]: 'https://nodejs.org/download/release/v22.5.1/node-v22.5.1-win-x64.zip',
}; };
const DST_BIN_MAP = {
darwin_arm64: 'node-aarch64-apple-darwin',
darwin_x64: 'node-x86_64-apple-darwin',
linux_x64: 'node-x86_64-unknown-linux-gnu',
win32_x64: 'node-x86_64-pc-windows-msvc.exe',
};
const SRC_BIN_MAP = { const SRC_BIN_MAP = {
[MAC_ARM]: 'node-v22.5.1-darwin-arm64/bin/node', [MAC_ARM]: 'node-v22.5.1-darwin-arm64/bin/node',
[MAC_X64]: 'node-v22.5.1-darwin-x64/bin/node', [MAC_X64]: 'node-v22.5.1-darwin-x64/bin/node',
@@ -30,6 +23,13 @@ const SRC_BIN_MAP = {
[WIN_X64]: 'node-v22.5.1-win-x64/node.exe', [WIN_X64]: 'node-v22.5.1-win-x64/node.exe',
}; };
const DST_BIN_MAP = {
darwin_arm64: 'yaaknode-aarch64-apple-darwin',
darwin_x64: 'yaaknode-x86_64-apple-darwin',
linux_x64: 'yaaknode-x86_64-unknown-linux-gnu',
win32_x64: 'yaaknode-x86_64-pc-windows-msvc.exe',
};
const dstDir = path.join(__dirname, `..`, 'src-tauri', 'vendored', 'node'); const dstDir = path.join(__dirname, `..`, 'src-tauri', 'vendored', 'node');
rmSync(dstDir, {recursive: true, force: true}); rmSync(dstDir, {recursive: true, force: true});
mkdirSync(dstDir, {recursive: true}); mkdirSync(dstDir, {recursive: true});
+7 -7
View File
@@ -17,13 +17,6 @@ const URL_MAP = {
[WIN_X64]: 'https://github.com/protocolbuffers/protobuf/releases/download/v27.2/protoc-27.2-win64.zip', [WIN_X64]: 'https://github.com/protocolbuffers/protobuf/releases/download/v27.2/protoc-27.2-win64.zip',
}; };
const DST_BIN_MAP = {
[MAC_ARM]: 'protoc-aarch64-apple-darwin',
[MAC_X64]: 'protoc-x86_64-apple-darwin',
[LNX_X64]: 'protoc-x86_64-unknown-linux-gnu',
[WIN_X64]: 'protoc-x86_64-pc-windows-msvc.exe',
};
const SRC_BIN_MAP = { const SRC_BIN_MAP = {
[MAC_ARM]: 'bin/protoc', [MAC_ARM]: 'bin/protoc',
[MAC_X64]: 'bin/protoc', [MAC_X64]: 'bin/protoc',
@@ -31,6 +24,13 @@ const SRC_BIN_MAP = {
[WIN_X64]: 'bin/protoc.exe', [WIN_X64]: 'bin/protoc.exe',
}; };
const DST_BIN_MAP = {
[MAC_ARM]: 'yaakprotoc-aarch64-apple-darwin',
[MAC_X64]: 'yaakprotoc-x86_64-apple-darwin',
[LNX_X64]: 'yaakprotoc-x86_64-unknown-linux-gnu',
[WIN_X64]: 'yaakprotoc-x86_64-pc-windows-msvc.exe',
};
const dstDir = path.join(__dirname, `..`, 'src-tauri', 'vendored', 'protoc'); const dstDir = path.join(__dirname, `..`, 'src-tauri', 'vendored', 'protoc');
rmSync(dstDir, {recursive: true, force: true}); rmSync(dstDir, {recursive: true, force: true});
mkdirSync(dstDir, {recursive: true}); mkdirSync(dstDir, {recursive: true});
+3 -3
View File
@@ -67,11 +67,11 @@ pub async fn fill_pool_from_files(
let (mut rx, _child) = app_handle let (mut rx, _child) = app_handle
.shell() .shell()
.sidecar("protoc") .sidecar("yaakprotoc")
.expect("protoc not found") .expect("yaakprotoc not found")
.args(args) .args(args)
.spawn() .spawn()
.expect("protoc failed to start"); .expect("yaakprotoc failed to start");
while let Some(event) = rx.recv().await { while let Some(event) = rx.recv().await {
match event { match event {
@@ -44,13 +44,13 @@ pub async fn node_start<R: Runtime>(app: &AppHandle<R>, temp_dir: &PathBuf) -> S
let (mut rx, _child) = app let (mut rx, _child) = app
.shell() .shell()
.sidecar("node") .sidecar("yaaknode")
.unwrap() .expect("yaaknode not found")
.env("YAAK_GRPC_PORT_FILE_PATH", port_file_path.clone()) .env("YAAK_GRPC_PORT_FILE_PATH", port_file_path.clone())
.env("YAAK_PLUGINS_DIR", plugins_dir) .env("YAAK_PLUGINS_DIR", plugins_dir)
.args(&[plugin_runtime_dir.join("index.cjs")]) .args(&[plugin_runtime_dir.join("index.cjs")])
.spawn() .spawn()
.unwrap(); .expect("yaaknode failed to start");
tauri::async_runtime::spawn(async move { tauri::async_runtime::spawn(async move {
// read events such as stdout // read events such as stdout