Skip to content

Commit

Permalink
Merge branch 'deployment-target-macos-12' into deployment-target-maco…
Browse files Browse the repository at this point in the history
…s-13
  • Loading branch information
F1248 committed Jan 30, 2025
2 parents d6fc02d + 33ef959 commit ac680b1
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Genius/Extensions/Foundation/Process.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ extension Process {
self.executableURL = executableURL
self.arguments = arguments
}
self.qualityOfService = .userInitiated
}

func runSafe() -> String? {
Expand All @@ -46,7 +47,7 @@ extension Process {
waitUntilExit()
let errorPipeData = errorPipe.read()
let outputPipeData = outputPipe.read()
guard terminationStatus == 0, errorPipeData == nil, let outputPipeData else {
guard terminationStatus == 0, terminationReason == .exit, errorPipeData == nil, let outputPipeData else {
logError(outputPipeData: outputPipeData, errorPipeData: errorPipeData)
return nil
}
Expand Down
16 changes: 16 additions & 0 deletions Genius/Models/Helpers/IORegistryName.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//
// IORegistryName.swift
// Genius
//
// © 2025 F1248 <[email protected]>
// See LICENSE.txt for license information.
//

enum IORegistryName {

static let nvramVariables: String =
switch SystemInformation.Hardware.CPU.type.value {
case .appleSilicon: "IODTNVRAMVariables"
case .intel: "AppleEFINVRAM"
}
}
2 changes: 1 addition & 1 deletion Genius/Models/SystemInformation/MaintenanceChecks.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ extension SystemInformation {
enum TheftProtection {

static let activationLock = SystemInformationData<Bool?>(
IORegistry(class: "IODTNVRAMVariables").keyExists("fmm-mobileme-token-FMM"),
IORegistry(class: IORegistryName.nvramVariables).keyExists("fmm-mobileme-token-FMM"),
applicable: Hardware.securityChip.value >=? .t2 &&? !?Hardware.Model.isVirtualMachine.value
)
static let firmwarePassword = SystemInformationData<Bool?>(
Expand Down
11 changes: 10 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ set -e

echo "
Preparing..."
if [ -e /usr/bin/osascript ]; then
for _ in $(pgrep -x Genius); do
osascript -e "quit app \"Genius\""
done
else
if pgrep -x Genius; then
killall Genius
fi
fi
if [ -w /Applications ]; then
cd /Applications
else
Expand All @@ -21,7 +30,7 @@ else
fi

echo "Downloading..."
curl --silent --remote-name --location https://nightly.link/F1248/Genius/workflows/Build-Genius/deployment-target-macos-13/Genius.zip
curl --no-progress-meter --remote-name --location https://nightly.link/F1248/Genius/workflows/Build-Genius/deployment-target-macos-13/Genius.zip

echo "Installing..."
unzip -q -o Genius.zip
Expand Down

0 comments on commit ac680b1

Please sign in to comment.