docs: add terminal + git clone steps to build instructions #3

Merged
owlburtoe merged 1 commit from docs/install-clone-step into main 2026-07-14 17:53:08 -04:00

View file

@ -108,10 +108,24 @@ If it refuses to start with a WebKit error, install the web engine it renders in
### Part 2 — build the installer yourself
You need **Node.js 20+** and **Rust**, plus a few OS-specific build tools. Install
them in the order below, then run the same three commands on every platform.
Everything here happens in a **terminal** — a window where you type commands
instead of clicking. You copy each block below, paste it in, and press Enter.
Never used one? That's fine; the steps are in order and nothing is destructive.
#### Step 1: install the build tools for your OS
#### Step 1: open a terminal
- **Windows** — press the Windows key, type `powershell`, and click
**Windows PowerShell**. (If a command later says "access denied," close it and
instead right-click it → **Run as administrator**.)
- **macOS** — press `Cmd + Space`, type `terminal`, press Enter.
- **Linux**`Ctrl + Alt + T`, or search your apps for "Terminal".
Two things to know: **paste** is `Ctrl + V` (`Cmd + V` on Mac, and in some Linux
terminals it's `Ctrl + Shift + V`), and a command that prints nothing usually
means it worked. If a command asks for your password, that's the OS, not us —
type it (the characters won't appear as you type) and press Enter.
#### Step 2: install the build tools for your OS
**Windows** — in PowerShell, using `winget` (ships with Windows 10/11):
@ -123,11 +137,12 @@ winget install --id Microsoft.VisualStudio.2022.BuildTools --override `
winget install --id Microsoft.EdgeWebView2Runtime # already on Win 10 1803+/11; no-op if present
winget install --id OpenJS.NodeJS.LTS # Node 20+
winget install --id Rustlang.Rustup # Rust
winget install --id Git.Git # git, to download the code in Step 3
rustup default stable-msvc # make sure Rust uses the MSVC toolchain
```
Then close and reopen PowerShell so it picks up the new tools. (Chocolatey users:
`choco install visualstudio2022buildtools visualstudio2022-workload-vctools nodejs-lts rustup.install`.)
`choco install visualstudio2022buildtools visualstudio2022-workload-vctools nodejs-lts rustup.install git`.)
<details>
<summary>No winget? Install by hand instead</summary>
@ -138,12 +153,13 @@ Then close and reopen PowerShell so it picks up the new tools. (Chocolatey users
<https://developer.microsoft.com/microsoft-edge/webview2/> (skip on Win 10 1803+/11).
3. **Node.js 20 LTS** — <https://nodejs.org>, accept the defaults.
4. **Rust**`rustup-init.exe` from <https://rustup.rs>, press Enter to accept the default.
5. **Git** — <https://git-scm.com/download/win>, accept the defaults.
</details>
**macOS** — Terminal:
```sh
xcode-select --install # Apple's compiler tools
xcode-select --install # Apple's compiler tools (includes git)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh # Rust; accept the defaults
brew install node # Node 20+ (Homebrew)
```
@ -156,7 +172,7 @@ afterwards either way.
```
sudo apt update
sudo apt install libwebkit2gtk-4.1-dev build-essential curl wget file \
sudo apt install git libwebkit2gtk-4.1-dev build-essential curl wget file \
libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh # Rust; accept defaults
@ -167,12 +183,12 @@ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh # Rust; accept
```
# Fedora
sudo dnf install webkit2gtk4.1-devel openssl-devel curl wget file \
sudo dnf install git webkit2gtk4.1-devel openssl-devel curl wget file \
libappindicator-gtk3-devel librsvg2-devel libxdo-devel
sudo dnf group install "c-development"
# Arch
sudo pacman -S --needed webkit2gtk-4.1 base-devel curl wget file openssl \
sudo pacman -S --needed git webkit2gtk-4.1 base-devel curl wget file openssl \
appmenu-gtk-module libappindicator-gtk3 librsvg xdotool
```
</details>
@ -188,19 +204,57 @@ nvm install 20 # Node 20 LTS
(`sudo apt install nodejs npm` works too if it gives you v20 or newer — check
with `node --version`.) Restart your terminal when everything is installed.
#### Step 2: check the tools are there
#### Step 3: download the code
`git clone` copies the project from the server into a folder on your machine.
This puts it in your home folder (`C:\Users\you\TRS`, `/Users/you/TRS`, or
`/home/you/TRS`):
```
cd ~
git clone https://forgejo.owlburtoe.dev/owlburtoe/TRS.git
cd TRS
```
On Windows PowerShell, `cd ~` also means "my home folder," so the same three
lines work as-is.
You are now **inside the project folder**, and every later command assumes that.
If you close the terminal and come back, run `cd ~/TRS` again to get back here.
`ls` (Windows: `dir`) should list `README.md` and `trs-quote-tool` — if it
doesn't, you're in the wrong folder.
Already downloaded it once? Don't clone again — `cd ~/TRS` then `git pull` to
grab the latest changes.
<details>
<summary>No git, or you'd rather not use it — download a ZIP instead</summary>
Open <https://forgejo.owlburtoe.dev/owlburtoe/TRS> in a browser, click the
**Code** button, and choose **Download ZIP**. Unzip it (Windows: right-click →
Extract All), then in your terminal `cd` into the unzipped folder — the easiest
way is to type `cd ` (with the space), then drag the folder from your file
manager onto the terminal window, which pastes its path, and press Enter.
The downside: to get later updates you have to download the ZIP again by hand,
whereas `git pull` does it in one command.
</details>
#### Step 4: check the tools are there
```
node --version # v20 or higher
cargo --version # any version
git --version # any version
```
Both must print a version. If either says "command not found," reopen your
terminal; if it still fails, that tool didn't install.
All three must print a version. If one says "command not found," close the
terminal and open a new one (installers only affect terminals opened afterwards);
if it still fails, that tool didn't install — redo its line in Step 2.
#### Step 3: build
#### Step 5: build
From the folder containing this README:
From inside the `TRS` folder you cloned in Step 3:
```
cd trs-quote-tool
@ -209,10 +263,11 @@ npm run tauri build
```
The first build compiles the whole Rust dependency tree and takes **515 minutes**
— that's normal, and later builds are much faster. You must build **on the OS you
want the installer for**: a Mac cannot produce a Windows `.exe`.
— that's normal, and later builds are much faster. Lots of scrolling text is
expected; what matters is whether it ends with an error. You must build **on the
OS you want the installer for**: a Mac cannot produce a Windows `.exe`.
#### Step 4: collect the installer
#### Step 6: collect the installer
`npm run tauri build` prints the exact paths at the end. They live under
`trs-quote-tool/src-tauri/target/release/bundle/`:
@ -242,7 +297,7 @@ npm test # frontend tests (calculations, DTO leakage)
cargo test # in src-tauri: money/excel/migration tests
```
Prereqs are the same as [Part 2, Step 1](#step-1-install-the-build-tools-for-your-os).
Prereqs are the same as [Part 2, Step 2](#step-2-install-the-build-tools-for-your-os).
## Using it (no dev tools needed)