You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The project uses a unified, modular build script (`electron-app/build.mjs`) to handle building the backend (Go), packet sender (Rust), and frontends (React/Vite) for the Electron application.
4
+
5
+
## Prerequisites
6
+
7
+
-**Node.js** & **pnpm**
8
+
-**Go** (1.21+)
9
+
-**Rust/Cargo** (for Packet Sender)
10
+
11
+
## Basic Usage
12
+
13
+
Run the build script from the `electron-app` directory (or via npm scripts).
The build configuration is defined in `electron-app/build.mjs` within the `CONFIG` object.
26
+
27
+
## Build Specific Components
28
+
29
+
You can build individual components by passing their flag.
30
+
31
+
```sh
32
+
# Build only the Backend
33
+
node build.mjs --backend
34
+
35
+
# Build only the Testing View
36
+
node build.mjs --testing-view
37
+
38
+
# Build only the Packet Sender
39
+
node build.mjs --packet-sender
40
+
```
41
+
42
+
## Platform Targeting
43
+
44
+
By default, the script builds for all defined platforms (Windows, Linux, macOS). You can limit this using flags.
45
+
46
+
```sh
47
+
# Build backend for Windows only
48
+
node build.mjs --backend --win
49
+
50
+
# Build everything for Linux
51
+
node build.mjs --linux
52
+
```
53
+
54
+
## Advanced: Overwriting Commands
55
+
56
+
The build script allows you to override configuration properties on the fly. This is useful for CI pipelines where you might want to use different build commands or flags.
57
+
58
+
**Syntax**: `--[target].[property]="value"`
59
+
60
+
### Examples
61
+
62
+
```sh
63
+
# Use a custom build command for the backend:
64
+
node build.mjs --backend --backend.commands="pnpm run build:prod --"
0 commit comments