Skip to content

Commit

Permalink
First inclusion of Sparkle
Browse files Browse the repository at this point in the history
  • Loading branch information
glouel committed Dec 18, 2018
1 parent 89a7218 commit a8c1c50
Show file tree
Hide file tree
Showing 8 changed files with 238 additions and 9 deletions.
166 changes: 163 additions & 3 deletions Aerial.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion Aerial/App/Resources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.4.6beta5</string>
<string>1.4.7beta1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand All @@ -39,6 +39,10 @@
<string>Aerial uses location services to calculate Sunset and Sunrise times from your position</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>SUPublicEDKey</key>
<string>fbiQGEFq55xl4bjwj2/SpIO4JMsKmEyhHEWlMMueyDY=</string>
<key>SUFeedURL</key>
<string>https://raw.githubusercontent.com/JohnCoates/Aerial/master/appcast.xml</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
Expand Down
6 changes: 6 additions & 0 deletions Aerial/Source/Controllers/PreferencesWindowController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import AVFoundation
import ScreenSaver
import VideoToolbox
import CoreLocation
import Sparkle

final class TimeOfDay {
let title: String
Expand Down Expand Up @@ -1398,6 +1399,11 @@ final class PreferencesWindowController: NSWindowController, NSOutlineViewDataSo

}

@IBAction func checkForUpdatesButton(_ sender: Any) {
debugLog("check for updates")
let supd = SUUpdater.init(for: Bundle(for: PreferencesWindowController.self))
supd?.checkForUpdates(self)
}
@IBAction func trashOldVideosClick(_ sender: Any) {
ManifestLoader.instance.trashOldVideos()

Expand Down
4 changes: 4 additions & 0 deletions Aerial/Source/Views/AerialView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import Foundation
import ScreenSaver
import AVFoundation
import AVKit
import Sparkle

@objc(AerialView)
// swiftlint:disable:next type_body_length
Expand Down Expand Up @@ -177,6 +178,9 @@ final class AerialView: ScreenSaverView {

// swiftlint:disable:next cyclomatic_complexity
func setup() {
// Initialize Sparkle updater
_ = SUUpdater.init(for: Bundle(for: AerialView.self))

debugLog("\(self.description) AerialView setup init")
let preferences = Preferences.sharedInstance
let timeManagement = TimeManagement.sharedInstance
Expand Down
24 changes: 24 additions & 0 deletions Podfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Uncomment the next line to define a global platform for your project
platform :macos, '10.9'

target 'Aerial' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!

# Pods for Aerial
pod 'Sparkle'

target 'Aerial Tests' do
inherit! :search_paths
# Pods for testing
end

end

target 'AerialApp' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!

# Pods for AerialApp
pod 'Sparkle'
end
16 changes: 16 additions & 0 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
PODS:
- Sparkle (1.21.0)

DEPENDENCIES:
- Sparkle

SPEC REPOS:
https://github.com/CocoaPods/Specs.git:
- Sparkle

SPEC CHECKSUMS:
Sparkle: 24f10673813bf7c32d73ffa8a775590adefc40df

PODFILE CHECKSUM: f168964208636ac1fde61a950654def91bc7ada9

COCOAPODS: 1.5.0
8 changes: 6 additions & 2 deletions Resources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.4.6beta7</string>
<string>1.4.6test1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.4.6beta7</string>
<string>1.4.6test1</string>
<key>LSApplicationCategoryType</key>
<string></string>
<key>LSMinimumSystemVersion</key>
Expand All @@ -35,5 +35,9 @@
<string>Aerial uses location services to calculate Sunset and Sunrise times from your position</string>
<key>NSPrincipalClass</key>
<string>AerialView</string>
<key>SUFeedURL</key>
<string>https://raw.githubusercontent.com/JohnCoates/Aerial/master/appcast.xml</string>
<key>SUPublicEDKey</key>
<string>fbiQGEFq55xl4bjwj2/SpIO4JMsKmEyhHEWlMMueyDY=</string>
</dict>
</plist>
17 changes: 14 additions & 3 deletions Resources/PreferencesWindow.xib
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ is disabled
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<popUpButton toolTip="The duration of the fades at the begginning and the end of each video" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="405-v4-6d2">
<popUpButton toolTip="The duration of the fades at the beginning and the end of each video" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="405-v4-6d2">
<rect key="frame" x="385" y="144" width="107" height="25"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<popUpButtonCell key="cell" type="push" title="1 Second" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="4aA-BM-bD5" id="WDB-Zy-UB4">
Expand Down Expand Up @@ -526,7 +526,7 @@ is disabled
</view>
</tabViewItem>
<tabViewItem label="Text" identifier="" id="bPY-uP-DGa">
<view key="view" id="M1m-ud-C95">
<view key="view" ambiguous="YES" id="M1m-ud-C95">
<rect key="frame" x="10" y="33" width="614" height="381"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
Expand Down Expand Up @@ -1328,7 +1328,7 @@ Shift, but macOS 10.12.4 or above and a compatible Mac are required) </string>
</view>
</tabViewItem>
<tabViewItem label="Cache" identifier="2" id="kp1-xv-zNG">
<view key="view" ambiguous="YES" id="93q-v8-yxM">
<view key="view" id="93q-v8-yxM">
<rect key="frame" x="10" y="33" width="614" height="381"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
Expand Down Expand Up @@ -1630,6 +1630,17 @@ Shift, but macOS 10.12.4 or above and a compatible Mac are required) </string>
<action selector="trashOldVideosClick:" target="-2" id="FpQ-0L-fBx"/>
</connections>
</button>
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="pn3-am-SBg">
<rect key="frame" x="456" y="342" width="141" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="push" title="Look for update" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="3GZ-q0-Uhe">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<action selector="checkForUpdatesButton:" target="-2" id="WNM-Id-UvF"/>
</connections>
</button>
</subviews>
</view>
</tabViewItem>
Expand Down

0 comments on commit a8c1c50

Please sign in to comment.