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>
This commit is contained in:
Scott GarrettandClaude Code committed 2026-11-29 20:34:24 -05:00
1 parent 80ca3970ec
commit 723db31fc0
7 files changed
+38 -23

No files matched your search

+1 -1
View File
@@ -87,7 +87,7 @@ final class Logger : NSObject, MP42Logging {
private static func appSupportURL() -> URL {
let fileManager = FileManager.default
if let url = fileManager.urls(for: .applicationSupportDirectory, in: .userDomainMask)
.first?.appendingPathComponent("Subler") {
.first?.appendingPathComponent("SublerMKV") {
do {
if fileManager.fileExists(atPath: url.path) == false {
+1 -1
View File
@@ -230,7 +230,7 @@ final class OCRManager {
}
private lazy var destinationURL = {
return FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask).first?.appendingPathComponent("Subler", isDirectory: true).appendingPathComponent("tessdata", isDirectory: true).appendingPathComponent("v4", isDirectory: true)
return FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask).first?.appendingPathComponent("SublerMKV", isDirectory: true).appendingPathComponent("tessdata", isDirectory: true).appendingPathComponent("v4", isDirectory: true)
}()
private lazy var baseURL = {
+1 -1
View File
@@ -18,7 +18,7 @@ protocol Preset: NSSecureCoding, NSCopying {
extension Preset {
private func appSupportURL() -> URL? {
return FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask).first?.appendingPathComponent("Subler")
return FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask).first?.appendingPathComponent("SublerMKV")
}
var fileURL: URL {
+1 -1
View File
@@ -99,7 +99,7 @@ final class PresetManager {
}
private func appSupportURL() -> URL? {
return FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask).first?.appendingPathComponent("Subler")
return FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask).first?.appendingPathComponent("SublerMKV")
}
private func version(of fileURL: URL) -> Int? {
+9
View File
@@ -67,6 +67,15 @@ final class Queue {
archiver.encode(items, forKey: NSKeyedArchiveRootObjectKey)
archiver.finishEncoding()
// The Application Support/SublerMKV folder must exist before an
// atomic write (a fresh install has none, and the write error is
// swallowed below, which would silently disable persistence)
let fileManager = FileManager.default
let directory = url.deletingLastPathComponent()
if fileManager.fileExists(atPath: directory.path) == false {
try? fileManager.createDirectory(at: directory, withIntermediateDirectories: true, attributes: [:])
}
try? archiver.encodedData.write(to: url, options: [.atomic])
}
}
+1 -1
View File
@@ -214,6 +214,6 @@ final class QueuePreferences: NSObject {
}
var queueURL: URL? {
return FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask).first?.appendingPathComponent("Subler").appendingPathComponent("queue.sbqueue", isDirectory: false)
return FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask).first?.appendingPathComponent("SublerMKV").appendingPathComponent("queue.sbmkvqueue", isDirectory: false)
}
}