Skip to content

Windows .exe installer with install folder choice; open .wad files given without -iwad - #1

Merged
luiz-august0 merged 2 commits into
mainfrom
dist-test/windows-exe
Oct 19, 2026
Merged

luiz-august0 merged 2 commits into
mainfrom
dist-test/windows-exe

Conversation

@luiz-august0

@luiz-august0 luiz-august0 commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Windows installer is now an .exe (jpackage + WiX): the user chooses the install folder (default C:\Program Files\DoomJava), Start menu and desktop shortcuts, .wad file association, fixed upgrade UUID. Per-OS jpackage options moved to doom-app/src/dist/jpackage/*.args.
  • Windows portable zip ships the jpackage app-image (DoomJava.exe) instead of doom-java.bat.
  • Loose files (LooseFiles): arguments before the first parameter are used by type (IWAD header → -iwad, .wad → -merge, .deh/.bex → -deh, .lmp → -playdemo); explicit parameters still win. This is what makes the file association and dropping a .wad on the launcher work on every version (divergence D-173).
  • release.yml: WiX install step on Windows; workflow_dispatch and dist-test/** branches build the artifacts (version 1.0.0) without publishing a release.

Test plan

  • ./mvnw verify
  • -Pdist build on macOS (dmg + portable zips); headless timedemo: loose freedoom2.wad loads Freedoom 2, explicit -iwad wins
  • Release workflow on dist-test/windows-exe: all 4 platforms green (run 39338225551)
  • Windows machine: installer asks for the folder (default Program Files), double-clicking a .wad opens it, portable DoomJava.exe accepts a dropped .wad

🤖 Generated with Claude Code


Devin Review

luiz-august0 and others added 2 commits October 19, 2026 19:51
…ven without -iwad

- jpackage builds an .exe on Windows: install folder dialog (default C:\Program Files\DoomJava), Start menu and
  desktop shortcuts, .wad file association, fixed upgrade UUID. Per-OS jpackage options moved to
  doom-app/src/dist/jpackage/*.args.
- The Windows portable zip ships the jpackage app-image (DoomJava.exe) instead of doom-java.bat.
- LooseFiles: arguments before the first parameter are used by type (IWAD header -> -iwad, .wad -> -merge,
  .deh/.bex -> -deh, .lmp -> -playdemo), so file associations and dropping a file on the launcher work (D-173).
- release.yml: WiX install step on Windows, workflow_dispatch and dist-test/* branches build without a release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@luiz-august0
luiz-august0 merged commit 6c5cb5b into main Oct 19, 2026
8 of 9 checks passed
@luiz-august0
luiz-august0 deleted the dist-test/windows-exe branch October 19, 2026 23:19

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 3 potential issues.

1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)

Devin Review

Comment on lines +45 to +48
if (iwad == null && isIwad(arg)) {
iwad = arg;
} else {
merge.add(arg);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Bare IWAD name loads wrong game

When freedoom2.wad lives in an IWAD search directory, isIwad checks only the working directory and classifies it as a PWAD. The game loads its default IWAD and merges Freedoom instead of playing Freedoom 2.

Learn more

A bare filename can be resolved through the normal IWAD search path even when it is not in the working directory. isIwad only reads the raw path, while findWadByName searches the configured IWAD locations. When the raw path cannot be read, expansion turns it into -merge, and GameSources.load selects the default IWAD before merging the requested one. The resulting game uses data from two IWADs instead of the chosen game.

Example: Put freedoom2.wad in the portable iwads folder and run doom-java.sh freedoom2.wad from another directory. Expansion emits -merge freedoom2.wad; the game selects bundled doom1.wad before loading Freedoom 2.

Recommended fix: Resolve loose WAD names through the same IWAD search path before inspecting their headers, or defer classification until the locator can resolve them. Preserve the resolved path and treat an unreadable file as an error rather than assuming it is a PWAD.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +45 to +48
if (iwad == null && isIwad(arg)) {
iwad = arg;
} else {
merge.add(arg);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Explicit IWAD mixes two games

With a loose IWAD and explicit -iwad, LooseFiles merges the loose IWAD despite choosing the explicit one. Its maps and assets override the selected game's data.

Learn more

LooseFiles.expand appends the implicit -iwad after the explicit arguments. LaunchOptions.parse therefore selects the explicit IWAD. However, expansion has already placed the loose IWAD into the merge list when another IWAD was explicitly selected. GameSources.load merges it over the selected IWAD, letting its lumps replace the selected game's data.

Example: Run DoomJava.exe C:\wads\doom1.wad -iwad C:\wads\doom2.wad. Doom 2 becomes the base IWAD, but Doom 1 is merged on top instead of ignored.

Recommended fix: Before grouping WADs, detect an explicit -iwad. Do not merge a loose IWAD that lost to the explicit selection; apply this rule to every extra IWAD rather than treating it as a PWAD.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

String arg = args.get(i);
String lower = arg.toLowerCase(Locale.ROOT);
if (lower.endsWith(".wad")) {
// DIVERGE: Chocolate picks the IWAD by file name, and only for absolute Windows paths (docs/divergences.md)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Loose-file divergence lacks required ID

The DIVERGE comment omits D-173, violating the required divergence-reference format in coding rules.

Suggested change
// DIVERGE: Chocolate picks the IWAD by file name, and only for absolute Windows paths (docs/divergences.md)
// DIVERGE: Chocolate picks the IWAD by name and requires absolute Windows paths (see docs/divergences.md D-173)

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

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