From 69ba4190a620716ff7bc49ec8d9fc5100c6b1d45 Mon Sep 17 00:00:00 2001 From: Serhiy Mytrovtsiy Date: Tue, 1 Jun 2021 19:00:55 +0200 Subject: [PATCH] feat: include SMC in the Stats feat: add SMC command to the Makefile --- .gitignore | 1 + Makefile | 8 ++- Stats.xcodeproj/project.pbxproj | 24 ++++--- .../xcshareddata/xcschemes/CPU.xcscheme | 67 ------------------- Stats/Supporting Files/Info.plist | 2 +- 5 files changed, 22 insertions(+), 80 deletions(-) delete mode 100644 Stats.xcodeproj/xcshareddata/xcschemes/CPU.xcscheme diff --git a/.gitignore b/.gitignore index 8b1d1520..53559544 100644 --- a/.gitignore +++ b/.gitignore @@ -10,5 +10,6 @@ Stats.app create-dmg dSYMs.zip Stats.dmg.zip +smc Cartfile.resolved \ No newline at end of file diff --git a/Makefile b/Makefile index 65830b64..32dabd85 100644 --- a/Makefile +++ b/Makefile @@ -5,8 +5,8 @@ BUILD_PATH = $(PWD)/build APP_PATH = "$(BUILD_PATH)/$(APP).app" ZIP_PATH = "$(BUILD_PATH)/$(APP).zip" -.SILENT: archive notarize sign prepare-dmg prepare-dSYM clean next-version check history disk -.PHONY: build archive notarize sign prepare-dmg prepare-dSYM clean next-version check history open +.SILENT: archive notarize sign prepare-dmg prepare-dSYM clean next-version check history disk smc +.PHONY: build archive notarize sign prepare-dmg prepare-dSYM clean next-version check history open smc build: clean next-version archive notarize sign prepare-dmg prepare-dSYM open @@ -126,3 +126,7 @@ open: osascript -e 'display notification "Stats signed and ready for distribution" with title "Build the Stats"' echo "Opening working folder..." open $(PWD) + +smc: + $(MAKE) --directory=./smc + open $(PWD)/smc \ No newline at end of file diff --git a/Stats.xcodeproj/project.pbxproj b/Stats.xcodeproj/project.pbxproj index edef430b..3071dd39 100644 --- a/Stats.xcodeproj/project.pbxproj +++ b/Stats.xcodeproj/project.pbxproj @@ -21,6 +21,7 @@ 9A20E6DA2575555100AC2302 /* PieChart.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A20E6D92575555100AC2302 /* PieChart.swift */; }; 9A27D4FD2538A3E5001BB651 /* Repeat in Frameworks */ = {isa = PBXBuildFile; productRef = 9A27D4FC2538A3E5001BB651 /* Repeat */; }; 9A27D5352538A456001BB651 /* Reachability in Frameworks */ = {isa = PBXBuildFile; productRef = 9A27D5342538A456001BB651 /* Reachability */; }; + 9A2843E52666959B00EC1F6D /* smc in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9ADE6FD8265D032100D2FBA8 /* smc */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; 9A34353B243E278D006B19F9 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A34353A243E278D006B19F9 /* main.swift */; }; 9A34353C243E27E8006B19F9 /* LaunchAtLogin.app in Copy Files */ = {isa = PBXBuildFile; fileRef = 9A343527243E26A0006B19F9 /* LaunchAtLogin.app */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 9A3E17C1247A8F5E00449CD1 /* StatsKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A0C82DA24460F7200FAE3D4 /* StatsKit.framework */; }; @@ -326,6 +327,16 @@ /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ + 9A2843E42666959600EC1F6D /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 7; + files = ( + 9A2843E52666959B00EC1F6D /* smc in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 9A6698E72326AB16001D00E1 /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; @@ -357,15 +368,6 @@ name = "Copy Files"; runOnlyForDeploymentPostprocessing = 0; }; - 9ADE6FD6265D032100D2FBA8 /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = /usr/share/man/man1/; - dstSubfolderSpec = 0; - files = ( - ); - runOnlyForDeploymentPostprocessing = 1; - }; 9AECEF3D24ACF98800DB95D4 /* Copy Files */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; @@ -1027,6 +1029,7 @@ 9A6698E72326AB16001D00E1 /* Embed Frameworks */, 9AECEF3D24ACF98800DB95D4 /* Copy Files */, 9A88E2672659002E00E2B7B0 /* ShellScript */, + 9A2843E42666959600EC1F6D /* CopyFiles */, ); buildRules = ( ); @@ -1217,7 +1220,6 @@ buildPhases = ( 9ADE6FD4265D032100D2FBA8 /* Sources */, 9ADE6FD5265D032100D2FBA8 /* Frameworks */, - 9ADE6FD6265D032100D2FBA8 /* CopyFiles */, ); buildRules = ( ); @@ -2624,6 +2626,7 @@ PRODUCT_BUNDLE_IDENTIFIER = eu.exelban.Stats.SMC; PRODUCT_NAME = smc; PROVISIONING_PROFILE_SPECIFIER = ""; + SKIP_INSTALL = YES; SWIFT_VERSION = 5.0; }; name = Debug; @@ -2641,6 +2644,7 @@ PRODUCT_BUNDLE_IDENTIFIER = eu.exelban.Stats.SMC; PRODUCT_NAME = smc; PROVISIONING_PROFILE_SPECIFIER = ""; + SKIP_INSTALL = YES; SWIFT_VERSION = 5.0; }; name = Release; diff --git a/Stats.xcodeproj/xcshareddata/xcschemes/CPU.xcscheme b/Stats.xcodeproj/xcshareddata/xcschemes/CPU.xcscheme deleted file mode 100644 index 23c5cefd..00000000 --- a/Stats.xcodeproj/xcshareddata/xcschemes/CPU.xcscheme +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Stats/Supporting Files/Info.plist b/Stats/Supporting Files/Info.plist index 6d1dd711..6348e4f2 100755 --- a/Stats/Supporting Files/Info.plist +++ b/Stats/Supporting Files/Info.plist @@ -17,7 +17,7 @@ CFBundleShortVersionString $(MARKETING_VERSION) CFBundleVersion - 259 + 269 Description Simple macOS system monitor in your menu bar LSApplicationCategoryType