Files
maptool/docs/development.adoc
T
randy 7329497e95 Initial scaffold: Sinatra map app with Tauri desktop shell
Sinatra backend serving a basic Leaflet map, wrapped in a Tauri
desktop shell that starts the same server in a native window.
2026-08-24 22:57:03 +02:00

78 lines
1.8 KiB
Plaintext

= Development guide
:toc:
:toclevels: 2
== Web app only
[source,shell]
----
bundle install
bundle exec puma -C config/puma.rb
----
Open http://127.0.0.1:4567. For auto-reload during development, run
via the `rerun` gem instead:
[source,shell]
----
bundle exec rerun -- bundle exec puma -C config/puma.rb
----
== Desktop shell (Tauri)
=== Prerequisites
* Rust (stable) and the Tauri CLI: `cargo install tauri-cli --version "^2"`
* Ruby + Bundler, with gems installed (`bundle install` in the project
root)
* Platform build tools required by Tauri itself:
** *Linux*: WebKitGTK and GTK development packages, e.g. on
Debian/Ubuntu:
+
[source,shell]
----
sudo apt install libwebkit2gtk-4.1-dev libjavascriptcoregtk-4.1-dev \
libgtk-3-dev libsoup-3.0-dev build-essential
----
** *macOS*: Xcode command line tools.
** *Windows*: the WebView2 runtime (preinstalled on current Windows) and
the MSVC build tools.
See the upstream https://tauri.app/start/prerequisites/[Tauri
prerequisites] page for the current package names on your platform.
=== Running in development
[source,shell]
----
cd src-tauri
cargo tauri dev
----
This runs `beforeDevCommand` (starts Puma on `127.0.0.1:4567`) and
opens a native window pointed at it, per `src-tauri/tauri.conf.json`.
=== Building
[source,shell]
----
cd src-tauri
cargo tauri build
----
Requires `Gemfile.lock` to exist (`bundle install` beforehand), since
the Ruby app files are embedded into the bundle as resources. See
`docs/architecture.adoc` for the current limitation around this build
still depending on a system Ruby installation on the target machine.
=== Regenerating icons
Desktop icons live in `src-tauri/icons/`. To regenerate them from a
new source image (at least 1024x1024 PNG):
[source,shell]
----
cd src-tauri
cargo tauri icon path/to/source.png
----