Publish VCC Plus OSS source distribution for 3.6.2 build 60
This commit is contained in:
commit
c652a5276d
1192 files changed
+272368
No files matched your search
@@ -0,0 +1,330 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
import SwiftUI
|
||||
import AppKit
|
||||
|
||||
enum AppCredits {
|
||||
static func resource(_ name: String, extension ext: String) -> URL? {
|
||||
Bundle.main.url(forResource: name, withExtension: ext, subdirectory: "About")
|
||||
}
|
||||
static func text(_ name: String) -> String {
|
||||
guard let url = resource(name, extension: "txt"), let text = try? String(contentsOf: url, encoding: .utf8) else {
|
||||
return "This build is missing its bundled \(name) notice. Please rebuild or reinstall the complete application."
|
||||
}
|
||||
return text
|
||||
}
|
||||
static var hasDiskLibrary: Bool {
|
||||
guard let resources = Bundle.main.resourceURL else { return false }
|
||||
return FileManager.default.fileExists(atPath: resources.appendingPathComponent("Toolchain/LICENSES/DECBFILE-NOTICE.txt").path)
|
||||
}
|
||||
static var hasStandaloneDiskLibrary: Bool {
|
||||
guard let resources = Bundle.main.resourceURL else { return false }
|
||||
return FileManager.default.fileExists(atPath: resources.appendingPathComponent("Toolchain/LICENSES/DSKCON-STANDALONE-NOTICE.txt").path)
|
||||
}
|
||||
static var diskLibraryNotice: String {
|
||||
let core = "The ROM-backed core of decbfile, by Pierre Sarrazin, is public-domain software and retains its upstream no-warranty notice. It provides disk-file access through the Disk BASIC ROM loaded in the emulated CoCo. That ROM is separate third-party software and is not covered by the library’s public-domain dedication or VCC Plus’s GPL license."
|
||||
guard hasStandaloneDiskLibrary else { return core }
|
||||
return core + "\n\nThis build also includes Pierre Sarrazin’s standalone floppy disk driver as an optional development library. His upstream notice declares it public domain except for the portions taken from Disk Extended Color BASIC. Those portions are separate third-party code and are not covered by VCC Plus’s GPL license or the library’s public-domain dedication. Their respective owners retain their rights. Linking this driver is an explicit project choice; it allows disk access without keeping Disk BASIC mapped. Rights-holder inquiries or removal requests may be sent to [email protected]."
|
||||
}
|
||||
static var developmentTools: String {
|
||||
let introduction = "CMOC by Pierre Sarrazin · LWTools by William Astle and contributors · mcpp by Kiyoshi Matsui and contributors · GNU Make by the Free Software Foundation and contributors · Perl by Larry Wall and contributors.\n\nCMOC, LWTools and GNU Make are GPL-licensed. mcpp uses a BSD license. Perl is available under the GNU GPL version 1 or later, or the Artistic License. Exact upstream source snapshots and licenses are retained in the repository. The bundled toolchain excludes the separately supplied floating-point ROM. Any included standalone Disk BASIC-derived driver is identified separately below.\n\n"
|
||||
guard let base = Bundle.main.resourceURL?.appendingPathComponent("Toolchain/LICENSES"),
|
||||
let files = try? FileManager.default.contentsOfDirectory(at: base, includingPropertiesForKeys: nil) else {
|
||||
return introduction + "The optional development toolchain is not included in this build."
|
||||
}
|
||||
return introduction + (hasDiskLibrary ? diskLibraryNotice + "\n\n" : "") + files.sorted { $0.lastPathComponent < $1.lastPathComponent }.map {
|
||||
"—— " + $0.lastPathComponent + " ——\n\n" + ((try? String(contentsOf: $0, encoding: .utf8)) ?? "Notice unavailable.")
|
||||
}.joined(separator: "\n\n")
|
||||
}
|
||||
static var version: String {
|
||||
let info = Bundle.main.infoDictionary ?? [:]
|
||||
return "Version \(info["CFBundleShortVersionString"] as? String ?? "Development") (build \(info["CFBundleVersion"] as? String ?? "—"))"
|
||||
}
|
||||
}
|
||||
|
||||
private struct CreditArtwork: View {
|
||||
let name: String
|
||||
var ext = "pdf"
|
||||
let label: String
|
||||
var body: some View {
|
||||
if let url = AppCredits.resource(name, extension: ext), let image = NSImage(contentsOf: url) {
|
||||
Image(nsImage: image).resizable().scaledToFit().accessibilityLabel(label)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Both windows read the same approved notices; no duplicate legal copy in views.
|
||||
private struct LegalNoticesView: View {
|
||||
private let notices = [
|
||||
("Copyright & Trademarks", "CopyrightNotice"),
|
||||
("Original Artwork", "ArtworkNotice"),
|
||||
("ROMs & Third-Party Software", "ROMNotice"),
|
||||
("DriveWire protocol", "DriveWireCredit")
|
||||
]
|
||||
var body: some View {
|
||||
VStack(alignment: .leading, spacing: 20) {
|
||||
ForEach(notices, id: \.1) { title, resource in
|
||||
VStack(alignment: .leading, spacing: 8) {
|
||||
Text(title).font(.headline).accessibilityAddTraits(.isHeader)
|
||||
Text(AppCredits.text(resource)).textSelection(.enabled)
|
||||
if resource == "DriveWireCredit" {
|
||||
Link("DriveWire project and specification", destination: URL(string: "https://github.com/DrPitre/DriveWire")!)
|
||||
} else if resource == "ArtworkNotice" {
|
||||
Link("SockMaster’s CoCo 3 and CM-8 illustration on CoCopedia",
|
||||
destination: URL(string: "https://www.cocopedia.com/wiki/File:COCO-CM8.GIF")!)
|
||||
}
|
||||
}
|
||||
}
|
||||
if AppCredits.hasDiskLibrary {
|
||||
VStack(alignment: .leading, spacing: 8) {
|
||||
Text("Disk File Library").font(.headline).accessibilityAddTraits(.isHeader)
|
||||
Text(AppCredits.diskLibraryNotice).textSelection(.enabled)
|
||||
}
|
||||
}
|
||||
Link("Contact: [email protected]", destination: URL(string: "mailto:[email protected]")!)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct AboutVCCView: View {
|
||||
@Environment(\.colorScheme) private var colorScheme
|
||||
@Environment(\.openWindow) private var openWindow
|
||||
var body: some View {
|
||||
ScrollViewReader { proxy in
|
||||
VStack(spacing: 0) {
|
||||
HStack(spacing: 12) {
|
||||
Button { proxy.scrollTo("mac-credits", anchor: .top) } label: { Label("Mac credits", systemImage: "desktopcomputer") }
|
||||
.accessibilityIdentifier("about-mac-credits")
|
||||
Button { proxy.scrollTo("notices", anchor: .top) } label: { Label("Notices", systemImage: "doc.text") }
|
||||
.accessibilityIdentifier("about-notices")
|
||||
Button { proxy.scrollTo("windows-credits", anchor: .top) } label: { Label("Windows credits", systemImage: "person.2") }
|
||||
.accessibilityIdentifier("about-windows-credits")
|
||||
Spacer(minLength: 4)
|
||||
Button { openWindow(id: "credits") } label: { Label("Licenses…", systemImage: "text.book.closed") }
|
||||
.accessibilityIdentifier("about-licenses")
|
||||
}.buttonStyle(.bordered).controlSize(.small).padding(14)
|
||||
Divider()
|
||||
ScrollView {
|
||||
VStack(alignment: .leading, spacing: 22) {
|
||||
HStack(alignment: .top, spacing: 20) {
|
||||
Image(nsImage: NSApplication.shared.applicationIconImage)
|
||||
.resizable().scaledToFit().frame(width: 96, height: 96)
|
||||
.accessibilityLabel("VCC Plus app icon").accessibilityIdentifier("about-app-icon")
|
||||
VStack(alignment: .leading, spacing: 8) {
|
||||
Text("VCC Plus OSS").font(.title.bold()).accessibilityAddTraits(.isHeader)
|
||||
Text(AppCredits.version).foregroundStyle(.secondary)
|
||||
Button("Release History…") { openWindow(id: "release-history") }
|
||||
.accessibilityIdentifier("about-release-history")
|
||||
Text("Designed by Brian Holman").font(.headline)
|
||||
Text("Sponsored by Dezota LLC").font(.headline)
|
||||
}
|
||||
}.id("mac-credits")
|
||||
VStack(alignment: .leading, spacing: 16) {
|
||||
Text("""
|
||||
VCC Plus brings the wonder of the Color Computer to a new generation—and new possibilities to those who grew up with it. Reimagined for the Mac, it combines classic computing with a browsable software library, an integrated C development environment, and a native interface.
|
||||
|
||||
Built on decades of outstanding work by the Color Computer community and developed with the assistance of OpenAI’s ChatGPT and Codex, VCC Plus connects that rich legacy with today’s tools—honoring the creators, preserving their attributions, and respecting the licenses that make this work possible.
|
||||
""")
|
||||
.foregroundStyle(.secondary).fixedSize(horizontal: false, vertical: true)
|
||||
.textSelection(.enabled)
|
||||
HStack(alignment: .center) {
|
||||
CreditArtwork(name: "founder", label: "Brian Holman, founder illustration")
|
||||
.frame(width: 64, height: 85).accessibilityIdentifier("about-founder")
|
||||
Spacer(minLength: 24)
|
||||
Link(destination: URL(string: "https://www.dezota.com")!) {
|
||||
CreditArtwork(name: colorScheme == .dark ? "dezota-dark" : "dezota", label: "Dezota LLC corporate logo").frame(width: 156, height: 36)
|
||||
}.buttonStyle(.plain).help("Open the Dezota LLC website").accessibilityLabel("Dezota LLC website")
|
||||
.accessibilityIdentifier("about-sponsor")
|
||||
}.frame(maxWidth: .infinity)
|
||||
}
|
||||
Divider()
|
||||
LegalNoticesView().id("notices")
|
||||
Divider()
|
||||
VStack(alignment: .leading, spacing: 18) {
|
||||
Text("Original Windows VCC").font(.title2.bold()).accessibilityAddTraits(.isHeader)
|
||||
CreditArtwork(name: "windows-vcc", ext: "bmp", label: "Original VCC logo")
|
||||
.frame(height: 82).frame(maxWidth: .infinity)
|
||||
HStack(spacing: 24) {
|
||||
CreditArtwork(name: "windows-founders", ext: "bmp", label: "Artwork from the original Windows About window").frame(width: 130, height: 100)
|
||||
VStack(alignment: .leading, spacing: 8) {
|
||||
Text("VCC — Virtual Color Computer").font(.headline)
|
||||
Text("Windows VCC Version 2.1.10.0").foregroundStyle(.secondary)
|
||||
Text("Another classic computer canceled before it's time!").italic()
|
||||
}
|
||||
}
|
||||
Text(AppCredits.text("WindowsAbout")).textSelection(.enabled)
|
||||
Link("Original VCC project", destination: URL(string: "https://github.com/VCCE/VCC")!)
|
||||
}.id("windows-credits")
|
||||
}.frame(maxWidth: 700, alignment: .leading).padding(24).frame(maxWidth: .infinity)
|
||||
}
|
||||
}
|
||||
}.frame(minWidth: 620, minHeight: 520)
|
||||
}
|
||||
}
|
||||
|
||||
struct LicenseCreditsView: View {
|
||||
@State private var selected: String? = "Overview"
|
||||
private let notices = [
|
||||
("Overview", "VCC Plus Notices"),
|
||||
("GPL", "GNU General Public License"),
|
||||
("ThirdPartyNotices", "Third-Party Notices"),
|
||||
("WindowsAbout", "Original Windows VCC"),
|
||||
("DevelopmentTools", "C Development Tools")
|
||||
]
|
||||
var body: some View {
|
||||
HSplitView {
|
||||
List(selection: $selected) {
|
||||
Section("Documents") {
|
||||
ForEach(notices, id: \.0) { key, title in
|
||||
Label(title, systemImage: key == "GPL" ? "text.book.closed" : "doc.text")
|
||||
.padding(.vertical, 5).tag(key)
|
||||
.accessibilityIdentifier("license-document-" + key)
|
||||
}
|
||||
}
|
||||
}.listStyle(.sidebar).frame(minWidth: 180, idealWidth: 210, maxWidth: 250)
|
||||
.accessibilityLabel("License documents")
|
||||
VStack(alignment: .leading, spacing: 0) {
|
||||
Text(notices.first { $0.0 == (selected ?? "Overview") }?.1 ?? "VCC Plus Notices")
|
||||
.font(.headline).padding(18).accessibilityAddTraits(.isHeader)
|
||||
Divider()
|
||||
ScrollView {
|
||||
Group {
|
||||
if selected == nil || selected == "Overview" { LegalNoticesView() }
|
||||
else { Text(selected == "DevelopmentTools" ? AppCredits.developmentTools : AppCredits.text(selected!)).textSelection(.enabled) }
|
||||
}.frame(maxWidth: .infinity, alignment: .leading).padding(20)
|
||||
}.id(selected)
|
||||
}.frame(minWidth: 420, maxWidth: .infinity, maxHeight: .infinity)
|
||||
}.frame(minWidth: 640, minHeight: 500)
|
||||
}
|
||||
}
|
||||
|
||||
private struct KeyboardHelpSection {
|
||||
let title: String
|
||||
let symbol: String
|
||||
let commands: [(String, String)]
|
||||
let paragraphs: [String]
|
||||
func matches(_ query: String) -> Bool {
|
||||
query.isEmpty || ([title] + commands.flatMap { [$0.0, $0.1] } + paragraphs)
|
||||
.contains { $0.localizedCaseInsensitiveContains(query) }
|
||||
}
|
||||
}
|
||||
|
||||
struct KeyboardHelpView: View {
|
||||
@State private var search = ""
|
||||
private let sections: [KeyboardHelpSection] = [
|
||||
KeyboardHelpSection(title: "Focus & CoCo keys", symbol: "keyboard", commands: [
|
||||
("⌘1", "Show Emulator — reopen or bring it forward"),
|
||||
("⌥⌘K", "Focus the CoCo display"),
|
||||
("⌥⌘U", "Focus Mac controls")
|
||||
], paragraphs: [
|
||||
"Use Input → Focus Mac Controls to leave the CoCo display, then Tab and Shift-Tab to move through native controls. Enable Keyboard navigation in macOS System Settings → Keyboard if needed. Space activates a focused button; Escape dismisses a menu or popover. Input → Focus CoCo Display returns typing to the guest.",
|
||||
"System view’s Devices list and the Media, Machine and Input menus provide native alternatives to the illustrated controls. VoiceOver can read the Mac controls, labels and media status. It cannot interpret arbitrary CoCo graphics or applications; Copy CoCo Screen Text works only in supported text modes.",
|
||||
"Return → ENTER · Escape → BREAK · Home → CLEAR · Delete → backspace/left · Arrow keys → CoCo arrows · F1/F2 → CoCo F1/F2. Use Fn or Globe with function keys if macOS assigns them to hardware controls.",
|
||||
"Input → Keyboard and Joysticks offers Natural, CoCo and Compact layouts. Natural uses the Mac’s typed characters; CoCo follows physical US CoCo key positions. In Compact mode, Tab supplies CLEAR and the unshifted grave key supplies BREAK. Control and Option supply the CoCo Control and Alt keys.",
|
||||
"Keyboard joystick assignments reserve their configured direction/fire keys. Change the port’s input source when you need those keys for typing. Held keys are released when the display loses focus."
|
||||
]),
|
||||
KeyboardHelpSection(title: "Machine", symbol: "cpu", commands: [
|
||||
("⇧⌘O", "Choose a CoCo 3 system ROM"),
|
||||
("⇧⌘P", "Configuration Profiles"),
|
||||
("⌘,", "Machine Settings"),
|
||||
("⇧⌘F", "Emulator window: toggle fast-forward (sound is silenced)"),
|
||||
("⌘Q", "Quit, with unsaved-media protection")
|
||||
], paragraphs: [
|
||||
"Windows VCC’s F3–F12 application shortcuts are not mapped wholesale on Mac. Use Run/Pause and Restart in the toolbar, Display for video output, Machine for fast-forward and CPU settings, Cartridge for devices, and View for full screen. F1/F2 remain guest keys."
|
||||
]),
|
||||
KeyboardHelpSection(title: "Media", symbol: "externaldrive", commands: [
|
||||
("⌘O", "Open Media; choose its destination"),
|
||||
("⇧⌘B", "Load and run a CoCo binary"),
|
||||
("⇧⌘D", "Floppy Disks"),
|
||||
("⇧⌘T", "Cassette")
|
||||
], paragraphs: [
|
||||
"Drop one media file onto the main display, a System drive or cartridge, or a drive row. Choose the destination and confirm. File → Open Recent Media remembers the last 12 successful file selections. Clear Recent Media removes history, not files or mounted media."
|
||||
]),
|
||||
KeyboardHelpSection(title: "Display", symbol: "display", commands: [
|
||||
("⇧⌘E", "Expand/return the monitor in System view"),
|
||||
("⇧⌘S", "Save the active CoCo picture as a PNG")
|
||||
], paragraphs: [
|
||||
"Display → Display Settings offers sharp, smooth and integer-pixel scaling, plus optional scanlines. These remembered Mac preferences preserve the running session. Save CoCo Screen captures the current active picture as a PNG at native resolution without scaling, scanlines or the surrounding window; the CoCo keeps running while you choose where to save."
|
||||
]),
|
||||
KeyboardHelpSection(title: "BASIC Development", symbol: "terminal", commands: [
|
||||
("⌃⇧H", "Quick Help for the command at the insertion point"),
|
||||
("Option-click a command", "Open its BASIC reference topic"),
|
||||
("⌃Space", "Show BASIC keyword completions"),
|
||||
("Tab", "Accept a faint keyword suggestion"),
|
||||
("⌘F in the reference", "Find a command or topic")
|
||||
], paragraphs: [
|
||||
"Develop → BASIC Quick Reference is available offline. Browse syntax, parameters, related commands and error explanations. RGB-DOS and SDC-DOS additions are labeled separately. A topic stays open while you edit.",
|
||||
"Open Example creates a separate editable workspace with its own recovery draft. Opening it does not load or run anything. Use Run when ready; the existing safeguards apply before replacing the CoCo program. Only the workspace that most recently loaded a program controls its BASIC debugger."
|
||||
]),
|
||||
KeyboardHelpSection(title: "Debugger", symbol: "ladybug", commands: [
|
||||
("⌥⌘D", "Show Debugger"),
|
||||
("⌥⌘R", "Pause / continue execution"),
|
||||
("⌥⌘I", "Step one instruction while paused")
|
||||
], paragraphs: []),
|
||||
KeyboardHelpSection(title: "Find in a source editor", symbol: "magnifyingglass", commands: [
|
||||
("⌘F", "Find in the current BASIC, C or assembly file"),
|
||||
("⌥⌘F", "Find and replace in this file"),
|
||||
("⌘G", "Select the next match"),
|
||||
("⇧⌘G", "Select the previous match"),
|
||||
("⌘E", "Use the selected source text for Find"),
|
||||
("Escape", "Close the find bar and return to the source")
|
||||
], paragraphs: [
|
||||
"Replace edits one selected match. Replace All in File edits the current file in one Undo step. You can search a read-only header. To search across C project files, choose the magnifying-glass tab in the left sidebar."
|
||||
]),
|
||||
KeyboardHelpSection(title: "C Development", symbol: "curlybraces.square", commands: [
|
||||
("⌥⌘C", "Open C Development"),
|
||||
("⇧⌘F", "C workspace: Find in Project")
|
||||
], paragraphs: [
|
||||
"Build uses the current editor contents, including unsaved edits. Save All writes your files to disk. For a source-debug build, set a breakpoint on an executable line, run to it, then use the C stepping controls, call stack, Variables and Watches. Open Debugger to inspect individual machine instructions, registers or memory."
|
||||
]),
|
||||
KeyboardHelpSection(title: "Clipboard", symbol: "doc.on.clipboard", commands: [
|
||||
("⌘C / ⌘V", "Copy screen / paste text when the CoCo display has focus"),
|
||||
("⇧⌘C / ⇧⌘V", "Explicit CoCo screen copy / text paste")
|
||||
], paragraphs: [
|
||||
"Edit offers BASIC Merge and Replace, with confirmation. Wait at the BASIC prompt first. Neither starts the program. Text paste executes Return only where the clipboard contains a newline. Cancel Paste, Pause or a CoCo key stops remaining input; already entered text is retained. BASIC lines are limited to 249 characters to prevent truncation."
|
||||
]),
|
||||
]
|
||||
var body: some View {
|
||||
VStack(spacing: 0) {
|
||||
HStack(spacing: 12) {
|
||||
Label("Find a shortcut or topic", systemImage: "keyboard").font(.headline)
|
||||
Spacer()
|
||||
TextField("Search keyboard help", text: $search).textFieldStyle(.roundedBorder)
|
||||
.frame(maxWidth: 260).accessibilityLabel("Search keyboard help")
|
||||
.accessibilityIdentifier("keyboard-help-search")
|
||||
}.padding(16)
|
||||
Divider()
|
||||
ScrollView {
|
||||
VStack(alignment: .leading, spacing: 18) {
|
||||
Text("Click the CoCo display before typing. Native text fields keep their usual Mac editing shortcuts.")
|
||||
.foregroundStyle(.secondary)
|
||||
ForEach(sections.filter { $0.matches(search.trimmingCharacters(in: .whitespacesAndNewlines)) }, id: \.title) { section in
|
||||
SecondaryCard {
|
||||
Label(section.title, systemImage: section.symbol).font(.headline)
|
||||
.accessibilityAddTraits(.isHeader)
|
||||
Grid(alignment: .leading, horizontalSpacing: 20, verticalSpacing: 9) {
|
||||
ForEach(section.commands, id: \.0) { key, action in
|
||||
GridRow {
|
||||
Text(key).font(.system(.body, design: .monospaced))
|
||||
.frame(width: 110, alignment: .leading)
|
||||
Text(action).frame(maxWidth: .infinity, alignment: .leading)
|
||||
}
|
||||
}
|
||||
}
|
||||
if !section.paragraphs.isEmpty {
|
||||
SecondaryHelp(title: section.title == "Focus & CoCo keys" ? "Navigation and CoCo key layouts" : "Using " + section.title.lowercased()) {
|
||||
ForEach(section.paragraphs, id: \.self) { paragraph in
|
||||
Text(paragraph).fixedSize(horizontal: false, vertical: true)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if !sections.contains(where: { $0.matches(search.trimmingCharacters(in: .whitespacesAndNewlines)) }) {
|
||||
Label("No matching shortcuts or topics", systemImage: "magnifyingglass")
|
||||
.foregroundStyle(.secondary).padding(.vertical, 20)
|
||||
}
|
||||
}.padding(20).frame(maxWidth: 760, alignment: .leading).frame(maxWidth: .infinity)
|
||||
}
|
||||
}.frame(minWidth: 620, minHeight: 500)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user