Skip to content

Import bottles, WhiskyWine and settings from upstream Whisky - #2

Merged
iStorry merged 6 commits into
mainfrom
feat/bundle-id-migration
Oct 29, 2026
Merged

iStorry merged 6 commits into
mainfrom
feat/bundle-id-migration

Conversation

@iStorry

@iStorry iStorry commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

Follows #1, which moved the bundle ID to com.istorry.Whisky.

Why

Bottles (~/Library/Containers/<bundle-id>/BottleVM.plist), WhiskyWine (~/Library/Application Support/<bundle-id>/Libraries) and settings are all keyed by bundle ID. After the move to com.istorry.Whisky, anyone switching from upstream Whisky would see an empty bottle list and have to download Wine again from upstream's server.

What

UpstreamDataMigration.migrateIfNeeded() runs once, from WhiskyApp.init (before BottleVM.shared creates our bottle list) and from WhiskyCmd's main:

  1. Settings: keys missing from our domain are copied from com.isaacmarovitz.Whisky. A defaultBottleLocation that points at upstream's own Bottles folder is skipped, so new bottles go into our container. A custom location is kept.
  2. WhiskyWine: upstream's Libraries folder is moved into ours if we don't have one yet. DLLs are copied into bottles, not linked, so nothing points back into the old location.
  3. Bottle list: upstream's paths are merged into ours, skipping duplicates. Bottles are not moved. Programs inside Wine prefixes record absolute paths, and macOS treats the upstream folder as a protected app container whose folder can't be renamed or removed. Its contents stay readable and writable.

Each step is idempotent. Completion is recorded only after all steps succeed, so a failure shows an alert in the app (stderr in the CLI) and is retried on the next launch.

Supporting refactors:

  • BottleData and WhiskyWineInstaller paths are now derived per bundle ID, so the upstream locations reuse the same code.
  • BottleData gained a throwing write() (the old encode() wraps it, behaviour unchanged).
  • defaultBottleLocation is now a named constant instead of a string literal repeated in two views.

Also adds docs/upstream-issue-triage.md: a priority-ranked triage (P0–P3) of the 433 open upstream Whisky-App/Whisky issues, grouped by underlying problem, to plan work on the fork.

Verification

  • swiftlint --strict, Debug and Release xcodebuild for Whisky and WhiskyCmd pass with no project warnings.
  • Ran WhiskyCmd against fake upstream data in ~/Library:
    • fresh install, no upstream data → marked complete, nothing imported
    • upstream bottle plus a duplicate custom-path bottle → upstream bottle imported once, duplicate skipped
    • Wine moved; settings copied without overwriting existing ones; upstream-default defaultBottleLocation skipped, custom one kept
    • after completion, newly added upstream bottles are not re-imported
    • corrupt upstream BottleVM.plist → error on stderr, Wine still moved, not marked complete; succeeds on the next run once fixed

Not verified:

  • The alert has not been seen in the running app.
  • Whether a signed build triggers macOS's "would like to access data from other apps" prompt when it reads upstream's container. If it does and the user declines, the migration fails and is retried on the next launch.
  • New strings are English only; Crowdin will pick them up.

- Bundle IDs: com.istorry.Whisky, com.istorry.WhiskyCmd,
  com.istorry.Whisky.WhiskyThumbnail (incl. WhiskyKit fallback)
- Drop upstream development team ID
- Mark project and schemes as upgraded for Xcode 26.2; enable
  project-wide user script sandboxing and string catalog symbols,
  keeping sandboxing off for the Whisky target's SwiftLint phase
- WhiskyKit: swift-tools-version 6.2, swiftLanguageModes, https
  dependency URL
- SwiftLint: exclude nested .build directories
Data is keyed by bundle ID, so users switching from upstream
(com.isaacmarovitz.Whisky) would otherwise see no bottles and have to
reinstall WhiskyWine.

On first launch of the app or CLI:
- Settings missing from our domain are copied over, except a
  defaultBottleLocation that points at upstream's own bottle folder
- WhiskyWine Libraries are moved into our Application Support folder
- Upstream's bottle list is merged into ours; bottles stay in place,
  since Wine prefixes record absolute paths and macOS protects the
  upstream container folder from being moved

Each step is idempotent and completion is only recorded once all
succeed, so a failure is reported (alert in the app, stderr in the CLI)
and retried on the next launch.
Replaces the Ubuntu SwiftLint workflow, which used a years-old
SwiftLint image and did not build the app, with a macos-26 job that
lints with a checksum-verified SwiftLint 0.65.1 and builds Whisky and
WhiskyCmd against the committed Package.resolved. Points the README
badge at the fork.
@iStorry
iStorry deleted the branch chore/xcode-26-swift-6.2 October 29, 2026 03:34
@iStorry iStorry closed this Oct 29, 2026
@iStorry iStorry reopened this Oct 29, 2026
@iStorry
iStorry changed the base branch from chore/xcode-26-swift-6.2 to main October 29, 2026 03:34
@iStorry iStorry closed this Oct 29, 2026
@iStorry
iStorry deleted the feat/bundle-id-migration branch October 29, 2026 03:38
@iStorry
iStorry restored the feat/bundle-id-migration branch October 29, 2026 03:38
@iStorry iStorry reopened this Oct 29, 2026
@iStorry
iStorry merged commit 3f91377 into main Oct 29, 2026
1 check passed
@iStorry
iStorry deleted the feat/bundle-id-migration branch October 29, 2026 03:41
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