82 lines
4.7 KiB
Markdown
82 lines
4.7 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
|
|
.venv/Scripts/python.exe scripts/collect-licenses.py
|
|
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`.
|
|
|
|
For a separate portable test build while the normal build is running, set `FILEBOW_BUILD_OUT=out/tab-fix` before `pnpm build`. MSIX packaging uses the default `out/FileBow-win32-x64` build.
|
|
|
|
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
|
|
node scripts/capture-wheel.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`.
|
|
|
|
### Explorer tab selection
|
|
|
|
Build the Windows helper, then open two Explorer tabs containing different test files. Select a file in each tab and keep the second tab in the foreground. Run `node tests/explorer-selection.cjs --expect C:/path/to/second-file.txt` from an external test runner that does not take focus. Use repeated `--expect` arguments for multiple files or `--empty` after clearing the active tab's selection. Test switching back to the first tab while another Explorer window is open. `--log test-results/selection.json` records the result; `--helper path/to/FileBow.Windows.exe` checks a specific build.
|
|
|
|
The helper matches the active tab's shell-browser window handle, since tabs share the top-level Explorer window handle. If the foreground window or tab changes during the read, it returns an empty selection.
|
|
|
|
## 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`, `native/ExplorerSelection.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).
|
|
|
|
FileBow is licensed under GPL-3.0-or-later. Before distributing binaries, follow the [license and corresponding-source notes](../licenses/README.md). Generating license notices is separate from providing the matching dependency sources.
|