Skip to content

feat: import an existing Diablo IV install instead of re-downloading#6

Open
jonx wants to merge 1 commit into
MichaelLod:mainfrom
jonx:feat/import-existing-install
Open

feat: import an existing Diablo IV install instead of re-downloading#6
jonx wants to merge 1 commit into
MichaelLod:mainfrom
jonx:feat/import-existing-install

Conversation

@jonx

@jonx jonx commented Jun 22, 2026

Copy link
Copy Markdown

What

Adds Settings → Advanced → "Import existing install…" so people migrating from another Wine wrapper can reuse a Diablo IV download they already have, instead of re-downloading ~140 GB.

Why

Anyone coming from CrossOver / Porting Kit / Whisky / raw GPTK usually already has the full game on disk, and Battle.net will adopt an existing install and pull only the patch delta — but there was no way to get those files into D4Mac's bottle.

How

  • Scans the common wrapper locations for a folder containing Diablo IV.exe + .build.info:
    • Porting Kit / Wineskin .app prefixes (~/Applications, /Applications)
    • CrossOver bottles, Whisky bottles, ~/Games (GPTK)
    • plus a manual folder picker
  • Clones the chosen folder into C:\Program Files (x86)\Diablo IV via clonefile(2) — instant + copy-on-write on the same APFS volume; falls back to a recursive copy across volumes.
  • On success, tells the user Battle.net should detect it automatically (with manual fallback instructions).
  • Adds BottleManager.Phase.importingGame for the status banner.

Testing

swift build clean. Verified the scanner resolves a real Porting Kit install, and that the clone is the same operation as a manual cp -cR (instant, COW) on APFS. Built a local dev bundle around the shipped Wine runtime and exercised the Settings UI.

🤖 Generated with Claude Code

People migrating from CrossOver / Porting Kit / Whisky / GPTK usually already
have the full ~140 GB game on disk. Battle.net can adopt an existing install and
download only the patch delta — but D4Mac had no way to get those files into the
bottle.

Adds Settings -> Advanced -> "Import existing install…":
- scans the common wrapper locations (Porting Kit/Wineskin .app prefixes,
  CrossOver & Whisky bottles, ~/Games for GPTK) for a folder with
  "Diablo IV.exe" + ".build.info", plus a manual folder picker;
- clones the chosen folder into C:\Program Files (x86)\Diablo IV via
  clonefile(2) — instant + copy-on-write on the same APFS volume, with a
  cross-volume copy fallback;
- on success, tells the user Battle.net should detect it automatically (and how
  to point it manually if not).

New BottleManager.Phase.importingGame for the status banner.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 22, 2026

Copy link
Copy Markdown

@jonx is attempting to deploy a commit to the michaellod's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@jonx, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 59 minutes and 55 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 940f6196-642e-470a-aa70-66400bb36333

📥 Commits

Reviewing files that changed from the base of the PR and between 09d3080 and d404368.

📒 Files selected for processing (3)
  • Sources/D4Mac/BottleManager.swift
  • Sources/D4Mac/ImportExistingInstall.swift
  • Sources/D4Mac/Settings.swift
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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