Compare commits
36 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| eb3cc85403 | |||
| 51b171fcb7 | |||
| 316d576715 | |||
| c6a1c3e785 | |||
| 20ceff19fe | |||
| 93ae7d634f | |||
| 766356d4a3 | |||
| bd68ecfbab | |||
| f1ebfa05bd | |||
| c8231a15ae | |||
| 4c81f92105 | |||
| 14a2f4077f | |||
| 9be8b62dc9 | |||
| 4b5448a4b6 | |||
| 7cb3bf5e4d | |||
| c3ca122b27 | |||
| f4af791fac | |||
| adbdc52603 | |||
| ef7341e9a5 | |||
| 6705cd100b | |||
| e5c9f80318 | |||
| caa96f7634 | |||
| a0acf3e309 | |||
| d546366b63 | |||
| 1997006727 | |||
| d6a007b7bc | |||
| c076b3cf79 | |||
| bd81825eb6 | |||
| c67bf82f1c | |||
| edbfb57081 | |||
| 15ef64fad1 | |||
| 335a978ea3 | |||
| 29f8316c7d | |||
| 163c257ad3 | |||
| 155f350ec3 | |||
| 21ad6e8422 |
@@ -18,13 +18,11 @@
|
||||
0A59C2721E3D09CE00E40A2B /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A59C2711E3D09CE00E40A2B /* Constants.swift */; };
|
||||
0A59C2741E3D0C0E00E40A2B /* GetIt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A59C2731E3D0C0E00E40A2B /* GetIt.swift */; };
|
||||
0A8DA5DA1E3E808500148315 /* AboutViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A8DA5D91E3E808500148315 /* AboutViewController.swift */; };
|
||||
0AAAC76C208664EB009C6ACB /* progressView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AAAC76B208664EB009C6ACB /* progressView.swift */; };
|
||||
0AAC75B61E3E24800086BB87 /* DownloadButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AAC75B51E3E24800086BB87 /* DownloadButton.swift */; };
|
||||
0AAC75B81E3E25820086BB87 /* GrayButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AAC75B71E3E25820086BB87 /* GrayButton.swift */; };
|
||||
0AF763CF1E474D2A00403BA1 /* InstallationGuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AF763CD1E474D2A00403BA1 /* InstallationGuideViewController.swift */; };
|
||||
0AF763D21E476D4C00403BA1 /* openTerminalButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AF763D11E476D4C00403BA1 /* openTerminalButton.swift */; };
|
||||
0AF763D41E47B90D00403BA1 /* InstallationGuideTexts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AF763D31E47B90D00403BA1 /* InstallationGuideTexts.swift */; };
|
||||
0AF763D61E47C71500403BA1 /* installationGuideTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AF763D51E47C71500403BA1 /* installationGuideTextField.swift */; };
|
||||
656FE9E68E618252B653F728 /* Pods_Get_It.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3F840AEEA491FC0DE6DE63CC /* Pods_Get_It.framework */; };
|
||||
0AFE6EDE20ACB49E002C7693 /* Logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AFE6EDD20ACB49E002C7693 /* Logger.swift */; };
|
||||
89FEC36FE494806C0C0FAF5E /* Pods_Get_It.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3F840AEEA491FC0DE6DE63CC /* Pods_Get_It.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
@@ -41,12 +39,10 @@
|
||||
0A59C2711E3D09CE00E40A2B /* Constants.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = "<group>"; };
|
||||
0A59C2731E3D0C0E00E40A2B /* GetIt.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GetIt.swift; sourceTree = "<group>"; };
|
||||
0A8DA5D91E3E808500148315 /* AboutViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AboutViewController.swift; sourceTree = "<group>"; };
|
||||
0AAAC76B208664EB009C6ACB /* progressView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = progressView.swift; sourceTree = "<group>"; };
|
||||
0AAC75B51E3E24800086BB87 /* DownloadButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DownloadButton.swift; sourceTree = "<group>"; };
|
||||
0AAC75B71E3E25820086BB87 /* GrayButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GrayButton.swift; sourceTree = "<group>"; };
|
||||
0AF763CD1E474D2A00403BA1 /* InstallationGuideViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InstallationGuideViewController.swift; sourceTree = "<group>"; };
|
||||
0AF763D11E476D4C00403BA1 /* openTerminalButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = openTerminalButton.swift; sourceTree = "<group>"; };
|
||||
0AF763D31E47B90D00403BA1 /* InstallationGuideTexts.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InstallationGuideTexts.swift; sourceTree = "<group>"; };
|
||||
0AF763D51E47C71500403BA1 /* installationGuideTextField.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = installationGuideTextField.swift; sourceTree = "<group>"; };
|
||||
0AFE6EDD20ACB49E002C7693 /* Logger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Logger.swift; sourceTree = "<group>"; };
|
||||
2F2FF097A134B03DBD16D354 /* Pods-Youtube-dl-GUI.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Youtube-dl-GUI.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Youtube-dl-GUI/Pods-Youtube-dl-GUI.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
3D0235652B5434027EFB9C78 /* Pods-Get It.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Get It.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Get It/Pods-Get It.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
3F840AEEA491FC0DE6DE63CC /* Pods_Get_It.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Get_It.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
@@ -60,7 +56,7 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
656FE9E68E618252B653F728 /* Pods_Get_It.framework in Frameworks */,
|
||||
89FEC36FE494806C0C0FAF5E /* Pods_Get_It.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -106,7 +102,6 @@
|
||||
0A59C26D1E3D01A700E40A2B /* WindowController.swift */,
|
||||
0A59C26F1E3D01F400E40A2B /* OptionsViewController.swift */,
|
||||
0A8DA5D91E3E808500148315 /* AboutViewController.swift */,
|
||||
0AF763CD1E474D2A00403BA1 /* InstallationGuideViewController.swift */,
|
||||
);
|
||||
name = Controller;
|
||||
sourceTree = "<group>";
|
||||
@@ -119,8 +114,7 @@
|
||||
0AAC75B71E3E25820086BB87 /* GrayButton.swift */,
|
||||
0A2BF1F71E460F170002C5B7 /* optionsTextfield.swift */,
|
||||
0A2BF1F91E4619230002C5B7 /* secureOptionsTextfield.swift */,
|
||||
0AF763D11E476D4C00403BA1 /* openTerminalButton.swift */,
|
||||
0AF763D51E47C71500403BA1 /* installationGuideTextField.swift */,
|
||||
0AAAC76B208664EB009C6ACB /* progressView.swift */,
|
||||
);
|
||||
name = View;
|
||||
sourceTree = "<group>";
|
||||
@@ -129,6 +123,7 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
0A59C2731E3D0C0E00E40A2B /* GetIt.swift */,
|
||||
0AFE6EDD20ACB49E002C7693 /* Logger.swift */,
|
||||
);
|
||||
name = Model;
|
||||
sourceTree = "<group>";
|
||||
@@ -137,7 +132,6 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
0A59C2711E3D09CE00E40A2B /* Constants.swift */,
|
||||
0AF763D31E47B90D00403BA1 /* InstallationGuideTexts.swift */,
|
||||
);
|
||||
name = "Constants and Text";
|
||||
sourceTree = "<group>";
|
||||
@@ -191,7 +185,7 @@
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 0730;
|
||||
LastUpgradeCheck = 0820;
|
||||
LastUpgradeCheck = 1020;
|
||||
ORGANIZATIONNAME = "Kevin De Koninck";
|
||||
TargetAttributes = {
|
||||
0A3153141CF37A660020DBB8 = {
|
||||
@@ -210,6 +204,7 @@
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
English,
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
@@ -260,21 +255,20 @@
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${SRCROOT}/Pods/Target Support Files/Pods-Get It/Pods-Get It-frameworks.sh",
|
||||
"${BUILT_PRODUCTS_DIR}/DJProgressHUD_OSX/DJProgressHUD_OSX.framework",
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Get It/Pods-Get It-frameworks.sh",
|
||||
"${BUILT_PRODUCTS_DIR}/ITSwitch/ITSwitch.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/LetsMove/LetsMove.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/STPrivilegedTask/STPrivilegedTask.framework",
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputPaths = (
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DJProgressHUD_OSX.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ITSwitch.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/LetsMove.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/STPrivilegedTask.framework",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Get It/Pods-Get It-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Get It/Pods-Get It-frameworks.sh\"\n";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
@@ -285,19 +279,17 @@
|
||||
files = (
|
||||
0AAC75B61E3E24800086BB87 /* DownloadButton.swift in Sources */,
|
||||
0A59C2721E3D09CE00E40A2B /* Constants.swift in Sources */,
|
||||
0AF763D21E476D4C00403BA1 /* openTerminalButton.swift in Sources */,
|
||||
0AAC75B81E3E25820086BB87 /* GrayButton.swift in Sources */,
|
||||
0A8DA5DA1E3E808500148315 /* AboutViewController.swift in Sources */,
|
||||
0AF763D61E47C71500403BA1 /* installationGuideTextField.swift in Sources */,
|
||||
0A2BF1FA1E4619230002C5B7 /* secureOptionsTextfield.swift in Sources */,
|
||||
0A2BF1F81E460F170002C5B7 /* optionsTextfield.swift in Sources */,
|
||||
0AFE6EDE20ACB49E002C7693 /* Logger.swift in Sources */,
|
||||
0A31531B1CF37A660020DBB8 /* ViewController.swift in Sources */,
|
||||
0A59C2701E3D01F400E40A2B /* OptionsViewController.swift in Sources */,
|
||||
0A59C26E1E3D01A700E40A2B /* WindowController.swift in Sources */,
|
||||
0A3153191CF37A660020DBB8 /* AppDelegate.swift in Sources */,
|
||||
0A59C2741E3D0C0E00E40A2B /* GetIt.swift in Sources */,
|
||||
0AF763CF1E474D2A00403BA1 /* InstallationGuideViewController.swift in Sources */,
|
||||
0AF763D41E47B90D00403BA1 /* InstallationGuideTexts.swift in Sources */,
|
||||
0AAAC76C208664EB009C6ACB /* progressView.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -319,19 +311,28 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
@@ -354,7 +355,7 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.11;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.12;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx;
|
||||
@@ -366,19 +367,28 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
@@ -395,7 +405,7 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.11;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.12;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = macosx;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
@@ -413,7 +423,7 @@
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.11;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.KevinDeKoninck.GetIt;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 3.0;
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
@@ -428,7 +438,7 @@
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.11;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.KevinDeKoninck.GetIt;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 3.0;
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0820"
|
||||
LastUpgradeVersion = "1020"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict/>
|
||||
</plist>
|
||||
BIN
Binary file not shown.
@@ -23,11 +23,7 @@ class AboutViewController: NSViewController {
|
||||
}
|
||||
|
||||
@IBAction func githubBtnClicked(_ sender: Any) {
|
||||
open(website: "https://github.com/Kevin-De-Koninck/Get-It")
|
||||
}
|
||||
|
||||
@IBAction func kBtnClicked(_ sender: Any) {
|
||||
open(website: "https://kevindekoninck.com")
|
||||
open(website: "https://kevin-de-koninck.github.io/Get-It/")
|
||||
}
|
||||
|
||||
@IBAction func supportedSitesBtnClicked(_ sender: Any) {
|
||||
@@ -43,7 +39,7 @@ class AboutViewController: NSViewController {
|
||||
}
|
||||
|
||||
func open(website: String){
|
||||
if let url = URL(string: website), NSWorkspace.shared().open(url) {
|
||||
if let url = URL(string: website), NSWorkspace.shared.open(url) {
|
||||
print("default browser was successfully opened")
|
||||
}
|
||||
}
|
||||
|
||||
+219
-280
@@ -1,9 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="14109" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14109"/>
|
||||
<capability name="Alignment constraints to the first baseline" minToolsVersion="6.0"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14490.70"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
@@ -192,9 +191,9 @@
|
||||
<scene sceneID="R2V-B0-nI4">
|
||||
<objects>
|
||||
<windowController id="B8D-0N-5wS" customClass="WindowController" customModule="Get_It" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<window key="window" title="Get It" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" releasedWhenClosed="NO" showsToolbarButton="NO" visibleAtLaunch="NO" animationBehavior="default" tabbingMode="disallowed" titlebarAppearsTransparent="YES" id="IQv-IB-iLA">
|
||||
<window key="window" title="Get It" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" tabbingMode="disallowed" titlebarAppearsTransparent="YES" id="IQv-IB-iLA">
|
||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" texturedBackground="YES"/>
|
||||
<rect key="contentRect" x="316" y="275" width="236" height="61"/>
|
||||
<rect key="contentRect" x="316" y="275" width="234" height="61"/>
|
||||
<rect key="screenRect" x="0.0" y="0.0" width="1680" height="1027"/>
|
||||
<connections>
|
||||
<outlet property="delegate" destination="B8D-0N-5wS" id="nbQ-ii-R9S"/>
|
||||
@@ -213,20 +212,20 @@
|
||||
<objects>
|
||||
<viewController id="Igh-3R-yf8" customClass="OptionsViewController" customModule="Get_It" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<view key="view" autoresizesSubviews="NO" appearanceType="aqua" id="JYB-pR-edy">
|
||||
<rect key="frame" x="0.0" y="0.0" width="484" height="225"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="484" height="224"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<tabView appearanceType="aqua" translatesAutoresizingMaskIntoConstraints="NO" id="Thg-ew-X1n">
|
||||
<rect key="frame" x="13" y="48" width="458" height="173"/>
|
||||
<rect key="frame" x="13" y="48" width="458" height="172"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
<tabViewItems>
|
||||
<tabViewItem label="General" identifier="1" id="6h1-Wr-GoT">
|
||||
<view key="view" id="TLS-HV-qXB">
|
||||
<rect key="frame" x="10" y="33" width="438" height="127"/>
|
||||
<rect key="frame" x="10" y="33" width="438" height="126"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<textField toolTip="Do not download any videos larger than... [MB]" horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="hSv-0K-HSK">
|
||||
<rect key="frame" x="15" y="107" width="154" height="17"/>
|
||||
<rect key="frame" x="15" y="107" width="154" height="16"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Maximum file size in MB:" id="4pd-DK-fsY">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
@@ -258,7 +257,7 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<popUpButton verticalHuggingPriority="750" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="GVv-b9-3xw">
|
||||
<rect key="frame" x="233" y="27" width="205" height="26"/>
|
||||
<rect key="frame" x="233" y="27" width="205" height="25"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="200" id="ldN-ch-fdo"/>
|
||||
</constraints>
|
||||
@@ -275,15 +274,18 @@
|
||||
</popUpButtonCell>
|
||||
</popUpButton>
|
||||
<textField toolTip="Do not download any videos larger than... [MB]" focusRingType="none" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="3pX-rq-V4S" customClass="optionsTextfield" customModule="Get_It" customModuleProvider="target">
|
||||
<rect key="frame" x="235" y="105" width="200" height="22"/>
|
||||
<rect key="frame" x="235" y="105" width="200" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="196" id="PCe-th-M0d"/>
|
||||
</constraints>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" focusRingType="none" placeholderString="MB" usesSingleLineMode="YES" id="bwk-B0-ddt">
|
||||
<numberFormatter key="formatter" formatterBehavior="default10_4" numberStyle="decimal" minimumIntegerDigits="1" maximumIntegerDigits="2000000000" maximumFractionDigits="3" id="upV-Rp-Z1r"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
<allowedInputSourceLocales>
|
||||
<string>NSAllRomanInputSourcesLocaleIdentifier</string>
|
||||
</allowedInputSourceLocales>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<customView appearanceType="aqua" translatesAutoresizingMaskIntoConstraints="NO" id="4pH-QS-9z0" customClass="ITSwitch">
|
||||
@@ -293,7 +295,7 @@
|
||||
</constraints>
|
||||
</customView>
|
||||
<button fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="E2g-pg-Lkd">
|
||||
<rect key="frame" x="237" y="55" width="25" height="25"/>
|
||||
<rect key="frame" x="237" y="54" width="25" height="25"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="Folder-icon" imagePosition="only" alignment="center" imageScaling="proportionallyUpOrDown" inset="2" id="SKQ-JD-k6p">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
@@ -304,7 +306,7 @@
|
||||
</connections>
|
||||
</button>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="jzS-2Q-oeP">
|
||||
<rect key="frame" x="268" y="59" width="167" height="17"/>
|
||||
<rect key="frame" x="268" y="58" width="167" height="17"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="~/Downloads" id="hQv-OP-7CA">
|
||||
<font key="font" metaFont="system"/>
|
||||
@@ -335,11 +337,11 @@
|
||||
</tabViewItem>
|
||||
<tabViewItem label="Authentication" identifier="1" id="nQe-Ig-lpx">
|
||||
<view key="view" id="feV-YF-baS">
|
||||
<rect key="frame" x="10" y="33" width="438" height="127"/>
|
||||
<rect key="frame" x="10" y="33" width="438" height="126"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<textField toolTip="Login with this account ID." horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="cq7-lq-buu">
|
||||
<rect key="frame" x="15" y="107" width="70" height="17"/>
|
||||
<rect key="frame" x="15" y="106" width="70" height="17"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Username:" id="rde-Ek-tE0">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
@@ -347,7 +349,7 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField toolTip="Account password." horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="kPw-pm-uzD">
|
||||
<rect key="frame" x="15" y="82" width="66" height="17"/>
|
||||
<rect key="frame" x="15" y="81" width="66" height="17"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Password:" id="3dl-Oh-K3n">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
@@ -355,7 +357,7 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField toolTip="Two-factor auth code." horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="QCZ-p4-s9r">
|
||||
<rect key="frame" x="15" y="57" width="126" height="17"/>
|
||||
<rect key="frame" x="15" y="56" width="126" height="17"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="2-factor auth. code:" id="5Pl-g9-mvf">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
@@ -363,7 +365,7 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField toolTip="Use .netrc authentication data." horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="VgU-RJ-wme">
|
||||
<rect key="frame" x="15" y="32" width="43" height="17"/>
|
||||
<rect key="frame" x="15" y="31" width="43" height="17"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title=".netrc:" id="mVl-wb-Dwj">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
@@ -371,7 +373,7 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField toolTip="Video password (vimeo, smotri, youku)." horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="XT7-mz-0Ty">
|
||||
<rect key="frame" x="15" y="7" width="105" height="17"/>
|
||||
<rect key="frame" x="15" y="6" width="105" height="17"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Video password:" id="Ccx-Sr-IKu">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
@@ -379,18 +381,18 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField toolTip="Login with this account ID." verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="dBF-vk-0RT" customClass="optionsTextfield" customModule="Get_It" customModuleProvider="target">
|
||||
<rect key="frame" x="233" y="104" width="204" height="22"/>
|
||||
<rect key="frame" x="233" y="103" width="204" height="23"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" id="rks-dF-EiC">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<secureTextField toolTip="Account password." verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="XOo-FL-D72" customClass="secureOptionsTextfield" customModule="Get_It" customModuleProvider="target">
|
||||
<rect key="frame" x="235" y="79" width="200" height="22"/>
|
||||
<rect key="frame" x="235" y="79" width="200" height="21"/>
|
||||
<secureTextFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" usesSingleLineMode="YES" id="cXC-NM-zft">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
<allowedInputSourceLocales>
|
||||
<string>NSAllRomanInputSourcesLocaleIdentifier</string>
|
||||
@@ -398,10 +400,10 @@
|
||||
</secureTextFieldCell>
|
||||
</secureTextField>
|
||||
<secureTextField toolTip="Two-factor auth code." verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="oKK-rG-X7n" customClass="secureOptionsTextfield" customModule="Get_It" customModuleProvider="target">
|
||||
<rect key="frame" x="235" y="54" width="200" height="22"/>
|
||||
<rect key="frame" x="235" y="53" width="200" height="23"/>
|
||||
<secureTextFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" usesSingleLineMode="YES" id="tsX-JF-j9l">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
<allowedInputSourceLocales>
|
||||
<string>NSAllRomanInputSourcesLocaleIdentifier</string>
|
||||
@@ -409,10 +411,10 @@
|
||||
</secureTextFieldCell>
|
||||
</secureTextField>
|
||||
<secureTextField toolTip="Video password (vimeo, smotri, youku)." verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="7z3-Y1-nMX" customClass="secureOptionsTextfield" customModule="Get_It" customModuleProvider="target">
|
||||
<rect key="frame" x="235" y="4" width="200" height="22"/>
|
||||
<rect key="frame" x="235" y="4" width="200" height="21"/>
|
||||
<secureTextFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" usesSingleLineMode="YES" id="nh1-q6-ChQ">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
<allowedInputSourceLocales>
|
||||
<string>NSAllRomanInputSourcesLocaleIdentifier</string>
|
||||
@@ -420,7 +422,7 @@
|
||||
</secureTextFieldCell>
|
||||
</secureTextField>
|
||||
<customView appearanceType="aqua" translatesAutoresizingMaskIntoConstraints="NO" id="oFp-TW-xIO" customClass="ITSwitch">
|
||||
<rect key="frame" x="235" y="32" width="28" height="17"/>
|
||||
<rect key="frame" x="235" y="31" width="28" height="17"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="28" id="tHP-Af-pND"/>
|
||||
</constraints>
|
||||
@@ -490,7 +492,7 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<popUpButton toolTip="Specify audio format. "best" by default." verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="COd-kj-c2S">
|
||||
<rect key="frame" x="233" y="75" width="205" height="26"/>
|
||||
<rect key="frame" x="233" y="75" width="205" height="25"/>
|
||||
<popUpButtonCell key="cell" type="push" title="mp3" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="nG7-Yr-dNV" id="hkc-5f-how">
|
||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="menu"/>
|
||||
@@ -516,7 +518,7 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<popUpButton toolTip="Specify ffmpeg/avconv audio quality." verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="NTZ-jV-G7e">
|
||||
<rect key="frame" x="233" y="50" width="205" height="26"/>
|
||||
<rect key="frame" x="233" y="50" width="205" height="25"/>
|
||||
<popUpButtonCell key="cell" type="push" title="5 - default" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="93A-J4-ydT" id="rdW-HE-pLn">
|
||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="menu"/>
|
||||
@@ -611,7 +613,7 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<popUpButton toolTip="Video format code." verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="eWL-eG-ysb">
|
||||
<rect key="frame" x="233" y="102" width="205" height="26"/>
|
||||
<rect key="frame" x="233" y="102" width="205" height="25"/>
|
||||
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="oE5-Sb-yT5" id="NMF-8y-sbu">
|
||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="menu"/>
|
||||
@@ -727,7 +729,7 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField toolTip="Playlist video to start at (default is 1)." horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="wAC-uf-GyV">
|
||||
<rect key="frame" x="15" y="56" width="122" height="17"/>
|
||||
<rect key="frame" x="15" y="56" width="122" height="16"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Start/Stop at video:" id="lMd-M7-jrK">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
@@ -750,7 +752,7 @@
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" id="1gT-cD-UP8">
|
||||
<numberFormatter key="formatter" formatterBehavior="default10_4" numberStyle="decimal" minimumIntegerDigits="1" maximumIntegerDigits="2000000000" maximumFractionDigits="3" id="IVM-v5-5bW"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
@@ -758,7 +760,7 @@
|
||||
<rect key="frame" x="235" y="26" width="200" height="22"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" id="f03-ni-3zk">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
@@ -782,7 +784,7 @@
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" id="9mB-9d-8BW">
|
||||
<numberFormatter key="formatter" formatterBehavior="default10_4" numberStyle="decimal" minimumIntegerDigits="1" maximumIntegerDigits="2000000000" maximumFractionDigits="3" id="KRO-L8-OTZ"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
@@ -868,7 +870,7 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<popUpButton toolTip="Languages of the subtitles to download." verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="dgx-dx-gii">
|
||||
<rect key="frame" x="233" y="27" width="205" height="26"/>
|
||||
<rect key="frame" x="233" y="27" width="205" height="25"/>
|
||||
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="OSc-kZ-ZkZ" id="dST-Kk-zjE">
|
||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="menu"/>
|
||||
@@ -952,6 +954,27 @@
|
||||
</tabViewItem>
|
||||
</tabViewItems>
|
||||
</tabView>
|
||||
<customView translatesAutoresizingMaskIntoConstraints="NO" id="pNa-9O-W4T" customClass="progressView" customModule="Get_It" customModuleProvider="target">
|
||||
<rect key="frame" x="8" y="8" width="468" height="208"/>
|
||||
<subviews>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="01C-M7-gNR">
|
||||
<rect key="frame" x="111" y="85" width="247" height="38"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="243" id="9rB-zr-LQr"/>
|
||||
<constraint firstAttribute="height" constant="38" id="XHs-gH-N9g"/>
|
||||
</constraints>
|
||||
<textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="center" title="Please wait... This can take a while." id="hiu-ci-vo6">
|
||||
<font key="font" metaFont="systemSemibold" size="16"/>
|
||||
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="01C-M7-gNR" firstAttribute="centerY" secondItem="pNa-9O-W4T" secondAttribute="centerY" id="9xB-8a-EDq"/>
|
||||
<constraint firstItem="01C-M7-gNR" firstAttribute="centerX" secondItem="pNa-9O-W4T" secondAttribute="centerX" id="FMq-vb-FoJ"/>
|
||||
</constraints>
|
||||
</customView>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="5cG-jL-fhF" customClass="GrayButton" customModule="Get_It" customModuleProvider="target">
|
||||
<rect key="frame" x="303" y="20" width="161" height="30"/>
|
||||
<constraints>
|
||||
@@ -966,14 +989,36 @@
|
||||
<action selector="loadDefaultsBtnClicked:" target="Igh-3R-yf8" id="PwE-Kk-BJT"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="1Kd-VN-9S6" customClass="GrayButton" customModule="Get_It" customModuleProvider="target">
|
||||
<rect key="frame" x="20" y="20" width="161" height="30"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="30" id="DVt-bj-Kd7"/>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="161" id="KsI-Sv-g9Y"/>
|
||||
<constraint firstAttribute="width" constant="161" id="SEi-e2-ur6"/>
|
||||
</constraints>
|
||||
<buttonCell key="cell" type="squareTextured" title="Install/update software" bezelStyle="texturedSquare" alignment="center" imageScaling="proportionallyDown" inset="2" id="S9o-LZ-UyG">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
<connections>
|
||||
<action selector="installSoftwareBtnClicked:" target="Igh-3R-yf8" id="QVM-7W-lVP"/>
|
||||
</connections>
|
||||
</buttonCell>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="1Kd-VN-9S6" firstAttribute="top" secondItem="Thg-ew-X1n" secondAttribute="bottom" constant="8" id="89E-VG-SFn"/>
|
||||
<constraint firstItem="pNa-9O-W4T" firstAttribute="leading" secondItem="JYB-pR-edy" secondAttribute="leading" constant="8" id="92P-1g-TuC"/>
|
||||
<constraint firstAttribute="bottom" secondItem="5cG-jL-fhF" secondAttribute="bottom" constant="20" symbolic="YES" id="HnB-AH-iHN"/>
|
||||
<constraint firstAttribute="bottom" secondItem="1Kd-VN-9S6" secondAttribute="bottom" constant="20" id="Rny-pK-eE8"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Thg-ew-X1n" secondAttribute="trailing" constant="20" symbolic="YES" id="T0Q-Ko-ZIx"/>
|
||||
<constraint firstItem="Thg-ew-X1n" firstAttribute="trailing" secondItem="5cG-jL-fhF" secondAttribute="trailing" id="bLJ-O4-K9Z"/>
|
||||
<constraint firstItem="Thg-ew-X1n" firstAttribute="top" secondItem="JYB-pR-edy" secondAttribute="top" constant="10" id="cKg-oK-Cby"/>
|
||||
<constraint firstItem="pNa-9O-W4T" firstAttribute="top" secondItem="JYB-pR-edy" secondAttribute="top" constant="8" id="igk-c4-995"/>
|
||||
<constraint firstAttribute="trailing" secondItem="pNa-9O-W4T" secondAttribute="trailing" constant="8" id="j5e-J8-u9B"/>
|
||||
<constraint firstItem="Thg-ew-X1n" firstAttribute="leading" secondItem="JYB-pR-edy" secondAttribute="leading" constant="20" symbolic="YES" id="jp2-AV-HTe"/>
|
||||
<constraint firstItem="5cG-jL-fhF" firstAttribute="top" secondItem="Thg-ew-X1n" secondAttribute="bottom" constant="8" symbolic="YES" id="oKw-pX-kUC"/>
|
||||
<constraint firstAttribute="bottom" secondItem="pNa-9O-W4T" secondAttribute="bottom" constant="8" id="qHu-ee-d9q"/>
|
||||
<constraint firstItem="1Kd-VN-9S6" firstAttribute="leading" secondItem="Thg-ew-X1n" secondAttribute="leading" id="rQP-PF-eRw"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<connections>
|
||||
@@ -988,6 +1033,8 @@
|
||||
<outlet property="embedSubs" destination="qZO-hk-m7W" id="AlN-XP-lKj"/>
|
||||
<outlet property="extractAudio" destination="x2Q-ob-Edw" id="fAL-4g-keF"/>
|
||||
<outlet property="ignoreErrors" destination="4pH-QS-9z0" id="gKb-lS-LVN"/>
|
||||
<outlet property="installProgressText" destination="01C-M7-gNR" id="Nel-zL-hxI"/>
|
||||
<outlet property="installProgressView" destination="pNa-9O-W4T" id="JoS-ky-S5E"/>
|
||||
<outlet property="keepVideo" destination="9Bd-2o-Ck1" id="62E-eI-GmQ"/>
|
||||
<outlet property="languageSubs" destination="dgx-dx-gii" id="pgp-l4-Sbm"/>
|
||||
<outlet property="maxFileSize" destination="3pX-rq-V4S" id="sAf-bf-9OU"/>
|
||||
@@ -1008,13 +1055,13 @@
|
||||
</viewController>
|
||||
<customObject id="qfN-P7-ONt" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="306" y="269.5"/>
|
||||
<point key="canvasLocation" x="485" y="255"/>
|
||||
</scene>
|
||||
<!--Window Controller-->
|
||||
<scene sceneID="Zgg-lz-KoH">
|
||||
<objects>
|
||||
<windowController id="TVW-7d-GRi" customClass="WindowController" customModule="Get_It" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<window key="window" title="Get It Installation Guide" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" releasedWhenClosed="NO" showsToolbarButton="NO" visibleAtLaunch="NO" frameAutosaveName="" animationBehavior="default" titlebarAppearsTransparent="YES" id="Tkd-6d-x5p">
|
||||
<window key="window" title="Get It Installation Guide" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" frameAutosaveName="" animationBehavior="default" titlebarAppearsTransparent="YES" id="Tkd-6d-x5p">
|
||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" texturedBackground="YES"/>
|
||||
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
|
||||
<rect key="contentRect" x="426" y="524" width="236" height="60"/>
|
||||
@@ -1023,193 +1070,55 @@
|
||||
<outlet property="delegate" destination="TVW-7d-GRi" id="mpp-Us-RbT"/>
|
||||
</connections>
|
||||
</window>
|
||||
<connections>
|
||||
<segue destination="7TU-zM-7EV" kind="relationship" relationship="window.shadowedContentViewController" id="rO6-fM-EUc"/>
|
||||
</connections>
|
||||
</windowController>
|
||||
<customObject id="zQP-Ps-hIV" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="-758" y="150"/>
|
||||
</scene>
|
||||
<!--Installation Guide View Controller-->
|
||||
<scene sceneID="0CD-kl-tJb">
|
||||
<objects>
|
||||
<viewController id="7TU-zM-7EV" customClass="InstallationGuideViewController" customModule="Get_It" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<view key="view" appearanceType="aqua" id="tyQ-Oc-9g9">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="300"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<button translatesAutoresizingMaskIntoConstraints="NO" id="AKl-V2-VAQ">
|
||||
<rect key="frame" x="548" y="0.0" width="52" height="300"/>
|
||||
<buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="right arrow" imagePosition="only" alignment="center" imageScaling="proportionallyUpOrDown" inset="2" id="6tT-h0-YTY">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="nextPageBtnClicked:" target="7TU-zM-7EV" id="g5S-pC-I5o"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button translatesAutoresizingMaskIntoConstraints="NO" id="MqU-tW-Gu6">
|
||||
<rect key="frame" x="0.0" y="0.0" width="52" height="300"/>
|
||||
<buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="left arrow" imagePosition="only" alignment="center" imageScaling="proportionallyUpOrDown" inset="2" id="30J-7y-4qn">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="previousPageBtnClicked:" target="7TU-zM-7EV" id="4Ad-SO-4vi"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button verticalHuggingPriority="750" springLoaded="YES" translatesAutoresizingMaskIntoConstraints="NO" id="VMd-5w-2AW" customClass="installButton" customModule="Get_It" customModuleProvider="target">
|
||||
<rect key="frame" x="155" y="20" width="291" height="32"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="291" id="yN5-Yx-GNK"/>
|
||||
</constraints>
|
||||
<buttonCell key="cell" type="bevel" title="Install" bezelStyle="rounded" alignment="center" imageScaling="proportionallyDown" inset="2" id="xgC-Jb-cAL">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system" size="16"/>
|
||||
<connections>
|
||||
<action selector="installBtnClicked:" target="7TU-zM-7EV" id="jpC-3X-raM"/>
|
||||
</connections>
|
||||
</buttonCell>
|
||||
</button>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="NvZ-KG-FeY">
|
||||
<rect key="frame" x="63" y="277" width="474" height="17"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="17" id="17b-xb-EvS"/>
|
||||
</constraints>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Introduction" id="kdG-eZ-psX">
|
||||
<font key="font" metaFont="systemBold" size="16"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="wNP-mt-jZW">
|
||||
<rect key="frame" x="75" y="128" width="452" height="136"/>
|
||||
<textFieldCell key="cell" sendsActionOnEndEditing="YES" id="fsA-qR-zEd">
|
||||
<font key="font" metaFont="system"/>
|
||||
<string key="title">Homebrew is the missing package manager for macOS. Homebrew can install software that apple did not provide.
|
||||
|
||||
We will be using Homebrew to install all the software that is needed for
|
||||
Get It.
|
||||
|
||||
Enter the following command in the Terminal app and follow the instructions. When finished, proceed to the next page.</string>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Xz6-v7-hke" customClass="installationGuideTextField" customModule="Get_It" customModuleProvider="target">
|
||||
<rect key="frame" x="100" y="82" width="400" height="22"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="400" id="VfL-nO-HPW"/>
|
||||
<constraint firstAttribute="height" constant="22" id="qAW-RO-a6c"/>
|
||||
</constraints>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" refusesFirstResponder="YES" sendsActionOnEndEditing="YES" state="on" title="/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"" drawsBackground="YES" id="EmD-JU-kRJ">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" red="0.0" green="0.59548611111111116" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<button fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="0QF-OZ-3Ai">
|
||||
<rect key="frame" x="288" y="137" width="24" height="25"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="refresh" imagePosition="only" alignment="center" imageScaling="proportionallyUpOrDown" inset="2" id="vKv-s0-QGa">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="refreshInstallationBtnClicked:" target="XfG-lQ-9wD" id="YBN-dI-dYk"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button verticalHuggingPriority="750" ambiguous="YES" springLoaded="YES" translatesAutoresizingMaskIntoConstraints="NO" id="yyJ-e7-LEQ" customClass="GrayButton" customModule="Get_It" customModuleProvider="target">
|
||||
<rect key="frame" x="155" y="20" width="291" height="32"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="291" id="zAu-ec-oMN"/>
|
||||
</constraints>
|
||||
<buttonCell key="cell" type="bevel" title="Open the Terminal app" bezelStyle="rounded" alignment="center" imageScaling="proportionallyDown" inset="2" id="U7f-Lz-FHb">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system" size="16"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="openTerminalButtonClicked:" target="7TU-zM-7EV" id="WR3-2p-EQw"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="AKl-V2-VAQ" firstAttribute="leading" secondItem="Xz6-v7-hke" secondAttribute="trailing" constant="48" id="2Pa-c6-oZA"/>
|
||||
<constraint firstItem="MqU-tW-Gu6" firstAttribute="top" secondItem="AKl-V2-VAQ" secondAttribute="top" id="2eC-yb-CGw"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Xz6-v7-hke" secondAttribute="bottom" constant="82" id="4cb-y1-ADK"/>
|
||||
<constraint firstItem="Xz6-v7-hke" firstAttribute="centerX" secondItem="VMd-5w-2AW" secondAttribute="centerX" id="Gvf-vX-ino"/>
|
||||
<constraint firstItem="MqU-tW-Gu6" firstAttribute="top" secondItem="tyQ-Oc-9g9" secondAttribute="top" id="IfK-9G-2a7"/>
|
||||
<constraint firstItem="AKl-V2-VAQ" firstAttribute="leading" secondItem="wNP-mt-jZW" secondAttribute="trailing" constant="23" id="K3R-TY-rzT"/>
|
||||
<constraint firstAttribute="bottom" secondItem="NvZ-KG-FeY" secondAttribute="bottom" constant="277" id="KZ0-Rx-8A2"/>
|
||||
<constraint firstItem="MqU-tW-Gu6" firstAttribute="bottom" secondItem="AKl-V2-VAQ" secondAttribute="bottom" id="Kgx-QL-rPy"/>
|
||||
<constraint firstAttribute="bottom" secondItem="MqU-tW-Gu6" secondAttribute="bottom" id="PCY-RT-YQH"/>
|
||||
<constraint firstItem="Xz6-v7-hke" firstAttribute="centerX" secondItem="NvZ-KG-FeY" secondAttribute="centerX" id="Rcj-Rl-jqo"/>
|
||||
<constraint firstItem="wNP-mt-jZW" firstAttribute="top" secondItem="NvZ-KG-FeY" secondAttribute="bottom" constant="13" id="VG1-TW-NCB"/>
|
||||
<constraint firstItem="VMd-5w-2AW" firstAttribute="top" secondItem="Xz6-v7-hke" secondAttribute="bottom" constant="30" id="czC-Xe-kgr"/>
|
||||
<constraint firstItem="MqU-tW-Gu6" firstAttribute="leading" secondItem="tyQ-Oc-9g9" secondAttribute="leading" id="eu4-4D-gxA"/>
|
||||
<constraint firstItem="Xz6-v7-hke" firstAttribute="centerX" secondItem="tyQ-Oc-9g9" secondAttribute="centerX" id="gyx-XZ-C1B"/>
|
||||
<constraint firstItem="Xz6-v7-hke" firstAttribute="leading" secondItem="MqU-tW-Gu6" secondAttribute="trailing" constant="48" id="ib3-9e-m8m"/>
|
||||
<constraint firstItem="Xz6-v7-hke" firstAttribute="top" secondItem="wNP-mt-jZW" secondAttribute="bottom" constant="24" id="l1S-Cs-pJB"/>
|
||||
<constraint firstItem="NvZ-KG-FeY" firstAttribute="leading" secondItem="MqU-tW-Gu6" secondAttribute="trailing" constant="13" id="q2B-HO-CoQ"/>
|
||||
<constraint firstAttribute="trailing" secondItem="AKl-V2-VAQ" secondAttribute="trailing" id="sNJ-R9-2Ta"/>
|
||||
<constraint firstItem="wNP-mt-jZW" firstAttribute="centerX" secondItem="VMd-5w-2AW" secondAttribute="centerX" id="xyz-tm-ta7"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="bodyText" destination="wNP-mt-jZW" id="6TT-6r-zEn"/>
|
||||
<outlet property="commandTextField" destination="Xz6-v7-hke" id="79I-pb-jKU"/>
|
||||
<outlet property="installButton" destination="VMd-5w-2AW" id="5p8-w9-P7z"/>
|
||||
<outlet property="nextPageBtn" destination="AKl-V2-VAQ" id="dzq-UU-SKk"/>
|
||||
<outlet property="openTerminalButton" destination="yyJ-e7-LEQ" id="A2b-Zo-Sc0"/>
|
||||
<outlet property="previousPageBtn" destination="MqU-tW-Gu6" id="Aln-IW-Co5"/>
|
||||
<outlet property="refreshImage" destination="0QF-OZ-3Ai" id="8vN-Yi-g46"/>
|
||||
<outlet property="titleText" destination="NvZ-KG-FeY" id="iBM-S6-PZh"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<customObject id="Oxp-Gb-gXy" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="-758" y="489"/>
|
||||
</scene>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="hIz-AP-VOD">
|
||||
<objects>
|
||||
<customObject id="rPt-NT-nkU" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
|
||||
<viewController id="XfG-lQ-9wD" customClass="ViewController" customModule="Get_It" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<view key="view" autoresizesSubviews="NO" wantsLayer="YES" appearanceType="aqua" id="m2S-Jp-Qdl">
|
||||
<rect key="frame" x="0.0" y="0.0" width="332" height="390"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="386" height="427"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<scrollView toolTip="Insert your URLs here. Seperate multiple URLS with a breakline (enter)." fixedFrame="YES" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="70X-2A-ilo">
|
||||
<rect key="frame" x="20" y="100" width="291" height="166"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<clipView key="contentView" ambiguous="YES" id="MdI-Io-aKx">
|
||||
<rect key="frame" x="1" y="1" width="274" height="164"/>
|
||||
<scrollView toolTip="Insert your URLs here. Seperate multiple URLS with a breakline (enter)." horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="70X-2A-ilo">
|
||||
<rect key="frame" x="20" y="95" width="346" height="216"/>
|
||||
<clipView key="contentView" drawsBackground="NO" id="MdI-Io-aKx">
|
||||
<rect key="frame" x="1" y="1" width="344" height="214"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<textView ambiguous="YES" importsGraphics="NO" richText="NO" verticallyResizable="YES" findStyle="panel" allowsCharacterPickerTouchBarItem="NO" allowsUndo="YES" linkDetection="YES" textCompletion="NO" smartInsertDelete="YES" id="7x6-CY-4t8">
|
||||
<rect key="frame" x="0.0" y="0.0" width="274" height="164"/>
|
||||
<textView importsGraphics="NO" richText="NO" verticallyResizable="YES" findStyle="panel" allowsCharacterPickerTouchBarItem="NO" allowsUndo="YES" linkDetection="YES" textCompletion="NO" smartInsertDelete="YES" id="7x6-CY-4t8">
|
||||
<rect key="frame" x="0.0" y="0.0" width="344" height="214"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<size key="minSize" width="274" height="164"/>
|
||||
<size key="maxSize" width="548" height="10000000"/>
|
||||
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
<size key="minSize" width="344" height="214"/>
|
||||
<size key="maxSize" width="1552" height="10000000"/>
|
||||
<color key="insertionPointColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
</textView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</clipView>
|
||||
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="YES" id="oFw-vl-dn8">
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="346" id="6Lh-pr-nB0"/>
|
||||
<constraint firstAttribute="height" constant="216" id="lE5-i7-Aol"/>
|
||||
</constraints>
|
||||
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="YES" id="oFw-vl-dn8">
|
||||
<rect key="frame" x="-100" y="-100" width="87" height="18"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</scroller>
|
||||
<scroller key="verticalScroller" verticalHuggingPriority="750" horizontal="NO" id="RPz-US-rpq">
|
||||
<rect key="frame" x="275" y="1" width="15" height="164"/>
|
||||
<scroller key="verticalScroller" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="RPz-US-rpq">
|
||||
<rect key="frame" x="329" y="1" width="16" height="214"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</scroller>
|
||||
</scrollView>
|
||||
<button autoresizesSubviews="NO" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="eoJ-ib-ihB" customClass="DownloadButton" customModule="Get_It" customModuleProvider="target">
|
||||
<rect key="frame" x="20" y="21" width="291" height="29"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<button autoresizesSubviews="NO" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="eoJ-ib-ihB" customClass="DownloadButton" customModule="Get_It" customModuleProvider="target">
|
||||
<rect key="frame" x="20" y="19" width="346" height="30"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="30" id="icp-82-tXX"/>
|
||||
</constraints>
|
||||
<buttonCell key="cell" type="bevel" title="Download" bezelStyle="regularSquare" alignment="center" imageScaling="proportionallyDown" inset="2" id="2Wl-gw-9kz">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
@@ -1218,20 +1127,12 @@ Enter the following command in the Terminal app and follow the instructions. Whe
|
||||
<action selector="downloadButton:" target="XfG-lQ-9wD" id="fCZ-Uv-yft"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="SGD-KR-TCl" customClass="GrayButton" customModule="Get_It" customModuleProvider="target">
|
||||
<rect key="frame" x="20" y="60" width="292" height="30"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<buttonCell key="cell" type="bevel" title="Open destination folder" bezelStyle="rounded" alignment="center" imageScaling="proportionallyDown" inset="2" id="3uQ-eK-NEk">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system" size="14"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="openDestinationFolderBtnClicked:" target="XfG-lQ-9wD" id="HG6-hW-eXV"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="CAr-Wq-0Fh">
|
||||
<rect key="frame" x="100" y="274" width="132" height="114"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<button translatesAutoresizingMaskIntoConstraints="NO" id="CAr-Wq-0Fh">
|
||||
<rect key="frame" x="114" y="319" width="158" height="108"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="108" id="0AD-wY-87o"/>
|
||||
<constraint firstAttribute="width" constant="158" id="NkD-L7-pPr"/>
|
||||
</constraints>
|
||||
<buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="arrow-download-icon" imagePosition="only" alignment="center" imageScaling="proportionallyUpOrDown" inset="2" id="3jb-ZT-9gU">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
@@ -1240,9 +1141,12 @@ Enter the following command in the Terminal app and follow the instructions. Whe
|
||||
<segue destination="22z-Dn-UPJ" kind="popover" popoverAnchorView="CAr-Wq-0Fh" popoverBehavior="t" preferredEdge="maxY" id="PiP-l7-9X3"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="AoL-t3-F2Z">
|
||||
<rect key="frame" x="282" y="360" width="30" height="30"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<button translatesAutoresizingMaskIntoConstraints="NO" id="AoL-t3-F2Z">
|
||||
<rect key="frame" x="328" y="397" width="38" height="30"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="30" id="Q3E-mf-cPX"/>
|
||||
<constraint firstAttribute="width" constant="38" id="Sgo-SE-Sr7"/>
|
||||
</constraints>
|
||||
<buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="Settings" imagePosition="only" alignment="center" imageScaling="proportionallyUpOrDown" inset="2" id="xgK-5l-IF3">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
@@ -1251,32 +1155,79 @@ Enter the following command in the Terminal app and follow the instructions. Whe
|
||||
<segue destination="Igh-3R-yf8" kind="popover" identifier="settingsSegue" popoverAnchorView="AoL-t3-F2Z" popoverBehavior="t" preferredEdge="maxY" id="g0o-eO-lPT"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Gih-DJ-UYv">
|
||||
<rect key="frame" x="281" y="320" width="30" height="30"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="package" imagePosition="only" alignment="center" imageScaling="proportionallyUpOrDown" inset="2" id="SfQ-Iq-zhf">
|
||||
<customView translatesAutoresizingMaskIntoConstraints="NO" id="TCr-WW-W4C" customClass="progressView" customModule="Get_It" customModuleProvider="target">
|
||||
<rect key="frame" x="43" y="112" width="300" height="181"/>
|
||||
<subviews>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" textCompletion="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Wyx-tm-2Ez">
|
||||
<rect key="frame" x="34" y="20" width="233" height="55"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="55" id="y9P-fo-eT8"/>
|
||||
</constraints>
|
||||
<textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="center" title="Label" id="4YQ-va-fYx">
|
||||
<font key="font" metaFont="smallSystem"/>
|
||||
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="38L-rH-SBn">
|
||||
<rect key="frame" x="27" y="81" width="247" height="19"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="243" id="djE-gA-jsZ"/>
|
||||
<constraint firstAttribute="height" constant="19" id="nI3-up-RsT"/>
|
||||
</constraints>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" title="Label" id="yUm-Ij-IRa">
|
||||
<font key="font" metaFont="systemSemibold" size="16"/>
|
||||
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="300" id="9NK-0k-37D"/>
|
||||
<constraint firstItem="38L-rH-SBn" firstAttribute="top" secondItem="TCr-WW-W4C" secondAttribute="top" constant="81" id="CNn-uC-P6B"/>
|
||||
<constraint firstAttribute="height" constant="181" id="FFC-C5-qBj"/>
|
||||
<constraint firstItem="38L-rH-SBn" firstAttribute="leading" secondItem="TCr-WW-W4C" secondAttribute="leading" constant="29" id="coK-Ej-YJI"/>
|
||||
<constraint firstItem="Wyx-tm-2Ez" firstAttribute="top" secondItem="38L-rH-SBn" secondAttribute="bottom" constant="6" id="e0D-v5-px2"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Wyx-tm-2Ez" secondAttribute="trailing" constant="35" id="ehS-7e-mcj"/>
|
||||
<constraint firstItem="Wyx-tm-2Ez" firstAttribute="leading" secondItem="TCr-WW-W4C" secondAttribute="leading" constant="36" id="lKL-sn-bm3"/>
|
||||
<constraint firstAttribute="trailing" secondItem="38L-rH-SBn" secondAttribute="trailing" constant="28" id="yeb-Pe-dII"/>
|
||||
</constraints>
|
||||
</customView>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="SGD-KR-TCl" customClass="GrayButton" customModule="Get_It" customModuleProvider="target">
|
||||
<rect key="frame" x="20" y="57" width="346" height="30"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="30" id="LI2-6R-gxY"/>
|
||||
</constraints>
|
||||
<buttonCell key="cell" type="bevel" title="Open destination folder" bezelStyle="rounded" alignment="center" imageScaling="proportionallyDown" inset="2" id="3uQ-eK-NEk">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
<connections>
|
||||
<action selector="InstallGuideBtnClicked:" target="XfG-lQ-9wD" id="Qne-4i-dZH"/>
|
||||
</connections>
|
||||
<font key="font" metaFont="system" size="14"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<segue destination="TVW-7d-GRi" kind="show" id="lSN-IA-ncA"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="qaK-My-rOG">
|
||||
<rect key="frame" x="284" y="285" width="24" height="25"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="refresh" imagePosition="only" alignment="center" imageScaling="proportionallyUpOrDown" inset="2" id="p8t-Iq-WEE">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="refreshInstallationBtnClicked:" target="XfG-lQ-9wD" id="9YC-ex-V2W"/>
|
||||
<action selector="openDestinationFolderBtnClicked:" target="XfG-lQ-9wD" id="HG6-hW-eXV"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="SGD-KR-TCl" firstAttribute="leading" secondItem="m2S-Jp-Qdl" secondAttribute="leading" constant="20" id="1bo-q4-GtQ"/>
|
||||
<constraint firstItem="CAr-Wq-0Fh" firstAttribute="top" secondItem="m2S-Jp-Qdl" secondAttribute="top" id="4yx-or-XdE"/>
|
||||
<constraint firstAttribute="trailing" secondItem="70X-2A-ilo" secondAttribute="trailing" constant="20" id="AgV-zb-udl"/>
|
||||
<constraint firstAttribute="trailing" secondItem="TCr-WW-W4C" secondAttribute="trailing" constant="43" id="BdY-uB-X9o"/>
|
||||
<constraint firstItem="eoJ-ib-ihB" firstAttribute="leading" secondItem="m2S-Jp-Qdl" secondAttribute="leading" constant="20" id="D8c-Sv-t9B"/>
|
||||
<constraint firstItem="SGD-KR-TCl" firstAttribute="top" secondItem="70X-2A-ilo" secondAttribute="bottom" constant="8" id="J38-Xs-2i0"/>
|
||||
<constraint firstItem="CAr-Wq-0Fh" firstAttribute="leading" secondItem="m2S-Jp-Qdl" secondAttribute="leading" constant="114" id="Jnw-YH-sOj"/>
|
||||
<constraint firstItem="eoJ-ib-ihB" firstAttribute="top" secondItem="SGD-KR-TCl" secondAttribute="bottom" constant="8" id="Rhi-xX-5O3"/>
|
||||
<constraint firstAttribute="trailing" secondItem="eoJ-ib-ihB" secondAttribute="trailing" constant="20" id="ZfM-Be-wBV"/>
|
||||
<constraint firstAttribute="trailing" secondItem="AoL-t3-F2Z" secondAttribute="trailing" constant="20" id="cYU-53-NiS"/>
|
||||
<constraint firstAttribute="trailing" secondItem="SGD-KR-TCl" secondAttribute="trailing" constant="20" id="gc3-Rn-q2M"/>
|
||||
<constraint firstItem="70X-2A-ilo" firstAttribute="leading" secondItem="m2S-Jp-Qdl" secondAttribute="leading" constant="20" id="geo-LV-NpU"/>
|
||||
<constraint firstItem="SGD-KR-TCl" firstAttribute="top" secondItem="70X-2A-ilo" secondAttribute="bottom" constant="8" id="jW0-tT-tAP"/>
|
||||
<constraint firstItem="TCr-WW-W4C" firstAttribute="top" secondItem="CAr-Wq-0Fh" secondAttribute="bottom" constant="26" id="mvd-jG-09J"/>
|
||||
<constraint firstItem="70X-2A-ilo" firstAttribute="top" secondItem="CAr-Wq-0Fh" secondAttribute="bottom" constant="8" id="nqL-Tl-a4q"/>
|
||||
<constraint firstItem="SGD-KR-TCl" firstAttribute="top" secondItem="TCr-WW-W4C" secondAttribute="bottom" constant="25" id="q0Q-2y-Rw7"/>
|
||||
<constraint firstItem="TCr-WW-W4C" firstAttribute="leading" secondItem="m2S-Jp-Qdl" secondAttribute="leading" constant="43" id="t9V-yC-SIq"/>
|
||||
<constraint firstItem="AoL-t3-F2Z" firstAttribute="top" secondItem="m2S-Jp-Qdl" secondAttribute="top" id="yQE-8F-U7L"/>
|
||||
<constraint firstItem="eoJ-ib-ihB" firstAttribute="top" secondItem="SGD-KR-TCl" secondAttribute="bottom" constant="8" id="yuW-SW-0UB"/>
|
||||
</constraints>
|
||||
<shadow key="shadow">
|
||||
<color key="color" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</shadow>
|
||||
@@ -1284,14 +1235,15 @@ Enter the following command in the Terminal app and follow the instructions. Whe
|
||||
<connections>
|
||||
<outlet property="downloadBtn" destination="eoJ-ib-ihB" id="oJe-4A-1EC"/>
|
||||
<outlet property="inputURLS" destination="7x6-CY-4t8" id="fsP-Il-dvb"/>
|
||||
<outlet property="installationGuideBtn" destination="Gih-DJ-UYv" id="JDK-gm-7gO"/>
|
||||
<outlet property="openDestinationFolderBtn" destination="SGD-KR-TCl" id="BcM-UQ-fxc"/>
|
||||
<outlet property="refreshInstallationBtn" destination="qaK-My-rOG" id="qi9-kQ-Cia"/>
|
||||
<outlet property="progressDetails" destination="Wyx-tm-2Ez" id="gKP-v3-iIw"/>
|
||||
<outlet property="progressTitle" destination="38L-rH-SBn" id="y49-WU-cLd"/>
|
||||
<outlet property="progressV" destination="TCr-WW-W4C" id="PS3-EV-bHc"/>
|
||||
<outlet property="settingsBtn" destination="AoL-t3-F2Z" id="J49-jk-pqX"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="-203" y="506"/>
|
||||
<point key="canvasLocation" x="-789" y="650.5"/>
|
||||
</scene>
|
||||
<!--About View Controller-->
|
||||
<scene sceneID="pBA-F1-9Jd">
|
||||
@@ -1419,9 +1371,12 @@ Get It supports.</string>
|
||||
<rect key="frame" x="10" y="33" width="404" height="200"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<button fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="zah-bb-HCF">
|
||||
<rect key="frame" x="54" y="17" width="90" height="92"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<button translatesAutoresizingMaskIntoConstraints="NO" id="zah-bb-HCF">
|
||||
<rect key="frame" x="26" y="17" width="352" height="92"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="92" id="Xmx-gd-J8T"/>
|
||||
<constraint firstAttribute="width" constant="352" id="aWm-bf-R5X"/>
|
||||
</constraints>
|
||||
<buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="github" imagePosition="only" alignment="center" imageScaling="proportionallyUpOrDown" inset="2" id="DKn-rC-Jim">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
@@ -1442,15 +1397,6 @@ For more information, visit GitHub and my website.</string>
|
||||
<color key="backgroundColor" red="0.96078431372549022" green="0.96078431372549022" blue="0.96078431372549022" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="gok-WD-mJe">
|
||||
<rect key="frame" x="35" y="-1" width="129" height="17"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" title="GitHub Repository" drawsBackground="YES" id="chZ-G8-YaV">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" red="0.96078431369999995" green="0.96078431369999995" blue="0.96078431369999995" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="qJg-b5-ciO">
|
||||
<rect key="frame" x="18" y="180" width="40" height="17"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
@@ -1460,26 +1406,6 @@ For more information, visit GitHub and my website.</string>
|
||||
<color key="backgroundColor" red="0.96078431369999995" green="0.96078431369999995" blue="0.96078431369999995" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="cGh-ix-qbo">
|
||||
<rect key="frame" x="224" y="-1" width="132" height="17"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" title="Developer's website" drawsBackground="YES" id="cpd-dh-udP">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" red="0.96078431369999995" green="0.96078431369999995" blue="0.96078431369999995" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<button fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="CEw-C9-2w5">
|
||||
<rect key="frame" x="230" y="17" width="120" height="83"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="K" imagePosition="only" alignment="center" imageScaling="proportionallyUpOrDown" inset="2" id="PW4-Xf-MsT">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="kBtnClicked:" target="22z-Dn-UPJ" id="ovR-FT-ciz"/>
|
||||
</connections>
|
||||
</button>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="2mT-62-1Za">
|
||||
<rect key="frame" x="18" y="129" width="40" height="17"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
@@ -1489,7 +1415,25 @@ For more information, visit GitHub and my website.</string>
|
||||
<color key="backgroundColor" red="0.96078431369999995" green="0.96078431369999995" blue="0.96078431369999995" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="gok-WD-mJe">
|
||||
<rect key="frame" x="138" y="1" width="129" height="17"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="17" id="1bn-vQ-DXH"/>
|
||||
<constraint firstAttribute="width" constant="129" id="Jwc-3V-wn4"/>
|
||||
</constraints>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" title="GitHub Repository" drawsBackground="YES" id="chZ-G8-YaV">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" red="0.96078431369999995" green="0.96078431369999995" blue="0.96078431369999995" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="gok-WD-mJe" firstAttribute="centerX" secondItem="Z7n-de-qmn" secondAttribute="centerX" id="SNE-Za-pzc"/>
|
||||
<constraint firstAttribute="bottom" secondItem="zah-bb-HCF" secondAttribute="bottom" constant="17" id="dbK-s2-RTF"/>
|
||||
<constraint firstItem="zah-bb-HCF" firstAttribute="centerX" secondItem="Z7n-de-qmn" secondAttribute="centerX" id="hSK-JN-o1r"/>
|
||||
<constraint firstAttribute="bottom" secondItem="gok-WD-mJe" secondAttribute="bottom" constant="1" id="vcN-kJ-1IC"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</tabViewItem>
|
||||
</tabViewItems>
|
||||
@@ -1505,20 +1449,15 @@ For more information, visit GitHub and my website.</string>
|
||||
</viewController>
|
||||
<customObject id="e7J-ZB-3Kb" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="306" y="566"/>
|
||||
<point key="canvasLocation" x="440" y="662"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="Folder-icon" width="512" height="512"/>
|
||||
<image name="K" width="210" height="145"/>
|
||||
<image name="Settings" width="122.87999725341797" height="122.87999725341797"/>
|
||||
<image name="Settings" width="512" height="512"/>
|
||||
<image name="arrow-download-icon" width="256" height="256"/>
|
||||
<image name="github" width="351.08572387695312" height="351.08572387695312"/>
|
||||
<image name="left arrow" width="626" height="626"/>
|
||||
<image name="package" width="300" height="300"/>
|
||||
<image name="github" width="512" height="512"/>
|
||||
<image name="paypal" width="206" height="204"/>
|
||||
<image name="refresh" width="512" height="512"/>
|
||||
<image name="right arrow" width="626" height="626"/>
|
||||
<image name="safari" width="1024" height="1024"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
||||
@@ -10,7 +10,8 @@ import Foundation
|
||||
import Cocoa
|
||||
|
||||
// Command
|
||||
let DEFAULT_COMMAND = "export PATH=$PATH:/usr/local/bin && youtube-dl --prefer-ffmpeg --newline —yes-playlist —extract-audio —audio-format mp3 —audio-quality 5 —youtube-skip-dash-manifest —sub-format srt —max-filesize 15M —ignore-errors --no-colorhttps://www.youtube.com/watch?v=LrAx8ZuCFyU -o ~/Downloads/‘%(title)s.%(ext)s’"
|
||||
let EXPORT_PATH = "export PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin"
|
||||
let DEFAULT_COMMAND = EXPORT_PATH + " && youtube-dl --prefer-ffmpeg --newline —yes-playlist —extract-audio —audio-format mp3 —audio-quality 5 —youtube-skip-dash-manifest —sub-format srt —ignore-errors --no-colorhttps://www.youtube.com/watch?v=LrAx8ZuCFyU -o ~/Downloads/‘%(title)s.%(ext)s’"
|
||||
let DEFAULT_OUTPUTPATH = "~/Downloads/"
|
||||
let REGEX_PATTERN = "(?<=^\\[download\\].)[0-9.]+\\%"
|
||||
|
||||
@@ -18,7 +19,7 @@ let REGEX_PATTERN = "(?<=^\\[download\\].)[0-9.]+\\%"
|
||||
var blueColor = NSColor.init(red: 45.0/255, green: 135.0/255, blue: 250.0/255, alpha: 1)
|
||||
|
||||
// Settings
|
||||
let DEFAULT_SETTINGS = [ "maxFileSize" : "15",
|
||||
let DEFAULT_SETTINGS = [ "maxFileSize" : "",
|
||||
"ignoreErrors" : "1", //bool
|
||||
"path" : "~/Downloads/",
|
||||
"outputTemplate" : "Title.extension",
|
||||
@@ -50,10 +51,5 @@ let DEFAULT_SETTINGS = [ "maxFileSize" : "15",
|
||||
// User Defaults - keys
|
||||
let SAVED_COMMAND = "savedCommand"
|
||||
let SETTINGS_KEY = "settings"
|
||||
let YTDL = "isYTDLInstalled"
|
||||
let BREW = "isBrewInstalled"
|
||||
let FFMPEG = "isFfmpegInstalled"
|
||||
let PYTHON = "isPythonInstalled"
|
||||
let XCODE = "isXcodeInstalled"
|
||||
let OUTPUT_PATH = "outputPath"
|
||||
let OUTPUT_TEMPLATE = "outputTemplate"
|
||||
|
||||
@@ -24,8 +24,8 @@ class DownloadButton: NSButton {
|
||||
//text
|
||||
let style = NSMutableParagraphStyle()
|
||||
style.alignment = .center
|
||||
self.attributedTitle = NSAttributedString(string: "Download", attributes: [ NSForegroundColorAttributeName : NSColor.white,
|
||||
NSParagraphStyleAttributeName : style,
|
||||
NSFontAttributeName: NSFont(name: "Arial", size: 18)!])
|
||||
self.attributedTitle = NSAttributedString(string: "Download", attributes: [ NSAttributedString.Key.foregroundColor : NSColor.white,
|
||||
NSAttributedString.Key.paragraphStyle : style,
|
||||
NSAttributedString.Key.font: NSFont(name: "Arial", size: 18)!])
|
||||
}
|
||||
}
|
||||
|
||||
+4
-67
@@ -7,6 +7,7 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import STPrivilegedTask
|
||||
|
||||
class GetIt {
|
||||
var isYTDLInstalled: Bool = false
|
||||
@@ -14,40 +15,7 @@ class GetIt {
|
||||
var isFfmpegInstalled: Bool = false
|
||||
var isPythonInstalled: Bool = false
|
||||
var isXcodeInstalled: Bool = false
|
||||
|
||||
init() {
|
||||
//Get installed software
|
||||
//This is needed for the installation guide
|
||||
if let installed = UserDefaults.standard.value(forKey: YTDL) as? String {
|
||||
self.isYTDLInstalled = installed == "true" ? true : false
|
||||
} else {
|
||||
self.isYTDLInstalled = false
|
||||
}
|
||||
|
||||
if let installed = UserDefaults.standard.value(forKey: BREW) as? String {
|
||||
self.isBrewInstalled = installed == "true" ? true : false
|
||||
} else {
|
||||
self.isBrewInstalled = false
|
||||
}
|
||||
|
||||
if let installed = UserDefaults.standard.value(forKey: FFMPEG) as? String {
|
||||
self.isFfmpegInstalled = installed == "true" ? true : false
|
||||
} else {
|
||||
self.isFfmpegInstalled = false
|
||||
}
|
||||
|
||||
if let installed = UserDefaults.standard.value(forKey: PYTHON) as? String {
|
||||
self.isPythonInstalled = installed == "true" ? true : false
|
||||
} else {
|
||||
self.isPythonInstalled = false
|
||||
}
|
||||
|
||||
if let installed = UserDefaults.standard.value(forKey: XCODE) as? String {
|
||||
self.isXcodeInstalled = installed == "true" ? true : false
|
||||
} else {
|
||||
self.isXcodeInstalled = false
|
||||
}
|
||||
}
|
||||
var isPycryptoInstalled: Bool = false
|
||||
|
||||
|
||||
func getCommand() -> String {
|
||||
@@ -83,7 +51,7 @@ class GetIt {
|
||||
func execute(commandSynchronous: String) -> String {
|
||||
var arguments:[String] = []
|
||||
arguments.append("-c")
|
||||
arguments.append( commandSynchronous )
|
||||
arguments.append( EXPORT_PATH + " && " + commandSynchronous + " 2>&1")
|
||||
|
||||
let task = Process()
|
||||
task.launchPath = "/bin/sh"
|
||||
@@ -96,38 +64,7 @@ class GetIt {
|
||||
task.waitUntilExit()
|
||||
let data = pipe.fileHandleForReading.readDataToEndOfFile()
|
||||
|
||||
return(NSString(data: data, encoding: String.Encoding.utf8.rawValue) as! String)
|
||||
}
|
||||
|
||||
|
||||
func checkIfSoftwareIsInstalled(){
|
||||
var result = self.execute(commandSynchronous: "export PATH=$PATH:/usr/local/bin && if brew ls --versions youtube-dl > /dev/null; then echo INSTALLED; else echo NOT INSTALLED; fi")
|
||||
var temp = result.components(separatedBy: "\n")
|
||||
isYTDLInstalled = temp[0] == "INSTALLED" ? true : false
|
||||
|
||||
result = self.execute(commandSynchronous: "export PATH=$PATH:/usr/local/bin && [ ! -f \"`which brew`\" ] && echo NOT INSTALLED")
|
||||
temp = result.components(separatedBy: "\n")
|
||||
isBrewInstalled = temp[0] == "NOT INSTALLED" ? false : true
|
||||
|
||||
result = self.execute(commandSynchronous: "export PATH=$PATH:/usr/local/bin && if brew ls --versions ffmpeg > /dev/null; then echo INSTALLED; else echo NOT INSTALLED; fi")
|
||||
temp = result.components(separatedBy: "\n")
|
||||
isFfmpegInstalled = temp[0] == "INSTALLED" ? true : false
|
||||
|
||||
result = self.execute(commandSynchronous: "export PATH=$PATH:/usr/local/bin && if brew ls --versions python3 > /dev/null; then echo INSTALLED; else echo NOT INSTALLED; fi")
|
||||
temp = result.components(separatedBy: "\n")
|
||||
isPythonInstalled = temp[0] == "INSTALLED" ? true : false
|
||||
|
||||
result = self.execute(commandSynchronous: "export PATH=$PATH:/usr/local/bin && [ ! -f \"`which xcode-select`\" ] && echo NOT INSTALLED")
|
||||
temp = result.components(separatedBy: "\n")
|
||||
isXcodeInstalled = temp[0] == "NOT INSTALLED" ? false : true
|
||||
|
||||
//save it so we can use it everywhere (installation guide)
|
||||
UserDefaults.standard.setValue("\(isBrewInstalled)", forKey: BREW)
|
||||
UserDefaults.standard.setValue("\(isYTDLInstalled)", forKey: YTDL)
|
||||
UserDefaults.standard.setValue("\(isFfmpegInstalled)", forKey: FFMPEG)
|
||||
UserDefaults.standard.setValue("\(isPythonInstalled)", forKey: PYTHON)
|
||||
UserDefaults.standard.setValue("\(isXcodeInstalled)", forKey: XCODE)
|
||||
UserDefaults.standard.synchronize()
|
||||
return(NSString(data: data, encoding: String.Encoding.utf8.rawValue)! as String)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+3
-3
@@ -17,17 +17,17 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.2</string>
|
||||
<string>0.7</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>2</string>
|
||||
<string>69</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.utilities</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2017 Kevin De Koninck. All rights reserved.</string>
|
||||
<string>Copyright © 2019 Kevin De Koninck. All rights reserved.</string>
|
||||
<key>NSMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
//
|
||||
// InstallationGuideTexts.swift
|
||||
// Get It
|
||||
//
|
||||
// Created by Kevin De Koninck on 05/02/2017.
|
||||
// Copyright © 2017 Kevin De Koninck. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
let PAGES = ["intro","xcode","brew","python","ytdl","finish"]
|
||||
|
||||
let TITLE:[String:String] = ["intro":"Introduction",
|
||||
"xcode":"Xcode Command Line Tools",
|
||||
"brew":"Homebrew",
|
||||
"python":"Python interpreter",
|
||||
"ytdl":"YouTube-DL and other dependencies",
|
||||
"finish":"It's over now. It's done."]
|
||||
|
||||
let BODY:[String:String] = ["intro":"Before you can use Get It, we must install some dependencies. This guide will assist you with installing these dependencies.\n\nThe dependencies that we will install (if not already installed) are:\n - Homebrew\n - Python 3\n - YouTube-DL \n - FFMPEG.\n\n.",
|
||||
"xcode":"Xcode development tools are some handy tools that are always nice to have on your system. Xcode is a large suite of software development tools and libraries from Apple.\nInstallation of many common Unix-based tools requires the GCC compiler. The Xcode Command Line Tools include a GCC compiler.\n\nTo install the Xcode command line tools, just press the 'Install' button below and follow the guide that will pop up.",
|
||||
"brew":"Homebrew is the missing package manager for macOS which we'll be using Homebrew to install all the software that is needed for Get It.\n\nTo install brew, copy the following command (green text), press the button 'Open the Terminal app' and paste the command in the terminal app. Then press enter, wait a bit and press enter again. Enter your password when the installer asks for it.\nWhen the installation has finished, you may close the Terminal app.",
|
||||
"python":"Our core program requires the python 3 interpreter to operate.\n\nTo install Python 3, just press the 'Install' button below.",
|
||||
"ytdl":"YouTube-DL is the core program of Get It. It's an open-source command line tool that handles the downloading of our files.\nWe also want to install FFMPEG for post processing of our files (e.g. converting our audio to mp3).\n\nTo install YouTube-DL and FFMPEG, just press the 'Install' button below.",
|
||||
"finish":"If you executed eveything correctly, then your installation is completed. \n\nYou may close this window (and the Terminal app) now and click on the little blue refresh icon (like the one below) to reload all software.\n\nThen you're good to go!"]
|
||||
|
||||
let INSTALLATION_COMMANDS:[String:String] = ["intro":"",
|
||||
"xcode":"xcode-select --install",
|
||||
"brew":"/usr/bin/ruby -e \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)\"",
|
||||
"python":"brew install python3",
|
||||
"ytdl":"brew install youtube-dl ffmpeg libav",
|
||||
"finish":""]
|
||||
@@ -1,155 +0,0 @@
|
||||
//
|
||||
// InstallationGuideViewController.swift
|
||||
// Get It
|
||||
//
|
||||
// Created by Kevin De Koninck on 05/02/2017.
|
||||
// Copyright © 2017 Kevin De Koninck. All rights reserved.
|
||||
//
|
||||
|
||||
import Cocoa
|
||||
import DJProgressHUD_OSX
|
||||
|
||||
class InstallationGuideViewController: NSViewController {
|
||||
|
||||
var getIt = GetIt()
|
||||
|
||||
/*
|
||||
* Dictoinary title ("intro" : "introduction", "brew" : "Homebrew", ...)
|
||||
bodyText ("intro : "welcome to ..." , "brew" : "we will ...", ...)
|
||||
...
|
||||
|
||||
* variabele page: Int = 0
|
||||
variable pages = ["intro", "brew", ...]
|
||||
|
||||
* bodytext = bodyTextDict(pages[page])
|
||||
|
||||
* if clicked previeous: page = page - 1 (if page > 0)
|
||||
|
||||
etc
|
||||
*/
|
||||
|
||||
@IBOutlet weak var nextPageBtn: NSButton!
|
||||
@IBOutlet weak var previousPageBtn: NSButton!
|
||||
@IBOutlet weak var bodyText: NSTextField!
|
||||
@IBOutlet weak var commandTextField: optionsTextfield!
|
||||
@IBOutlet weak var titleText: NSTextField!
|
||||
@IBOutlet weak var refreshImage: NSButton!
|
||||
@IBOutlet weak var openTerminalButton: NSButton!
|
||||
@IBOutlet weak var installButton: installButton!
|
||||
|
||||
var currentPage: Int = 0 //intro
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
self.view.wantsLayer = true
|
||||
|
||||
previousPageBtn.isHidden = true
|
||||
refreshImage.isHidden = true
|
||||
currentPage = 0
|
||||
displayPage()
|
||||
|
||||
//TODO remove
|
||||
//
|
||||
// print(getIt.isXcodeInstalled)
|
||||
// print(getIt.isBrewInstalled)
|
||||
// print(getIt.isPythonInstalled)
|
||||
// print(getIt.isYTDLInstalled)
|
||||
//
|
||||
// getIt.isXcodeInstalled = false
|
||||
// getIt.isPythonInstalled = false
|
||||
// getIt.isBrewInstalled = false
|
||||
}
|
||||
|
||||
override func awakeFromNib() {
|
||||
if self.view.layer != nil {
|
||||
let color : CGColor = CGColor(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0)
|
||||
self.view.layer?.backgroundColor = color
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func displayPage() {
|
||||
installButton.isEnabled = true
|
||||
switch currentPage {
|
||||
case 0:
|
||||
previousPageBtn.isHidden = true
|
||||
nextPageBtn.isHidden = false
|
||||
commandTextField.isHidden = true
|
||||
refreshImage.isHidden = true
|
||||
openTerminalButton.isHidden = true
|
||||
installButton.isHidden = true
|
||||
case 2:
|
||||
previousPageBtn.isHidden = false
|
||||
nextPageBtn.isHidden = false
|
||||
commandTextField.isHidden = false
|
||||
refreshImage.isHidden = true
|
||||
openTerminalButton.isHidden = false
|
||||
installButton.isHidden = true
|
||||
case 5:
|
||||
previousPageBtn.isHidden = false
|
||||
nextPageBtn.isHidden = true
|
||||
commandTextField.isHidden = true
|
||||
refreshImage.isHidden = false
|
||||
openTerminalButton.isHidden = true
|
||||
installButton.isHidden = true
|
||||
default:
|
||||
previousPageBtn.isHidden = false
|
||||
nextPageBtn.isHidden = false
|
||||
commandTextField.isHidden = true
|
||||
refreshImage.isHidden = true
|
||||
openTerminalButton.isHidden = true
|
||||
installButton.isHidden = false
|
||||
}
|
||||
|
||||
titleText.stringValue = TITLE[PAGES[currentPage]]!
|
||||
bodyText.stringValue = BODY[PAGES[currentPage]]!
|
||||
commandTextField.stringValue = INSTALLATION_COMMANDS[PAGES[currentPage]]!
|
||||
}
|
||||
@IBAction func openTerminalButtonClicked(_ sender: Any) {
|
||||
_ = getIt.execute(commandSynchronous: "open /Applications/Utilities/Terminal.app")
|
||||
}
|
||||
|
||||
@IBAction func installBtnClicked(_ sender: Any) {
|
||||
var cmd = ""
|
||||
|
||||
switch currentPage {
|
||||
case 1: cmd = "export PATH=$PATH:/usr/local/bin && " + INSTALLATION_COMMANDS["xcode"]!
|
||||
case 3: cmd = "export PATH=$PATH:/usr/local/bin && " + INSTALLATION_COMMANDS["python"]!
|
||||
default: cmd = "export PATH=$PATH:/usr/local/bin && " + INSTALLATION_COMMANDS["ytdl"]!
|
||||
}
|
||||
|
||||
DJProgressHUD.showStatus(" Installing\nPlease wait...", from: self.view)
|
||||
_ = getIt.execute(commandSynchronous: cmd)
|
||||
DJProgressHUD.dismiss()
|
||||
installButton.isEnabled = false
|
||||
}
|
||||
|
||||
@IBAction func nextPageBtnClicked(_ sender: Any) {
|
||||
|
||||
if(currentPage == 0 && getIt.isXcodeInstalled && getIt.isBrewInstalled && getIt.isPythonInstalled) { currentPage = 4 }
|
||||
else if(currentPage == 0 && getIt.isXcodeInstalled && getIt.isBrewInstalled) { currentPage = 3 }
|
||||
else if(currentPage == 0 && getIt.isXcodeInstalled) { currentPage = 2 }
|
||||
else if(currentPage == 1 && getIt.isBrewInstalled && getIt.isPythonInstalled) { currentPage = 4 }
|
||||
else if(currentPage == 1 && getIt.isBrewInstalled) { currentPage = 3 }
|
||||
else if(currentPage == 2 && getIt.isPythonInstalled) { currentPage = 4 }
|
||||
else{ currentPage = currentPage + 1 }
|
||||
|
||||
displayPage()
|
||||
}
|
||||
|
||||
@IBAction func previousPageBtnClicked(_ sender: Any) {
|
||||
|
||||
if(currentPage == 4 && getIt.isXcodeInstalled && getIt.isBrewInstalled && getIt.isPythonInstalled) { currentPage = 0 }
|
||||
else if(currentPage == 4 && getIt.isPythonInstalled && getIt.isBrewInstalled) { currentPage = 1 }
|
||||
else if(currentPage == 4 && getIt.isPythonInstalled) { currentPage = 2 }
|
||||
else if(currentPage == 3 && getIt.isXcodeInstalled && getIt.isBrewInstalled) { currentPage = 0 }
|
||||
else if(currentPage == 3 && getIt.isBrewInstalled) { currentPage = 1 }
|
||||
else if(currentPage == 2 && getIt.isXcodeInstalled) { currentPage = 0 }
|
||||
else{ currentPage = currentPage - 1 }
|
||||
|
||||
displayPage()
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
//
|
||||
// Logger.swift
|
||||
// Get It
|
||||
//
|
||||
// Created by Kevin De Koninck on 16/05/2018.
|
||||
// Copyright © 2018 Kevin De Koninck. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
class Logger {
|
||||
let log_file: String = "/tmp/getit_logs"
|
||||
let install_log_file: String = "/tmp/getit_install"
|
||||
|
||||
func reset() {
|
||||
let cmd = "echo '' > \(self.log_file)"
|
||||
_ = self.execute(commandSynchronous: cmd)
|
||||
}
|
||||
|
||||
func log(tag: String, str: String) {
|
||||
print("\(tag) \(str)")
|
||||
let str_ = str.replacingOccurrences(of: "'", with: "")
|
||||
var cmd = "echo '\(tag)\t\(str_)' >> \(self.log_file)"
|
||||
cmd = cmd.replacingOccurrences(of: "\"", with: "")
|
||||
cmd = cmd.replacingOccurrences(of: "`", with: "")
|
||||
_ = self.execute(commandSynchronous: cmd)
|
||||
}
|
||||
|
||||
func resetInstallLog() {
|
||||
let cmd = "echo '' > \(self.install_log_file)"
|
||||
_ = self.execute(commandSynchronous: cmd)
|
||||
}
|
||||
|
||||
func logInstall(tag: String, str: String) {
|
||||
print("\(tag) \(str)")
|
||||
let str_ = str.replacingOccurrences(of: "'", with: "")
|
||||
var cmd = "echo '\(tag)\t\(str_)' >> \(self.install_log_file)"
|
||||
cmd = cmd.replacingOccurrences(of: "\"", with: "")
|
||||
cmd = cmd.replacingOccurrences(of: "`", with: "")
|
||||
_ = self.execute(commandSynchronous: cmd)
|
||||
}
|
||||
|
||||
func execute(commandSynchronous: String) -> String {
|
||||
var arguments:[String] = []
|
||||
arguments.append("-c")
|
||||
arguments.append( EXPORT_PATH + " && " + commandSynchronous + " 2>&1")
|
||||
|
||||
let task = Process()
|
||||
task.launchPath = "/bin/sh"
|
||||
task.arguments = arguments
|
||||
|
||||
let pipe = Pipe()
|
||||
task.standardOutput = pipe
|
||||
task.standardError = pipe
|
||||
task.launch()
|
||||
task.waitUntilExit()
|
||||
let data = pipe.fileHandleForReading.readDataToEndOfFile()
|
||||
|
||||
return(NSString(data: data, encoding: String.Encoding.utf8.rawValue)! as String)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -10,6 +10,8 @@ import Cocoa
|
||||
import ITSwitch
|
||||
|
||||
class OptionsViewController: NSViewController {
|
||||
|
||||
var getIt = GetIt()
|
||||
|
||||
//General tab
|
||||
@IBOutlet weak var maxFileSize: NSTextField!
|
||||
@@ -17,6 +19,8 @@ class OptionsViewController: NSViewController {
|
||||
@IBOutlet weak var outputTemplate: NSPopUpButton!
|
||||
@IBOutlet weak var selectedPath: NSTextField!
|
||||
|
||||
@IBOutlet var installProgressView: progressView!
|
||||
@IBOutlet weak var installProgressText: NSTextField!
|
||||
|
||||
//audio tab
|
||||
@IBOutlet weak var extractAudio: ITSwitch!
|
||||
@@ -71,6 +75,10 @@ class OptionsViewController: NSViewController {
|
||||
downloadPlaylist.tintColor = blueColor
|
||||
reversePlaylist.tintColor = blueColor
|
||||
netrc.tintColor = blueColor
|
||||
|
||||
// progress view
|
||||
installProgressView.isHidden = true
|
||||
installProgressText.isHidden = true
|
||||
|
||||
//placeholders
|
||||
maxFileSize.placeholderString = "In MB"
|
||||
@@ -112,6 +120,15 @@ class OptionsViewController: NSViewController {
|
||||
UserDefaults.standard.synchronize()
|
||||
}
|
||||
|
||||
|
||||
@IBAction func installSoftwareBtnClicked(_ sender: Any) {
|
||||
installProgressView.isHidden = false
|
||||
installProgressText.isHidden = false
|
||||
_ = getIt.execute(commandSynchronous: "if ! xcode-select -v &> /dev/null; then xcode-select --install; fi; if brew -v &> /dev/null; then brew update; else echo /usr/bin/ruby -e '$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)'; fi; if brew ls --versions python &> /dev/null; then brew upgrade python; else brew install python; brew link python; fi; if brew ls --versions python3 &> /dev/null; then brew upgrade python3; else brew install python3; fi; if pip2.7 list | grep -i pycrypt &> /dev/null; then pip2.7 install pycrypt --upgrade; else pip2.7 install pycrypt; fi; if youtube-dl --version &> /dev/null; then brew upgrade youtube-dl; else brew install youtube-dl; fi; if brew list libav &> /dev/null; then brew upgrade libav; else brew install libav; fi; if brew list ffmpeg &> /dev/null; then brew upgrade ffmpeg; else brew install ffmpeg; fi")
|
||||
installProgressView.isHidden = true
|
||||
installProgressText.isHidden = true
|
||||
}
|
||||
|
||||
@IBAction func loadDefaultsBtnClicked(_ sender: Any) {
|
||||
UserDefaults.standard.set(DEFAULT_SETTINGS, forKey: SETTINGS_KEY)
|
||||
UserDefaults.standard.setValue(DEFAULT_SETTINGS["path"]!, forKey: OUTPUT_PATH)
|
||||
@@ -122,7 +139,7 @@ class OptionsViewController: NSViewController {
|
||||
func saveSettings() {
|
||||
var settingsDict = [String: String]()
|
||||
|
||||
settingsDict["maxFileSize"] = maxFileSize.stringValue
|
||||
settingsDict["maxFileSize"] = maxFileSize.stringValue.replacingOccurrences(of: ".", with: "").replacingOccurrences(of: ",", with: "")
|
||||
settingsDict["ignoreErrors"] = String(ignoreErrors.checked) == "true" ? "1" : "0"
|
||||
settingsDict["path"] = UserDefaults.standard.value(forKey: OUTPUT_PATH) as? String
|
||||
settingsDict["outputTemplate"] = outputTemplate.itemTitle(at: outputTemplate.indexOfSelectedItem)
|
||||
@@ -259,13 +276,13 @@ class OptionsViewController: NSViewController {
|
||||
|
||||
func createCommand() -> String {
|
||||
//Start of creating the command
|
||||
var command = "export PATH=$PATH:/usr/local/bin && youtube-dl --newline --prefer-ffmpeg";
|
||||
var command = EXPORT_PATH + " && youtube-dl --newline --prefer-ffmpeg";
|
||||
|
||||
//Preprocessing
|
||||
let audioFormatString = audioFormat.selectedItem?.title.characters.split{$0 == "\""}.map(String.init)
|
||||
let audioQualityString = audioQuality.selectedItem!.title.characters.split{$0 == "\""}.map(String.init)
|
||||
let audioFormatString = audioFormat.selectedItem?.title.split{$0 == "\""}.map(String.init)
|
||||
let audioQualityString = audioQuality.selectedItem!.title.split{$0 == "\""}.map(String.init)
|
||||
let videoFormatString = videoFormat.selectedItem!.tag
|
||||
let audioQ = audioQualityString.first!.characters.first
|
||||
let audioQ = audioQualityString.first!.first
|
||||
|
||||
//Creating the command
|
||||
if downloadPlaylist.checked { command += " --yes-playlist" } else { command += " --no-playlist" }
|
||||
@@ -288,7 +305,7 @@ class OptionsViewController: NSViewController {
|
||||
if downloadAutoSubs.checked { command += " --write-auto-sub" }
|
||||
if downloadAllSubs.checked { command += " --all-subs" }
|
||||
if embedSubs.checked { command += " --embed-subs" }
|
||||
if !maxFileSize.stringValue.isEmpty { command += " --max-filesize \(maxFileSize.stringValue)M" }
|
||||
if !maxFileSize.stringValue.isEmpty { command += " --max-filesize \(maxFileSize.stringValue.replacingOccurrences(of: ".", with: "").replacingOccurrences(of: ",", with: ""))M" }
|
||||
if ignoreErrors.checked == true { command += " --ignore-errors" } else { command += " --abort-on-error" }
|
||||
|
||||
command += " --audio-format \(audioFormatString![0])"
|
||||
@@ -327,19 +344,14 @@ class OptionsViewController: NSViewController {
|
||||
dialog.canCreateDirectories = true
|
||||
dialog.allowsMultipleSelection = false
|
||||
|
||||
if (dialog.runModal() == NSModalResponseOK) {
|
||||
if (dialog.runModal() == NSApplication.ModalResponse.OK) {
|
||||
let result = dialog.url
|
||||
if (result != nil) {
|
||||
let path = result!.path
|
||||
UserDefaults.standard.setValue(path, forKey: OUTPUT_PATH)
|
||||
UserDefaults.standard.synchronize()
|
||||
|
||||
|
||||
|
||||
selectedPath.stringValue = NSURL(fileURLWithPath: path).lastPathComponent!
|
||||
|
||||
print(path)
|
||||
print(selectedPath.stringValue)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+55
-68
@@ -10,15 +10,10 @@
|
||||
//TODO: check if youtube-dl is installed on boot up: if brew ls --versions youtube-dl > /dev/null; then echo INSTALLED; else echo NOT INSTALLED; fi
|
||||
// if not, then disable all buttons except the package icon that will start a guide on how to install it.
|
||||
|
||||
//TODO: check if homebrew is installed: [ ! -f "`which breww`" ] && echo NOT INSTALLED (check on output: NOT INSTALLED)
|
||||
|
||||
//TODO: make a guide
|
||||
|
||||
//TODO: regex check for urls in input field
|
||||
|
||||
|
||||
import Cocoa
|
||||
import DJProgressHUD_OSX
|
||||
|
||||
class ViewController: NSViewController {
|
||||
|
||||
@@ -26,19 +21,19 @@ class ViewController: NSViewController {
|
||||
@IBOutlet weak var settingsBtn: NSButton!
|
||||
@IBOutlet weak var openDestinationFolderBtn: GrayButton!
|
||||
@IBOutlet weak var downloadBtn: DownloadButton!
|
||||
@IBOutlet weak var installationGuideBtn: NSButton!
|
||||
@IBOutlet weak var refreshInstallationBtn: NSButton!
|
||||
@IBOutlet weak var progressV: progressView!
|
||||
@IBOutlet weak var progressTitle: NSTextField!
|
||||
@IBOutlet weak var progressDetails: NSTextField!
|
||||
|
||||
|
||||
//global variables
|
||||
var getIt = GetIt()
|
||||
var logger = Logger()
|
||||
var downloadingFileNr: Int = 1
|
||||
var previousProgress: CGFloat = 0.0
|
||||
var currentProgress: CGFloat = 0.0
|
||||
var downloadsDidStart: Bool = false
|
||||
|
||||
|
||||
|
||||
override func awakeFromNib() {
|
||||
if self.view.layer != nil {
|
||||
let color : CGColor = CGColor(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0)
|
||||
@@ -52,75 +47,75 @@ class ViewController: NSViewController {
|
||||
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(openSettingsView), name: NSNotification.Name(rawValue: "openSettingsView"), object: nil)
|
||||
}
|
||||
func openSettingsView(notif: AnyObject) {
|
||||
@objc func openSettingsView(notif: AnyObject) {
|
||||
self.performSegue(withIdentifier: "settingsSegue", sender: self)
|
||||
}
|
||||
|
||||
override func viewWillAppear() {
|
||||
super.viewWillAppear()
|
||||
|
||||
getIt.checkIfSoftwareIsInstalled()
|
||||
let activate = (!getIt.isYTDLInstalled) || (!getIt.isFfmpegInstalled)
|
||||
installationGuideViewSetUp(activate: activate)
|
||||
// installationGuideViewSetUp(activate: true) //TODO - remove (is for testing purposes)
|
||||
dismissProgressView()
|
||||
}
|
||||
|
||||
func installationGuideViewSetUp(activate: Bool) {
|
||||
inputURLS.isEditable = !activate
|
||||
settingsBtn.isEnabled = !activate
|
||||
openDestinationFolderBtn.isEnabled = !activate
|
||||
downloadBtn.isEnabled = !activate
|
||||
installationGuideBtn.isEnabled = activate
|
||||
installationGuideBtn.isHidden = !activate
|
||||
refreshInstallationBtn.isEnabled = activate
|
||||
refreshInstallationBtn.isHidden = !activate
|
||||
func activateComponents(activate: Bool) {
|
||||
inputURLS.isEditable = activate
|
||||
settingsBtn.isEnabled = activate
|
||||
openDestinationFolderBtn.isEnabled = activate
|
||||
downloadBtn.isEnabled = activate
|
||||
}
|
||||
|
||||
@IBAction func refreshInstallationBtnClicked(_ sender: Any) {
|
||||
getIt.checkIfSoftwareIsInstalled()
|
||||
let activate = (!getIt.isYTDLInstalled) || (!getIt.isFfmpegInstalled)
|
||||
installationGuideViewSetUp(activate: activate)
|
||||
// installationGuideViewSetUp(activate: true) //TODO - remove (is for testing purposes)
|
||||
func dismissProgressView() {
|
||||
self.activateComponents(activate: true)
|
||||
progressV.isHidden = true
|
||||
progressTitle.isHidden = true
|
||||
progressDetails.isHidden = true
|
||||
}
|
||||
|
||||
@IBAction func InstallGuideBtnClicked(_ sender: Any) {
|
||||
func showInProgressView(title: String, details: String) {
|
||||
self.activateComponents(activate: false)
|
||||
progressV.isHidden = false
|
||||
progressTitle.isHidden = false
|
||||
progressDetails.isHidden = false
|
||||
progressTitle.stringValue = title
|
||||
progressDetails.stringValue = details
|
||||
logger.log(tag: "[PROGRESS VIEW]", str: "\(title): \(details)")
|
||||
}
|
||||
|
||||
@IBAction func openDestinationFolderBtnClicked(_ sender: Any) {
|
||||
_ = getIt.open(folder: UserDefaults.standard.value(forKey: OUTPUT_PATH) as! String)
|
||||
}
|
||||
|
||||
|
||||
@IBAction func downloadButton(_ sender: AnyObject) {
|
||||
logger.reset()
|
||||
|
||||
//get input URLs
|
||||
let tempString = inputURLS.string!
|
||||
let urls = tempString.characters.split{$0 == "\n"}.map(String.init)
|
||||
let tempString = inputURLS.string
|
||||
let urls = tempString.split{$0 == "\n"}.map(String.init)
|
||||
if(urls.count > 0){
|
||||
var urlStr = " "
|
||||
for url in urls { urlStr = urlStr + url + " " }
|
||||
|
||||
//start download
|
||||
downloadsDidStart = false
|
||||
DJProgressHUD.showStatus("Gathering information\n Please wait", from: self.view)
|
||||
self.showInProgressView(title: "Gathering information", details: "Please wait")
|
||||
execute(commmandAsynchronous: getIt.getCommand() + " -o " + getIt.getOutputPath() + getIt.getOutputTemplate() + urlStr)
|
||||
} else {
|
||||
DJProgressHUD.showStatus("Can't download nothing", from: self.view)
|
||||
self.showInProgressView(title: "Whoops", details: "Can't download nothing")
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(2), execute: {
|
||||
DJProgressHUD.dismiss()
|
||||
self.dismissProgressView()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func execute(commmandAsynchronous: String){
|
||||
|
||||
var receivedStr = "" // variable to keep the received string (usefull to display it at the end)
|
||||
downloadingFileNr = 1 // reset file nr
|
||||
|
||||
//Prepare command
|
||||
var arguments:[String] = []
|
||||
arguments.append("-c")
|
||||
arguments.append( commmandAsynchronous )
|
||||
print( commmandAsynchronous )
|
||||
arguments.append(commmandAsynchronous + " 2>&1")
|
||||
logger.log(tag: "[COMMAND]", str: "\(commmandAsynchronous) 2>&1")
|
||||
|
||||
//Start execution of command
|
||||
let task = Process()
|
||||
@@ -138,35 +133,30 @@ class ViewController: NSViewController {
|
||||
if data.count > 0 {
|
||||
if let s = NSString(data: data, encoding: String.Encoding.utf8.rawValue) {
|
||||
//RECEIVED OUTPUT
|
||||
|
||||
print("RECEIVED \(s)")
|
||||
print("--------------")
|
||||
self.logger.log(tag: "[RECEIVED]", str: "\(s)")
|
||||
|
||||
var status: String!
|
||||
let matchesError = [String]()
|
||||
|
||||
//Received value preprocessing
|
||||
let receivedStr = s.components(separatedBy: "\n")[0]
|
||||
receivedStr = s.components(separatedBy: "\n")[0]
|
||||
var str = receivedStr.replacingOccurrences(of: " ", with: "")
|
||||
|
||||
//Get percentage using a regular expression
|
||||
do{
|
||||
//regex for downloadbar
|
||||
let regex = try NSRegularExpression(pattern: REGEX_PATTERN, options: [])
|
||||
let matches = regex.matches(in: str, options: [], range: NSRange(location: 0, length: str.characters.count))
|
||||
let matches = regex.matches(in: str, options: [], range: NSRange(location: 0, length: str.count))
|
||||
//regex for error
|
||||
let regexError = try NSRegularExpression(pattern: "ERROR", options: [])
|
||||
let matchesError = regexError.matches(in: str, options: [], range: NSRange(location: 0, length: str.characters.count))
|
||||
_ = regexError.matches(in: str, options: [], range: NSRange(location: 0, length: str.count))
|
||||
|
||||
if matchesError.count > 0 {
|
||||
print(receivedStr)
|
||||
|
||||
}else if matches.count > 0 {
|
||||
let rangeOfMatch = matches[0].rangeAt(0)
|
||||
if matches.count > 0 {
|
||||
let rangeOfMatch = matches[0].range(at: 0)
|
||||
var index = str.index(str.startIndex, offsetBy: rangeOfMatch.location + rangeOfMatch.length - 1)
|
||||
str = str.substring(to: index)
|
||||
str = String(str[..<index])
|
||||
index = str.index(str.startIndex, offsetBy: rangeOfMatch.location - 1)
|
||||
str = str.substring(from: index)
|
||||
str = String(str[index...])
|
||||
|
||||
self.currentProgress = CGFloat(Double(round(100 * (str as NSString).doubleValue) / 100 ))
|
||||
if( self.currentProgress < self.previousProgress){
|
||||
@@ -184,39 +174,37 @@ class ViewController: NSViewController {
|
||||
if matchesError.count == 0 {
|
||||
if(str == "100"){
|
||||
self.downloadingFileNr = self.downloadingFileNr + 1
|
||||
status = "Processing file \(self.downloadingFileNr)\n \(self.currentProgress)%"
|
||||
status = "Processing file \(self.downloadingFileNr)"
|
||||
self.previousProgress = 0.0
|
||||
} else if (str == "-1" && self.downloadingFileNr > 1){
|
||||
status = "Processing file \(self.downloadingFileNr - 1)\n "
|
||||
status = "Processing file \(self.downloadingFileNr - 1)"
|
||||
} else if (str == "-1") {
|
||||
status = "Downloading file \(self.downloadingFileNr)\n \(self.currentProgress)%"
|
||||
status = "Downloading file \(self.downloadingFileNr)"
|
||||
} else if (self.currentProgress <= 100){
|
||||
status = "Downloading file \(self.downloadingFileNr)\n \(self.currentProgress)%"
|
||||
status = "Downloading file \(self.downloadingFileNr)"
|
||||
self.previousProgress = self.currentProgress
|
||||
self.downloadsDidStart = true
|
||||
} else {
|
||||
status = "Processing file \(self.downloadingFileNr)\n \(self.currentProgress)%"
|
||||
status = "Processing file \(self.downloadingFileNr)"
|
||||
self.previousProgress = self.currentProgress
|
||||
}
|
||||
if(self.downloadsDidStart) {
|
||||
DJProgressHUD.showProgress(self.currentProgress/100.0, withStatus: status, from: self.view)
|
||||
self.showInProgressView(title: status, details: "\(self.currentProgress)%")
|
||||
}
|
||||
}
|
||||
//error received
|
||||
else
|
||||
{
|
||||
DJProgressHUD.showStatus("ERROR\n\(receivedStr)", from: self.view)
|
||||
else {
|
||||
self.showInProgressView(title: "Error!", details: "\(receivedStr)")
|
||||
}
|
||||
}
|
||||
outHandle.waitForDataInBackgroundAndNotify()
|
||||
} else {
|
||||
//EOF ON STDOUT FROM PROCESS
|
||||
NotificationCenter.default.removeObserver(obs1)
|
||||
NotificationCenter.default.removeObserver(obs1 as Any)
|
||||
if(self.downloadingFileNr < 2){
|
||||
DJProgressHUD.dismiss()
|
||||
DJProgressHUD.showStatus(" Download failed\n\n Video not available or\nvideo format not available", from: self.view)
|
||||
self.showInProgressView(title: "Failed...", details: "Something went wrong. Please try other settings or report this issue on github if the problem doesn't magically disappears.")
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(4), execute: {
|
||||
DJProgressHUD.dismiss()
|
||||
self.dismissProgressView()
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -225,9 +213,8 @@ class ViewController: NSViewController {
|
||||
var obs2 : NSObjectProtocol!
|
||||
obs2 = NotificationCenter.default.addObserver(forName: Process.didTerminateNotification, object: task, queue: nil) { notification -> Void in
|
||||
//PROCESS TERMINATED
|
||||
NotificationCenter.default.removeObserver(obs2)
|
||||
|
||||
DJProgressHUD.dismiss()
|
||||
NotificationCenter.default.removeObserver(obs2 as Any)
|
||||
self.dismissProgressView()
|
||||
}
|
||||
|
||||
task.launch()
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
//
|
||||
// installationGuideTextField.swift
|
||||
// Get It
|
||||
//
|
||||
// Created by Kevin De Koninck on 05/02/2017.
|
||||
// Copyright © 2017 Kevin De Koninck. All rights reserved.
|
||||
//
|
||||
|
||||
import Cocoa
|
||||
|
||||
class installationGuideTextField: NSTextField {
|
||||
|
||||
override func draw(_ dirtyRect: NSRect) {
|
||||
super.draw(dirtyRect)
|
||||
|
||||
var bgColor = NSColor(red: 251/255.0, green: 251/255.0, blue: 251/255.0, alpha: 1.0)
|
||||
bgColor = NSColor(red: 255/255.0, green: 255/255.0, blue: 255/255.0, alpha: 1.0)
|
||||
|
||||
self.focusRingType = .none
|
||||
self.isBordered = false
|
||||
self.drawsBackground = false
|
||||
self.backgroundColor = bgColor
|
||||
self.layer?.backgroundColor = bgColor.cgColor
|
||||
|
||||
//underline
|
||||
let border = CALayer()
|
||||
let width = CGFloat(1.0)
|
||||
border.borderColor = blueColor.cgColor
|
||||
border.frame = CGRect(x: 0, y: self.frame.size.height - width, width: self.frame.size.width, height: self.frame.size.height)
|
||||
border.borderWidth = width
|
||||
self.layer?.addSublayer(border)
|
||||
self.layer?.masksToBounds = true
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -12,20 +12,20 @@ class installButton: NSButton {
|
||||
|
||||
override func draw(_ dirtyRect: NSRect) {
|
||||
super.draw(dirtyRect)
|
||||
|
||||
self.layer?.backgroundColor = blueColor.cgColor
|
||||
self.layer?.cornerRadius = 15.0
|
||||
self.layer?.masksToBounds = true
|
||||
}
|
||||
|
||||
override func awakeFromNib() {
|
||||
super.awakeFromNib()
|
||||
|
||||
self.layer?.backgroundColor = blueColor.cgColor
|
||||
self.layer?.cornerRadius = 15.0
|
||||
self.layer?.masksToBounds = true
|
||||
|
||||
//text
|
||||
let style = NSMutableParagraphStyle()
|
||||
style.alignment = .center
|
||||
self.attributedTitle = NSAttributedString(string: "Install", attributes: [ NSForegroundColorAttributeName : NSColor.white,
|
||||
NSParagraphStyleAttributeName : style,
|
||||
NSFontAttributeName: NSFont(name: "Arial", size: 18)!])
|
||||
self.attributedTitle = NSAttributedString(string: "Install", attributes: [ NSAttributedString.Key.foregroundColor : NSColor.white,
|
||||
NSAttributedString.Key.paragraphStyle : style,
|
||||
NSAttributedString.Key.font: NSFont(name: "Arial", size: 18)!])
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// progressView.swift
|
||||
// Get It
|
||||
//
|
||||
// Created by Kevin De Koninck on 17/04/2018.
|
||||
// Copyright © 2018 Kevin De Koninck. All rights reserved.
|
||||
//
|
||||
|
||||
import Cocoa
|
||||
|
||||
class progressView: NSView {
|
||||
|
||||
override func draw(_ dirtyRect: NSRect) {
|
||||
super.draw(dirtyRect)
|
||||
|
||||
self.alphaValue = 0.7
|
||||
self.layer?.backgroundColor = NSColor.black.cgColor
|
||||
self.layer?.cornerRadius = 15.0
|
||||
self.layer?.masksToBounds = true
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
target ‘Get It’ do
|
||||
use_frameworks!
|
||||
pod 'ITSwitch'
|
||||
pod 'DJProgressHUD_OSX'
|
||||
pod 'STPrivilegedTask'
|
||||
pod 'LetsMove'
|
||||
end
|
||||
end
|
||||
|
||||
+7
-7
@@ -1,24 +1,24 @@
|
||||
PODS:
|
||||
- DJProgressHUD_OSX (0.0.1)
|
||||
- ITSwitch (1.0)
|
||||
- LetsMove (1.24)
|
||||
- STPrivilegedTask (1.0.1)
|
||||
|
||||
DEPENDENCIES:
|
||||
- DJProgressHUD_OSX
|
||||
- ITSwitch
|
||||
- LetsMove
|
||||
- STPrivilegedTask
|
||||
|
||||
SPEC REPOS:
|
||||
https://github.com/CocoaPods/Specs.git:
|
||||
- DJProgressHUD_OSX
|
||||
https://github.com/cocoapods/specs.git:
|
||||
- ITSwitch
|
||||
- LetsMove
|
||||
- STPrivilegedTask
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
DJProgressHUD_OSX: a8de6d2da8750dbf671fcddc649a44a9cd2807c4
|
||||
ITSwitch: 7ff745d6f2a6910e9194b23e4eab9a843258a478
|
||||
LetsMove: fefe56bc7bc7fb7d37049e28a14f297961229fc5
|
||||
STPrivilegedTask: 103f97827454e786074640cf89d303be344498c7
|
||||
|
||||
PODFILE CHECKSUM: b1b05df537f199f1410c30e64c24cde88db79221
|
||||
PODFILE CHECKSUM: 4dca32d4d6791341e27820d98c0efe1419299b51
|
||||
|
||||
COCOAPODS: 1.5.0
|
||||
COCOAPODS: 1.7.0.rc.1
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
//
|
||||
// DJProgressIndicator.h
|
||||
// Playground
|
||||
//
|
||||
// Created by Daniel Jackson on 5/11/14.
|
||||
// Copyright (c) 2014 Daniel Jackson. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface DJActivityIndicator : NSView
|
||||
|
||||
@property BOOL isAnimating;
|
||||
|
||||
- (void)setColor:(NSColor *)value;
|
||||
- (void)setBackgroundColor:(NSColor *)value;
|
||||
|
||||
- (void)stopAnimation:(id)sender;
|
||||
- (void)startAnimation:(id)sender;
|
||||
|
||||
@end
|
||||
@@ -1,208 +0,0 @@
|
||||
//
|
||||
// DJProgressIndicator.m
|
||||
// Playground
|
||||
//
|
||||
// Created by Daniel Jackson on 5/11/14.
|
||||
// Copyright (c) 2014 Daniel Jackson. All rights reserved.
|
||||
//
|
||||
|
||||
#import "DJActivityIndicator.h"
|
||||
|
||||
#define kAlphaWhenStopped 0.15
|
||||
#define kFadeMultiplier 0.85
|
||||
|
||||
@interface DJActivityIndicator ()
|
||||
{
|
||||
int position;
|
||||
NSMutableArray* finColors;
|
||||
|
||||
BOOL isFadingOut;
|
||||
NSTimer* animationTimer;
|
||||
|
||||
NSColor* foreColor;
|
||||
NSColor* backColor;
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation DJActivityIndicator
|
||||
|
||||
- (id)initWithFrame:(NSRect)frame
|
||||
{
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
position = 0;
|
||||
int numFins = 12;
|
||||
|
||||
finColors = [[NSMutableArray alloc] initWithCapacity:numFins];
|
||||
|
||||
_isAnimating = NO;
|
||||
isFadingOut = NO;
|
||||
|
||||
foreColor = [NSColor blackColor];
|
||||
backColor = [NSColor clearColor];
|
||||
|
||||
for(int i=0; i<numFins; i++)
|
||||
{
|
||||
[finColors addObject:foreColor];
|
||||
}
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)drawRect:(NSRect)dirtyRect
|
||||
{
|
||||
[super drawRect:dirtyRect];
|
||||
|
||||
NSSize size = [self bounds].size;
|
||||
CGFloat theMaxSize;
|
||||
if(size.width >= size.height)
|
||||
theMaxSize = size.height;
|
||||
else
|
||||
theMaxSize = size.width;
|
||||
|
||||
[backColor set];
|
||||
[NSBezierPath fillRect:[self bounds]];
|
||||
|
||||
CGContextRef currentContext = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];
|
||||
[NSGraphicsContext saveGraphicsState];
|
||||
|
||||
CGContextTranslateCTM(currentContext,[self bounds].size.width/2,[self bounds].size.height/2);
|
||||
|
||||
NSBezierPath *path = [[NSBezierPath alloc] init];
|
||||
CGFloat lineWidth = 0.0859375 * theMaxSize;
|
||||
CGFloat lineStart = 0.234375 * theMaxSize;
|
||||
CGFloat lineEnd = 0.421875 * theMaxSize;
|
||||
[path setLineWidth:lineWidth];
|
||||
[path setLineCapStyle:NSRoundLineCapStyle];
|
||||
[path moveToPoint:NSMakePoint(0,lineStart)];
|
||||
[path lineToPoint:NSMakePoint(0,lineEnd)];
|
||||
|
||||
for (int i=0; i<finColors.count; i++) {
|
||||
if(_isAnimating) {
|
||||
[(NSColor*)finColors[i] set];
|
||||
}
|
||||
else {
|
||||
[[foreColor colorWithAlphaComponent:kAlphaWhenStopped] set];
|
||||
}
|
||||
|
||||
[path stroke];
|
||||
|
||||
CGContextRotateCTM(currentContext, 6.282185/finColors.count);
|
||||
}
|
||||
path = nil;
|
||||
|
||||
[NSGraphicsContext restoreGraphicsState];
|
||||
}
|
||||
|
||||
- (void)startAnimation:(id)sender
|
||||
{
|
||||
if (_isAnimating && !isFadingOut) return;
|
||||
|
||||
[self actuallyStartAnimation];
|
||||
}
|
||||
|
||||
- (void)stopAnimation:(id)sender
|
||||
{
|
||||
isFadingOut = YES;
|
||||
}
|
||||
|
||||
- (void)setColor:(NSColor *)value
|
||||
{
|
||||
if (foreColor != value) {
|
||||
foreColor = nil;
|
||||
foreColor = value;
|
||||
|
||||
for (int i=0; i<finColors.count; i++) {
|
||||
CGFloat alpha = [finColors[i] alphaComponent];
|
||||
[finColors setObject:[foreColor colorWithAlphaComponent:alpha] atIndexedSubscript:i];
|
||||
}
|
||||
|
||||
[self setNeedsDisplay:YES];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setBackgroundColor:(NSColor *)value
|
||||
{
|
||||
if (backColor != value) {
|
||||
backColor = nil;
|
||||
backColor = value;
|
||||
[self setNeedsDisplay:YES];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)updateFrame:(NSTimer *)timer
|
||||
{
|
||||
if(position > 0) {
|
||||
position--;
|
||||
}
|
||||
else {
|
||||
position = (int)finColors.count - 1;
|
||||
}
|
||||
|
||||
CGFloat minAlpha = kAlphaWhenStopped;
|
||||
for (int i=0; i<finColors.count; i++) {
|
||||
CGFloat newAlpha = [finColors[i] alphaComponent] * kFadeMultiplier;
|
||||
if (newAlpha < minAlpha)
|
||||
newAlpha = minAlpha;
|
||||
|
||||
finColors[i] = [foreColor colorWithAlphaComponent:newAlpha];
|
||||
}
|
||||
|
||||
if (isFadingOut) {
|
||||
BOOL done = YES;
|
||||
for (int i=0; i<finColors.count; i++) {
|
||||
if (fabs([finColors[i] alphaComponent] - minAlpha) > 0.01) {
|
||||
done = NO;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (done) {
|
||||
[self actuallyStopAnimation];
|
||||
}
|
||||
}
|
||||
else {
|
||||
finColors[position] = foreColor;
|
||||
}
|
||||
|
||||
[self setNeedsDisplay:YES];
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (void)actuallyStartAnimation
|
||||
{
|
||||
[self actuallyStopAnimation];
|
||||
|
||||
_isAnimating = YES;
|
||||
isFadingOut = NO;
|
||||
|
||||
position = 1;
|
||||
|
||||
animationTimer = [NSTimer timerWithTimeInterval:(NSTimeInterval)0.05
|
||||
target:self
|
||||
selector:@selector(updateFrame:)
|
||||
userInfo:nil
|
||||
repeats:YES];
|
||||
|
||||
[[NSRunLoop currentRunLoop] addTimer:animationTimer forMode:NSRunLoopCommonModes];
|
||||
[[NSRunLoop currentRunLoop] addTimer:animationTimer forMode:NSDefaultRunLoopMode];
|
||||
[[NSRunLoop currentRunLoop] addTimer:animationTimer forMode:NSEventTrackingRunLoopMode];
|
||||
}
|
||||
|
||||
- (void)actuallyStopAnimation
|
||||
{
|
||||
_isAnimating = NO;
|
||||
isFadingOut = NO;
|
||||
|
||||
if (animationTimer) {
|
||||
// we were using timer-based animation
|
||||
[animationTimer invalidate];
|
||||
animationTimer = nil;
|
||||
}
|
||||
//[self setNeedsDisplay:YES];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@end
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
//
|
||||
// CPBezierPath.h
|
||||
// Cloud Play OSX
|
||||
//
|
||||
// Created by Daniel Jackson on 5/11/14.
|
||||
// Copyright (c) 2014 Daniel Jackson. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface DJBezierPath : NSBezierPath
|
||||
|
||||
- (CGPathRef)quartzPath;
|
||||
|
||||
@end
|
||||
-66
@@ -1,66 +0,0 @@
|
||||
//
|
||||
// CPBezierPath.m
|
||||
// Cloud Play OSX
|
||||
//
|
||||
// Created by Daniel Jackson on 5/11/14.
|
||||
// Copyright (c) 2014 Daniel Jackson. All rights reserved.
|
||||
//
|
||||
|
||||
#import "DJBezierPath.h"
|
||||
|
||||
@implementation DJBezierPath
|
||||
|
||||
- (CGPathRef)quartzPath
|
||||
{
|
||||
int i, numElements;
|
||||
|
||||
// Need to begin a path here.
|
||||
CGPathRef immutablePath = NULL;
|
||||
|
||||
// Then draw the path elements.
|
||||
numElements = (int)[self elementCount];
|
||||
if (numElements > 0)
|
||||
{
|
||||
CGMutablePathRef path = CGPathCreateMutable();
|
||||
NSPoint points[3];
|
||||
BOOL didClosePath = YES;
|
||||
|
||||
for (i = 0; i < numElements; i++)
|
||||
{
|
||||
switch ([self elementAtIndex:i associatedPoints:points])
|
||||
{
|
||||
case NSMoveToBezierPathElement:
|
||||
CGPathMoveToPoint(path, NULL, points[0].x, points[0].y);
|
||||
break;
|
||||
|
||||
case NSLineToBezierPathElement:
|
||||
CGPathAddLineToPoint(path, NULL, points[0].x, points[0].y);
|
||||
didClosePath = NO;
|
||||
break;
|
||||
|
||||
case NSCurveToBezierPathElement:
|
||||
CGPathAddCurveToPoint(path, NULL, points[0].x, points[0].y,
|
||||
points[1].x, points[1].y,
|
||||
points[2].x, points[2].y);
|
||||
didClosePath = NO;
|
||||
break;
|
||||
|
||||
case NSClosePathBezierPathElement:
|
||||
CGPathCloseSubpath(path);
|
||||
didClosePath = YES;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Be sure the path is closed or Quartz may not do valid hit detection.
|
||||
if (!didClosePath)
|
||||
CGPathCloseSubpath(path);
|
||||
|
||||
immutablePath = CGPathCreateCopy(path);
|
||||
CGPathRelease(path);
|
||||
}
|
||||
|
||||
return immutablePath;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -1,66 +0,0 @@
|
||||
//
|
||||
// CPProgressView.h
|
||||
// Cloud Play OSX
|
||||
//
|
||||
// Created by Daniel Jackson on 4/22/14.
|
||||
// Copyright (c) 2014 Daniel Jackson. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import <QuartzCore/QuartzCore.h>
|
||||
|
||||
/*#define popupWidth 120
|
||||
#define popupHeight 120
|
||||
|
||||
#define popupAlpha 0.9
|
||||
|
||||
#define xOffset 0
|
||||
#define yOffset 0
|
||||
|
||||
#define indicatorSize 40*/
|
||||
|
||||
@class DJProgressIndicator;
|
||||
@class DJActivityIndicator;
|
||||
|
||||
@interface DJProgressHUD : NSView
|
||||
|
||||
+ (void)setBackgroundAlpha:(CGFloat)bgAlph disableActions:(BOOL)disActions;
|
||||
|
||||
+ (void)showStatus:(NSString*)status FromView:(NSView*)view;
|
||||
+ (void)showProgress:(CGFloat)progress withStatus:(NSString*)status FromView:(NSView*)view;
|
||||
|
||||
+ (void)dismiss;
|
||||
|
||||
//+ (void)popActivity;
|
||||
@property (nonatomic) BOOL keepActivityCount;
|
||||
|
||||
@property (nonatomic, readonly) BOOL animatingDismiss;
|
||||
@property (nonatomic, readonly) BOOL animatingShow;
|
||||
@property (nonatomic, readonly) BOOL displaying;
|
||||
@property (nonatomic, readonly) NSUInteger activityCount;
|
||||
|
||||
/*
|
||||
-----Customization----
|
||||
|
||||
Make all changes to [CPProgressView instance]
|
||||
Prior to showing popup, call -(void)orientPopup
|
||||
*/
|
||||
|
||||
#define pMaxWidth1 250
|
||||
#define pMaxHeight1 200
|
||||
|
||||
|
||||
|
||||
//General Popup Values
|
||||
@property (nonatomic) CGVector pOffset;
|
||||
@property (nonatomic) CGFloat pAlpha;
|
||||
|
||||
//Padding
|
||||
@property (nonatomic) CGFloat pPadding;
|
||||
|
||||
@property (nonatomic) CGSize indicatorSize;
|
||||
@property (nonatomic) CGVector indicatorOffset;
|
||||
@property (nonatomic) CGSize labelSize;
|
||||
@property (nonatomic) CGVector labelOffset;
|
||||
|
||||
@end
|
||||
-425
@@ -1,425 +0,0 @@
|
||||
//
|
||||
// CPProgressView.m
|
||||
// Cloud Play OSX
|
||||
//
|
||||
// Created by Daniel Jackson on 4/22/14.
|
||||
// Copyright (c) 2014 Daniel Jackson. All rights reserved.
|
||||
//
|
||||
|
||||
#import "DJProgressHUD.h"
|
||||
#import "DJActivityIndicator.h"
|
||||
#import "DJProgressIndicator.h"
|
||||
|
||||
#define DEBUG_LOGS 1
|
||||
|
||||
typedef void (^CompletionHander)(void);
|
||||
|
||||
@interface DJProgressHUD ()
|
||||
{
|
||||
NSView* parentView;
|
||||
|
||||
CGSize pSize; //This is set automatically based on the content
|
||||
DJActivityIndicator* activityIndicator;
|
||||
DJProgressIndicator* progressIndicator;
|
||||
NSTextField* label;
|
||||
|
||||
NSButton* backgroundMask;
|
||||
NSView* MainHUD;
|
||||
}
|
||||
|
||||
@property CGFloat backgroundAlpha;
|
||||
@property BOOL actionsEnabled;
|
||||
|
||||
@end
|
||||
|
||||
@implementation DJProgressHUD
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Class Methods
|
||||
|
||||
+ (void)showStatus:(NSString*)status FromView:(NSView*)view
|
||||
{
|
||||
[[self instance] showStatus:status FromView:view];
|
||||
}
|
||||
|
||||
+ (void)setBackgroundAlpha:(CGFloat)bgAlph disableActions:(BOOL)disActions
|
||||
{
|
||||
DJProgressHUD* theHUD = [self instance];
|
||||
theHUD.backgroundAlpha = bgAlph;
|
||||
|
||||
[theHUD setBackground];
|
||||
|
||||
}
|
||||
|
||||
+ (void)showProgress:(CGFloat)progress withStatus:(NSString*)status FromView:(NSView*)view
|
||||
{
|
||||
[[self instance] showProgress:progress withStatus:status FromView:view];
|
||||
}
|
||||
|
||||
+ (void)dismiss
|
||||
{
|
||||
if([[self instance] keepActivityCount]) {
|
||||
[[self instance] popActivity];
|
||||
}
|
||||
else {
|
||||
[[self instance] hideViewAnimated];
|
||||
}
|
||||
}
|
||||
|
||||
+ (void)popActivity
|
||||
{
|
||||
[[self instance] popActivity];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Master Methods
|
||||
|
||||
- (void)showStatus:(NSString*)status FromView:(NSView*)view
|
||||
{
|
||||
parentView = view;
|
||||
|
||||
label.stringValue = status;
|
||||
|
||||
[activityIndicator setHidden:FALSE];
|
||||
[progressIndicator setHidden:TRUE];
|
||||
[activityIndicator startAnimation:nil];
|
||||
|
||||
if(![self displaying])
|
||||
[self showViewAnimated];
|
||||
else
|
||||
[self replaceViewQuick];
|
||||
}
|
||||
|
||||
- (void)addMask {
|
||||
|
||||
[backgroundMask removeFromSuperview];
|
||||
[backgroundMask setFrame:parentView.frame];
|
||||
[backgroundMask setEnabled:!_actionsEnabled];
|
||||
if(!backgroundMask.wantsLayer) {
|
||||
CALayer* layer = [CALayer layer];
|
||||
[backgroundMask setLayer:layer];
|
||||
}
|
||||
[backgroundMask.layer setOpacity:0.0];
|
||||
[parentView addSubview:backgroundMask positioned:NSWindowAbove relativeTo:self];
|
||||
}
|
||||
|
||||
- (void)removeMask {
|
||||
|
||||
[backgroundMask removeFromSuperview];
|
||||
// [backgroundMask.animator.layer setOpacity:0.0];
|
||||
}
|
||||
|
||||
- (void)showProgress:(CGFloat)progress withStatus:(NSString*)status FromView:(NSView*)view
|
||||
{
|
||||
parentView = view;
|
||||
|
||||
label.stringValue = status;
|
||||
|
||||
[activityIndicator setHidden:TRUE];
|
||||
[progressIndicator setHidden:FALSE];
|
||||
[activityIndicator stopAnimation:nil];
|
||||
[progressIndicator showProgress:progress];
|
||||
|
||||
if(![self displaying])
|
||||
[self showViewAnimated];
|
||||
else
|
||||
[self replaceViewQuick];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Instance Methods
|
||||
|
||||
-(void)replaceViewQuick
|
||||
{
|
||||
[self beginShowView];
|
||||
[MainHUD.layer setOpacity:_pAlpha];
|
||||
}
|
||||
|
||||
- (void)beginShowView
|
||||
{
|
||||
[self updateLayout];
|
||||
|
||||
if(!self.superview) [parentView addSubview:self];
|
||||
[self.layer setFrame:parentView.frame];
|
||||
[self addSubview:MainHUD];
|
||||
NSRect size = [self getCenterWithinRect:parentView.frame scale:1.0];
|
||||
[MainHUD.layer setFrame:size];
|
||||
|
||||
_displaying = true;
|
||||
_activityCount++;
|
||||
|
||||
[self addMask];
|
||||
|
||||
[activityIndicator.layer setOpacity:1.0];
|
||||
[progressIndicator.layer setOpacity:1.0];
|
||||
[label.layer setOpacity:1.0];
|
||||
}
|
||||
|
||||
-(void)finishHideView
|
||||
{
|
||||
[MainHUD removeFromSuperview];
|
||||
[self removeFromSuperview];
|
||||
parentView = nil;
|
||||
_displaying = false;
|
||||
|
||||
[self removeMask];
|
||||
|
||||
[activityIndicator stopAnimation:nil];
|
||||
}
|
||||
|
||||
- (void)showViewAnimated
|
||||
{
|
||||
if(![parentView wantsLayer])
|
||||
{
|
||||
[parentView setWantsLayer:TRUE];
|
||||
[parentView setLayer:[CALayer layer]];
|
||||
}
|
||||
if(![MainHUD wantsLayer])
|
||||
{
|
||||
[MainHUD setWantsLayer:TRUE];
|
||||
[MainHUD setLayer:[CALayer layer]];
|
||||
}
|
||||
|
||||
[self beginShowView];
|
||||
MainHUD.layer.opacity = 0.0;
|
||||
|
||||
NSRect sizeBefore = [self getCenterWithinRect:parentView.frame scale:0.75];
|
||||
[MainHUD.layer setFrame:sizeBefore];
|
||||
|
||||
_animatingShow = true;
|
||||
|
||||
[CATransaction flush];
|
||||
[CATransaction begin];
|
||||
[CATransaction setValue:[NSNumber numberWithFloat:0.15f]
|
||||
forKey:kCATransactionAnimationDuration];
|
||||
[CATransaction setCompletionBlock:^{
|
||||
_animatingShow = false;
|
||||
}];
|
||||
|
||||
[MainHUD.layer setFrame:[self getCenterWithinRect:parentView.frame scale:1.0]];
|
||||
[MainHUD.layer setOpacity:_pAlpha];
|
||||
[CATransaction commit];
|
||||
|
||||
[self setNeedsDisplay:TRUE];
|
||||
}
|
||||
|
||||
- (void)hideViewAnimated
|
||||
{
|
||||
if(![parentView wantsLayer])
|
||||
{
|
||||
[parentView setWantsLayer:TRUE];
|
||||
[parentView setLayer:[CALayer layer]];
|
||||
}
|
||||
if(![MainHUD wantsLayer])
|
||||
{
|
||||
[MainHUD setWantsLayer:TRUE];
|
||||
[MainHUD setLayer:[CALayer layer]];
|
||||
}
|
||||
|
||||
NSRect newSize = [self getCenterWithinRect:parentView.frame scale:0.75];
|
||||
|
||||
//The ring doesnt resize easily. Clear it.
|
||||
[progressIndicator clear];
|
||||
|
||||
_animatingDismiss = true;
|
||||
_animatingShow = true;
|
||||
|
||||
[CATransaction flush];
|
||||
[CATransaction begin];
|
||||
[CATransaction setValue:[NSNumber numberWithFloat:0.15f] forKey:kCATransactionAnimationDuration];
|
||||
[CATransaction setCompletionBlock:^{
|
||||
_animatingShow = false;
|
||||
if(MainHUD.layer.opacity == 0.0)
|
||||
{
|
||||
[self finishHideView];
|
||||
//[self updateLayout];
|
||||
[MainHUD addSubview:progressIndicator];
|
||||
}
|
||||
}];
|
||||
[activityIndicator.layer setOpacity:0.0];
|
||||
[label.layer setOpacity:0.0];
|
||||
[MainHUD.layer setFrame:newSize];
|
||||
[MainHUD.layer setOpacity:0.0];
|
||||
[CATransaction commit];
|
||||
|
||||
[self setNeedsDisplay:TRUE];
|
||||
}
|
||||
|
||||
- (void)popActivity
|
||||
{
|
||||
_activityCount--;
|
||||
if(_activityCount == 0)
|
||||
[self hideViewAnimated];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Laying It Out
|
||||
|
||||
- (void)updateLayout
|
||||
{
|
||||
[self setBackground];
|
||||
|
||||
CGSize maxContentSize = CGSizeMake(pMaxWidth1-(_pPadding*2), pMaxHeight1-(_pPadding*2));
|
||||
CGSize minContentSize = CGSizeMake(_indicatorSize.width, _indicatorSize.height);
|
||||
|
||||
CGFloat stringWidth = [label.stringValue sizeWithAttributes:@{ NSFontAttributeName : label.font }].width + 5;
|
||||
float stringHeight = [self heightForString:label.stringValue font:label.font width:maxContentSize.width] + 8;
|
||||
|
||||
if(label.stringValue == nil || label.stringValue.length == 0)
|
||||
stringHeight = 0;
|
||||
|
||||
stringWidth = (stringWidth > minContentSize.width) ? stringWidth : minContentSize.width;
|
||||
if(stringWidth > maxContentSize.width)
|
||||
stringWidth = maxContentSize.width;
|
||||
|
||||
CGFloat maxStringHeight = maxContentSize.height-_indicatorSize.height-(_pPadding+(_pPadding/2));
|
||||
stringHeight = (stringHeight > maxStringHeight) ? maxStringHeight : stringHeight;
|
||||
|
||||
CGFloat popupWidth = stringWidth+(_pPadding*2);
|
||||
|
||||
CGFloat lW = stringWidth;
|
||||
CGFloat lH = stringHeight;
|
||||
CGFloat lX = _pPadding;
|
||||
CGFloat lY = (stringHeight == 0) ? 0 : _pPadding;
|
||||
[label setFrame:NSMakeRect(lX, lY, lW, lH)];
|
||||
|
||||
CGFloat spaceBetween = (stringHeight != 0) ? _pPadding/3 : _pPadding;
|
||||
|
||||
CGFloat iW = _indicatorSize.width;
|
||||
CGFloat iH = _indicatorSize.height;
|
||||
CGFloat iX = ((lW+(_pPadding*2))/2)-(iW/2); //center it
|
||||
CGFloat iY = lY+lH+(spaceBetween);
|
||||
NSRect indicatorRect = NSMakeRect(iX, iY, iW, iH);
|
||||
activityIndicator.frame = progressIndicator.frame = indicatorRect;
|
||||
|
||||
CGFloat spaceOnTop = (stringHeight != 0) ? _pPadding/3 : 0;
|
||||
|
||||
[progressIndicator setRingThickness:6];
|
||||
[progressIndicator sizeToFit];
|
||||
[activityIndicator setColor:[NSColor whiteColor]];
|
||||
|
||||
pSize.width = popupWidth;
|
||||
pSize.height = iY+iH+_pPadding+spaceOnTop;//+(_pPadding/2);
|
||||
|
||||
[self setAutoresizesSubviews:YES];
|
||||
[MainHUD setAutoresizesSubviews:YES];
|
||||
|
||||
[self setNeedsDisplay:TRUE];
|
||||
[MainHUD setNeedsDisplay:TRUE];
|
||||
}
|
||||
|
||||
- (void)setBackground
|
||||
{
|
||||
CGColorRef bgcolor = CGColorCreateGenericRGB(0.05, 0.05, 0.05, _pAlpha);
|
||||
if(![MainHUD wantsLayer])
|
||||
{
|
||||
CALayer* bgLayer = [CALayer layer];
|
||||
[bgLayer setBackgroundColor:bgcolor];
|
||||
[bgLayer setCornerRadius:15.0];
|
||||
[MainHUD setWantsLayer:TRUE];
|
||||
[MainHUD setLayer:bgLayer];
|
||||
}
|
||||
else {
|
||||
[MainHUD.layer setBackgroundColor:bgcolor];
|
||||
[MainHUD.layer setCornerRadius:15.0];
|
||||
}
|
||||
|
||||
if(![self layer]) {
|
||||
CALayer* bgLayer = [CALayer layer];
|
||||
[self setLayer:bgLayer];
|
||||
[self setWantsLayer:TRUE];
|
||||
}
|
||||
|
||||
[self.layer setBackgroundColor:CGColorCreateGenericRGB(0, 0, 0, _backgroundAlpha)];
|
||||
|
||||
[self setNeedsDisplay:TRUE];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Other
|
||||
|
||||
-(CGFloat) heightForString:(NSString *)myString font:(NSFont*) myFont width:(CGFloat)myWidth
|
||||
{
|
||||
NSTextStorage *textStorage = [[NSTextStorage alloc] initWithString:myString];
|
||||
NSTextContainer *textContainer = [[NSTextContainer alloc] initWithContainerSize:NSMakeSize(myWidth, FLT_MAX)];
|
||||
;
|
||||
NSLayoutManager *layoutManager = [[NSLayoutManager alloc] init];
|
||||
[layoutManager addTextContainer:textContainer];
|
||||
[textStorage addLayoutManager:layoutManager];
|
||||
[textStorage addAttribute:NSFontAttributeName value:myFont
|
||||
range:NSMakeRange(0, [textStorage length])];
|
||||
[textContainer setLineFragmentPadding:0.0];
|
||||
|
||||
(void) [layoutManager glyphRangeForTextContainer:textContainer];
|
||||
return [layoutManager
|
||||
usedRectForTextContainer:textContainer].size.height;
|
||||
}
|
||||
|
||||
- (NSRect)getCenterWithinRect:(NSRect)parentFrame scale:(CGFloat)scale
|
||||
{
|
||||
NSRect result;
|
||||
CGFloat newWidth = pSize.width*scale;
|
||||
CGFloat newHeight = pSize.height*scale;
|
||||
result.origin.x = parentFrame.size.width/2 - newWidth/2 + _pOffset.dx;
|
||||
result.origin.y = parentFrame.size.height/2 - newHeight/2 + _pOffset.dy;
|
||||
result.size.width = newWidth;
|
||||
result.size.height = newHeight;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
||||
- (void)initializePopup
|
||||
{
|
||||
self.autoresizingMask = NSViewMaxXMargin | NSViewMaxYMargin | NSViewMinXMargin | NSViewMinYMargin;
|
||||
MainHUD.autoresizingMask = NSViewMaxXMargin | NSViewMaxYMargin | NSViewMinXMargin | NSViewMinYMargin;
|
||||
|
||||
MainHUD = [[NSView alloc] init];
|
||||
activityIndicator = [[DJActivityIndicator alloc] init];
|
||||
progressIndicator = [[DJProgressIndicator alloc] init];
|
||||
backgroundMask = [[NSButton alloc] init];
|
||||
label = [[NSTextField alloc] init];
|
||||
|
||||
[self addSubview:MainHUD];
|
||||
[MainHUD addSubview:label];
|
||||
[MainHUD addSubview:activityIndicator];
|
||||
[MainHUD addSubview:progressIndicator];
|
||||
|
||||
//----DEFAULT VALUES----
|
||||
|
||||
_backgroundAlpha = 0.4;
|
||||
_actionsEnabled = FALSE;
|
||||
|
||||
_pOffset = CGVectorMake(0, 0);
|
||||
_pAlpha = 0.9;
|
||||
_pPadding = 10;
|
||||
|
||||
_indicatorSize = CGSizeMake(40, 40);
|
||||
_indicatorOffset = CGVectorMake(0, 0);
|
||||
|
||||
_indicatorSize = CGSizeMake(40, 40);
|
||||
_indicatorOffset = CGVectorMake(0, 0);
|
||||
|
||||
[label setBezeled:NO];
|
||||
[label setDrawsBackground:NO];
|
||||
[label setEditable:NO];
|
||||
[label setSelectable:NO];
|
||||
|
||||
label.font = [NSFont boldSystemFontOfSize:12.0];
|
||||
[label setTextColor:[NSColor colorWithCalibratedWhite:1.0 alpha:0.85]];
|
||||
}
|
||||
|
||||
+ (DJProgressHUD *) instance
|
||||
{
|
||||
static dispatch_once_t once;
|
||||
static DJProgressHUD *sharedView;
|
||||
dispatch_once(&once, ^ {
|
||||
sharedView = [[self alloc] init];
|
||||
[sharedView initializePopup];
|
||||
});
|
||||
|
||||
return sharedView;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -1,30 +0,0 @@
|
||||
//
|
||||
// DJProgressIndicator.h
|
||||
// Playground
|
||||
//
|
||||
// Created by Daniel Jackson on 5/11/14.
|
||||
// Copyright (c) 2014 Daniel Jackson. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import <QuartzCore/QuartzCore.h>
|
||||
|
||||
@interface DJProgressIndicator : NSView
|
||||
|
||||
@property (nonatomic,readonly) CGFloat currentProgress;
|
||||
|
||||
- (void)setBackgroundColor:(NSColor *)value;
|
||||
- (void)setRingColor:(NSColor *)value backgroundRingColor:(NSColor*)value2;
|
||||
- (void)setRingThickness:(CGFloat)thick;
|
||||
- (void)setRingRadius:(CGFloat)radius;
|
||||
|
||||
- (void)showProgress:(float)progress;
|
||||
|
||||
-(void)sizeToFit;
|
||||
|
||||
-(void)clear;
|
||||
|
||||
@property (nonatomic, readonly) CGFloat ringRadius;
|
||||
@property (nonatomic, readonly) CGFloat ringThickness;
|
||||
|
||||
@end
|
||||
@@ -1,249 +0,0 @@
|
||||
//
|
||||
// DJProgressIndicator.m
|
||||
// Playground
|
||||
//
|
||||
// Created by Daniel Jackson on 5/11/14.
|
||||
// Copyright (c) 2014 Daniel Jackson. All rights reserved.
|
||||
//
|
||||
|
||||
#import "DJProgressIndicator.h"
|
||||
#import "DJBezierPath.h"
|
||||
|
||||
@interface DJProgressIndicator ()
|
||||
{
|
||||
NSColor* backRingColor;
|
||||
NSColor* ringColor;
|
||||
NSColor* backColor;
|
||||
}
|
||||
|
||||
@property (nonatomic, strong) CAShapeLayer *backgroundRingLayer;
|
||||
@property (nonatomic, strong) CAShapeLayer *ringLayer;
|
||||
|
||||
@end
|
||||
|
||||
@implementation DJProgressIndicator
|
||||
|
||||
- (id)initWithFrame:(NSRect)frame
|
||||
{
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
_currentProgress = 0;
|
||||
|
||||
_ringThickness = 6;
|
||||
_ringRadius = self.frame.size.width/2 - (_ringThickness);
|
||||
|
||||
backRingColor = [NSColor darkGrayColor];
|
||||
ringColor = [NSColor whiteColor];
|
||||
backColor = [NSColor clearColor];
|
||||
|
||||
[self setAutoresizesSubviews:YES];
|
||||
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)drawRect:(NSRect)dirtyRect
|
||||
{
|
||||
[super drawRect:dirtyRect];
|
||||
|
||||
//NSLog(@"Drawing");
|
||||
|
||||
[self setBackground];
|
||||
|
||||
[self resetRings];
|
||||
}
|
||||
|
||||
- (void)setBackground
|
||||
{
|
||||
if(![self wantsLayer])
|
||||
{
|
||||
CALayer* bgLayer = [CALayer layer];
|
||||
[bgLayer setBackgroundColor:backColor.CGColor];
|
||||
[self setWantsLayer:TRUE];
|
||||
[self setLayer:bgLayer];
|
||||
}
|
||||
else {
|
||||
[self.layer setBackgroundColor:backColor.CGColor];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)resetRings
|
||||
{
|
||||
[_ringLayer removeFromSuperlayer];
|
||||
_ringLayer = nil;
|
||||
[_backgroundRingLayer removeFromSuperlayer];
|
||||
_backgroundRingLayer = nil;
|
||||
|
||||
[self updateLayout];
|
||||
self.ringLayer.strokeEnd = _currentProgress;
|
||||
}
|
||||
|
||||
-(void)updateLayout
|
||||
{
|
||||
self.backgroundRingLayer.position = self.ringLayer.position = CGPointMake((CGRectGetWidth(self.bounds)/2), CGRectGetHeight(self.bounds)/2);
|
||||
}
|
||||
|
||||
- (void)showProgress:(float)progress {
|
||||
|
||||
NSLog(@"-----%f",progress);
|
||||
|
||||
_currentProgress = progress;
|
||||
|
||||
[self updateLayout];
|
||||
|
||||
if(progress >= 0) {
|
||||
self.ringLayer.strokeEnd = progress;
|
||||
}
|
||||
else {
|
||||
[self cancelRingLayerAnimation];
|
||||
}
|
||||
|
||||
//[self setNeedsDisplay:TRUE];
|
||||
}
|
||||
|
||||
- (CAShapeLayer *)ringLayer {
|
||||
if(!_ringLayer) {
|
||||
CGPoint center = CGPointMake(CGRectGetWidth(self.frame)/2, CGRectGetHeight(self.frame)/2);
|
||||
_ringLayer = [self createRingLayerWithCenter:center radius:_ringRadius lineWidth:_ringThickness color:ringColor];
|
||||
[self.layer addSublayer:_ringLayer];
|
||||
}
|
||||
return _ringLayer;
|
||||
}
|
||||
|
||||
- (CAShapeLayer *)backgroundRingLayer {
|
||||
if(!_backgroundRingLayer) {
|
||||
CGPoint center = CGPointMake(CGRectGetWidth(self.frame)/2, CGRectGetHeight(self.frame)/2);
|
||||
_backgroundRingLayer = [self createRingLayerWithCenter:center radius:_ringRadius lineWidth:_ringThickness color:backRingColor];
|
||||
_backgroundRingLayer.strokeEnd = 1;
|
||||
[self.layer addSublayer:_backgroundRingLayer];
|
||||
}
|
||||
return _backgroundRingLayer;
|
||||
}
|
||||
|
||||
- (void)cancelRingLayerAnimation {
|
||||
[CATransaction begin];
|
||||
[CATransaction setDisableActions:YES];
|
||||
[self.layer removeAllAnimations];
|
||||
|
||||
_ringLayer.strokeEnd = 0.0f;
|
||||
if (_ringLayer.superlayer) {
|
||||
[_ringLayer removeFromSuperlayer];
|
||||
}
|
||||
_ringLayer = nil;
|
||||
|
||||
if (_backgroundRingLayer.superlayer) {
|
||||
[_backgroundRingLayer removeFromSuperlayer];
|
||||
}
|
||||
_backgroundRingLayer = nil;
|
||||
|
||||
[CATransaction commit];
|
||||
}
|
||||
|
||||
-(void)clear
|
||||
{
|
||||
[self cancelRingLayerAnimation];
|
||||
}
|
||||
|
||||
- (CGPoint)pointOnCircleWithCenter:(CGPoint)center radius:(double)radius angleInDegrees:(double)angleInDegrees {
|
||||
float x = (float)(radius * cos(angleInDegrees * M_PI / 180)) + radius;
|
||||
float y = (float)(radius * sin(angleInDegrees * M_PI / 180)) + radius;
|
||||
return CGPointMake(x, y);
|
||||
}
|
||||
|
||||
|
||||
- (DJBezierPath *)createCirclePathWithCenter:(CGPoint)center radius:(CGFloat)radius sampleCount:(NSInteger)sampleCount {
|
||||
|
||||
DJBezierPath *smoothedPath = [[DJBezierPath alloc] init];
|
||||
CGPoint startPoint = [self pointOnCircleWithCenter:center radius:radius angleInDegrees:90];
|
||||
|
||||
[smoothedPath moveToPoint:startPoint];
|
||||
|
||||
CGFloat delta = 360.0f/sampleCount;
|
||||
CGFloat angleInDegrees = 90;
|
||||
for (NSInteger i=1; i<sampleCount; i++) {
|
||||
angleInDegrees -= delta;
|
||||
CGPoint point = [self pointOnCircleWithCenter:center radius:radius angleInDegrees:angleInDegrees];
|
||||
[smoothedPath lineToPoint:point];
|
||||
}
|
||||
|
||||
[smoothedPath lineToPoint:startPoint];
|
||||
|
||||
return smoothedPath;
|
||||
}
|
||||
|
||||
|
||||
- (CAShapeLayer *)createRingLayerWithCenter:(CGPoint)center radius:(CGFloat)radius lineWidth:(CGFloat)lineWidth color:(NSColor *)color {
|
||||
|
||||
DJBezierPath *smoothedPath = [self createCirclePathWithCenter:center radius:radius sampleCount:72];
|
||||
|
||||
CAShapeLayer *slice = [CAShapeLayer layer];
|
||||
slice.frame = CGRectMake(center.x-radius, center.y-radius, radius*2, radius*2);
|
||||
slice.fillColor = [NSColor clearColor].CGColor;
|
||||
slice.strokeColor = color.CGColor;
|
||||
slice.lineWidth = lineWidth;
|
||||
slice.lineCap = kCALineJoinBevel;
|
||||
slice.lineJoin = kCALineJoinBevel;
|
||||
|
||||
CGPathRef path = smoothedPath.quartzPath;
|
||||
slice.path = path;
|
||||
CGPathRelease(path);
|
||||
|
||||
|
||||
return slice;
|
||||
}
|
||||
|
||||
|
||||
- (void)setRingColor:(NSColor *)value backgroundRingColor:(NSColor*)value2
|
||||
{
|
||||
bool changed = false;
|
||||
|
||||
if (ringColor != value) {
|
||||
ringColor = nil;
|
||||
ringColor= value;
|
||||
changed = true;
|
||||
}
|
||||
if (backRingColor != value2) {
|
||||
backRingColor = nil;
|
||||
backRingColor = value2;
|
||||
changed = true;
|
||||
}
|
||||
if(changed) {
|
||||
[self resetRings];
|
||||
[self setNeedsDisplay:TRUE];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setBackgroundColor:(NSColor *)value
|
||||
{
|
||||
if (backColor != value) {
|
||||
//[backColor release];
|
||||
backColor = nil;
|
||||
backColor = value;
|
||||
[self setBackground];
|
||||
//[self setNeedsDisplay:TRUE];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setRingThickness:(CGFloat)thick
|
||||
{
|
||||
if(_ringThickness != thick) {
|
||||
_ringThickness = thick;
|
||||
[self resetRings];
|
||||
//[self setNeedsDisplay:TRUE];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setRingRadius:(CGFloat)radius
|
||||
{
|
||||
if(_ringRadius != radius) {
|
||||
_ringRadius = radius;
|
||||
[self resetRings];
|
||||
//[self setNeedsDisplay:TRUE];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)sizeToFit {
|
||||
_ringRadius = self.frame.size.width/2 - (_ringThickness);
|
||||
}
|
||||
|
||||
@end
|
||||
Generated
-338
@@ -1,338 +0,0 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
DJProgressHUD_OSX
|
||||
Copyright (C) 2014 Daniel Jackson
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
{signature of Ty Coon}, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
Generated
-46
@@ -1,46 +0,0 @@
|
||||
DJProgressHUD
|
||||
=================
|
||||
|
||||
Progress and Activity HUD for OSX.
|
||||
|
||||
I am really excited to introduce this ProgressHUD for osx. When I started my first osx app, I noticed that there was not good alternative to SVProgressHUD for the mac. Because this is a such a great tool for displaying a process, I decided to write it for the mac.
|
||||
|
||||
Please let me know if you find this helpfull!
|
||||
|
||||

|
||||
|
||||
##Setup
|
||||
1. Add DJProgressHUD to your application directory
|
||||
2. Ensure ARC is enabled on the project
|
||||
3. Import the control you want to use
|
||||
4. Refer to the samples below for possible display options
|
||||
|
||||
##Whats included:
|
||||
- DJProgressHUD: A class to show a popup view to the user displaying the current progress or an activity indicator.
|
||||
- DJActivityIndicator: A customizable activity indicator. The mac's version, NSProgressIndicator, just doesn't cut it.
|
||||
- DJProgressIndicator: A customizable circular progress view. Change the thickness, radius, size and color. I couldnt find one for the mac. So again, I made one.
|
||||
|
||||
##Code Sample
|
||||
|
||||
Simple Progress - uses progress indicator
|
||||
|
||||
CGFloat currentProgress = 0.33;
|
||||
[DJProgressHUD showProgress:currentProgress withStatus:@"The Progress!" FromView:self.view];
|
||||
...
|
||||
[DJProgressHUD dismiss];
|
||||
|
||||
Simple Status - uses activity indicator
|
||||
|
||||
[DJProgressHUD showStatus:@"INDICATOR" FromView:self.view];
|
||||
...
|
||||
[DJProgressHUD dismiss];
|
||||
|
||||
Progress Indicator - Customizing
|
||||
|
||||
DJProgressIndicator* progress = [[DJProgressIndicator alloc] initWithFrame: ... ];
|
||||
[progress setRingThickness:8];
|
||||
[progress setRingRadius:15];
|
||||
[progress setBackgroundColor:[NSColor clearColor]];
|
||||
[progress setRingColor:[NSColor whiteColor] backgroundRingColor:[NSColor darkGrayColor]];
|
||||
[self.view addSubview:progress];
|
||||
[progress showProgress: 0.33 ];
|
||||
Generated
+5
-1
@@ -392,7 +392,11 @@ static BOOL Trash(NSString *path) {
|
||||
BOOL result = NO;
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_8
|
||||
if (floor(NSAppKitVersionNumber) >= NSAppKitVersionNumber10_8) {
|
||||
result = [[NSFileManager defaultManager] trashItemAtURL:[NSURL fileURLWithPath:path] resultingItemURL:NULL error:NULL];
|
||||
if (@available(macOS 10.8, *)) {
|
||||
result = [[NSFileManager defaultManager] trashItemAtURL:[NSURL fileURLWithPath:path] resultingItemURL:NULL error:NULL];
|
||||
} else {
|
||||
// Fallback on earlier versions
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_11
|
||||
|
||||
Generated
+7
-7
@@ -1,24 +1,24 @@
|
||||
PODS:
|
||||
- DJProgressHUD_OSX (0.0.1)
|
||||
- ITSwitch (1.0)
|
||||
- LetsMove (1.24)
|
||||
- STPrivilegedTask (1.0.1)
|
||||
|
||||
DEPENDENCIES:
|
||||
- DJProgressHUD_OSX
|
||||
- ITSwitch
|
||||
- LetsMove
|
||||
- STPrivilegedTask
|
||||
|
||||
SPEC REPOS:
|
||||
https://github.com/CocoaPods/Specs.git:
|
||||
- DJProgressHUD_OSX
|
||||
https://github.com/cocoapods/specs.git:
|
||||
- ITSwitch
|
||||
- LetsMove
|
||||
- STPrivilegedTask
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
DJProgressHUD_OSX: a8de6d2da8750dbf671fcddc649a44a9cd2807c4
|
||||
ITSwitch: 7ff745d6f2a6910e9194b23e4eab9a843258a478
|
||||
LetsMove: fefe56bc7bc7fb7d37049e28a14f297961229fc5
|
||||
STPrivilegedTask: 103f97827454e786074640cf89d303be344498c7
|
||||
|
||||
PODFILE CHECKSUM: b1b05df537f199f1410c30e64c24cde88db79221
|
||||
PODFILE CHECKSUM: 4dca32d4d6791341e27820d98c0efe1419299b51
|
||||
|
||||
COCOAPODS: 1.5.0
|
||||
COCOAPODS: 1.7.0.rc.1
|
||||
|
||||
Generated
+675
-662
File diff suppressed because it is too large
Load Diff
-60
@@ -1,60 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0930"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForAnalyzing = "YES"
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "429E750368B61ABCD8DFF8293D466E7D"
|
||||
BlueprintName = "DJProgressHUD_OSX"
|
||||
ReferencedContainer = "container:Pods.xcodeproj"
|
||||
BuildableName = "DJProgressHUD_OSX.framework">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
buildConfiguration = "Debug">
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
buildConfiguration = "Debug"
|
||||
allowLocationSimulation = "YES">
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0930"
|
||||
LastUpgradeVersion = "1020"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
@@ -14,10 +14,10 @@
|
||||
buildForArchiving = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "1D1277B04944214E28E206D65F005710"
|
||||
BlueprintIdentifier = "9A32BAE58F8E5FFB7BE8A59E9B216786"
|
||||
BuildableName = "ITSwitch.framework"
|
||||
BlueprintName = "ITSwitch"
|
||||
ReferencedContainer = "container:Pods.xcodeproj"
|
||||
BuildableName = "ITSwitch.framework">
|
||||
ReferencedContainer = "container:Pods.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0930"
|
||||
LastUpgradeVersion = "1020"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
@@ -14,10 +14,10 @@
|
||||
buildForArchiving = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "92A4DE1508C6CA686DC4DDEB83341720"
|
||||
BlueprintIdentifier = "F83960005EA88D0C24A1D277DD0E8667"
|
||||
BuildableName = "LetsMove.framework"
|
||||
BlueprintName = "LetsMove"
|
||||
ReferencedContainer = "container:Pods.xcodeproj"
|
||||
BuildableName = "LetsMove.framework">
|
||||
ReferencedContainer = "container:Pods.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0930"
|
||||
LastUpgradeVersion = "1020"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
@@ -14,7 +14,7 @@
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "CD4182946621EBCCC3159A4373646698"
|
||||
BlueprintIdentifier = "6822A3C6F352B3FBBC37114BBA826EB3"
|
||||
BuildableName = "Pods_Get_It.framework"
|
||||
BlueprintName = "Pods-Get It"
|
||||
ReferencedContainer = "container:Pods.xcodeproj">
|
||||
@@ -45,7 +45,7 @@
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "CD4182946621EBCCC3159A4373646698"
|
||||
BlueprintIdentifier = "6822A3C6F352B3FBBC37114BBA826EB3"
|
||||
BuildableName = "Pods_Get_It.framework"
|
||||
BlueprintName = "Pods-Get It"
|
||||
ReferencedContainer = "container:Pods.xcodeproj">
|
||||
|
||||
+5
-5
@@ -4,11 +4,6 @@
|
||||
<dict>
|
||||
<key>SchemeUserState</key>
|
||||
<dict>
|
||||
<key>DJProgressHUD_OSX.xcscheme</key>
|
||||
<dict>
|
||||
<key>isShown</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>ITSwitch.xcscheme</key>
|
||||
<dict>
|
||||
<key>isShown</key>
|
||||
@@ -24,6 +19,11 @@
|
||||
<key>isShown</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>STPrivilegedTask.xcscheme</key>
|
||||
<dict>
|
||||
<key>isShown</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>SuppressBuildableAutocreation</key>
|
||||
<dict/>
|
||||
|
||||
Generated
+22
@@ -0,0 +1,22 @@
|
||||
# BSD License
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of Sveinbjorn Thordarson nor that of any other
|
||||
# contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
Generated
+58
@@ -0,0 +1,58 @@
|
||||
# STPrivilegedTask - Objective C class
|
||||
|
||||
An NSTask-like wrapper around AuthorizationExecuteWithPrivileges() in the Security API to run shell commands with root privileges in Mac OS X.
|
||||
|
||||
Example of usage:
|
||||
|
||||
```objective-c
|
||||
STPrivilegedTask *privilegedTask = [[STPrivilegedTask alloc] init];
|
||||
|
||||
[privilegedTask setLaunchPath:@"/usr/bin/touch"];
|
||||
NSArray *args = [NSArray arrayWithObject:@"/etc/my_test_file"];
|
||||
[privilegedTask setArguments:args];
|
||||
[privilegedTask setCurrentDirectoryPath:[[NSBundle mainBundle] resourcePath]];
|
||||
|
||||
//set it off
|
||||
OSStatus err = [privilegedTask launch];
|
||||
if (err != errAuthorizationSuccess) {
|
||||
if (err == errAuthorizationCanceled) {
|
||||
NSLog(@"User cancelled");
|
||||
} else {
|
||||
NSLog(@"Something went wrong");
|
||||
}
|
||||
}
|
||||
|
||||
// Read output file handle for data
|
||||
NSFileHandle *readHandle = [privilegedTask outputFileHandle];
|
||||
NSData *outputData = [readHandle readDataToEndOfFile];
|
||||
NSString *outputString = [[NSString alloc] initWithData:outputData encoding:NSUTF8StringEncoding];
|
||||
|
||||
```
|
||||
|
||||
# BSD License
|
||||
|
||||
```
|
||||
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of Sveinbjorn Thordarson nor that of any other
|
||||
# contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
```
|
||||
Generated
+81
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
#
|
||||
# STPrivilegedTask - NSTask-like wrapper around AuthorizationExecuteWithPrivileges
|
||||
# Copyright (C) 2009-2015 Sveinbjorn Thordarson <sveinbjornt@gmail.com>
|
||||
#
|
||||
# BSD License
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of Sveinbjorn Thordarson nor that of any other
|
||||
# contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import <Carbon/Carbon.h>
|
||||
#import <Security/Authorization.h>
|
||||
#import <Security/AuthorizationTags.h>
|
||||
|
||||
#define STPrivilegedTaskDidTerminateNotification @"STPrivilegedTaskDidTerminateNotification"
|
||||
//#define TMP_STDERR_TEMPLATE @".authStderr.XXXXXX"
|
||||
|
||||
// Defines error value for when AuthorizationExecuteWithPrivilleges no longer
|
||||
// exists anyplace. Rather than defining a new enum, we just create a global
|
||||
// constant
|
||||
extern const OSStatus errAuthorizationFnNoLongerExists;
|
||||
|
||||
@interface STPrivilegedTask : NSObject
|
||||
{
|
||||
NSArray *arguments;
|
||||
NSString *cwd;
|
||||
NSString *launchPath;
|
||||
BOOL isRunning;
|
||||
pid_t pid;
|
||||
int terminationStatus;
|
||||
NSFileHandle *outputFileHandle;
|
||||
NSTimer *checkStatusTimer;
|
||||
}
|
||||
-(id)initWithLaunchPath:(NSString *)path;
|
||||
-(id)initWithLaunchPath:(NSString *)path arguments: (NSArray *)args;
|
||||
+(STPrivilegedTask *)launchedPrivilegedTaskWithLaunchPath:(NSString *)path;
|
||||
+(STPrivilegedTask *)launchedPrivilegedTaskWithLaunchPath:(NSString *)path arguments:(NSArray *)arguments;
|
||||
-(NSArray *)arguments;
|
||||
-(NSString *)currentDirectoryPath;
|
||||
-(BOOL)isRunning;
|
||||
-(int)launch;
|
||||
-(NSString *)launchPath;
|
||||
-(int)processIdentifier;
|
||||
-(void)setArguments:(NSArray *)arguments;
|
||||
-(void)setCurrentDirectoryPath:(NSString *)path;
|
||||
-(void)setLaunchPath:(NSString *)path;
|
||||
-(NSFileHandle *)outputFileHandle;
|
||||
-(void)terminate; // doesn't work
|
||||
-(int)terminationStatus;
|
||||
-(void)_checkTaskStatus;
|
||||
-(void)waitUntilExit;
|
||||
@end
|
||||
/*static OSStatus AuthorizationExecuteWithPrivilegesStdErrAndPid (
|
||||
AuthorizationRef authorization,
|
||||
const char *pathToTool,
|
||||
AuthorizationFlags options,
|
||||
char * const *arguments,
|
||||
FILE **communicationsPipe,
|
||||
FILE **errPipe,
|
||||
pid_t* processid
|
||||
);*/
|
||||
Generated
+461
@@ -0,0 +1,461 @@
|
||||
/*
|
||||
#
|
||||
# STPrivilegedTask - NSTask-like wrapper around AuthorizationExecuteWithPrivileges
|
||||
# Copyright (C) 2009-2015 Sveinbjorn Thordarson <sveinbjornt@gmail.com>
|
||||
#
|
||||
# BSD License
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of Sveinbjorn Thordarson nor that of any other
|
||||
# contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#import "STPrivilegedTask.h"
|
||||
#import <stdio.h>
|
||||
#import <unistd.h>
|
||||
#import <dlfcn.h>
|
||||
|
||||
/* New error code denoting that AuthorizationExecuteWithPrivileges no longer exists */
|
||||
OSStatus const errAuthorizationFnNoLongerExists = -70001;
|
||||
|
||||
@implementation STPrivilegedTask
|
||||
|
||||
- (id)init
|
||||
{
|
||||
if ((self = [super init])) {
|
||||
launchPath = @"";
|
||||
cwd = [[NSString alloc] initWithString:[[NSFileManager defaultManager] currentDirectoryPath]];
|
||||
arguments = [[NSArray alloc] init];
|
||||
isRunning = NO;
|
||||
outputFileHandle = nil;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(void)dealloc
|
||||
{
|
||||
#if !__has_feature(objc_arc)
|
||||
[launchPath release];
|
||||
[arguments release];
|
||||
[cwd release];
|
||||
|
||||
if (outputFileHandle != nil) {
|
||||
[outputFileHandle release];
|
||||
}
|
||||
[super dealloc];
|
||||
#endif
|
||||
}
|
||||
|
||||
-(id)initWithLaunchPath:(NSString *)path arguments:(NSArray *)args
|
||||
{
|
||||
if ((self = [self initWithLaunchPath:path])) {
|
||||
[self setArguments:args];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(id)initWithLaunchPath:(NSString *)path
|
||||
{
|
||||
if ((self = [self init])) {
|
||||
[self setLaunchPath:path];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
||||
+(STPrivilegedTask *)launchedPrivilegedTaskWithLaunchPath:(NSString *)path arguments:(NSArray *)args
|
||||
{
|
||||
STPrivilegedTask *task = [[STPrivilegedTask alloc] initWithLaunchPath:path arguments:args];
|
||||
#if !__has_feature(objc_arc)
|
||||
[task autorelease];
|
||||
#endif
|
||||
|
||||
[task launch];
|
||||
[task waitUntilExit];
|
||||
return task;
|
||||
}
|
||||
|
||||
+(STPrivilegedTask *)launchedPrivilegedTaskWithLaunchPath:(NSString *)path
|
||||
{
|
||||
STPrivilegedTask *task = [[STPrivilegedTask alloc] initWithLaunchPath:path];
|
||||
#if !__has_feature(objc_arc)
|
||||
[task autorelease];
|
||||
#endif
|
||||
[task launch];
|
||||
[task waitUntilExit];
|
||||
return task;
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
||||
- (NSArray *)arguments
|
||||
{
|
||||
return arguments;
|
||||
}
|
||||
|
||||
- (NSString *)currentDirectoryPath;
|
||||
{
|
||||
return cwd;
|
||||
}
|
||||
|
||||
- (BOOL)isRunning
|
||||
{
|
||||
return isRunning;
|
||||
}
|
||||
|
||||
- (NSString *)launchPath
|
||||
{
|
||||
return launchPath;
|
||||
}
|
||||
|
||||
- (int)processIdentifier
|
||||
{
|
||||
return pid;
|
||||
}
|
||||
|
||||
- (int)terminationStatus
|
||||
{
|
||||
return terminationStatus;
|
||||
}
|
||||
|
||||
- (NSFileHandle *)outputFileHandle;
|
||||
{
|
||||
return outputFileHandle;
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
||||
-(void)setArguments:(NSArray *)args
|
||||
{
|
||||
#if !__has_feature(objc_arc)
|
||||
[arguments release];
|
||||
[args retain];
|
||||
#endif
|
||||
arguments = args;
|
||||
}
|
||||
|
||||
-(void)setCurrentDirectoryPath:(NSString *)path
|
||||
{
|
||||
#if !__has_feature(objc_arc)
|
||||
[cwd release];
|
||||
[path retain];
|
||||
#endif
|
||||
cwd = path;
|
||||
}
|
||||
|
||||
-(void)setLaunchPath:(NSString *)path
|
||||
{
|
||||
#if !__has_feature(objc_arc)
|
||||
[launchPath release];
|
||||
[path retain];
|
||||
#endif
|
||||
launchPath = path;
|
||||
}
|
||||
|
||||
# pragma mark -
|
||||
|
||||
// return 0 for success
|
||||
-(int)launch
|
||||
{
|
||||
OSStatus err = noErr;
|
||||
const char *toolPath = [launchPath fileSystemRepresentation];
|
||||
|
||||
AuthorizationRef authorizationRef;
|
||||
AuthorizationItem myItems = {kAuthorizationRightExecute, strlen(toolPath), &toolPath, 0};
|
||||
AuthorizationRights myRights = {1, &myItems};
|
||||
AuthorizationFlags flags = kAuthorizationFlagDefaults | kAuthorizationFlagInteractionAllowed | kAuthorizationFlagPreAuthorize | kAuthorizationFlagExtendRights;
|
||||
|
||||
NSUInteger numberOfArguments = [arguments count];
|
||||
char *args[numberOfArguments + 1];
|
||||
FILE *outputFile;
|
||||
|
||||
// Create fn pointer to AuthorizationExecuteWithPrivileges in case it doesn't exist
|
||||
// in this version of MacOS
|
||||
static OSStatus (*_AuthExecuteWithPrivsFn)(
|
||||
AuthorizationRef authorization, const char *pathToTool, AuthorizationFlags options,
|
||||
char * const *arguments, FILE **communicationsPipe) = NULL;
|
||||
|
||||
// Check to see if we have the correct function in our loaded libraries
|
||||
if (!_AuthExecuteWithPrivsFn) {
|
||||
// On 10.7, AuthorizationExecuteWithPrivileges is deprecated. We want
|
||||
// to still use it since there's no good alternative (without requiring
|
||||
// code signing). We'll look up the function through dyld and fail if
|
||||
// it is no longer accessible. If Apple removes the function entirely
|
||||
// this will fail gracefully. If they keep the function and throw some
|
||||
// sort of exception, this won't fail gracefully, but that's a risk
|
||||
// we'll have to take for now.
|
||||
// Pattern by Andy Kim from Potion Factory LLC
|
||||
_AuthExecuteWithPrivsFn = dlsym(RTLD_DEFAULT, "AuthorizationExecuteWithPrivileges");
|
||||
if (!_AuthExecuteWithPrivsFn) {
|
||||
// This version of OS X has finally removed this function. Exit with an error.
|
||||
err = errAuthorizationFnNoLongerExists;
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
||||
// Use Apple's Authentication Manager APIs to get an Authorization Reference
|
||||
// These Apple APIs are quite possibly the most horrible of the Mac OS X APIs
|
||||
|
||||
// create authorization reference
|
||||
err = AuthorizationCreate(NULL, kAuthorizationEmptyEnvironment, kAuthorizationFlagDefaults, &authorizationRef);
|
||||
if (err != errAuthorizationSuccess) {
|
||||
return err;
|
||||
}
|
||||
|
||||
// pre-authorize the privileged operation
|
||||
err = AuthorizationCopyRights(authorizationRef, &myRights, kAuthorizationEmptyEnvironment, flags, NULL);
|
||||
if (err != errAuthorizationSuccess) {
|
||||
return err;
|
||||
}
|
||||
|
||||
// OK, at this point we have received authorization for the task.
|
||||
// Let's prepare to launch it
|
||||
|
||||
// first, construct an array of c strings from NSArray w. arguments
|
||||
for (int i = 0; i < numberOfArguments; i++) {
|
||||
NSString *argString = arguments[i];
|
||||
NSUInteger stringLength = [argString length];
|
||||
|
||||
args[i] = malloc((stringLength + 1) * sizeof(char));
|
||||
snprintf(args[i], stringLength + 1, "%s", [argString fileSystemRepresentation]);
|
||||
}
|
||||
args[numberOfArguments] = NULL;
|
||||
|
||||
// change to the current dir specified
|
||||
char *prevCwd = (char *)getcwd(nil, 0);
|
||||
chdir([cwd fileSystemRepresentation]);
|
||||
|
||||
//use Authorization Reference to execute script with privileges
|
||||
err = _AuthExecuteWithPrivsFn(authorizationRef, [launchPath fileSystemRepresentation], kAuthorizationFlagDefaults, args, &outputFile);
|
||||
|
||||
// OK, now we're done executing, let's change back to old dir
|
||||
chdir(prevCwd);
|
||||
|
||||
// free the malloc'd argument strings
|
||||
for (int i = 0; i < numberOfArguments; i++) {
|
||||
free(args[i]);
|
||||
}
|
||||
|
||||
// free the auth ref
|
||||
AuthorizationFree(authorizationRef, kAuthorizationFlagDefaults);
|
||||
|
||||
// we return err if execution failed
|
||||
if (err != errAuthorizationSuccess) {
|
||||
return err;
|
||||
} else {
|
||||
isRunning = YES;
|
||||
}
|
||||
|
||||
// get file handle for the command output
|
||||
outputFileHandle = [[NSFileHandle alloc] initWithFileDescriptor:fileno(outputFile) closeOnDealloc:YES];
|
||||
pid = fcntl(fileno(outputFile), F_GETOWN, 0);
|
||||
|
||||
// start monitoring task
|
||||
checkStatusTimer = [NSTimer scheduledTimerWithTimeInterval:0.10 target:self selector:@selector(_checkTaskStatus) userInfo:nil repeats:YES];
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
- (void)terminate
|
||||
{
|
||||
// This doesn't work without a PID, and we can't get one. Stupid Security API
|
||||
/* int ret = kill(pid, SIGKILL);
|
||||
|
||||
if (ret != 0)
|
||||
NSLog(@"Error %d", errno);*/
|
||||
}
|
||||
|
||||
// hang until task is done
|
||||
- (void)waitUntilExit
|
||||
{
|
||||
waitpid([self processIdentifier], &terminationStatus, 0);
|
||||
isRunning = NO;
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
||||
// check if privileged task is still running
|
||||
- (void)_checkTaskStatus
|
||||
{
|
||||
// see if task has terminated
|
||||
int mypid = waitpid([self processIdentifier], &terminationStatus, WNOHANG);
|
||||
if (mypid != 0) {
|
||||
isRunning = NO;
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:STPrivilegedTaskDidTerminateNotification object:self];
|
||||
[checkStatusTimer invalidate];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
||||
- (NSString *)description
|
||||
{
|
||||
NSArray *args = [self arguments];
|
||||
NSString *cmd = [[self launchPath] copy];
|
||||
|
||||
for (int i = 0; i < [args count]; i++) {
|
||||
cmd = [cmd stringByAppendingFormat:@" %@", args[i]];
|
||||
}
|
||||
|
||||
return [[super description] stringByAppendingFormat:@" %@", cmd];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
/*
|
||||
*
|
||||
* Add the Standard err Pipe and Pid support to AuthorizationExecuteWithPrivileges()
|
||||
* method
|
||||
*
|
||||
* @Author: Miklós Fazekas
|
||||
* Modified Aug 10 2010 by Sveinbjorn Thordarson
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/*static OSStatus AuthorizationExecuteWithPrivilegesStdErrAndPid (
|
||||
AuthorizationRef authorization,
|
||||
const char *pathToTool,
|
||||
AuthorizationFlags options,
|
||||
char * const *arguments,
|
||||
FILE **communicationsPipe,
|
||||
FILE **errPipe,
|
||||
pid_t* processid
|
||||
)
|
||||
{
|
||||
// get the Apple-approved secure temp directory
|
||||
NSString *tempFileTemplate = [NSTemporaryDirectory() stringByAppendingPathComponent: TMP_STDERR_TEMPLATE];
|
||||
|
||||
// copy it into a C string
|
||||
const char *tempFileTemplateCString = [tempFileTemplate fileSystemRepresentation];
|
||||
char *stderrpath = (char *)malloc(strlen(tempFileTemplateCString) + 1);
|
||||
strcpy(stderrpath, tempFileTemplateCString);
|
||||
|
||||
printf("%s\n", stderrpath);
|
||||
|
||||
// this is the command, it echoes pid and directs stderr output to pipe before running the tool w. args
|
||||
const char *commandtemplate = "echo $$; \"$@\" 2>%s";
|
||||
|
||||
if (communicationsPipe == errPipe)
|
||||
commandtemplate = "echo $$; \"$@\" 2>1";
|
||||
else if (errPipe == 0)
|
||||
commandtemplate = "echo $$; \"$@\"";
|
||||
|
||||
char command[1024];
|
||||
char **args;
|
||||
OSStatus result;
|
||||
int argcount = 0;
|
||||
int i;
|
||||
int stderrfd = 0;
|
||||
FILE *commPipe = 0;
|
||||
|
||||
// First, create temporary file for stderr
|
||||
if (errPipe)
|
||||
{
|
||||
// create temp file
|
||||
stderrfd = mkstemp(stderrpath);
|
||||
|
||||
// close and remove it
|
||||
close(stderrfd);
|
||||
unlink(stderrpath);
|
||||
|
||||
// create a pipe on the path of the temp file
|
||||
if (mkfifo(stderrpath,S_IRWXU | S_IRWXG) != 0)
|
||||
{
|
||||
fprintf(stderr,"Error mkfifo:%d\n", errno);
|
||||
return errAuthorizationInternal;
|
||||
}
|
||||
|
||||
if (stderrfd < 0)
|
||||
return errAuthorizationInternal;
|
||||
}
|
||||
|
||||
// Create command to be executed
|
||||
for (argcount = 0; arguments[argcount] != 0; ++argcount) {}
|
||||
args = (char**)malloc (sizeof(char*)*(argcount + 5));
|
||||
args[0] = "-c";
|
||||
snprintf (command, sizeof (command), commandtemplate, stderrpath);
|
||||
args[1] = command;
|
||||
args[2] = "";
|
||||
args[3] = (char*)pathToTool;
|
||||
for (i = 0; i < argcount; ++i) {
|
||||
args[i+4] = arguments[i];
|
||||
}
|
||||
args[argcount+4] = 0;
|
||||
|
||||
// for debugging: log the executed command
|
||||
printf ("Exec:\n%s", "/bin/sh"); for (i = 0; args[i] != 0; ++i) { printf (" \"%s\"", args[i]); } printf ("\n");
|
||||
|
||||
// Execute command
|
||||
result = AuthorizationExecuteWithPrivileges(authorization, "/bin/sh", options, args, &commPipe );
|
||||
if (result != noErr)
|
||||
{
|
||||
unlink (stderrpath);
|
||||
return result;
|
||||
}
|
||||
|
||||
// Read the first line of stdout => it's the pid
|
||||
{
|
||||
int stdoutfd = fileno (commPipe);
|
||||
char pidnum[1024];
|
||||
pid_t pid = 0;
|
||||
int i = 0;
|
||||
char ch = 0;
|
||||
|
||||
while ((read(stdoutfd, &ch, sizeof(ch)) == 1) && (ch != '\n') && (i < sizeof(pidnum)))
|
||||
{
|
||||
pidnum[i++] = ch;
|
||||
}
|
||||
pidnum[i] = 0;
|
||||
|
||||
if (ch != '\n')
|
||||
{
|
||||
// we shouldn't get there
|
||||
unlink (stderrpath);
|
||||
return errAuthorizationInternal;
|
||||
}
|
||||
sscanf(pidnum, "%d", &pid);
|
||||
if (processid)
|
||||
{
|
||||
*processid = pid;
|
||||
}
|
||||
NSLog(@"Have PID %d", pid);
|
||||
}
|
||||
|
||||
//
|
||||
if (errPipe) {
|
||||
stderrfd = open(stderrpath, O_RDONLY, 0);
|
||||
// *errPipe = fdopen(stderrfd, "r");
|
||||
//Now it's safe to unlink the stderr file, as the opened handle will be still valid
|
||||
unlink (stderrpath);
|
||||
} else {
|
||||
unlink(stderrpath);
|
||||
}
|
||||
|
||||
if (communicationsPipe)
|
||||
*communicationsPipe = commPipe;
|
||||
else
|
||||
fclose (commPipe);
|
||||
|
||||
NSLog(@"AuthExecNew function over");
|
||||
|
||||
return noErr;
|
||||
}*/
|
||||
@@ -1,5 +0,0 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
@interface PodsDummy_DJProgressHUD_OSX : NSObject
|
||||
@end
|
||||
@implementation PodsDummy_DJProgressHUD_OSX
|
||||
@end
|
||||
@@ -1,20 +0,0 @@
|
||||
#ifdef __OBJC__
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#else
|
||||
#ifndef FOUNDATION_EXPORT
|
||||
#if defined(__cplusplus)
|
||||
#define FOUNDATION_EXPORT extern "C"
|
||||
#else
|
||||
#define FOUNDATION_EXPORT extern
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#import "DJActivityIndicator.h"
|
||||
#import "DJBezierPath.h"
|
||||
#import "DJProgressHUD.h"
|
||||
#import "DJProgressIndicator.h"
|
||||
|
||||
FOUNDATION_EXPORT double DJProgressHUD_OSXVersionNumber;
|
||||
FOUNDATION_EXPORT const unsigned char DJProgressHUD_OSXVersionString[];
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
framework module DJProgressHUD_OSX {
|
||||
umbrella header "DJProgressHUD_OSX-umbrella.h"
|
||||
|
||||
export *
|
||||
module * { export * }
|
||||
}
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.0.1</string>
|
||||
<string>1.0.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
CODE_SIGN_IDENTITY =
|
||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/ITSwitch
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||
OTHER_LDFLAGS = -framework "QuartzCore"
|
||||
OTHER_LDFLAGS = $(inherited) -framework "QuartzCore"
|
||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
PODS_ROOT = ${SRCROOT}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-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>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.24.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>${CURRENT_PROJECT_VERSION}</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-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>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>${CURRENT_PROJECT_VERSION}</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
+26
-342
@@ -1,348 +1,6 @@
|
||||
# Acknowledgements
|
||||
This application makes use of the following third party libraries:
|
||||
|
||||
## DJProgressHUD_OSX
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
DJProgressHUD_OSX
|
||||
Copyright (C) 2014 Daniel Jackson
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
{signature of Ty Coon}, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
|
||||
|
||||
## ITSwitch
|
||||
|
||||
Apache License
|
||||
@@ -548,4 +206,30 @@ Apache License
|
||||
limitations under the License.
|
||||
|
||||
|
||||
|
||||
## STPrivilegedTask
|
||||
|
||||
# BSD License
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of Sveinbjorn Thordarson nor that of any other
|
||||
# contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Generated by CocoaPods - https://cocoapods.org
|
||||
|
||||
+32
-348
@@ -12,354 +12,6 @@
|
||||
<key>Type</key>
|
||||
<string>PSGroupSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>FooterText</key>
|
||||
<string> GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
DJProgressHUD_OSX
|
||||
Copyright (C) 2014 Daniel Jackson
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
{signature of Ty Coon}, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
</string>
|
||||
<key>License</key>
|
||||
<string>GNU</string>
|
||||
<key>Title</key>
|
||||
<string>DJProgressHUD_OSX</string>
|
||||
<key>Type</key>
|
||||
<string>PSGroupSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>FooterText</key>
|
||||
<string>Apache License
|
||||
@@ -572,6 +224,38 @@ Public License instead of this License.
|
||||
<key>Type</key>
|
||||
<string>PSGroupSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>FooterText</key>
|
||||
<string> # BSD License
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of Sveinbjorn Thordarson nor that of any other
|
||||
# contributors may be used to endorse or promote products
|
||||
# derived from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY
|
||||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
</string>
|
||||
<key>License</key>
|
||||
<string>BSD</string>
|
||||
<key>Title</key>
|
||||
<string>STPrivilegedTask</string>
|
||||
<key>Type</key>
|
||||
<string>PSGroupSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>FooterText</key>
|
||||
<string>Generated by CocoaPods - https://cocoapods.org</string>
|
||||
|
||||
+29
-11
@@ -3,10 +3,15 @@ set -e
|
||||
set -u
|
||||
set -o pipefail
|
||||
|
||||
function on_error {
|
||||
echo "$(realpath -mq "${0}"):$1: error: Unexpected failure"
|
||||
}
|
||||
trap 'on_error $LINENO' ERR
|
||||
|
||||
if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then
|
||||
# If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy
|
||||
# frameworks to, so exit 0 (signalling the script phase was successful).
|
||||
exit 0
|
||||
# If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy
|
||||
# frameworks to, so exit 0 (signalling the script phase was successful).
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
|
||||
@@ -36,8 +41,8 @@ install_framework()
|
||||
local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
|
||||
|
||||
if [ -L "${source}" ]; then
|
||||
echo "Symlinked..."
|
||||
source="$(readlink "${source}")"
|
||||
echo "Symlinked..."
|
||||
source="$(readlink "${source}")"
|
||||
fi
|
||||
|
||||
# Use filter instead of exclude so missing patterns don't throw errors.
|
||||
@@ -47,8 +52,13 @@ install_framework()
|
||||
local basename
|
||||
basename="$(basename -s .framework "$1")"
|
||||
binary="${destination}/${basename}.framework/${basename}"
|
||||
|
||||
if ! [ -r "$binary" ]; then
|
||||
binary="${destination}/${basename}"
|
||||
elif [ -L "${binary}" ]; then
|
||||
echo "Destination binary is symlinked..."
|
||||
dirname="$(dirname "${binary}")"
|
||||
binary="${dirname}/$(readlink "${binary}")"
|
||||
fi
|
||||
|
||||
# Strip invalid architectures so "fat" simulator / device frameworks work on device
|
||||
@@ -62,7 +72,7 @@ install_framework()
|
||||
# Embed linked Swift runtime libraries. No longer necessary as of Xcode 7.
|
||||
if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then
|
||||
local swift_runtime_libs
|
||||
swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]})
|
||||
swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u)
|
||||
for lib in $swift_runtime_libs; do
|
||||
echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\""
|
||||
rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}"
|
||||
@@ -99,10 +109,18 @@ install_dsym() {
|
||||
fi
|
||||
}
|
||||
|
||||
# Copies the bcsymbolmap files of a vendored framework
|
||||
install_bcsymbolmap() {
|
||||
local bcsymbolmap_path="$1"
|
||||
local destination="${BUILT_PRODUCTS_DIR}"
|
||||
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}""
|
||||
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}"
|
||||
}
|
||||
|
||||
# Signs a framework with the provided identity
|
||||
code_sign_if_enabled() {
|
||||
if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then
|
||||
# Use the current code_sign_identitiy
|
||||
if [ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then
|
||||
# Use the current code_sign_identity
|
||||
echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}"
|
||||
local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'"
|
||||
|
||||
@@ -131,7 +149,7 @@ strip_invalid_archs() {
|
||||
for arch in $binary_archs; do
|
||||
if ! [[ "${ARCHS}" == *"$arch"* ]]; then
|
||||
# Strip non-valid architectures in-place
|
||||
lipo -remove "$arch" -output "$binary" "$binary" || exit 1
|
||||
lipo -remove "$arch" -output "$binary" "$binary"
|
||||
stripped="$stripped $arch"
|
||||
fi
|
||||
done
|
||||
@@ -143,14 +161,14 @@ strip_invalid_archs() {
|
||||
|
||||
|
||||
if [[ "$CONFIGURATION" == "Debug" ]]; then
|
||||
install_framework "${BUILT_PRODUCTS_DIR}/DJProgressHUD_OSX/DJProgressHUD_OSX.framework"
|
||||
install_framework "${BUILT_PRODUCTS_DIR}/ITSwitch/ITSwitch.framework"
|
||||
install_framework "${BUILT_PRODUCTS_DIR}/LetsMove/LetsMove.framework"
|
||||
install_framework "${BUILT_PRODUCTS_DIR}/STPrivilegedTask/STPrivilegedTask.framework"
|
||||
fi
|
||||
if [[ "$CONFIGURATION" == "Release" ]]; then
|
||||
install_framework "${BUILT_PRODUCTS_DIR}/DJProgressHUD_OSX/DJProgressHUD_OSX.framework"
|
||||
install_framework "${BUILT_PRODUCTS_DIR}/ITSwitch/ITSwitch.framework"
|
||||
install_framework "${BUILT_PRODUCTS_DIR}/LetsMove/LetsMove.framework"
|
||||
install_framework "${BUILT_PRODUCTS_DIR}/STPrivilegedTask/STPrivilegedTask.framework"
|
||||
fi
|
||||
if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
|
||||
wait
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
CODE_SIGN_IDENTITY =
|
||||
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/DJProgressHUD_OSX" "${PODS_CONFIGURATION_BUILD_DIR}/ITSwitch" "${PODS_CONFIGURATION_BUILD_DIR}/LetsMove"
|
||||
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ITSwitch" "${PODS_CONFIGURATION_BUILD_DIR}/LetsMove" "${PODS_CONFIGURATION_BUILD_DIR}/STPrivilegedTask"
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ITSwitch/ITSwitch.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/LetsMove/LetsMove.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/STPrivilegedTask/STPrivilegedTask.framework/Headers"
|
||||
LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/../Frameworks' '@loader_path/Frameworks'
|
||||
OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/DJProgressHUD_OSX/DJProgressHUD_OSX.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/ITSwitch/ITSwitch.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/LetsMove/LetsMove.framework/Headers"
|
||||
OTHER_LDFLAGS = $(inherited) -framework "DJProgressHUD_OSX" -framework "ITSwitch" -framework "LetsMove"
|
||||
OTHER_LDFLAGS = $(inherited) -framework "ITSwitch" -framework "LetsMove" -framework "QuartzCore" -framework "STPrivilegedTask" -framework "Security"
|
||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
CODE_SIGN_IDENTITY =
|
||||
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/DJProgressHUD_OSX" "${PODS_CONFIGURATION_BUILD_DIR}/ITSwitch" "${PODS_CONFIGURATION_BUILD_DIR}/LetsMove"
|
||||
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ITSwitch" "${PODS_CONFIGURATION_BUILD_DIR}/LetsMove" "${PODS_CONFIGURATION_BUILD_DIR}/STPrivilegedTask"
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ITSwitch/ITSwitch.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/LetsMove/LetsMove.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/STPrivilegedTask/STPrivilegedTask.framework/Headers"
|
||||
LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/../Frameworks' '@loader_path/Frameworks'
|
||||
OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/DJProgressHUD_OSX/DJProgressHUD_OSX.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/ITSwitch/ITSwitch.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/LetsMove/LetsMove.framework/Headers"
|
||||
OTHER_LDFLAGS = $(inherited) -framework "DJProgressHUD_OSX" -framework "ITSwitch" -framework "LetsMove"
|
||||
OTHER_LDFLAGS = $(inherited) -framework "ITSwitch" -framework "LetsMove" -framework "QuartzCore" -framework "STPrivilegedTask" -framework "Security"
|
||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-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>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0.1</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>${CURRENT_PROJECT_VERSION}</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,5 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
@interface PodsDummy_STPrivilegedTask : NSObject
|
||||
@end
|
||||
@implementation PodsDummy_STPrivilegedTask
|
||||
@end
|
||||
@@ -0,0 +1,17 @@
|
||||
#ifdef __OBJC__
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#else
|
||||
#ifndef FOUNDATION_EXPORT
|
||||
#if defined(__cplusplus)
|
||||
#define FOUNDATION_EXPORT extern "C"
|
||||
#else
|
||||
#define FOUNDATION_EXPORT extern
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#import "STPrivilegedTask.h"
|
||||
|
||||
FOUNDATION_EXPORT double STPrivilegedTaskVersionNumber;
|
||||
FOUNDATION_EXPORT const unsigned char STPrivilegedTaskVersionString[];
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
framework module STPrivilegedTask {
|
||||
umbrella header "STPrivilegedTask-umbrella.h"
|
||||
|
||||
export *
|
||||
module * { export * }
|
||||
}
|
||||
+3
-3
@@ -1,10 +1,10 @@
|
||||
CODE_SIGN_IDENTITY =
|
||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/DJProgressHUD_OSX
|
||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/STPrivilegedTask
|
||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||
OTHER_LDFLAGS = -framework "QuartzCore"
|
||||
OTHER_LDFLAGS = $(inherited) -framework "Security"
|
||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||
PODS_ROOT = ${SRCROOT}
|
||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/DJProgressHUD_OSX
|
||||
PODS_TARGET_SRCROOT = ${PODS_ROOT}/STPrivilegedTask
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
|
||||
SKIP_INSTALL = YES
|
||||
@@ -1,13 +1,32 @@
|
||||
# Get It
|
||||
A native macOS video/audio downloader. Think of it as a youtube downloader that works on many sites.
|
||||
A macOS video/audio downloader. Think of it as a youtube downloader that works on many sites.
|
||||
|
||||
<img src="https://github.com/Kevin-De-Koninck/Get-It/blob/master/ReadMe%20Resources/MainWindow.png?raw=true" height="400" /><img src="https://github.com/Kevin-De-Koninck/Get-It/blob/master/ReadMe%20Resources/Settings.png?raw=true" height="400" />
|
||||
|
||||
**Note**: Get It requires _Homebrew_. The required dependencies will be installed with _Homebrew_.
|
||||
|
||||
# Installation
|
||||
|
||||
Download it [here](https://github.com/Kevin-De-Koninck/Get-It/releases/download/v0.5.3/Get.It.app.zip), unzip it and open it.
|
||||
If a yellow package button is visible on the main screen, click on it and follow the guide (to install the dependencies).
|
||||
Download it [here](https://github.com/Kevin-De-Koninck/Get-It/releases/download/v0.6.1/Get.It.app.zip), unzip it and open it.
|
||||
To install the dependencies required to run the software, please open the settings in the app and click on 'Install/update software'. This will not update Get It, but it will update all dependencies.
|
||||
|
||||
## dependencies
|
||||
|
||||
Get It requires the following dependencies which you can install from within the app, or using the command line yourself (see below).
|
||||
The following list is required:
|
||||
- xcode-select
|
||||
- brew
|
||||
- python
|
||||
- python3
|
||||
- pycrypt
|
||||
- youtube-dl
|
||||
- libav
|
||||
- ffmpeg
|
||||
|
||||
To install the dependencies yourself, open the Terminal app and paste the following command:
|
||||
``` bash
|
||||
if ! xcode-select -v &> /dev/null; then xcode-select --install; fi; if brew -v &> /dev/null; then brew update; else echo /usr/bin/ruby -e '$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)'; fi; if brew ls --versions python &> /dev/null; then brew upgrade python; else brew install python; brew link python; fi; if brew ls --versions python3 &> /dev/null; then brew upgrade python3; else brew install python3; fi; if pip2.7 list | grep -i pycrypt &> /dev/null; then pip2.7 install pycrypt --upgrade; else pip2.7 install pycrypt; fi; if youtube-dl --version &> /dev/null; then brew upgrade youtube-dl; else brew install youtube-dl; fi; if brew list libav &> /dev/null; then brew upgrade libav; else brew install libav; fi; if brew list ffmpeg &> /dev/null; then brew upgrade ffmpeg; else brew install ffmpeg; fi
|
||||
```
|
||||
|
||||
|
||||
# About
|
||||
@@ -16,12 +35,19 @@ Get It will download audio and/or movies from many websites such as YouTube, BBC
|
||||
It will save your settings dynamically or you can restore the default settings. The default settings will download the audio from a video, convert it to an MP3 and save it to you downloads folder. This was, in my opinion, the mostly used setting.
|
||||
|
||||
|
||||
# Installation Guide
|
||||
|
||||
Get It will check if the dependencies that it needs are installed. If not all dependencies are installed, there will be a package icon in the main window that you can click. This button will load a simple installation guide that will guide you through the installation of the missing dependencies. If a dependency is already installed on your Mac, than the guide will not show this to avoid over complicating it.
|
||||
the following image is a screenshot of a step in the installation guide:
|
||||
<img src="https://github.com/Kevin-De-Koninck/Get-It/blob/master/ReadMe%20Resources/InstallationGuide.png?raw=true" width="400" />
|
||||
# Submit a bug
|
||||
|
||||
You can submit a bug here on Github. Please provide the following:
|
||||
- The URL(s) that you try to download.
|
||||
- Your settings.
|
||||
|
||||
Also, open the Terminal app on your MacBook and issue the following command:
|
||||
```
|
||||
cat /tmp/getit_logs
|
||||
```
|
||||
|
||||
Provide the output of the first command of you have an issue while installing the required software and provide the output of the second command of you have problems while downloading your URLs.
|
||||
|
||||
# THANKS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user