build script for mac

This commit is contained in:
Brandon Thomas committed 2025-05-07 23:13:23 -04:00
1 parent 06313f54a5
commit 83cecad280
3 files changed
+36

No files matched your search

+3
View File
@@ -33,6 +33,9 @@
"noEmit": true
},
"references": [
{
"path": "../../libs/tauri-api"
},
{
"path": "../../libs/components/lightbox-modal"
},
+31
View File
@@ -0,0 +1,31 @@
#!/usr/bin/env bash
# This works on Linux and MacOS to build production Artcraft
set -euxo pipefail
echo "Building production Artcraft..."
echo ""
root_dir=$(pwd)
frontend_path="${root_dir}/frontend"
rust_crate_path="${root_dir}/crates/desktop/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"
pushd "${frontend_path}" || exit
npm install
popd || exit
export TAURI_FRONTEND_PATH="${frontend_path}"
export TAURI_APP_PATH="${rust_crate_path}"
export VITE_ENVIRONMENT_TYPE="production"
cargo tauri build --config "${config_path}"
echo "Done!"
+2
View File
@@ -22,6 +22,8 @@ pushd "${frontend_path}" || exit
npm install
export VITE_ENVIRONMENT_TYPE="production"
nx dev editor3d
popd || exit