Commit 661f905
@ (#56)
Forge: fall back to the run jar when there is no @Args launcher (#42)
Pre-1.17 Forge (<=1.16.5) does not emit an OS @Args file; the installer
produces a runnable server jar instead. createServer only ever looked for
win_args.txt/unix_args.txt and threw installer-args-not-found for those
versions even though the install succeeded.
- New pure, unit-testable pickForgeRunJar() in serverDetect: given the
top-level jar listing, pick the produced forge/neoforge run jar
(universal on <=1.12, forge-<mcver>-<forgever>.jar on 1.13-1.16),
skipping the installer jar itself.
- createServer: if no @Args file is found after the installer runs, fall
back to launching that jar with -jar; only throw when neither exists.
1.17+ Forge / NeoForge keep the @Args path unchanged.
- universal-first ordering is safe only because listJars is top-level
only (documented in a comment so nobody makes it recursive).
- WIZARD smoke: cover the jar-vs-args decision (universal / loader / none,
installer excluded, vanilla server jar never picked, neoforge keyword).
Scope: this fixes the installer-args-not-found failure only. Actually
launching an old-Forge server also needs a compatible JRE (Java 8), which
is the Java-provisioning / #44 matrix concern, not this change.
@
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent 73de66b commit 661f905
3 files changed
Lines changed: 66 additions & 0 deletions
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
20 | 48 | | |
21 | 49 | | |
22 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
2637 | 2638 | | |
2638 | 2639 | | |
2639 | 2640 | | |
| 2641 | + | |
| 2642 | + | |
| 2643 | + | |
| 2644 | + | |
| 2645 | + | |
| 2646 | + | |
| 2647 | + | |
| 2648 | + | |
| 2649 | + | |
| 2650 | + | |
| 2651 | + | |
| 2652 | + | |
| 2653 | + | |
| 2654 | + | |
| 2655 | + | |
| 2656 | + | |
| 2657 | + | |
| 2658 | + | |
| 2659 | + | |
| 2660 | + | |
| 2661 | + | |
| 2662 | + | |
| 2663 | + | |
| 2664 | + | |
| 2665 | + | |
| 2666 | + | |
| 2667 | + | |
| 2668 | + | |
| 2669 | + | |
| 2670 | + | |
| 2671 | + | |
| 2672 | + | |
| 2673 | + | |
| 2674 | + | |
| 2675 | + | |
| 2676 | + | |
| 2677 | + | |
2640 | 2678 | | |
2641 | 2679 | | |
2642 | 2680 | | |
| |||
0 commit comments