summaryrefslogtreecommitdiffstats
path: root/docs/windows-build.md
blob: 88133cb456c85e9ec78ebad75a74accdf0cf7a30 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# Building MeshBay on Windows

A quick, linear path from a fresh `git clone` to `MeshBay-Setup-<version>.exe`.
For *why* things are done this way (firewall rules, autostart modes, the
dependency surface, networking) see [`packaging/win/README.md`](../packaging/win/README.md)
— this page is deliberately just the steps.

## Prerequisites

Install on the Windows machine that will build the installer:

| Tool | Version | Check |
|---|---|---|
| [Node.js](https://nodejs.org) | 22 or newer | `node --version` |
| Python | 3.12 or newer | `py -3.12 --version` (or `python --version`) |
| Git | any recent | `git --version` |

Nothing else — no VC++ Redistributable, no separate ffmpeg install. The build
scripts create their own throwaway Python venv and fetch ffmpeg themselves.

## 1. Clone

```powershell
git clone https://github.com/<owner>/meshbay.git
cd meshbay
```

## 2. Build

```powershell
cd packages\meshbay-client
npm run dist:win
```

This runs [`packaging/win/build-win.ps1`](../packaging/win/build-win.ps1), which:

1. checks Node ≥ 22
2. `npm ci` and downloads Electron's Chromium
3. bumps Electron to its latest release (skip with `-NoElectronBump`)
4. `npm run sync-ui` — copies the SPA from `meshbay-hub/.../static`
5. runs [`build-node-runtime.ps1`](../packaging/win/build-node-runtime.ps1) —
   creates a throwaway venv, installs `meshbay-node` + `meshbay-common`,
   freezes the daemon with PyInstaller, fetches and verifies ffmpeg
6. `electron-builder --win nsis`

Expect this to take several minutes the first time (Chromium download,
PyInstaller freeze, ffmpeg fetch). Output:

```
packages\meshbay-client\dist\MeshBay-Setup-<version>.exe
```

## 3. Options

```powershell
# smaller, streaming-less build for local iteration (skips the ~161 MB ffmpeg fetch)
npm run dist:win -- -SkipFfmpeg

# reuse an already-built node-runtime\ (faster iteration on the Electron side)
powershell -File ..\..\packaging\win\build-win.ps1 -SkipNodeRuntime

# keep Electron pinned instead of bumping to the latest release
npm run dist:win -- -NoElectronBump
```

To rebuild just the frozen daemon on its own:

```powershell
powershell -File ..\..\packaging\win\build-node-runtime.ps1
```

## 4. Install and run

Run `MeshBay-Setup-<version>.exe`. It is a **per-user** installer — no admin
prompt unless you opt into service mode (background daemon that starts at
boot, before sign-in) or accept the firewall rules, both offered during setup
and both switchable afterwards from the Node page. Installs to
`%LOCALAPPDATA%\Programs\MeshBay\`; runtime data lives in
`%LOCALAPPDATA%\meshbay\`.

## What's not automated yet

- The installer is **unsigned** — Windows SmartScreen will warn on first run
  (Authenticode signing is planned, not done).
- No Windows CI runner builds this — it's a manual build today.
- No genuine clean-machine (bare Windows 11 VM) install has been verified —
  see `docs/WINDOWS-PORT.md` §5.4 for what has been checked instead.

For everything else — what the installer actually contains, the two autostart
modes, the firewall rules and why they're scoped the way they are, networking
across NATs/VMs, and the dependency surface to watch when adding a Python
package — read [`packaging/win/README.md`](../packaging/win/README.md).