diff --git a/Makefile b/Makefile index a17a6ae..c709898 100644 --- a/Makefile +++ b/Makefile @@ -42,6 +42,18 @@ preview: $(XCODEBUILD) -scheme $(PREVIEW_SCHEME) build $(PREVIEW) +# The picture the screen saver list shows before it starts a live preview. +# Rendered at 2x and downsampled, so both sizes come from one run. Where the cat +# ends up is down to where it happened to wander, so run this until you get one +# you like. +.PHONY: thumbnail +thumbnail: + $(XCODEBUILD) -scheme $(PREVIEW_SCHEME) build + $(PREVIEW) --snapshot Resources/thumbnail@2x.png \ + --preview --size 90x58 --frames 2400 --grey --cats 1 --speed 5 + cp Resources/thumbnail@2x.png Resources/thumbnail.png + sips -z 58 90 Resources/thumbnail.png >/dev/null + .PHONY: lint lint: swiftlint --strict diff --git a/NecoSaver.xcodeproj/project.pbxproj b/NecoSaver.xcodeproj/project.pbxproj index 8653309..7b13293 100644 --- a/NecoSaver.xcodeproj/project.pbxproj +++ b/NecoSaver.xcodeproj/project.pbxproj @@ -15,6 +15,8 @@ CE0000000000000000000106 /* NecoSaverEngine.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE0000000000000000000006 /* NecoSaverEngine.swift */; }; CE0000000000000000000107 /* ConfigureSheetController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE0000000000000000000007 /* ConfigureSheetController.swift */; }; CE0000000000000000000108 /* NecoSaverView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE0000000000000000000008 /* NecoSaverView.swift */; }; + CE0000000000000000000121 /* thumbnail.png in Resources */ = {isa = PBXBuildFile; fileRef = CE0000000000000000000021 /* thumbnail.png */; }; + CE0000000000000000000122 /* thumbnail@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = CE0000000000000000000022 /* thumbnail@2x.png */; }; CE0000000000000000000109 /* Wallpaper.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE0000000000000000000010 /* Wallpaper.swift */; }; CE0000000000000000000111 /* Sprites.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE0000000000000000000001 /* Sprites.swift */; }; CE0000000000000000000112 /* SpriteCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE0000000000000000000002 /* SpriteCache.swift */; }; @@ -43,6 +45,8 @@ CE0000000000000000000008 /* NecoSaverView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NecoSaverView.swift; sourceTree = ""; }; CE0000000000000000000010 /* Wallpaper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Wallpaper.swift; sourceTree = ""; }; CE0000000000000000000009 /* PreviewApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PreviewApp.swift; sourceTree = ""; }; + CE0000000000000000000021 /* thumbnail.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = thumbnail.png; sourceTree = ""; }; + CE0000000000000000000022 /* thumbnail@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "thumbnail@2x.png"; sourceTree = ""; }; CE0000000000000000000011 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; CE0000000000000000000012 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; CE0000000000000000000013 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; @@ -91,6 +95,15 @@ path = Sources; sourceTree = ""; }; + CE0000000000000000000302 /* Resources */ = { + isa = PBXGroup; + children = ( + CE0000000000000000000021 /* thumbnail.png */, + CE0000000000000000000022 /* thumbnail@2x.png */, + ); + path = Resources; + sourceTree = ""; + }; CE0000000000000000000303 /* Preview */ = { isa = PBXGroup; children = ( @@ -122,6 +135,7 @@ isa = PBXGroup; children = ( CE0000000000000000000301 /* Sources */, + CE0000000000000000000302 /* Resources */, CE0000000000000000000303 /* Preview */, CE0000000000000000000013 /* README.md */, CE0000000000000000000304 /* Frameworks */, @@ -207,6 +221,8 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + CE0000000000000000000121 /* thumbnail.png in Resources */, + CE0000000000000000000122 /* thumbnail@2x.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Resources/thumbnail.png b/Resources/thumbnail.png new file mode 100644 index 0000000..5de43c8 Binary files /dev/null and b/Resources/thumbnail.png differ diff --git a/Resources/thumbnail@2x.png b/Resources/thumbnail@2x.png new file mode 100644 index 0000000..bcc606e Binary files /dev/null and b/Resources/thumbnail@2x.png differ