py: Remove unused imports

This commit is contained in:
Mykola Grymalyuk
2022-06-01 09:46:43 -06:00
parent 2768090383
commit 1ea3062ca5
11 changed files with 13 additions and 17 deletions

View File

@@ -1,6 +1,5 @@
# Commands for building the EFI and SMBIOS
# Copyright (C) 2020-2022, Dhinak G, Mykola Grymalyuk
from __future__ import print_function
import binascii
import copy
@@ -1003,6 +1002,11 @@ class BuildOpenCore:
# Ensure this is done at the end so all previous RestrictEvents patches are applied
# RestrictEvents and EFICheckDisabler will confilict if both are injected
self.enable_kext("EFICheckDisabler.kext", self.constants.restrictevents_version, self.constants.efi_disabler_path)
if self.constants.set_vmm_cpuid is True:
# Should be unneeded with our sysctl VMM patch, however for reference purposes we'll leave it here
# Ref: https://forums.macrumors.com/threads/opencore-on-the-mac-pro.2207814/
self.config["Kernel"]["Emulate"]["Cpuid1Data"] = binascii.unhexlify("00000000000000000000008000000000")
self.config["Kernel"]["Emulate"]["Cpuid1Mask"] = binascii.unhexlify("00000000000000000000008000000000")
def set_smbios(self):
spoofed_model = self.model

View File

@@ -1,7 +1,6 @@
# Handle misc CLI menu options
# Copyright (C) 2020-2022, Dhinak G, Mykola Grymalyuk
import sys
import subprocess
from resources import constants, install, utilities, defaults, sys_patch, installer, tui_helpers, global_settings
from data import cpu_data, smbios_data, model_array, os_data, mirror_data

View File

@@ -2,8 +2,6 @@
# Define Files
# Copyright (C) 2020-2022, Dhinak G, Mykola Grymalyuk
from __future__ import print_function
from pathlib import Path
from typing import Optional
@@ -194,6 +192,7 @@ class Constants:
self.needs_to_open_preferences = False # Determine if preferences need to be opened
self.host_is_hackintosh = False # Determine if host is Hackintosh
self.commit_info = (None, None, None)
self.set_vmm_cpuid = False # Set VMM bit inside CPUID
self.legacy_accel_support = [
os_data.os_data.big_sur,

View File

@@ -1,8 +1,6 @@
# Hardware probing
# Copyright (C) 2020-2022, Dhinak G, Mykola Grymalyuk
from __future__ import annotations
import binascii
import enum
import itertools

View File

@@ -1,8 +1,6 @@
# PyObjc Handling for IOKit
# Copyright (C) 2020-2022, Dhinak G
from __future__ import annotations
from typing import NewType, Union
import objc

View File

@@ -1,7 +1,5 @@
# Copyright (C) 2020-2022, Dhinak G, Mykola Grymalyuk
from __future__ import print_function
import subprocess
import sys
from pathlib import Path

View File

@@ -8,11 +8,15 @@
# We perform our required edits, then create a new snapshot for the system boot
# The manual process is as follows:
# 1. Mount the APFS volume as a read/write volume
# 1. Find the Root Volume
# 'diskutil info / | grep "Device Node:"'
# 2. Convert Snapshot Device Node to Root Volume Device Node
# /dev/disk3s1s1 -> /dev/disk3s1 (strip last 's1')
# 3. Mount the APFS volume as a read/write volume
# 'sudo mount -o nobrowse -t apfs /dev/disk5s5 /System/Volumes/Update/mnt1'
# 2. Perform edits to the system (ie. create new KernelCollection)
# 4. Perform edits to the system (ie. create new KernelCollection)
# 'sudo kmutil install --volume-root /System/Volumes/Update/mnt1/ --update-all'
# 3. Create a new snapshot for the system boot
# 5. Create a new snapshot for the system boot
# 'sudo bless --folder /System/Volumes/Update/mnt1/System/Library/CoreServices --bootefi --create-snapshot'
# Additionally Apple's APFS snapshot system supports system rollbacks:

View File

@@ -1,7 +1,6 @@
# Download PatcherSupportPkg for usage with Root Patching
# Copyright (C) 2020-2022, Dhinak G, Mykola Grymalyuk
from data import os_data
from resources import utilities
from pathlib import Path
import shutil

View File

@@ -3,7 +3,6 @@
# Call check_binary_updates() to determine if any updates are available
# Returns dict with Link and Version of the latest binary update if available
import requests
from pathlib import Path
class check_binary_updates:

View File

@@ -1,5 +1,4 @@
# Copyright (C) 2020-2022, Dhinak G, Mykola Grymaluk
from __future__ import print_function
import hashlib
import math