From f29fb15315bc8b298d6cccdb2b8bbf5c1ecae6cf Mon Sep 17 00:00:00 2001 From: Mingye Wang Date: Fri, 25 Nov 2022 09:39:15 +0800 Subject: [PATCH] Add warnings for missing RC/IASL My network's shit so it really has a tendency to run without it. The download error display is somehow never useful, so add warnings at compile time. We could be more helpful and say stuff like "do this to compile without going through the selection", but lazy lazy stuff boring. --- CPUFriendFriend.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CPUFriendFriend.py b/CPUFriendFriend.py index 4b73120..fcd6002 100755 --- a/CPUFriendFriend.py +++ b/CPUFriendFriend.py @@ -1,5 +1,6 @@ #!/usr/bin/env python import os, sys, plistlib, zipfile, tempfile, binascii, shutil +from warnings import warn from Scripts import * class CPUFF: @@ -43,7 +44,7 @@ def check_iasl(self,try_downloading=True): try: self._download_and_extract(temp,self.iasl_url) except Exception as e: - print("An error occurred :(\n - {}".format(e)) + warn("An error occurred :(\n - {}".format(e)) shutil.rmtree(temp, ignore_errors=True) # Check again after downloading return self.check_iasl(try_downloading=False) @@ -336,8 +337,12 @@ def main(self): out = self.r.run({"args":[self.iasl,x]}) if out[2] != 0: print(out[1]) + else: + warn("iasl not found, SSDT not compiled. Network issue?") os.chdir(cwd) self.r.run({"args":["open",self.out]}) + else: + warn("ResourceConverter not found, Kext not compiled. Network issue?") print("") print("Done.") exit()