From: Ruben Beltran del Rio Date: Sat, 14 Sep 2024 17:09:30 +0000 (+0200) Subject: Add about and sandbox sparkle X-Git-Tag: 1.1.0 X-Git-Url: https://git.r.bdr.sh/rbdr/captura/commitdiff_plain/9be247c36cb15153de2cbafe7e1c53209182f29e?ds=sidebyside;hp=578c47516baabf4cdcb3edb54f6e397a47032dd5 Add about and sandbox sparkle --- diff --git a/Captura.xcodeproj/project.pbxproj b/Captura.xcodeproj/project.pbxproj index f87b633..d549f3c 100644 --- a/Captura.xcodeproj/project.pbxproj +++ b/Captura.xcodeproj/project.pbxproj @@ -29,6 +29,7 @@ B55403EB2A7A2AD2004BCBAB /* Captura.sdef in Resources */ = {isa = PBXBuildFile; fileRef = B5278B482A781B78009F6462 /* Captura.sdef */; }; B55403ED2A7A388B004BCBAB /* RecordCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = B55403EC2A7A388B004BCBAB /* RecordCommand.swift */; }; B55541E52C95801B0015F522 /* Sparkle in Frameworks */ = {isa = PBXBuildFile; productRef = B55541E42C95801B0015F522 /* Sparkle */; }; + B55541E72C95F59E0015F522 /* AboutSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = B55541E62C95F5980015F522 /* AboutSettings.swift */; }; B55DDFCC2A6F0253001A5E76 /* Notification+AppEvents.swift in Sources */ = {isa = PBXBuildFile; fileRef = B55DDFCB2A6F0253001A5E76 /* Notification+AppEvents.swift */; }; B55DDFCE2A6F069D001A5E76 /* RecordingWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = B55DDFCD2A6F069D001A5E76 /* RecordingWindow.swift */; }; B56C70CD2A6EFDF4009B97EB /* CaptureState.swift in Sources */ = {isa = PBXBuildFile; fileRef = B56C70CC2A6EFDF4009B97EB /* CaptureState.swift */; }; @@ -84,6 +85,7 @@ B55403E62A79A08C004BCBAB /* CapturaShortcutsProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CapturaShortcutsProvider.swift; sourceTree = ""; }; B55403E92A79A434004BCBAB /* ScriptedPreferences.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScriptedPreferences.swift; sourceTree = ""; }; B55403EC2A7A388B004BCBAB /* RecordCommand.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RecordCommand.swift; sourceTree = ""; }; + B55541E62C95F5980015F522 /* AboutSettings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutSettings.swift; sourceTree = ""; }; B55DDFCB2A6F0253001A5E76 /* Notification+AppEvents.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Notification+AppEvents.swift"; sourceTree = ""; }; B55DDFCD2A6F069D001A5E76 /* RecordingWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RecordingWindow.swift; sourceTree = ""; }; B56C70CC2A6EFDF4009B97EB /* CaptureState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CaptureState.swift; sourceTree = ""; }; @@ -184,6 +186,7 @@ B5278B1D2A71BD8A009F6462 /* Settings */ = { isa = PBXGroup; children = ( + B55541E62C95F5980015F522 /* AboutSettings.swift */, B5278B1E2A71BD9B009F6462 /* OutputSettings.swift */, B5278B242A71CA80009F6462 /* AdvancedSettings.swift */, ); @@ -450,6 +453,7 @@ B5E7B75F2AB5D84700D5F03B /* NSScreen+screenWithMouse.swift in Sources */, B5278B1F2A71BD9B009F6462 /* OutputSettings.swift in Sources */, B5278B2A2A73992D009F6462 /* GifRenderer.swift in Sources */, + B55541E72C95F59E0015F522 /* AboutSettings.swift in Sources */, B5278B212A71BFC3009F6462 /* OutputFormatSetting.swift in Sources */, B55DDFCE2A6F069D001A5E76 /* RecordingWindow.swift in Sources */, B55403ED2A7A388B004BCBAB /* RecordCommand.swift in Sources */, diff --git a/Captura/Captura.entitlements b/Captura/Captura.entitlements index f6cc65e..b7ad98c 100644 --- a/Captura/Captura.entitlements +++ b/Captura/Captura.entitlements @@ -2,6 +2,11 @@ + com.apple.security.temporary-exception.mach-lookup.global-name + + $(PRODUCT_BUNDLE_IDENTIFIER)-spks + $(PRODUCT_BUNDLE_IDENTIFIER)-spki + com.apple.developer.aps-environment development com.apple.developer.icloud-container-identifiers diff --git a/Captura/Info.plist b/Captura/Info.plist index e997f3d..4c54891 100644 --- a/Captura/Info.plist +++ b/Captura/Info.plist @@ -2,6 +2,8 @@ + SUEnableInstallerLauncherService + SUFeedURL https://captura.tranquil.systems/appcast.xml SUPublicEDKey diff --git a/Captura/Presentation/Screens/PreferencesScreen.swift b/Captura/Presentation/Screens/PreferencesScreen.swift index c9c0c07..17ec3d7 100644 --- a/Captura/Presentation/Screens/PreferencesScreen.swift +++ b/Captura/Presentation/Screens/PreferencesScreen.swift @@ -9,6 +9,9 @@ struct PreferencesScreen: View { AdvancedSettings().tabItem { Label("Advanced", systemImage: "gear") }.padding(8.0).frame(minWidth: 300, minHeight: 260) + AboutSettings().tabItem { + Label("About", systemImage: "questionmark.circle.fill") + }.padding(8.0).frame(minWidth: 300, minHeight: 260) }.padding(16.0) } } diff --git a/Captura/Presentation/Settings/AboutSettings.swift b/Captura/Presentation/Settings/AboutSettings.swift new file mode 100644 index 0000000..f5fe77c --- /dev/null +++ b/Captura/Presentation/Settings/AboutSettings.swift @@ -0,0 +1,29 @@ +import SwiftUI + +struct AboutSettings: View { + + var appVersion: String { + let version = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "Unknown" + let build = Bundle.main.infoDictionary?["CFBundleVersion"] as? String ?? "Unknown" + return "Version \(version) (\(build))" + } + + var imprint = (try? AttributedString(markdown: "Captura is open source. Help and more information available at [captura.tranquil.systems](https://captura.tranquil.systems)")) ?? "" + + var body: some View { + Form { + VStack (alignment: .center) { + Text("Captura").bold() + Text(appVersion).foregroundStyle(.secondary) + Spacer() + Text(imprint) + .multilineTextAlignment(.center) + } + Spacer() + } + } +} + +#Preview { + AboutSettings() +}