Files
FileBow/docs/DEVELOPMENT.md
T

70 lines
3.4 KiB
Markdown

# Development
Build on Windows x64 with Node.js 24, pnpm, Python 3.11 and .NET SDK 8. The .NET restore includes Windows SDK BuildTools for MakeAppx and SignTool. Generated runtimes and packages are excluded from Git.
## Setup
```powershell
git clone https://git.nordik.dev/nordik/FileBow.git
cd FileBow
pnpm install --frozen-lockfile
node node_modules/electron/install.js
py -3.11 -m venv .venv
.venv/Scripts/python.exe -m pip install -r engine/requirements.lock.txt
dotnet restore native/FileBow.Windows.csproj --locked-mode
powershell -NoProfile -File scripts/fetch-ffmpeg.ps1
pnpm build:windows
.venv/Scripts/python.exe scripts/store-assets.py
.venv/Scripts/python.exe scripts/collect-licenses.py
pnpm start
```
The app interface and package language are English (`en-US`). Files and filenames can contain other languages. Windows-owned dialogs follow the operating system language.
## Build
```powershell
pnpm build:engine
pnpm build
pnpm build:msix
pnpm build:store
```
- `out/FileBow-win32-x64/FileBow.exe`: portable build; keep its entire directory together.
- `out/msix/FileBow_1.0.0.0_x64_Development.msix`: signed with a local development certificate.
- `out/msix/FileBow_1.0.0.0_x64_Store.msix`: unsigned Store submission package using `store/identity.store.json`.
To install the development package in a Windows test environment, run `scripts/install-development.ps1` from an elevated PowerShell. It verifies the recorded package hash, trusts the supplied development certificate and installs the package. It is not a Store installation script. Building a package does not install it or trust its certificate system-wide.
## Verify
For a portable release, build the app, commit the intended source revision, then run `.venv/Scripts/python.exe scripts/build-release.py --tag v1.0.0-rc.1`. The script creates a ZIP, startup notes, a source revision record and SHA-256 checksums under `out/releases`. Publish these as release assets rather than committing generated binaries to Git.
```powershell
pnpm test
.venv/Scripts/python.exe tests/engine_smoke.py
$env:FILEBOW_PACKAGED_ENGINE = (Resolve-Path vendor/engine/FileBowEngine.exe).Path
.venv/Scripts/python.exe tests/engine_smoke.py
pnpm test:ui
$env:FILEBOW_EXECUTABLE = (Resolve-Path out/FileBow-win32-x64/FileBow.exe).Path
pnpm test:ui
.venv/Scripts/python.exe scripts/verify-msix.py out/msix/FileBow_1.0.0.0_x64_Store.msix --allow-unsigned --identity store/identity.store.json
node scripts/capture-store.cjs
```
The worker tests check real conversions, encryption, image transparency, estimates, filename collisions and unchanged originals. UI checks use an isolated profile with global shortcuts and drag monitoring disabled. Screenshot capture uses sample files only. Local logs are in `test-results`.
## Structure
| Path | Purpose |
| --- | --- |
| `src/main.cjs` | Jobs, settings, tray, shortcuts and application lifecycle |
| `src/renderer` | Main interface, editors and radial menu |
| `src/preload` | Narrow IPC bridges for isolated renderers |
| `engine/filebow_engine.py` | Local conversion worker and JSON-lines protocol |
| `native/Program.cs` | Explorer selection, drag detection and Windows startup integration |
| `scripts` | Runtime, application, package and screenshot builds |
| `store` | Store identity, listing drafts, assets and submission checklist |
See the [release checklist](../store/RELEASE.md) for remaining release checks. The product overview is in the [README](../README.md).