mbproxy/README: route publish steps through install/publish.ps1
The README was telling readers to memorise the dotnet publish flag set; now it points at the script that captures both flavours so the documented path matches what we actually run. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+14
-7
@@ -72,13 +72,20 @@ The `docs/` tree is organized by topic. Start with [`docs/design.md`](docs/desig
|
||||
dotnet build Mbproxy.slnx -c Debug
|
||||
```
|
||||
|
||||
**Publish (Release, single-file self-contained, win-x64):**
|
||||
**Publish (Release, single-file, win-x64):**
|
||||
|
||||
```powershell
|
||||
dotnet publish src/Mbproxy/Mbproxy.csproj -c Release -r win-x64 --self-contained true -o C:\build\mbproxy-publish
|
||||
.\install\publish.ps1 -Clean
|
||||
```
|
||||
|
||||
The published output is a single `Mbproxy.exe` (~100 MB). The self-contained publish bundles the full .NET 10 + ASP.NET Core runtime. No .NET installation is required on the target machine.
|
||||
Produces both flavours under `publish-out\`:
|
||||
|
||||
| Flavour | Path | Size | Target prerequisite |
|
||||
|---|---|---|---|
|
||||
| Self-contained | `publish-out\self-contained\Mbproxy.exe` | ~100 MB | None — bundles .NET 10 + ASP.NET Core runtime |
|
||||
| Framework-dependent | `publish-out\framework-dependent\Mbproxy.exe` | ~1.5 MB | .NET 10 + ASP.NET Core preinstalled |
|
||||
|
||||
Pass `-OutputDir <path>` to publish elsewhere; omit `-Clean` to skip the wipe. The script wraps `dotnet publish src/Mbproxy/Mbproxy.csproj -c Release -r win-x64 [-p:SelfContained=false]` — run those directly if you only need one flavour.
|
||||
|
||||
**Run tests:**
|
||||
|
||||
@@ -102,11 +109,11 @@ Edit `src/Mbproxy/appsettings.json` to configure PLCs before running. The admin
|
||||
Full detail is in [`docs/operations.md`](docs/operations.md). Quick path:
|
||||
|
||||
```powershell
|
||||
# 1. Publish
|
||||
dotnet publish src/Mbproxy/Mbproxy.csproj -c Release -r win-x64 --self-contained true -o C:\build\mbproxy-publish
|
||||
# 1. Publish (produces publish-out\self-contained\ and publish-out\framework-dependent\)
|
||||
.\install\publish.ps1 -Clean
|
||||
|
||||
# 2. Install (elevated PowerShell)
|
||||
.\install\install.ps1 -PublishOutput C:\build\mbproxy-publish -Start
|
||||
# 2. Install (elevated PowerShell) — point at the flavour you want to deploy
|
||||
.\install\install.ps1 -PublishOutput .\publish-out\self-contained -Start
|
||||
|
||||
# 3. Edit the config that was placed at %ProgramData%\mbproxy\appsettings.json
|
||||
|
||||
|
||||
Reference in New Issue
Block a user