From 42e6ab0dcd7afdaee97ec48dac4dc4dd39951ed3 Mon Sep 17 00:00:00 2001 From: Connor Yoh Date: Fri, 4 Jul 2025 15:01:11 +0100 Subject: [PATCH] Update to docs --- ...d => DesktopApplicationDevelopmentGuide.md | 4 ++-- DeveloperGuide.md | 22 +++++++++++++++++++ .../build-tauri-jlink.bat | 0 .../build-tauri-jlink.sh | 0 4 files changed, 24 insertions(+), 2 deletions(-) rename JLINK-README.md => DesktopApplicationDevelopmentGuide.md (99%) rename build-tauri-jlink.bat => scripts/build-tauri-jlink.bat (100%) rename build-tauri-jlink.sh => scripts/build-tauri-jlink.sh (100%) diff --git a/JLINK-README.md b/DesktopApplicationDevelopmentGuide.md similarity index 99% rename from JLINK-README.md rename to DesktopApplicationDevelopmentGuide.md index 6b9798679..ccb62f736 100644 --- a/JLINK-README.md +++ b/DesktopApplicationDevelopmentGuide.md @@ -25,12 +25,12 @@ Run the appropriate build script for your platform: **Linux/macOS:** ```bash -./build-tauri-jlink.sh +./scripts/build-tauri-jlink.sh ``` **Windows:** ```cmd -build-tauri-jlink.bat +scripts\build-tauri-jlink.bat ``` ### 2. Build Tauri Application diff --git a/DeveloperGuide.md b/DeveloperGuide.md index 0728a1cdc..5d347bbaa 100644 --- a/DeveloperGuide.md +++ b/DeveloperGuide.md @@ -32,6 +32,12 @@ This guide focuses on developing for Stirling 2.0, including both the React fron - Docker for containerization - Gradle for build management +**Desktop Application (Tauri):** +- Tauri for cross-platform desktop app packaging +- Rust backend for system integration +- PDF file association support +- Self-contained JRE bundling with JLink + **Legacy (reference only during development):** - Thymeleaf templates (being completely replaced in 2.0) @@ -44,6 +50,8 @@ This guide focuses on developing for Stirling 2.0, including both the React fron - Java JDK 17 or later (JDK 21 recommended) - Node.js 18+ and npm (required for frontend development) - Gradle 7.0 or later (Included within the repo) +- Rust and Cargo (required for Tauri desktop app development) +- Tauri CLI (install with `cargo install tauri-cli`) ### Setup Steps @@ -95,6 +103,14 @@ Stirling 2.0 uses client-side file storage: ### Legacy Code Reference The existing Thymeleaf templates remain in the codebase during development as reference material but will be completely removed for the 2.0 release. +### Tauri Desktop App Development +Stirling-PDF can be packaged as a cross-platform desktop application using Tauri with PDF file association support and bundled JRE: + +**Quick Start:** +1. **Development/Testing**: `cargo tauri dev --no-watch -- -- "path/to/test.pdf"` +2. **Building**: See [DesktopApplicationDevelopmentGuide.md](DesktopApplicationDevelopmentGuide.md) for complete build instructions +3. **Features**: File associations, self-contained JRE, cross-platform support + ## 5. Project Structure ```bash @@ -109,6 +125,12 @@ Stirling-PDF/ │ │ ├── services/ # API and utility services │ │ ├── types/ # TypeScript type definitions │ │ └── utils/ # Utility functions +│ ├── src-tauri/ # Tauri desktop app configuration +│ │ ├── src/ # Rust backend code +│ │ ├── libs/ # JAR files (generated by build scripts) +│ │ ├── runtime/ # Bundled JRE (generated by build scripts) +│ │ ├── Cargo.toml # Rust dependencies +│ │ └── tauri.conf.json # Tauri configuration │ ├── public/ │ │ └── locales/ # Internationalization files (JSON) │ ├── package.json # Frontend dependencies diff --git a/build-tauri-jlink.bat b/scripts/build-tauri-jlink.bat similarity index 100% rename from build-tauri-jlink.bat rename to scripts/build-tauri-jlink.bat diff --git a/build-tauri-jlink.sh b/scripts/build-tauri-jlink.sh similarity index 100% rename from build-tauri-jlink.sh rename to scripts/build-tauri-jlink.sh