Merge branch 'main' into feature/merge-2d-3d-diverge

This commit is contained in:
Michael Chung committed 2025-05-08 23:46:08 -04:00
commit 74b8f9ace5
168 files changed
+4977 -831

No files matched your search

+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!"
+29
View File
@@ -0,0 +1,29 @@
#!/usr/bin/env bash
# This works on Linux and MacOS to launch the frontend dev server
root_dir=$(pwd)
frontend_path="${root_dir}/frontend"
echo "Running Artcraft Frontend in Dev Mode..."
echo ""
echo "You'll need to launch the Rust dev server as a second script!"
echo ""
# 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
pushd "${frontend_path}" || exit
npm install
export VITE_ENVIRONMENT_TYPE="production"
nx dev editor3d
popd || exit
+29
View File
@@ -0,0 +1,29 @@
#!/usr/bin/env bash
# This works on Linux and MacOS to launch the Rust dev server
set -euxo pipefail
echo "Running Artcraft Rust in Dev Mode..."
echo ""
echo "You'll need to launch the frontend dev server as a second script!"
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"
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}"
+36
View File
@@ -0,0 +1,36 @@
# Build Production Artcraft
Write-Host "Building production Artcraft..."
Write-Host ""
try
{
Push-Location -Path ".\frontend"
Write-Host "Installing latest dependencies..."
Write-Host ""
Write-Host "You may need to run ./clean_modules.sh or manually clean up occasionally!" -ForegroundColor red -BackgroundColor white
Write-Host ""
npm install
}
finally
{
Pop-Location
}
$env:VITE_ENVIRONMENT_TYPE="production"
# This tells Tauri *which* frontend and *which* Rust app to use since we're in a monorepo with several apps.
$env:TAURI_FRONTEND_PATH=".\frontend"
$env:TAURI_APP_PATH=".\crates\desktop\artcraft"
# The config file tells Tauri more instructions for the frontend build.
cargo tauri build --config ".\crates\desktop\artcraft\tauri.artcraft_3d.no_dev.conf.json"
Write-Host ""
Write-Host "Production Build Done!" -ForegroundColor green -BackgroundColor white
Write-Host ""
Write-Host "You can find the installer in: target\release\bundle\nsis\ArtCraft_(version_info)-setup.exe"
Start-Process "explorer.exe" -ArgumentList ".\target\release\bundle\nsis"
+31
View File
@@ -0,0 +1,31 @@
# This runs Artcraft Frontend in dev mode on Windows
Write-Host "Running Artcraft Frontend in Dev Mode..."
Write-Host ""
Write-Host "You'll need to launch the Rust dev server as a second script!" -ForegroundColor red -BackgroundColor white
Write-Host ""
Push-Location -Path ".\frontend"
$env:VITE_ENVIRONMENT_TYPE="production"
try
{
Write-Host "Installing latest dependencies..."
Write-Host ""
Write-Host "You may need to run ./clean_modules.sh or manually clean up occasionally!" -ForegroundColor red -BackgroundColor white
Write-Host ""
npm install
Write-Host "Running dev server..."
Write-Host ""
Write-Host "If this isn't running on port 5173, you may need to kill a zombie process!" -ForegroundColor red -BackgroundColor white
Write-Host ""
nx dev editor3d
}
finally
{
Pop-Location
}
+13
View File
@@ -0,0 +1,13 @@
# This runs Artcraft Rust in dev mode on Windows
Write-Host "Running Artcraft Rust in Dev Mode..."
Write-Host ""
Write-Host "You'll need to launch the frontend dev server as a second script!" -ForegroundColor red -BackgroundColor white
Write-Host ""
# This tells Tauri *which* frontend and *which* Rust app to use since we're in a monorepo with several apps.
$env:TAURI_FRONTEND_PATH=".\frontend"
$env:TAURI_APP_PATH=".\crates\desktop\artcraft"
# The config file tells Tauri more instructions for the frontend build.
cargo tauri dev --config ".\crates\desktop\artcraft\tauri.artcraft_3d.no_dev.conf.json"