Skip to content

Commit 3f2cea7

Browse files
committed
finish
1 parent 7228372 commit 3f2cea7

File tree

5 files changed

+53
-9
lines changed

5 files changed

+53
-9
lines changed

README.md

+12
Original file line numberDiff line numberDiff line change
@@ -1 +1,13 @@
11
# bubble-screensaver
2+
3+
4+
5+
6+
7+
8+
9+
10+
### References
11+
12+
[How to make a custom screensaver for Mac OS X](https://medium.com/better-programming/how-to-make-a-custom-screensaver-for-mac-os-x-7e1650c13bd8)
13+
[How to add thumbnails](https://stackoverflow.com/questions/35747595/adding-an-icon-to-a-screensaver)

bubble-screensaver.xcodeproj/project.pbxproj

+34-8
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,19 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10-
9600E5B325669FF40018D709 /* bubble_screensaverView.h in Headers */ = {isa = PBXBuildFile; fileRef = 9600E5B225669FF40018D709 /* bubble_screensaverView.h */; };
11-
9600E5B525669FF40018D709 /* bubble_screensaverView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9600E5B425669FF40018D709 /* bubble_screensaverView.m */; };
10+
9600E5BF2566A03B0018D709 /* bubble.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9600E5BE2566A03B0018D709 /* bubble.swift */; };
11+
9600E5C32566B6D20018D709 /* SoapBubble1080p.mov in Resources */ = {isa = PBXBuildFile; fileRef = 9600E5C22566B6D20018D709 /* SoapBubble1080p.mov */; };
12+
9600E5CB2566F6890018D709 /* thumbnail.png in Resources */ = {isa = PBXBuildFile; fileRef = 9600E5C92566F6890018D709 /* thumbnail.png */; };
13+
9600E5CC2566F6890018D709 /* thumbnail@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 9600E5CA2566F6890018D709 /* thumbnail@2x.png */; };
1214
/* End PBXBuildFile section */
1315

1416
/* Begin PBXFileReference section */
1517
9600E5AF25669FF30018D709 /* bubble-screensaver.saver */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "bubble-screensaver.saver"; sourceTree = BUILT_PRODUCTS_DIR; };
16-
9600E5B225669FF40018D709 /* bubble_screensaverView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = bubble_screensaverView.h; sourceTree = "<group>"; };
17-
9600E5B425669FF40018D709 /* bubble_screensaverView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = bubble_screensaverView.m; sourceTree = "<group>"; };
1818
9600E5B625669FF40018D709 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
19+
9600E5BE2566A03B0018D709 /* bubble.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = bubble.swift; sourceTree = "<group>"; };
20+
9600E5C22566B6D20018D709 /* SoapBubble1080p.mov */ = {isa = PBXFileReference; lastKnownFileType = video.quicktime; name = SoapBubble1080p.mov; path = "bubble-screensaver/SoapBubble1080p.mov"; sourceTree = "<group>"; };
21+
9600E5C92566F6890018D709 /* thumbnail.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = thumbnail.png; path = "bubble-screensaver/thumbnail.png"; sourceTree = "<group>"; };
22+
9600E5CA2566F6890018D709 /* thumbnail@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "thumbnail@2x.png"; path = "bubble-screensaver/thumbnail@2x.png"; sourceTree = "<group>"; };
1923
/* End PBXFileReference section */
2024

2125
/* Begin PBXFrameworksBuildPhase section */
@@ -32,6 +36,9 @@
3236
9600E5A525669FF30018D709 = {
3337
isa = PBXGroup;
3438
children = (
39+
9600E5C92566F6890018D709 /* thumbnail.png */,
40+
9600E5CA2566F6890018D709 /* thumbnail@2x.png */,
41+
9600E5C22566B6D20018D709 /* SoapBubble1080p.mov */,
3542
9600E5B125669FF40018D709 /* bubble-screensaver */,
3643
9600E5B025669FF30018D709 /* Products */,
3744
);
@@ -48,9 +55,8 @@
4855
9600E5B125669FF40018D709 /* bubble-screensaver */ = {
4956
isa = PBXGroup;
5057
children = (
51-
9600E5B225669FF40018D709 /* bubble_screensaverView.h */,
52-
9600E5B425669FF40018D709 /* bubble_screensaverView.m */,
5358
9600E5B625669FF40018D709 /* Info.plist */,
59+
9600E5BE2566A03B0018D709 /* bubble.swift */,
5460
);
5561
path = "bubble-screensaver";
5662
sourceTree = "<group>";
@@ -62,7 +68,6 @@
6268
isa = PBXHeadersBuildPhase;
6369
buildActionMask = 2147483647;
6470
files = (
65-
9600E5B325669FF40018D709 /* bubble_screensaverView.h in Headers */,
6671
);
6772
runOnlyForDeploymentPostprocessing = 0;
6873
};
@@ -97,6 +102,7 @@
97102
TargetAttributes = {
98103
9600E5AE25669FF30018D709 = {
99104
CreatedOnToolsVersion = 12.1;
105+
LastSwiftMigration = 1210;
100106
};
101107
};
102108
};
@@ -123,6 +129,9 @@
123129
isa = PBXResourcesBuildPhase;
124130
buildActionMask = 2147483647;
125131
files = (
132+
9600E5CB2566F6890018D709 /* thumbnail.png in Resources */,
133+
9600E5CC2566F6890018D709 /* thumbnail@2x.png in Resources */,
134+
9600E5C32566B6D20018D709 /* SoapBubble1080p.mov in Resources */,
126135
);
127136
runOnlyForDeploymentPostprocessing = 0;
128137
};
@@ -133,7 +142,7 @@
133142
isa = PBXSourcesBuildPhase;
134143
buildActionMask = 2147483647;
135144
files = (
136-
9600E5B525669FF40018D709 /* bubble_screensaverView.m in Sources */,
145+
9600E5BF2566A03B0018D709 /* bubble.swift in Sources */,
137146
);
138147
runOnlyForDeploymentPostprocessing = 0;
139148
};
@@ -254,27 +263,44 @@
254263
9600E5BA25669FF40018D709 /* Debug */ = {
255264
isa = XCBuildConfiguration;
256265
buildSettings = {
266+
CLANG_ENABLE_MODULES = YES;
257267
CODE_SIGN_STYLE = Automatic;
258268
COMBINE_HIDPI_IMAGES = YES;
269+
DEVELOPMENT_ASSET_PATHS = "bubble-screensaver/thumbnail@2x.png bubble-screensaver/thumbnail.png bubble-screensaver/SoapBubble1080p.mov";
259270
DEVELOPMENT_TEAM = ZBC4F58GF3;
260271
INFOPLIST_FILE = "bubble-screensaver/Info.plist";
261272
INSTALL_PATH = "$(HOME)/Library/Screen Savers";
273+
LD_RUNPATH_SEARCH_PATHS = (
274+
"$(inherited)",
275+
"@executable_path/../Frameworks",
276+
"@loader_path/../Frameworks",
277+
);
262278
PRODUCT_BUNDLE_IDENTIFIER = "-6308149.bubble-screensaver";
263279
PRODUCT_NAME = "$(TARGET_NAME)";
280+
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
281+
SWIFT_VERSION = 5.0;
264282
WRAPPER_EXTENSION = saver;
265283
};
266284
name = Debug;
267285
};
268286
9600E5BB25669FF40018D709 /* Release */ = {
269287
isa = XCBuildConfiguration;
270288
buildSettings = {
289+
CLANG_ENABLE_MODULES = YES;
271290
CODE_SIGN_STYLE = Automatic;
272291
COMBINE_HIDPI_IMAGES = YES;
292+
DEVELOPMENT_ASSET_PATHS = "bubble-screensaver/thumbnail@2x.png bubble-screensaver/thumbnail.png bubble-screensaver/SoapBubble1080p.mov";
273293
DEVELOPMENT_TEAM = ZBC4F58GF3;
274294
INFOPLIST_FILE = "bubble-screensaver/Info.plist";
275295
INSTALL_PATH = "$(HOME)/Library/Screen Savers";
296+
LD_RUNPATH_SEARCH_PATHS = (
297+
"$(inherited)",
298+
"@executable_path/../Frameworks",
299+
"@loader_path/../Frameworks",
300+
);
276301
PRODUCT_BUNDLE_IDENTIFIER = "-6308149.bubble-screensaver";
277302
PRODUCT_NAME = "$(TARGET_NAME)";
303+
SWIFT_VERSION = 5.0;
278304
WRAPPER_EXTENSION = saver;
279305
};
280306
name = Release;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Bucket
3+
uuid = "BFFCCECC-2046-4584-ACB3-7053FD1702DC"
4+
type = "1"
5+
version = "2.0">
6+
</Bucket>

bubble-screensaver/bubble.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class bubble: ScreenSaverView {
3434
self.playerLooper = AVPlayerLooper(player: self.queuePlayer, templateItem: playerItem)
3535
self.playerLayer = AVPlayerLayer(player: self.queuePlayer)
3636

37-
//let videoView = NSView(frame: NSMakeRect(frame.minX + NSWidth(frame)/4, frame.minY + NSHeight(frame)/4, NSWidth(frame)/2, NSHeight(frame)/2))
37+
3838
self.videoView = NSView(frame: NSMakeRect(0, 0, NSWidth(frame)/2, NSHeight(frame)/2))
3939
self.videoView.wantsLayer = true
4040
self.playerLayer.frame = videoView.frame

bubble-screensaver/thumbnail@2x.png

44.5 KB
Loading

0 commit comments

Comments
 (0)