Skip to content

Conversation

@sensei-hacker
Copy link
Member

@sensei-hacker sensei-hacker commented Dec 24, 2025

Fixes SITL feature which was broken because the code looked for binaries in the wrong location.

Problem
The SITL path used __dirname which points to the Vite build output (.vite/build/), but SITL binaries are located in resources/public/sitl/. This meant SITL couldn't find its executables in either dev mode or packaged builds.

Changes
Add getSitlBasePath() function that returns the correct path based on whether the app is packaged (process.resourcesPath) or in dev mode (app.getAppPath()/resources/public/sitl)
Add extraResource in forge.config.js to include SITL binaries in packaged builds

The SITL feature was broken because the code looked for binaries in
the wrong location. The path used __dirname which points to the Vite
build output (.vite/build/), but SITL binaries are in resources/public/sitl/.

Changes:
- Add getSitlBasePath() function that returns correct path based on
  whether app is packaged (process.resourcesPath) or in dev mode
  (app.getAppPath()/resources/public/sitl)
- Add extraResource in forge.config.js to include SITL in packages
- Add afterCopy hook to remove binaries for other platforms/architectures,
  reducing package size
@github-actions
Copy link

Branch Targeting Suggestion

You've targeted the master branch with this PR. Please consider if a version branch might be more appropriate:

  • maintenance-9.x - If your change is backward-compatible and won't create compatibility issues between INAV firmware and Configurator 9.x versions. This will allow your PR to be included in the next 9.x release.

  • maintenance-10.x - If your change introduces compatibility requirements between firmware and configurator that would break 9.x compatibility. This is for PRs which will be included in INAV 10.x

If master is the correct target for this change, no action is needed.


This is an automated suggestion to help route contributions to the appropriate branch.

@sensei-hacker sensei-hacker merged commit d9d1431 into iNavFlight:master Dec 24, 2025
7 checks passed
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.

1 participant