mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-15 00:34:08 +09:00
- disable library validation (fix Intel Power Gadget check)
- adjust CPU frequency visibility
This commit is contained in:
@@ -159,6 +159,10 @@ internal class Popup: NSView {
|
||||
|
||||
public func loadCallback(_ value: CPU_Load, tempValue: Double?, frequency: Double?) {
|
||||
DispatchQueue.main.async(execute: {
|
||||
if frequency != nil && (self.frequencyCircle! as NSView).isHidden {
|
||||
(self.frequencyCircle! as NSView).isHidden = false
|
||||
}
|
||||
|
||||
if (self.window?.isVisible ?? false) || !self.initialized {
|
||||
self.systemField?.stringValue = "\(Int(value.systemLoad.rounded(toPlaces: 2) * 100)) %"
|
||||
self.userField?.stringValue = "\(Int(value.userLoad.rounded(toPlaces: 2) * 100)) %"
|
||||
@@ -185,7 +189,6 @@ internal class Popup: NSView {
|
||||
if let freqCircle = self.frequencyCircle {
|
||||
freqCircle.setValue((100*freq)/self.maxFreq)
|
||||
freqCircle.setText("\((freq/1000).rounded(toPlaces: 2))\nGHz")
|
||||
(freqCircle as NSView).isHidden = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
9A0C82EE2446124800FAE3D4 /* SystemKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A7D0CB62444C2C800B09070 /* SystemKit.swift */; };
|
||||
9A1A7ABA24561F0B00A84F7A /* BarChart.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A1A7AB924561F0B00A84F7A /* BarChart.swift */; };
|
||||
9A1D5E4B25235C8100B82BFC /* helpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A1D5E4A25235C8100B82BFC /* helpers.swift */; };
|
||||
9A27D49D25389E08001BB651 /* IntelPowerGadget.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A97CE2A25371B2300742D8F /* IntelPowerGadget.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
|
||||
9A313BF7247EF01800DB5101 /* Reachability.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A5349CD23D8832E00C23824 /* Reachability.framework */; };
|
||||
9A313BF8247EF01800DB5101 /* Reachability.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9A5349CD23D8832E00C23824 /* Reachability.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
9A34353B243E278D006B19F9 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A34353A243E278D006B19F9 /* main.swift */; };
|
||||
@@ -83,7 +84,6 @@
|
||||
9A97CF082537351600742D8F /* ModuleKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9AABEADD243FB13500668CB0 /* ModuleKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
9A97CF0C2537351800742D8F /* StatsKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A0C82DA24460F7200FAE3D4 /* StatsKit.framework */; };
|
||||
9A97CF0D2537351800742D8F /* StatsKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9A0C82DA24460F7200FAE3D4 /* StatsKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
9A97CF122537352100742D8F /* IntelPowerGadget.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A97CE2A25371B2300742D8F /* IntelPowerGadget.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
|
||||
9A97CF2A25373C8400742D8F /* CPU.c in Sources */ = {isa = PBXBuildFile; fileRef = 9A97CF2925373C8400742D8F /* CPU.c */; };
|
||||
9A9B25BB24F7DE2B00C3CCE6 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 9A9B25BD24F7DE2B00C3CCE6 /* Localizable.strings */; };
|
||||
9A9D728A24471FAE005CF997 /* SMC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A9D728924471FAE005CF997 /* SMC.swift */; };
|
||||
@@ -460,6 +460,7 @@
|
||||
9A17EECB25363D5F003F1C19 /* IntelPowerGadget.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IntelPowerGadget.framework; path = System/Library/Frameworks/IntelPowerGadget.framework; sourceTree = "<group>"; };
|
||||
9A1A7AB924561F0B00A84F7A /* BarChart.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BarChart.swift; sourceTree = "<group>"; };
|
||||
9A1D5E4A25235C8100B82BFC /* helpers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = helpers.swift; sourceTree = "<group>"; };
|
||||
9A27D4A925389EFD001BB651 /* Stats.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Stats.entitlements; sourceTree = "<group>"; };
|
||||
9A343527243E26A0006B19F9 /* LaunchAtLogin.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LaunchAtLogin.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
9A343535243E26A0006B19F9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
9A343536243E26A0006B19F9 /* LaunchAtLogin.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = LaunchAtLogin.entitlements; sourceTree = "<group>"; };
|
||||
@@ -619,8 +620,8 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
9A97CF122537352100742D8F /* IntelPowerGadget.framework in Frameworks */,
|
||||
9A97CF072537351600742D8F /* ModuleKit.framework in Frameworks */,
|
||||
9A27D49D25389E08001BB651 /* IntelPowerGadget.framework in Frameworks */,
|
||||
9A97CF0C2537351800742D8F /* StatsKit.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@@ -751,6 +752,7 @@
|
||||
children = (
|
||||
9A6CFC0022A1C9F5001E782D /* Assets.xcassets */,
|
||||
9AABEB7D243FDEF100668CB0 /* main.swift */,
|
||||
9A27D4A925389EFD001BB651 /* Stats.entitlements */,
|
||||
9A141101229E721200D29793 /* Info.plist */,
|
||||
9A9B25BD24F7DE2B00C3CCE6 /* Localizable.strings */,
|
||||
);
|
||||
@@ -1894,7 +1896,7 @@
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_ENTITLEMENTS = "";
|
||||
CODE_SIGN_ENTITLEMENTS = "Stats/Supporting Files/Stats.entitlements";
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
@@ -1927,7 +1929,7 @@
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_ENTITLEMENTS = "";
|
||||
CODE_SIGN_ENTITLEMENTS = "Stats/Supporting Files/Stats.entitlements";
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
|
||||
8
Stats/Supporting Files/Stats.entitlements
Normal file
8
Stats/Supporting Files/Stats.entitlements
Normal file
@@ -0,0 +1,8 @@
|
||||
<?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>com.apple.security.cs.disable-library-validation</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
Reference in New Issue
Block a user