Commit 0b8b5a6
committed
Fix SITL binary path resolution for dev and packaged modes
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 size1 parent 5bf903c commit 0b8b5a6
2 files changed
+49
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
12 | 15 | | |
13 | 16 | | |
14 | 17 | | |
| |||
43 | 46 | | |
44 | 47 | | |
45 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
46 | 80 | | |
47 | 81 | | |
48 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
17 | 30 | | |
18 | 31 | | |
19 | 32 | | |
| |||
350 | 363 | | |
351 | 364 | | |
352 | 365 | | |
353 | | - | |
| 366 | + | |
354 | 367 | | |
355 | 368 | | |
356 | 369 | | |
| |||
373 | 386 | | |
374 | 387 | | |
375 | 388 | | |
376 | | - | |
| 389 | + | |
377 | 390 | | |
378 | 391 | | |
379 | 392 | | |
| |||
0 commit comments