Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/windows-portable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Windows portable MVP

on:
workflow_dispatch:
push:
branches:
- feature/gui-collector-mvp
paths:
- .github/workflows/windows-portable.yml

permissions:
contents: read

jobs:
build-windows-portable:
runs-on: windows-2022
timeout-minutes: 360

steps:
- name: Check out the instrumented Kdenlive fork
uses: actions/checkout@v4

- name: Build and assemble the portable MVP
shell: pwsh
run: |
$ErrorActionPreference = "Stop"
Set-ExecutionPolicy -Scope Process Bypass
.\packaging\windows\build-editpath.ps1

- name: Upload portable Windows MVP
uses: actions/upload-artifact@v4
with:
name: EditPath-Windows-x64
path: windows-output/EditPath-Windows-x64.zip
if-no-files-found: error
retention-days: 14
14 changes: 13 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ option(BUILD_TESTING "Build tests" ON)
option(CRASH_AUTO_TEST "Auto-generate testcases upon some crashes (uses RTTR library, needed for fuzzing)" OFF)
option(BUILD_FUZZING "Build fuzzing target" OFF)
option(BUILD_QCH "Build source code documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)" OFF)
option(BUILD_EDIT_PATH_RECORDER "Build the Edit Path recorder supervisor" ON)
add_feature_info(QCH ${BUILD_QCH} "Source code documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)")

# shall we use DBus?
Expand Down Expand Up @@ -232,6 +233,18 @@ add_subdirectory(src)
add_subdirectory(renderer)
add_subdirectory(thumbnailer)
add_subdirectory(data)
if(BUILD_EDIT_PATH_RECORDER)
add_subdirectory(video-path-pilot/gui)
install(FILES
video-path-pilot/job_pipeline.py
video-path-pilot/media_reconstruct.py
video-path-pilot/normalize_sample.py
video-path-pilot/validate_sample.py
video-path-pilot/validate_video_path.py
video-path-pilot/sample.schema.json
video-path-pilot/video-path.schema.json
DESTINATION ${KDE_INSTALL_BINDIR}/video-path-pilot)
endif()

# Install
ki18n_install(po)
Expand Down Expand Up @@ -271,4 +284,3 @@ feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
# pre-commit hook
include(KDEGitCommitHooks)
kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)

73 changes: 73 additions & 0 deletions WINDOWS_BUILD.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Building the Windows portable MVP

This produces an unsigned, portable 64-bit Windows engineering build. It does
not modify the official Kdenlive installation and does not require the editor
to install Python.

## Requirements

- 64-bit Windows 10 or Windows 11;
- at least 40 GB free disk space and 8 GB RAM (16 GB preferred);
- a stable internet connection and several hours for the first build;
- [Git for Windows](https://git-scm.com/download/win);
- [Python 3.11 or newer, 64-bit](https://www.python.org/downloads/windows/),
with **Add Python to PATH** selected;
- [Visual Studio 2022 Build Tools](https://visualstudio.microsoft.com/downloads/)
with **Desktop development with C++** selected.

Administrator access is useful for installing prerequisites, but the resulting
portable application does not require administrator access.

## Build

Run the fast prerequisite check first. It does not download or compile Kdenlive:

```powershell
Set-ExecutionPolicy -Scope Process Bypass
.\packaging\windows\build-editpath.ps1 -PreflightOnly
```

Only continue when it prints `PREFLIGHT PASSED`.

Open PowerShell in the repository root and run:

```powershell
Set-ExecutionPolicy -Scope Process Bypass
.\packaging\windows\build-editpath.ps1
```

Prefer a short checkout path such as `C:\src\edit-path`; long or space-heavy
paths can cause problems in Windows C++ dependency builds.

The script verifies prerequisites before downloading or compiling anything. It
then bootstraps KDE Craft under `C:\CraftRoot`, builds this exact checkout,
packages all runtime dependencies, embeds Python, generates synthetic test
media, and verifies both application executables.
It also prevents sleep while its process is running, writes the complete output
to `windows-output\windows-build.log`, and runs the packaged applications'
non-interactive version/self-tests before creating the ZIP.

The first build may take several hours. Keep PowerShell open and prevent the
computer from sleeping. A failed build can normally be retried with the same
command; Craft reuses completed dependencies.

## Result

Successful output is written to:

```text
windows-output\
├── EditPath-Windows-x64\
├── EditPath-Windows-x64.zip
└── build-manifest.json
```

Run `windows-output\EditPath-Windows-x64\bin\EditPath.exe`. Do not run
`kdenlive.exe` directly because that bypasses recording. Windows SmartScreen
may warn because the MVP has not yet been code-signed; use **More info → Run
anyway** only for an artifact built from the company repository.

If the script fails, save the complete PowerShell output and send the last 100
lines of `windows-output\windows-build.log` along with
`windows-output\build-manifest.json` if it exists. Do not
delete `C:\CraftRoot`, because it contains reusable dependency builds.
64 changes: 64 additions & 0 deletions WINDOWS_TEST_PLAN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Windows MVP acceptance test

Use the synthetic files shipped in the portable package's `test-media` folder.
Perform the normal-session test before the crash-recovery test.

## Editing assignment

> Create a 12–18 second 1280×720 video using both supplied video assets. Cut
> unwanted sections, arrange material from both videos, add the supplied audio
> track, adjust its timing, perform at least one undo and redo, and render the
> final result as MP4. This is an operational test; no editor explanation or
> creative intent should be entered.

## Test A: normal session

1. Extract `EditPath-Windows-x64.zip` to a normal writable folder.
2. Confirm `SELF-TEST.json` exists and contains `"passed": true`.
3. Double-click `bin\EditPath.exe`. Do not open `kdenlive.exe`.
4. Confirm Kdenlive opens directly with no terminal or initialization screen.
5. Import all three files from `test-media`.
6. Add both videos to the timeline and make at least two cuts.
7. Move or trim one clip at a visible frame boundary.
8. Add `test-audio.wav` and move it to a deliberate timeline position.
9. Press **Ctrl+Z** once and **Ctrl+Shift+Z** once.
10. Save normally. Confirm no second project filename is requested and the
session contains `edit.kdenlive`.
11. Render one MP4 directly into the displayed session folder.
12. Close Kdenlive normally.
13. Confirm the Edit Path completion screen appears, then click **Finish
Session**.
14. Open the generated sample and confirm `sample.json`, assets, final video,
raw events, native project, and validation reports exist.

Record PASS/FAIL and notes for every check:

- Kdenlive opened directly.
- No terminal/init screen appeared.
- Editing and preview worked.
- `edit.kdenlive` was created.
- Final MP4 rendered.
- Completion screen appeared only after closing Kdenlive.
- `sample.json` was generated.
- Operations contain integer frame positions/state changes.
- `history.undo` and `history.redo` are present.
- Asset IDs and SHA-256 hashes are present.
- Reconstruction report exists and states passed, unsupported, or failed with
an explicit reason.

## Test B: crash recovery

1. Start `bin\EditPath.exe` again.
2. Import `test-video-1.mp4`, put it on the timeline, and press **Ctrl+S**.
3. Make another visible edit and press **Ctrl+S** again.
4. Open Windows Task Manager, select Kdenlive, and choose **End task**. Do not
terminate EditPath.
5. Confirm the recovery screen appears.
6. Choose **Recover and Continue**.
7. Confirm `edit.kdenlive` reopens and the saved timeline edit remains.
8. Make one additional edit, save, render an MP4, and close normally.
9. Finish the session and confirm multiple numbered raw-event and console-log
segments were retained.

Do not report a test as passed if Kdenlive merely opened. A successful MVP test
must complete packaging and inspect the resulting `sample.json`.
Loading