Commit 2939a25
Anchor dev code and data directories on the running source tree
FwDirectoryFinder found the dev DistFiles by assuming the running
assembly sat exactly two levels below the tree root, and then let
HKCU RootCodeDir/RootDataDir override whatever it found. So a build
run from any other output folder missed DistFiles entirely, and
every worktree read the DistFiles named by the shared registry
value, which belongs to whichever tree last ran the build or the
launch script.
FindDevDistFiles now walks up from the running assembly to the
directory holding both DistFiles and FieldWorks.sln, and that tree
wins over the registry. An installed FieldWorks has no solution file
beside it, so it keeps reading the registry as before. Set
FW_USE_REGISTRY_DIRS to opt a dev build back into the registry.
Tests cover the walk from Output/Debug, from an architecture
subfolder, and from a project bin folder; the installed case; and
the precedence of the source tree over a registry value naming
another worktree.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent caeeeb1 commit 2939a25
4 files changed
Lines changed: 149 additions & 16 deletions
File tree
- .claude/skills/fieldworks-winapp
- Src/Common/FwUtils
- FwUtilsTests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| 123 | + | |
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
318 | | - | |
319 | | - | |
320 | | - | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
321 | 327 | | |
322 | 328 | | |
323 | 329 | | |
324 | 330 | | |
325 | 331 | | |
326 | 332 | | |
327 | 333 | | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
328 | 367 | | |
329 | 368 | | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
330 | 372 | | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
| 373 | + | |
337 | 374 | | |
338 | 375 | | |
339 | 376 | | |
| |||
349 | 386 | | |
350 | 387 | | |
351 | 388 | | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
352 | 394 | | |
353 | 395 | | |
354 | 396 | | |
355 | 397 | | |
356 | 398 | | |
357 | 399 | | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | 400 | | |
363 | 401 | | |
364 | 402 | | |
| |||
377 | 415 | | |
378 | 416 | | |
379 | 417 | | |
380 | | - | |
381 | | - | |
| 418 | + | |
382 | 419 | | |
383 | 420 | | |
384 | | - | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
385 | 424 | | |
386 | 425 | | |
387 | 426 | | |
| |||
Lines changed: 90 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
68 | 158 | | |
69 | 159 | | |
70 | 160 | | |
| |||
0 commit comments