Skip to content

Relative project paths - #644

Merged
JanuszBedkowski merged 3 commits into
MapsHD:mainfrom
capCafu:relative-project-paths
Nov 19, 2026
Merged

JanuszBedkowski merged 3 commits into
MapsHD:mainfrom
capCafu:relative-project-paths

Conversation

@capCafu

@capCafu capCafu commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Closes #626.

Step 3 project files (.mjp) now store session paths relative to the project file's folder, so a project keeps working after its folder is moved or copied to another computer. Old projects with absolute paths load as before.

  • Add resolveProjectPath() to shared/include/HDMapping/SessionPaths.h. Unlike resolveSessionPath(), it doesn't fall back to a file of the same name next to the project, because sessions are usually all called session.mjs. Paths that older versions saved relative to the current folder (sessions given on the command line) still load.
  • Save with toSessionPath() and load with resolveProjectPath() in step 3, its no-GUI version (Python bindings) and the legacy step 3.

Users will notice: new projects contain relative paths. Older HDMapping versions can open them only when started from the project folder. I'll update File Formats in the wiki once this is merged.

@JanuszBedkowski
JanuszBedkowski merged commit 784adfe into MapsHD:main Nov 19, 2026
7 checks passed
@capCafu
capCafu deleted the relative-project-paths branch November 20, 2026 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

step3 paths in global --> change to local

2 participants