Files
Scott GarrettandClaude Code 723db31fc0 Rename the build to SublerMKV.app, fully isolated from upstream
PRODUCT_NAME becomes SublerMKV (the interpolated bundle id follows to
org.galad.SublerMKV) and all Application Support data moves to its own
SublerMKV/ folder with the queue renamed queue.sbmkvqueue, so fork builds
and an installed upstream Subler.app never share prefs, files, or a
LaunchServices registration.

PRODUCT_MODULE_NAME stays pinned to "Subler" deliberately: XIB bindings
reference Swift classes module-qualified (Subler.LanguageTransformer), and
letting the module follow the product made the queue-options nib throw
"cannot find value transformer" mid-binding-load, freezing every checkbox
and popup in that window at XIB design state.

Queue.saveToDisk now creates its parent folder before the atomic write;
the write error is swallowed, so on a fresh install the queue would
otherwise silently never persist.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-11-29 20:34:24 -05:00

29 lines
676 B
Swift

//
// Preset.swift
// Subler
//
// Created by Damiano Galassi on 21/08/2017.
//
import Foundation
protocol Preset: NSSecureCoding, NSCopying {
var title: String { get set }
var changed: Bool { get set }
var version: Int { get }
var pathExtension: String { get }
}
extension Preset {
private func appSupportURL() -> URL? {
return FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask).first?.appendingPathComponent("SublerMKV")
}
var fileURL: URL {
guard let url = appSupportURL() else { fatalError() }
return url.appendingPathComponent(title).appendingPathExtension(pathExtension)
}
}