Building the Desktop App
Budgetzilla uses Tauri to provide a native desktop experience across macOS, Windows, and Linux.
Prerequisites
Section titled “Prerequisites”To build the desktop application, you need the following installed on your system:
- Rust — Install via rustup
- Node.js 18+ — Download from nodejs.org
- Platform Dependencies:
- macOS: Xcode Command Line Tools (
xcode-select --install) - Windows: Microsoft Visual Studio C++ Build Tools and WebView2
- Linux: See Tauri Linux prerequisites
- macOS: Xcode Command Line Tools (
Development
Section titled “Development”Run the application in development mode with hot-reloading:
cd webappnpm run tauri:devThis starts the Vite development server and opens the Tauri window.
Production Build
Section titled “Production Build”cd webappnpm run tauri:buildBuild artifacts will be in src-tauri/target/release/bundle/macos/.
Windows
Section titled “Windows”You can use the provided batch script to build on Windows (handling specific MSVC environment issues):
cd webapp.\build_tauri.batBuild artifacts will be in src-tauri/target/release/bundle/msi/ and bundle/setup.exe.
Configuration
Section titled “Configuration”The desktop app is configured in webapp/src-tauri/tauri.conf.json.
Metadata
Section titled “Metadata”| Field | Description |
|---|---|
productName | The display name of the application (set to Budgetzilla) |
version | App version string |
identifier | Unique bundle identifier (e.g., com.budgetzilla.app) |
Window Configuration
Section titled “Window Configuration”| Field | Description |
|---|---|
title | Default window title |
width / height | Initial window dimensions |
resizable | Whether the user can resize the window |
App Icons
Section titled “App Icons”Icons are managed via the Tauri CLI. To update the application icons from a source image:
- Place your source icon (1024x1024 PNG recommended) in
webapp/Budgetzilla.jpg(or any path) - Run the icon generation command:
Terminal window cd webappnpx tauri icon ./Budgetzilla.jpg
This automatically generates all required formats for all platforms in src-tauri/icons/.
Troubleshooting
Section titled “Troubleshooting”Windows Build Failures
Section titled “Windows Build Failures”If you encounter errors related to c2.dll or resource exhaustion:
- Use
build_tauri.batwhich forces x86 host tools. - Ensure you have at least 8GB of RAM available.
- Check that
VsDevCmd.batpath in the script matches your Visual Studio installation.
Rust Version Issues
Section titled “Rust Version Issues”Ensure your Rust toolchain is up to date:
rustup updateWebView2 Problems (Windows)
Section titled “WebView2 Problems (Windows)”The application requires the WebView2 runtime. It is pre-installed on Windows 10/11, but can be downloaded here if missing.