diff --git a/.github/workflows/test_only.yml b/.github/workflows/test_only.yml new file mode 100644 index 00000000..c65710ed --- /dev/null +++ b/.github/workflows/test_only.yml @@ -0,0 +1,88 @@ +name: Test Only + +on: [push] + +jobs: + build: + runs-on: macOS-latest + + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + + # - uses: actions/cache@v1 + # with: + # path: vendor/bundle + # key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }} + # restore-keys: | + # ${{ runner.os }}-gem- + + # - uses: actions/cache@v1 + # with: + # path: Pods + # key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} + # restore-keys: | + # ${{ runner.os }}-pods- + + - name: Install gems + run: | + # bundle config path vendor/bundle + # bundle config set without 'default doc job cable storage ujs test db' + # bundle install --jobs 4 --retry 3 + gem install cocoapods + gem install cocoapods-prune-localizations + + - name: Install Dependences + run: | + # bundle exec pod update + # bundle exec pod install + pod update + pod install + + - name: Clean and Build + run: | + xcodebuild \ + CODE_SIGN_IDENTITY="" \ + CODE_SIGNING_REQUIRED=NO \ + -parallelizeTargets + -workspace SelfControl.xcworkspace \ + -scheme "SelfControl" \ + -configuration "Release" \ + clean build + + # v2 + # - name: Install Dependences + # run: | + # sudo gem install cocoapods cocoapods-prune-localizations + # pod setup + # pod update + # pod install + + # - name: Clean and Build + # run: | + # xcodebuild \ + # CODE_SIGN_IDENTITY="" \ + # CODE_SIGNING_REQUIRED=NO \ + # -workspace SelfControl.xcworkspace \ + # -scheme "SelfControl" \ + # -configuration Release \ + # clean build + + # - name: Build + # uses: sersoft-gmbh/xcodebuild-action@v1.4 + # with: + # project: SelfControl.xcodeproj + # scheme: SelfControl + # destination: platform=macOS + # action: build + + # # https://github.com/mxcl/xcodebuild + # - name: Build + # uses: mxcl/xcodebuild@v1 + # with: + # xcode: ^12 + # platform: macOS + # action: build + # code-coverage: false + # configuration: release diff --git a/Gemfile b/Gemfile new file mode 100644 index 00000000..1e9c2174 --- /dev/null +++ b/Gemfile @@ -0,0 +1,4 @@ +source 'https://rubygems.org' + +gem "cocoapods-binary-cache", :git => "https://github.com/grab/cocoapods-binary-cache.git", :tag => "0.1.14" +gem 'cocoapods-prune-localizations' diff --git a/Podfile b/Podfile index bccb1be6..d58d1fe7 100644 --- a/Podfile +++ b/Podfile @@ -1,4 +1,4 @@ -source 'https://github.com/CocoaPods/Specs.git' +source 'https://cdn.cocoapods.org/' minVersion = '10.10' @@ -10,12 +10,12 @@ plugin 'cocoapods-prune-localizations', { :localizations => supported_locales } target "SelfControl" do use_frameworks! :linkage => :static - pod 'MASPreferences', '~> 1.1.4' + pod 'MASPreferences', :git => 'https://github.com/shpakovski/MASPreferences', :tag => '1.3' pod 'TransformerKit', '~> 1.1.1' pod 'FormatterKit/TimeIntervalFormatter', '~> 1.8.0' pod 'LetsMove', '~> 1.24' - pod 'Sentry', :git => 'https://github.com/getsentry/sentry-cocoa.git', :tag => '7.0.3' - + pod 'Sentry', :git => 'https://github.com/getsentry/sentry-cocoa.git', :tag => '7.3.0' + # Add test target target 'SelfControlTests' do inherit! :complete @@ -24,19 +24,19 @@ end target "SelfControl Killer" do use_frameworks! :linkage => :static - pod 'Sentry', :git => 'https://github.com/getsentry/sentry-cocoa.git', :tag => '7.0.3' + pod 'Sentry', :git => 'https://github.com/getsentry/sentry-cocoa.git', :tag => '7.3.0' end # we can't use_frameworks on these because they're command-line tools # Sentry says we need use_frameworks, but they seem to work OK anyway? target "SCKillerHelper" do - pod 'Sentry', :git => 'https://github.com/getsentry/sentry-cocoa.git', :tag => '7.0.3' + pod 'Sentry', :git => 'https://github.com/getsentry/sentry-cocoa.git', :tag => '7.3.0' end target "selfcontrol-cli" do - pod 'Sentry', :git => 'https://github.com/getsentry/sentry-cocoa.git', :tag => '7.0.3' + pod 'Sentry', :git => 'https://github.com/getsentry/sentry-cocoa.git', :tag => '7.3.0' end target "org.eyebeam.selfcontrold" do - pod 'Sentry', :git => 'https://github.com/getsentry/sentry-cocoa.git', :tag => '7.0.3' + pod 'Sentry', :git => 'https://github.com/getsentry/sentry-cocoa.git', :tag => '7.3.0' end post_install do |pi| diff --git a/PreferencesAdvancedViewController.h b/PreferencesAdvancedViewController.h index 63ade777..c8070793 100644 --- a/PreferencesAdvancedViewController.h +++ b/PreferencesAdvancedViewController.h @@ -7,8 +7,8 @@ // #import -#import "MASPreferencesViewController.h" +#import @interface PreferencesAdvancedViewController : NSViewController - + @end diff --git a/README.md b/README.md index d524ae04..6acb4f3d 100755 --- a/README.md +++ b/README.md @@ -1,28 +1,43 @@ -[SelfControl](http://selfcontrolapp.com) -=========== +# [SelfControl](http://selfcontrolapp.com) -About ------ -SelfControl is a free and open-source application for macOS that lets you block your own access to distracting websites, your mail servers, or anything else on the Internet. Just set a period of time to block for, add sites to your blocklist, and click "Start." Until that timer expires, you will be unable to access those sites—even if you restart your computer or delete the application. +## About + +SelfControl is a free and open-source application for macOS that lets you block **your own** access to distracting websites, your mail servers, or anything else on the Internet. Just set a period of time to block for, add sites to your blocklist, and click "Start." Until that timer expires, you will be unable to access those sites—even if you restart your computer or delete the application. + +## Credits -Credits -------- Developed by [Charlie Stigler](http://charliestigler.com), [Steve Lambert](http://visitsteve.com), and [others](https://github.com/SelfControlApp/selfcontrol/graphs/contributors). Your contributions very welcome! SelfControl is now available in 12 languages thanks to [the fine translators credited here](https://github.com/SelfControlApp/selfcontrol/wiki/Translation-Credits). -License -------- -SelfControl is free software under the GPL. See [this file](https://github.com/SelfControlApp/selfcontrol/blob/master/COPYING) for more details. +## License + +SelfControl is free software under the GPL. See [this file](COPYING) for more details. -Building For Development --------------------- +## Building For Development Users should always download the latest version of SelfControl from [our website]. If you want to contribute to SelfControl, you'll need to learn to build it for development. This can only be done on a Mac running a modern version of macOS. 1. Clone the SelfControl repo from GitHub. + + ```sh + git clone --recurse-submodules -j8 https://github.com/SelfControlApp/selfcontrol.git + ``` + 2. Make sure you have a recent version of Xcode and the Xcode command-line tools installed. -3. Install [CocoaPods](https://cocoapods.org/): `sudo gem install cocoapods` -4. Install the SelfControl dependencies using CocoaPods: `pod install` + +3. Install [CocoaPods](https://cocoapods.org/) + + ```sh + sudo gem install cocoapods + ``` + +4. Install the SelfControl dependencies using CocoaPods + + ```sh + pod install + ``` + 5. Open the `selfcontrol.xcworkspace` file (NOT `selfcontrol.xcodeproj`) + 6. Build and run (you may need to update/remove code signing settings to make it build properly) diff --git a/SelfControl.xcodeproj/project.pbxproj b/SelfControl.xcodeproj/project.pbxproj index dd3dcdc4..7b4ee87f 100644 --- a/SelfControl.xcodeproj/project.pbxproj +++ b/SelfControl.xcodeproj/project.pbxproj @@ -3028,7 +3028,6 @@ LastUpgradeCheck = 0930; TargetAttributes = { 8D1107260486CEB800E47090 = { - DevelopmentTeam = L6W5L88KN7; LastSwiftMigration = 1150; ProvisioningStyle = Manual; SystemCapabilities = { @@ -3039,25 +3038,20 @@ }; CB0EEF5C20FD8CE00024D27B = { CreatedOnToolsVersion = 9.4.1; - DevelopmentTeam = L6W5L88KN7; ProvisioningStyle = Automatic; }; CB74D1052480E506002B2079 = { - DevelopmentTeam = L6W5L88KN7; ProvisioningStyle = Manual; }; CB9C80F619CFB79700CDCAE1 = { CreatedOnToolsVersion = 6.0.1; - DevelopmentTeam = L6W5L88KN7; ProvisioningStyle = Automatic; }; CB9C811A19CFBA8500CDCAE1 = { CreatedOnToolsVersion = 6.0.1; - DevelopmentTeam = L6W5L88KN7; ProvisioningStyle = Manual; }; CBA2AFD10F39EC12005AFEBE = { - DevelopmentTeam = L6W5L88KN7; ProvisioningStyle = Manual; }; }; @@ -4056,12 +4050,10 @@ buildSettings = { CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; - CODE_SIGN_IDENTITY = "Developer ID Application"; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 406; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = L6W5L88KN7; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(SRCROOT)", @@ -4093,7 +4085,6 @@ COMBINE_HIDPI_IMAGES = YES; CURRENT_PROJECT_VERSION = 406; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = L6W5L88KN7; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(SRCROOT)", @@ -4140,7 +4131,6 @@ CODE_SIGN_IDENTITY = "Mac Developer"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = L6W5L88KN7; ENABLE_HARDENED_RUNTIME = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; @@ -4190,7 +4180,6 @@ CODE_SIGN_IDENTITY = "Mac Developer"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = L6W5L88KN7; ENABLE_HARDENED_RUNTIME = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; @@ -4283,12 +4272,10 @@ buildSettings = { CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; - CODE_SIGN_IDENTITY = "Developer ID Application"; CODE_SIGN_STYLE = Manual; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 406; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = L6W5L88KN7; GCC_DYNAMIC_NO_PIC = NO; GCC_MODEL_TUNING = G5; GCC_NO_COMMON_BLOCKS = NO; @@ -4326,12 +4313,10 @@ buildSettings = { CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; - CODE_SIGN_IDENTITY = "Developer ID Application"; - CODE_SIGN_STYLE = Manual; + CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 406; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = L6W5L88KN7; GCC_MODEL_TUNING = G5; GCC_NO_COMMON_BLOCKS = NO; GCC_PRECOMPILE_PREFIX_HEADER = YES; @@ -4382,7 +4367,6 @@ CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; CURRENT_PROJECT_VERSION = 406; - DEVELOPMENT_TEAM = ""; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; @@ -4428,7 +4412,6 @@ COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = YES; CURRENT_PROJECT_VERSION = 406; - DEVELOPMENT_TEAM = L6W5L88KN7; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; @@ -4464,8 +4447,6 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = "Developer ID Application"; - DEVELOPMENT_TEAM = L6W5L88KN7; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; @@ -4509,7 +4490,6 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = YES; - DEVELOPMENT_TEAM = L6W5L88KN7; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; @@ -4534,12 +4514,10 @@ buildSettings = { CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; - CODE_SIGN_IDENTITY = "Developer ID Application"; COPY_PHASE_STRIP = NO; CREATE_INFOPLIST_SECTION_IN_BINARY = YES; CURRENT_PROJECT_VERSION = 406; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = L6W5L88KN7; FRAMEWORK_SEARCH_PATHS = ( "$(PLATFORM_DIR)/Developer/Library/Frameworks\n\n$(PLATFORM_DIR)/Developer/Library/Frameworks\n\n", ); @@ -4574,7 +4552,6 @@ CREATE_INFOPLIST_SECTION_IN_BINARY = YES; CURRENT_PROJECT_VERSION = 406; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = L6W5L88KN7; FRAMEWORK_SEARCH_PATHS = ( "$(PLATFORM_DIR)/Developer/Library/Frameworks\n\n$(PLATFORM_DIR)/Developer/Library/Frameworks\n\n", );