From a1c2b4f5c871c604f39155d5b89f4e66f9a839b7 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Thu, 1 May 2025 15:17:21 -0400 Subject: [PATCH] revert script, add copy for michael --- script/desktop/launch_rust_only_3d.sh | 11 +------ .../launch_rust_only_3d_for_michael.sh | 32 +++++++++++++++++++ 2 files changed, 33 insertions(+), 10 deletions(-) create mode 100755 script/desktop/launch_rust_only_3d_for_michael.sh diff --git a/script/desktop/launch_rust_only_3d.sh b/script/desktop/launch_rust_only_3d.sh index c284a8c1c2..b56ed6b27d 100755 --- a/script/desktop/launch_rust_only_3d.sh +++ b/script/desktop/launch_rust_only_3d.sh @@ -2,14 +2,6 @@ set -euxo pipefail -# Kill any process running on port 5741, which will block startup -if lsof -i tcp:5173 &>/dev/null; then - lsof -i tcp:5173 -t | xargs kill -9 - echo "Killed process running on port 5173" -else - echo "No process running on port 5173" -fi - root_dir=$(pwd) frontend_path="${root_dir}/frontend" rust_crate_path="${root_dir}/crates/desktop/tauri-artcraft" @@ -23,8 +15,7 @@ config_path="${rust_crate_path}/tauri.artcraft_3d.no_dev.conf.toml" export TAURI_FRONTEND_PATH="${frontend_path}" export TAURI_APP_PATH="${rust_crate_path}" - -RUSTFLAGS="-Awarnings" cargo tauri dev --no-dev-server \ +cargo tauri dev --no-dev-server \ --no-dev-server-wait \ --no-watch \ --config "${config_path}" diff --git a/script/desktop/launch_rust_only_3d_for_michael.sh b/script/desktop/launch_rust_only_3d_for_michael.sh new file mode 100755 index 0000000000..c284a8c1c2 --- /dev/null +++ b/script/desktop/launch_rust_only_3d_for_michael.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + +set -euxo pipefail + +# Kill any process running on port 5741, which will block startup +if lsof -i tcp:5173 &>/dev/null; then + lsof -i tcp:5173 -t | xargs kill -9 + echo "Killed process running on port 5173" +else + echo "No process running on port 5173" +fi + +root_dir=$(pwd) +frontend_path="${root_dir}/frontend" +rust_crate_path="${root_dir}/crates/desktop/tauri-artcraft" + +# The tauri dev server integration is super annoying: It eats ctrl-c interrupts, +# it decoheres the and corrupts terminal output, and it's slow. This configuration +# allows us to start without it. Simply launch `nx` and the dev server as a separate +# process and leave tauri out of the loop +config_path="${rust_crate_path}/tauri.artcraft_3d.no_dev.conf.toml" + +export TAURI_FRONTEND_PATH="${frontend_path}" +export TAURI_APP_PATH="${rust_crate_path}" + + +RUSTFLAGS="-Awarnings" cargo tauri dev --no-dev-server \ + --no-dev-server-wait \ + --no-watch \ + --config "${config_path}" + +