diff --git a/Aria2D.xcodeproj/project.pbxproj b/Aria2D.xcodeproj/project.pbxproj index 486a518..982b666 100644 --- a/Aria2D.xcodeproj/project.pbxproj +++ b/Aria2D.xcodeproj/project.pbxproj @@ -7,6 +7,10 @@ objects = { /* Begin PBXBuildFile section */ + 010AF01923C4BAB600FC2320 /* About.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 010AF01B23C4BAB600FC2320 /* About.storyboard */; }; + 010AF02223C4BBFD00FC2320 /* InstallAria2GuideWindow.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 010AF02423C4BBFD00FC2320 /* InstallAria2GuideWindow.storyboard */; }; + 010AF02723C4BC4100FC2320 /* Log.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 010AF02923C4BC4100FC2320 /* Log.storyboard */; }; + 010AF02C23C4BD2600FC2320 /* Preferences.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 010AF02E23C4BD2600FC2320 /* Preferences.storyboard */; }; 010B59181D3CF66600550A43 /* MainMenu.swift in Sources */ = {isa = PBXBuildFile; fileRef = 010B59171D3CF66600550A43 /* MainMenu.swift */; }; 010D7C701F6BE54A005356D0 /* SidebarTableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 010D7C6D1F6BE54A005356D0 /* SidebarTableView.swift */; }; 010D7C711F6BE54A005356D0 /* SidebarViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 010D7C6E1F6BE54A005356D0 /* SidebarViewController.swift */; }; @@ -19,7 +23,6 @@ 011E102C1D478EB300BD2E71 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 011E102B1D478EB300BD2E71 /* Assets.xcassets */; }; 011E4D2F21E8BE0100997633 /* Aria2OptionsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 011E4D2E21E8BE0100997633 /* Aria2OptionsViewController.swift */; }; 011E4D3121E8C3AF00997633 /* Aria2cOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 011E4D3021E8C3AF00997633 /* Aria2cOptions.swift */; }; - 011E4D4421EC36AB00997633 /* SocketRocket.framework.dSYM in Copy Files */ = {isa = PBXBuildFile; fileRef = 011E4D3C21EC367200997633 /* SocketRocket.framework.dSYM */; }; 012A1BB21E174860007C4B46 /* Transformer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 012A1BB11E174860007C4B46 /* Transformer.swift */; }; 012B57302159267400D1AC03 /* FileNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 012B572F2159267400D1AC03 /* FileNode.swift */; }; 012BB31A23378E2100ACA3DE /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0199420723378BB30045FDE9 /* Sparkle.framework */; }; @@ -39,8 +42,6 @@ 013ABBA01E51B305008D370D /* SetServersViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 013ABB9F1E51B305008D370D /* SetServersViewController.swift */; }; 013EF1602258557600E4D7D8 /* InstallationMethodViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 013EF15F2258557600E4D7D8 /* InstallationMethodViewController.swift */; }; 013EF1622258605100E4D7D8 /* DMG File Installation Guide.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 013EF1612258605100E4D7D8 /* DMG File Installation Guide.pdf */; }; - 01474894215673CC005014D3 /* SocketRocket.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 01474892215673C6005014D3 /* SocketRocket.framework */; }; - 01474895215673CC005014D3 /* SocketRocket.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 01474892215673C6005014D3 /* SocketRocket.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 0147EDC11D21FAD800FB4324 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0147EDC01D21FAD800FB4324 /* AppDelegate.swift */; }; 0147EDC81D21FAD800FB4324 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0147EDC61D21FAD800FB4324 /* Main.storyboard */; }; 0147EDDB1D221A2800FB4324 /* DownloadsTableCellView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0147EDDA1D221A2800FB4324 /* DownloadsTableCellView.swift */; }; @@ -55,9 +56,6 @@ 016CF8F61ED52E5C001336F1 /* AdvancedViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 016CF8F51ED52E5C001336F1 /* AdvancedViewController.swift */; }; 016FDC6F1E73F10E00E01B35 /* ByteFileFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 016FDC6E1E73F10E00E01B35 /* ByteFileFormatter.swift */; }; 016FDC7B1E7D674200E01B35 /* LogViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 016FDC7A1E7D674200E01B35 /* LogViewController.swift */; }; - 0171426F23B9DA850051ADDF /* Preferences.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0171426E23B9DA850051ADDF /* Preferences.storyboard */; }; - 0171427123B9FB710051ADDF /* Log.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0171427023B9FB710051ADDF /* Log.storyboard */; }; - 0171427323B9FC370051ADDF /* About.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0171427223B9FC370051ADDF /* About.storyboard */; }; 017557BD1F6CD18D004C02F3 /* StatusCollectionViewItem.xib in Resources */ = {isa = PBXBuildFile; fileRef = 017557BC1F6CD18D004C02F3 /* StatusCollectionViewItem.xib */; }; 01789B1B1D9C995300A5B789 /* NewTaskViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01789B1A1D9C995300A5B789 /* NewTaskViewController.swift */; }; 01842A4F2233672700BA77CB /* Aria2cProcessStatusViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01842A4E2233672700BA77CB /* Aria2cProcessStatusViewController.swift */; }; @@ -89,8 +87,12 @@ 01A5351B2129512000E5C88C /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 01A5351D2129512000E5C88C /* Localizable.strings */; }; 01B914E5224F2E37001A55AD /* Aria2cTrackerListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01B914E4224F2E37001A55AD /* Aria2cTrackerListViewController.swift */; }; 01BC4F951E443A6500417221 /* SafeSubscript.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01BC4F941E443A6500417221 /* SafeSubscript.swift */; }; + 01C373572422630B006778D1 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = 01C373562422630B006778D1 /* README.md */; }; + 01C85324241CA605006581F9 /* Cartfile in Resources */ = {isa = PBXBuildFile; fileRef = 01C85323241CA604006581F9 /* Cartfile */; }; + 01C8532B241CA7DB006581F9 /* Starscream.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 01C85329241CA7D4006581F9 /* Starscream.framework */; }; + 01C8532C241CA7DB006581F9 /* Starscream.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 01C85329241CA7D4006581F9 /* Starscream.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 01C8532D241CA7E7006581F9 /* Starscream.framework.dSYM in Copy Files */ = {isa = PBXBuildFile; fileRef = 01C8532A241CA7D4006581F9 /* Starscream.framework.dSYM */; }; 01DD0D0B1D25012F0042ECEB /* MainSplitView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01DD0D0A1D25012F0042ECEB /* MainSplitView.swift */; }; - 01E410B222CA3CED00864118 /* InstallAria2GuideWindow.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 01E410B122CA3CED00864118 /* InstallAria2GuideWindow.storyboard */; }; 01E410B422CA427500864118 /* InstallAria2GuideWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01E410B322CA427500864118 /* InstallAria2GuideWindowController.swift */; }; 01E9068B219BF70900928580 /* Aria2D.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 01E90689219BF70800928580 /* Aria2D.xcdatamodeld */; }; 01E906AF219C518B00928580 /* Aria2Object+CoreDataClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01E906A7219C518B00928580 /* Aria2Object+CoreDataClass.swift */; }; @@ -117,7 +119,7 @@ dstSubfolderSpec = 10; files = ( 018B8B59236277B800276985 /* PromiseKit.framework in Embed Frameworks */, - 01474895215673CC005014D3 /* SocketRocket.framework in Embed Frameworks */, + 01C8532C241CA7DB006581F9 /* Starscream.framework in Embed Frameworks */, 018B8B5B236277B900276985 /* PMKFoundation.framework in Embed Frameworks */, 012BB31B23378E2100ACA3DE /* Sparkle.framework in Embed Frameworks */, ); @@ -130,10 +132,10 @@ dstPath = ""; dstSubfolderSpec = 16; files = ( + 01C8532D241CA7E7006581F9 /* Starscream.framework.dSYM in Copy Files */, 018B8B5C236277C500276985 /* PMKFoundation.framework.dSYM in Copy Files */, 018B8B5D236277C500276985 /* PromiseKit.framework.dSYM in Copy Files */, 0195A97823378C530058CBE4 /* Sparkle.framework.dSYM in Copy Files */, - 011E4D4421EC36AB00997633 /* SocketRocket.framework.dSYM in Copy Files */, ); name = "Copy Files"; runOnlyForDeploymentPostprocessing = 0; @@ -141,6 +143,19 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 010AF01C23C4BAC400FC2320 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/About.storyboard; sourceTree = ""; }; + 010AF02323C4BBFD00FC2320 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/InstallAria2GuideWindow.storyboard; sourceTree = ""; }; + 010AF02623C4BC0B00FC2320 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/InstallAria2GuideWindow.strings"; sourceTree = ""; }; + 010AF02823C4BC4100FC2320 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Log.storyboard; sourceTree = ""; }; + 010AF02B23C4BC4500FC2320 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Log.strings"; sourceTree = ""; }; + 010AF02D23C4BD2600FC2320 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Preferences.storyboard; sourceTree = ""; }; + 010AF03023C4BD2C00FC2320 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Preferences.strings"; sourceTree = ""; }; + 010AF03E23C4C14400FC2320 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Preferences.strings; sourceTree = ""; }; + 010AF04023C4C14D00FC2320 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Log.strings; sourceTree = ""; }; + 010AF04223C4C15300FC2320 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/About.strings; sourceTree = ""; }; + 010AF04323C4C15600FC2320 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/About.strings"; sourceTree = ""; }; + 010AF04523C4C15E00FC2320 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InstallAria2GuideWindow.strings; sourceTree = ""; }; + 010AF04723C4C4DA00FC2320 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Main.strings; sourceTree = ""; }; 010B59171D3CF66600550A43 /* MainMenu.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainMenu.swift; sourceTree = ""; }; 010D7C6D1F6BE54A005356D0 /* SidebarTableView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SidebarTableView.swift; sourceTree = ""; }; 010D7C6E1F6BE54A005356D0 /* SidebarViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SidebarViewController.swift; sourceTree = ""; }; @@ -153,7 +168,6 @@ 011E102B1D478EB300BD2E71 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 011E4D2E21E8BE0100997633 /* Aria2OptionsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Aria2OptionsViewController.swift; sourceTree = ""; }; 011E4D3021E8C3AF00997633 /* Aria2cOptions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Aria2cOptions.swift; sourceTree = ""; }; - 011E4D3C21EC367200997633 /* SocketRocket.framework.dSYM */ = {isa = PBXFileReference; lastKnownFileType = wrapper.dsym; name = SocketRocket.framework.dSYM; path = Carthage/Build/Mac/SocketRocket.framework.dSYM; sourceTree = ""; }; 0126245D1ED16178007FF8AA /* Aria2D-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Aria2D-Bridging-Header.h"; sourceTree = ""; }; 012A1BB11E174860007C4B46 /* Transformer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Transformer.swift; sourceTree = ""; }; 012B572F2159267400D1AC03 /* FileNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileNode.swift; sourceTree = ""; }; @@ -172,7 +186,6 @@ 013ABB9F1E51B305008D370D /* SetServersViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SetServersViewController.swift; sourceTree = ""; }; 013EF15F2258557600E4D7D8 /* InstallationMethodViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InstallationMethodViewController.swift; sourceTree = ""; }; 013EF1612258605100E4D7D8 /* DMG File Installation Guide.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = "DMG File Installation Guide.pdf"; sourceTree = ""; }; - 01474892215673C6005014D3 /* SocketRocket.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SocketRocket.framework; path = Carthage/Build/Mac/SocketRocket.framework; sourceTree = ""; }; 0147EDBD1D21FAD800FB4324 /* Aria2D.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Aria2D.app; sourceTree = BUILT_PRODUCTS_DIR; }; 0147EDC01D21FAD800FB4324 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 0147EDC71D21FAD800FB4324 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; @@ -190,9 +203,6 @@ 016CF8F51ED52E5C001336F1 /* AdvancedViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AdvancedViewController.swift; sourceTree = ""; }; 016FDC6E1E73F10E00E01B35 /* ByteFileFormatter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ByteFileFormatter.swift; sourceTree = ""; }; 016FDC7A1E7D674200E01B35 /* LogViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LogViewController.swift; sourceTree = ""; }; - 0171426E23B9DA850051ADDF /* Preferences.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Preferences.storyboard; sourceTree = ""; }; - 0171427023B9FB710051ADDF /* Log.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Log.storyboard; sourceTree = ""; }; - 0171427223B9FC370051ADDF /* About.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = About.storyboard; sourceTree = ""; }; 017557BC1F6CD18D004C02F3 /* StatusCollectionViewItem.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = StatusCollectionViewItem.xib; sourceTree = ""; }; 01789B1A1D9C995300A5B789 /* NewTaskViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NewTaskViewController.swift; sourceTree = ""; }; 01842A4E2233672700BA77CB /* Aria2cProcessStatusViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Aria2cProcessStatusViewController.swift; sourceTree = ""; }; @@ -225,8 +235,11 @@ 01A5351E2129512200E5C88C /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = ""; }; 01B914E4224F2E37001A55AD /* Aria2cTrackerListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Aria2cTrackerListViewController.swift; sourceTree = ""; }; 01BC4F941E443A6500417221 /* SafeSubscript.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SafeSubscript.swift; sourceTree = ""; }; + 01C373562422630B006778D1 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = SOURCE_ROOT; }; + 01C85323241CA604006581F9 /* Cartfile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Cartfile; sourceTree = SOURCE_ROOT; }; + 01C85329241CA7D4006581F9 /* Starscream.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Starscream.framework; path = Carthage/Build/Mac/Starscream.framework; sourceTree = ""; }; + 01C8532A241CA7D4006581F9 /* Starscream.framework.dSYM */ = {isa = PBXFileReference; lastKnownFileType = wrapper.dsym; name = Starscream.framework.dSYM; path = Carthage/Build/Mac/Starscream.framework.dSYM; sourceTree = ""; }; 01DD0D0A1D25012F0042ECEB /* MainSplitView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainSplitView.swift; sourceTree = ""; }; - 01E410B122CA3CED00864118 /* InstallAria2GuideWindow.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = InstallAria2GuideWindow.storyboard; sourceTree = ""; }; 01E410B322CA427500864118 /* InstallAria2GuideWindowController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InstallAria2GuideWindowController.swift; sourceTree = ""; }; 01E9068A219BF70800928580 /* Aria2D.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Aria2D.xcdatamodel; sourceTree = ""; }; 01E906A7219C518B00928580 /* Aria2Object+CoreDataClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Aria2Object+CoreDataClass.swift"; sourceTree = ""; }; @@ -250,8 +263,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 01474894215673CC005014D3 /* SocketRocket.framework in Frameworks */, 012BB31A23378E2100ACA3DE /* Sparkle.framework in Frameworks */, + 01C8532B241CA7DB006581F9 /* Starscream.framework in Frameworks */, 018B8B5A236277B900276985 /* PMKFoundation.framework in Frameworks */, 018B8B58236277B800276985 /* PromiseKit.framework in Frameworks */, ); @@ -315,10 +328,10 @@ isa = PBXGroup; children = ( 013EF15F2258557600E4D7D8 /* InstallationMethodViewController.swift */, - 01E410B122CA3CED00864118 /* InstallAria2GuideWindow.storyboard */, + 010AF02423C4BBFD00FC2320 /* InstallAria2GuideWindow.storyboard */, 01E410B322CA427500864118 /* InstallAria2GuideWindowController.swift */, ); - path = InstallAria2cGuide; + name = InstallAria2cGuide; sourceTree = ""; }; 0147EDB41D21FAD800FB4324 = { @@ -371,6 +384,8 @@ children = ( 01E90689219BF70800928580 /* Aria2D.xcdatamodeld */, 016CF8F41ED41618001336F1 /* Aria2D.entitlements */, + 01C85323241CA604006581F9 /* Cartfile */, + 01C373562422630B006778D1 /* README.md */, 018E892A1D34FEB7000C71B0 /* Resources */, 018E89541D34FF60000C71B0 /* CoreData */, 012C3AEB1E10102C00ABFE4C /* Aria2 */, @@ -383,11 +398,11 @@ 016C405A1DA27C6200EB27A2 /* AboutAria2D */ = { isa = PBXGroup; children = ( - 0171427223B9FC370051ADDF /* About.storyboard */, + 010AF01B23C4BAB600FC2320 /* About.storyboard */, 016C40581DA27C5B00EB27A2 /* AboutAria2DWindow.swift */, 016C405D1DA29A4100EB27A2 /* AboutAria2D.swift */, ); - path = AboutAria2D; + name = AboutAria2D; sourceTree = ""; }; 016FDC781E7B9BD600E01B35 /* InfoView */ = { @@ -427,17 +442,17 @@ 011D5587220D4FBE00FCE1DE /* FlippedScrollDocView.swift */, 011E4D3021E8C3AF00997633 /* Aria2cOptions.swift */, ); - path = Views; + name = Views; sourceTree = ""; }; 0182E60C1EAEE90000E08454 /* Log */ = { isa = PBXGroup; children = ( - 0171427023B9FB710051ADDF /* Log.storyboard */, + 010AF02923C4BC4100FC2320 /* Log.storyboard */, 019FAD9F1EA65B880032A60B /* LogWindowController.swift */, 016FDC7A1E7D674200E01B35 /* LogViewController.swift */, ); - path = Log; + name = Log; sourceTree = ""; }; 018E892A1D34FEB7000C71B0 /* Resources */ = { @@ -489,10 +504,10 @@ children = ( 018E896B1D350075000C71B0 /* PreferencesTabViewController.swift */, 018E896A1D350075000C71B0 /* PreferencesWindow.swift */, - 0171426E23B9DA850051ADDF /* Preferences.storyboard */, + 010AF02E23C4BD2600FC2320 /* Preferences.storyboard */, 01789B1C1D9D207E00A5B789 /* Views */, ); - path = Preferences; + name = Preferences; sourceTree = ""; }; 019BFF5E2125D90A00E715CC /* MainWindow */ = { @@ -522,12 +537,12 @@ 6ACACE787527AEFD90491354 /* Frameworks */ = { isa = PBXGroup; children = ( + 01C85329241CA7D4006581F9 /* Starscream.framework */, + 01C8532A241CA7D4006581F9 /* Starscream.framework.dSYM */, 018B8B51236277AF00276985 /* PMKFoundation.framework */, 018B8B52236277AF00276985 /* PMKFoundation.framework.dSYM */, 018B8B50236277AF00276985 /* PromiseKit.framework */, 018B8B53236277AF00276985 /* PromiseKit.framework.dSYM */, - 01474892215673C6005014D3 /* SocketRocket.framework */, - 011E4D3C21EC367200997633 /* SocketRocket.framework.dSYM */, 0199420723378BB30045FDE9 /* Sparkle.framework */, 0199420823378BB30045FDE9 /* Sparkle.framework.dSYM */, ); @@ -616,16 +631,18 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 01E410B222CA3CED00864118 /* InstallAria2GuideWindow.storyboard in Resources */, + 010AF02223C4BBFD00FC2320 /* InstallAria2GuideWindow.storyboard in Resources */, 01A5351B2129512000E5C88C /* Localizable.strings in Resources */, - 0171427123B9FB710051ADDF /* Log.storyboard in Resources */, + 010AF02723C4BC4100FC2320 /* Log.storyboard in Resources */, 0147EDC81D21FAD800FB4324 /* Main.storyboard in Resources */, + 01C85324241CA605006581F9 /* Cartfile in Resources */, 011E102C1D478EB300BD2E71 /* Assets.xcassets in Resources */, + 01C373572422630B006778D1 /* README.md in Resources */, 017557BD1F6CD18D004C02F3 /* StatusCollectionViewItem.xib in Resources */, - 0171427323B9FC370051ADDF /* About.storyboard in Resources */, + 010AF01923C4BAB600FC2320 /* About.storyboard in Resources */, 014D3B561EDBF2D000E3ABC0 /* Aria2D.conf in Resources */, 013EF1622258605100E4D7D8 /* DMG File Installation Guide.pdf in Resources */, - 0171426F23B9DA850051ADDF /* Preferences.storyboard in Resources */, + 010AF02C23C4BD2600FC2320 /* Preferences.storyboard in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -740,11 +757,52 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ + 010AF01B23C4BAB600FC2320 /* About.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 010AF01C23C4BAC400FC2320 /* Base */, + 010AF04223C4C15300FC2320 /* en */, + 010AF04323C4C15600FC2320 /* zh-Hans */, + ); + name = About.storyboard; + sourceTree = ""; + }; + 010AF02423C4BBFD00FC2320 /* InstallAria2GuideWindow.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 010AF02323C4BBFD00FC2320 /* Base */, + 010AF02623C4BC0B00FC2320 /* zh-Hans */, + 010AF04523C4C15E00FC2320 /* en */, + ); + name = InstallAria2GuideWindow.storyboard; + sourceTree = ""; + }; + 010AF02923C4BC4100FC2320 /* Log.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 010AF02823C4BC4100FC2320 /* Base */, + 010AF02B23C4BC4500FC2320 /* zh-Hans */, + 010AF04023C4C14D00FC2320 /* en */, + ); + name = Log.storyboard; + sourceTree = ""; + }; + 010AF02E23C4BD2600FC2320 /* Preferences.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 010AF02D23C4BD2600FC2320 /* Base */, + 010AF03023C4BD2C00FC2320 /* zh-Hans */, + 010AF03E23C4C14400FC2320 /* en */, + ); + name = Preferences.storyboard; + sourceTree = ""; + }; 0147EDC61D21FAD800FB4324 /* Main.storyboard */ = { isa = PBXVariantGroup; children = ( 0147EDC71D21FAD800FB4324 /* Base */, 01A53518212943F500E5C88C /* zh-Hans */, + 010AF04723C4C4DA00FC2320 /* en */, ); name = Main.storyboard; path = .; @@ -900,7 +958,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; LIBRARY_SEARCH_PATHS = "$(inherited)"; MACOSX_DEPLOYMENT_TARGET = 10.12; - MARKETING_VERSION = 1.3.4; + MARKETING_VERSION = 1.3.5; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; ONLY_ACTIVE_ARCH = YES; OTHER_LDFLAGS = ""; @@ -939,7 +997,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; LIBRARY_SEARCH_PATHS = "$(inherited)"; MACOSX_DEPLOYMENT_TARGET = 10.12; - MARKETING_VERSION = 1.3.4; + MARKETING_VERSION = 1.3.5; ONLY_ACTIVE_ARCH = NO; OTHER_LDFLAGS = ""; OTHER_SWIFT_FLAGS = ""; diff --git a/Aria2D/Aria2/Aria2.swift b/Aria2D/Aria2/Aria2.swift index 3f01fcb..dfbe5d6 100644 --- a/Aria2D/Aria2/Aria2.swift +++ b/Aria2D/Aria2/Aria2.swift @@ -32,12 +32,16 @@ class Aria2: NSObject { var result: [[[Aria2Object]]] } - let params = [[Aria2WebsocketParams(method: Aria2Method.tellActive, - params: nil ).object, - Aria2WebsocketParams(method: Aria2Method.tellWaiting, - params: [0, 1000]).object, - Aria2WebsocketParams(method: Aria2Method.tellStopped, - params: [0, 1000]).object]] + let params = [[ + Aria2WebsocketParams( + method: Aria2Method.tellActive, + params: nil ).object, + Aria2WebsocketParams( + method: Aria2Method.tellWaiting, + params: [0, 1000]).object, + Aria2WebsocketParams( + method: Aria2Method.tellStopped, + params: [0, 1000]).object]] send(method: Aria2Method.multicall, params: params) @@ -51,13 +55,17 @@ class Aria2: NSObject { } private func sortAllData() { - send(method: Aria2Method.multicall, - params: [[Aria2WebsocketParams(method: Aria2Method.tellActive, - params: [["gid", "status"]]).object, - Aria2WebsocketParams(method: Aria2Method.tellWaiting, - params: [0, 1000, ["gid", "status"]]).object, - Aria2WebsocketParams(method: Aria2Method.tellStopped, - params: [0, 1000, ["gid", "status"]]).object]]) + send(method: Aria2Method.multicall, + params: [[ + Aria2WebsocketParams( + method: Aria2Method.tellActive, + params: [["gid", "status"]]).object, + Aria2WebsocketParams( + method: Aria2Method.tellWaiting, + params: [0, 1000, ["gid", "status"]]).object, + Aria2WebsocketParams( + method: Aria2Method.tellStopped, + params: [0, 1000, ["gid", "status"]]).object]]) .done { data in struct GIDList: Decodable { var result: [[[[String: String]]]] @@ -87,19 +95,22 @@ class Aria2: NSObject { func updateActiveTasks() { send(method: Aria2Method.multicall, - params: [[Aria2WebsocketParams(method: Aria2Method.tellActive, - params: [["gid", - "status", - "completedLength", - "totalLength", - "downloadSpeed", - "uploadLength", - "uploadSpeed", - "connections", - "bittorrent", - "dir"]]).object, - Aria2WebsocketParams(method: Aria2Method.getGlobalStat, - params: []).object]]) + params: [[ + Aria2WebsocketParams( + method: Aria2Method.tellActive, + params: [["gid", + "status", + "completedLength", + "totalLength", + "downloadSpeed", + "uploadLength", + "uploadSpeed", + "connections", + "bittorrent", + "dir"]]).object, + Aria2WebsocketParams( + method: Aria2Method.getGlobalStat, + params: []).object]]) .done { data in struct Result: Decodable { let result: [ResultObj] @@ -123,25 +134,26 @@ class Aria2: NSObject { try DataManager.shared.updateStatus($0.status) } } - }.catch { - Log("\(#function) error \($0)") + }.catch { + Log("\(#function) error \($0)") } } func updateStatus(_ gids: [String], block: (([Aria2Status]) -> Void)? = nil) { guard effectiveGIDs(gids).count > 0 else { return } let params = gids.map { - Aria2WebsocketParams(method: Aria2Method.tellStatus, - params: [$0, ["gid", - "status", - "completedLength", - "totalLength", - "downloadSpeed", - "uploadLength", - "uploadSpeed", - "connections", - "bittorrent", - "dir"]]).object + Aria2WebsocketParams( + method: Aria2Method.tellStatus, + params: [$0, ["gid", + "status", + "completedLength", + "totalLength", + "downloadSpeed", + "uploadLength", + "uploadSpeed", + "connections", + "bittorrent", + "dir"]]).object } send(method: Aria2Method.multicall, diff --git a/Aria2D/Aria2/Aria2Websocket.swift b/Aria2D/Aria2/Aria2Websocket.swift index 224fad4..5febffc 100644 --- a/Aria2D/Aria2/Aria2Websocket.swift +++ b/Aria2D/Aria2/Aria2Websocket.swift @@ -7,7 +7,7 @@ // import Cocoa -import SocketRocket +import Starscream import PromiseKit struct ConnectedServerInfo { @@ -22,14 +22,9 @@ class Aria2Websocket: NSObject { private override init() { } - var socket: SRWebSocket? = nil + var socket: WebSocket? = nil - var isConnected: Bool { - get { - return socket?.readyState == .OPEN - } - } - + var isConnected = false var connectedServerInfo = ConnectedServerInfo() var aria2GlobalOption = [Aria2Option: String]() { @@ -44,14 +39,14 @@ class Aria2Websocket: NSObject { self.timer = nil } - socket?.close() + socket?.disconnect() if let url = Preferences.shared.aria2Servers.serverURL() { guard url.host != nil else { return } - socket = SRWebSocket(url: url) + socket = WebSocket(request: .init(url: url)) socket?.delegate = self - socket?.open() + socket?.connect() startTimer() } @@ -77,11 +72,11 @@ class Aria2Websocket: NSObject { timer.schedule(deadline: .now(), repeating: .seconds(1)) timer.setEventHandler { if !self.isConnected { - self.socket?.close() - let url = self.socket?.url - self.socket = SRWebSocket(url: url!) + self.socket?.disconnect() + guard let url = self.socket?.request.url else { return } + self.socket = WebSocket.init(request: .init(url: url)) self.socket?.delegate = self - self.socket?.open() + self.socket?.connect() } else { DispatchQueue.main.async { guard let count = try? DataManager.shared.activeCount(), @@ -203,7 +198,7 @@ class Aria2Websocket: NSObject { } } do { - try socket?.send(data: try JSONSerialization.data(withJSONObject: dic, options: .prettyPrinted)) + socket?.write(data: try JSONSerialization.data(withJSONObject: dic, options: .prettyPrinted), completion: nil) } catch let er { resolver.reject(webSocketResult.receiveError(message: "\(er)")) return @@ -222,8 +217,42 @@ enum webSocketResult: Error { case somethingError } -extension Aria2Websocket: SRWebSocketDelegate { - func webSocketDidOpen(_ webSocket: SRWebSocket) { +extension Aria2Websocket: WebSocketDelegate { + + func didReceive(event: WebSocketEvent, client: WebSocket) { + switch event { + case .connected(let headers): + isConnected = true + Log("websocket is connected: \(headers)") + webSocketDidOpen() + case .disconnected(let reason, let code): + isConnected = false + Log("websocket is disconnected: \(reason) with code: \(code)") + webSocket(didCloseWithCode: Int(code), reason: reason) + case .text(let string): + webSocket(didReceiveMessageWith: string) + case .binary(let data): + Log("Received data: \(data.count)") + case .ping(_): + Log("websocket ping") + case .pong(_): + Log("websocket pong") + case .viablityChanged(_): + Log("websocket viablityChanged") + case .reconnectSuggested(_): + Log("websocket reconnectSuggested") + case .cancelled: + isConnected = false + Log("websocket cancelled") + case .error(let error): + isConnected = false + Log("websocket error \(String(describing: error))") + } + } + + + + func webSocketDidOpen() { Aria2.shared.initData.run() connectedServerInfo.name = Preferences.shared.aria2Servers.getSelectedName() Aria2.shared.getVersion { @@ -237,8 +266,8 @@ extension Aria2Websocket: SRWebSocketDelegate { NotificationCenter.default.post(name: .updateGlobalStat, object: nil, userInfo: ["updateServer": true]) } - func webSocket(_ webSocket: SRWebSocket, didCloseWithCode code: Int, reason: String?, wasClean: Bool) { - connectedServerInfo.version = reason ?? "" + func webSocket(didCloseWithCode code: Int, reason: String) { + connectedServerInfo.version = reason connectedServerInfo.enabledFeatures = "" aria2GlobalOption = [:] DataManager.shared.deleteAllAria2Objects() @@ -246,7 +275,7 @@ extension Aria2Websocket: SRWebSocketDelegate { NotificationCenter.default.post(name: .updateGlobalStat, object: nil, userInfo: ["updateServer": true]) } - func webSocket(_ webSocket: SRWebSocket, didReceiveMessageWith string: String) { + func webSocket(didReceiveMessageWith string: String) { if let data = string.data(using: .utf8) { if let json = try? JSONDecoder().decode(JSONRPC.self, from: data), json.id.count == 36 { diff --git a/Aria2D/Source/AppDelegate.swift b/Aria2D/Source/AppDelegate.swift index 8a481c4..ae200a1 100644 --- a/Aria2D/Source/AppDelegate.swift +++ b/Aria2D/Source/AppDelegate.swift @@ -183,7 +183,11 @@ class AppDelegate: NSObject, NSApplicationDelegate { } catch { // Customize this code block to include application-specific recovery steps. let nserror = error as NSError - NSApplication.shared.presentError(nserror) + let re = NSApp.presentError(nserror) + // click ok button + if !re { + NSApp.terminate(self) + } } } } diff --git a/Aria2D/Source/Utils/EnumList.swift b/Aria2D/Source/Utils/EnumList.swift index 4431af7..c4fb847 100644 --- a/Aria2D/Source/Utils/EnumList.swift +++ b/Aria2D/Source/Utils/EnumList.swift @@ -22,6 +22,7 @@ enum PreferenceKeys: String { case completeNotice = "app_completeNotice" case showAria2Features = "app_showAria2Features" case showGlobalSpeed = "app_showGlobalSpeed" + case showDockIconSpeed = "app_showDockIconSpeed" case openMagnetLink = "app_openMagnetLink" case autoStartAria2c = "aria2c_autoStartAria2c" diff --git a/Aria2D/Source/Utils/Preferences.swift b/Aria2D/Source/Utils/Preferences.swift index 183366a..7c20a3c 100644 --- a/Aria2D/Source/Utils/Preferences.swift +++ b/Aria2D/Source/Utils/Preferences.swift @@ -137,6 +137,16 @@ class Preferences: NSObject { } } + @objc var showDockIconSpeed: Bool { + get { + return defaults(.showDockIconSpeed) as? Bool ?? true + } + set { + defaultsSet(newValue, forKey: .showDockIconSpeed) + NotificationCenter.default.post(name: .updateGlobalStat, object: nil) + } + } + @objc var openMagnetLink: Bool { get { return defaults(.openMagnetLink) as? Bool ?? true diff --git a/Aria2D/Source/View/Base.lproj/About.strings b/Aria2D/Source/View/Base.lproj/About.strings new file mode 100644 index 0000000..e69de29 diff --git a/Aria2D/Source/View/Base.lproj/InstallAria2GuideWindow.strings b/Aria2D/Source/View/Base.lproj/InstallAria2GuideWindow.strings new file mode 100644 index 0000000..e69de29 diff --git a/Aria2D/Source/View/Base.lproj/Log.strings b/Aria2D/Source/View/Base.lproj/Log.strings new file mode 100644 index 0000000..e69de29 diff --git a/Aria2D/Source/View/Base.lproj/Main.strings b/Aria2D/Source/View/Base.lproj/Main.strings new file mode 100644 index 0000000..e69de29 diff --git a/Aria2D/Source/View/Base.lproj/Preferences.strings b/Aria2D/Source/View/Base.lproj/Preferences.strings new file mode 100644 index 0000000..e69de29 diff --git a/Aria2D/Views/AboutAria2D/AboutAria2D.swift b/Aria2D/Views/AboutAria2D.swift similarity index 100% rename from Aria2D/Views/AboutAria2D/AboutAria2D.swift rename to Aria2D/Views/AboutAria2D.swift diff --git a/Aria2D/Views/AboutAria2D/AboutAria2DWindow.swift b/Aria2D/Views/AboutAria2DWindow.swift similarity index 100% rename from Aria2D/Views/AboutAria2D/AboutAria2DWindow.swift rename to Aria2D/Views/AboutAria2DWindow.swift diff --git a/Aria2D/Views/Preferences/Views/AdvancedViewController.swift b/Aria2D/Views/AdvancedViewController.swift similarity index 100% rename from Aria2D/Views/Preferences/Views/AdvancedViewController.swift rename to Aria2D/Views/AdvancedViewController.swift diff --git a/Aria2D/Views/Preferences/Views/Aria2OptionsViewController.swift b/Aria2D/Views/Aria2OptionsViewController.swift similarity index 100% rename from Aria2D/Views/Preferences/Views/Aria2OptionsViewController.swift rename to Aria2D/Views/Aria2OptionsViewController.swift diff --git a/Aria2D/Views/Preferences/Views/Aria2cLogViewController.swift b/Aria2D/Views/Aria2cLogViewController.swift similarity index 100% rename from Aria2D/Views/Preferences/Views/Aria2cLogViewController.swift rename to Aria2D/Views/Aria2cLogViewController.swift diff --git a/Aria2D/Views/Preferences/Views/Aria2cOptions.swift b/Aria2D/Views/Aria2cOptions.swift similarity index 100% rename from Aria2D/Views/Preferences/Views/Aria2cOptions.swift rename to Aria2D/Views/Aria2cOptions.swift diff --git a/Aria2D/Views/Preferences/Views/Aria2cProcessStatusViewController.swift b/Aria2D/Views/Aria2cProcessStatusViewController.swift similarity index 100% rename from Aria2D/Views/Preferences/Views/Aria2cProcessStatusViewController.swift rename to Aria2D/Views/Aria2cProcessStatusViewController.swift diff --git a/Aria2D/Views/Preferences/Views/Aria2cTrackerListViewController.swift b/Aria2D/Views/Aria2cTrackerListViewController.swift similarity index 100% rename from Aria2D/Views/Preferences/Views/Aria2cTrackerListViewController.swift rename to Aria2D/Views/Aria2cTrackerListViewController.swift diff --git a/Aria2D/Views/AboutAria2D/About.storyboard b/Aria2D/Views/Base.lproj/About.storyboard similarity index 100% rename from Aria2D/Views/AboutAria2D/About.storyboard rename to Aria2D/Views/Base.lproj/About.storyboard diff --git a/Aria2D/Views/InstallAria2cGuide/InstallAria2GuideWindow.storyboard b/Aria2D/Views/Base.lproj/InstallAria2GuideWindow.storyboard similarity index 100% rename from Aria2D/Views/InstallAria2cGuide/InstallAria2GuideWindow.storyboard rename to Aria2D/Views/Base.lproj/InstallAria2GuideWindow.storyboard diff --git a/Aria2D/Views/Log/Log.storyboard b/Aria2D/Views/Base.lproj/Log.storyboard similarity index 100% rename from Aria2D/Views/Log/Log.storyboard rename to Aria2D/Views/Base.lproj/Log.storyboard diff --git a/Aria2D/Views/Preferences/Preferences.storyboard b/Aria2D/Views/Base.lproj/Preferences.storyboard similarity index 99% rename from Aria2D/Views/Preferences/Preferences.storyboard rename to Aria2D/Views/Base.lproj/Preferences.storyboard index 55bb6b2..f512027 100644 --- a/Aria2D/Views/Preferences/Preferences.storyboard +++ b/Aria2D/Views/Base.lproj/Preferences.storyboard @@ -1,8 +1,8 @@ - + - + @@ -50,15 +50,16 @@ - + - + + @@ -69,7 +70,7 @@ + + +