]> git.r.bdr.sh - rbdr/captura/commitdiff
Add about and sandbox sparkle 1.1.0
authorRuben Beltran del Rio <redacted>
Sat, 14 Sep 2024 17:09:30 +0000 (19:09 +0200)
committerRuben Beltran del Rio <redacted>
Sat, 14 Sep 2024 17:09:30 +0000 (19:09 +0200)
Captura.xcodeproj/project.pbxproj
Captura/Captura.entitlements
Captura/Info.plist
Captura/Presentation/Screens/PreferencesScreen.swift
Captura/Presentation/Settings/AboutSettings.swift [new file with mode: 0644]

index f87b633970f3fdfdf4bf4945b81ceae80d588b12..d549f3caa21dd29f59e866ce027acc7e2bf5b998 100644 (file)
@@ -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 = "<group>"; };
                B55403E92A79A434004BCBAB /* ScriptedPreferences.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScriptedPreferences.swift; sourceTree = "<group>"; };
                B55403EC2A7A388B004BCBAB /* RecordCommand.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RecordCommand.swift; sourceTree = "<group>"; };
+               B55541E62C95F5980015F522 /* AboutSettings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutSettings.swift; sourceTree = "<group>"; };
                B55DDFCB2A6F0253001A5E76 /* Notification+AppEvents.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Notification+AppEvents.swift"; sourceTree = "<group>"; };
                B55DDFCD2A6F069D001A5E76 /* RecordingWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RecordingWindow.swift; sourceTree = "<group>"; };
                B56C70CC2A6EFDF4009B97EB /* CaptureState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CaptureState.swift; sourceTree = "<group>"; };
                B5278B1D2A71BD8A009F6462 /* Settings */ = {
                        isa = PBXGroup;
                        children = (
+                               B55541E62C95F5980015F522 /* AboutSettings.swift */,
                                B5278B1E2A71BD9B009F6462 /* OutputSettings.swift */,
                                B5278B242A71CA80009F6462 /* AdvancedSettings.swift */,
                        );
                                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 */,
index f6cc65ed7f8d9b4aa170c04fd0b6cb873219fcab..b7ad98c18d8b026357c2e4ea32b7d614ba28d8c3 100644 (file)
@@ -2,6 +2,11 @@
 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
 <dict>
+       <key>com.apple.security.temporary-exception.mach-lookup.global-name</key>
+       <array>
+               <string>$(PRODUCT_BUNDLE_IDENTIFIER)-spks</string>
+               <string>$(PRODUCT_BUNDLE_IDENTIFIER)-spki</string>
+       </array>
        <key>com.apple.developer.aps-environment</key>
        <string>development</string>
        <key>com.apple.developer.icloud-container-identifiers</key>
index e997f3dd7aeb54b44b423d146898f6cf015e0e96..4c548914ec634abc45f66c909e8dc21c45111159 100644 (file)
@@ -2,6 +2,8 @@
 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
 <dict>
+       <key>SUEnableInstallerLauncherService</key>
+       <true/>
        <key>SUFeedURL</key>
        <string>https://captura.tranquil.systems/appcast.xml</string>
        <key>SUPublicEDKey</key>
index c9c0c07d359e87d7784e05b37516454706a70a96..17ec3d7690a7a344086d1eec61b8a3d00ff56d01 100644 (file)
@@ -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 (file)
index 0000000..f5fe77c
--- /dev/null
@@ -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()
+}