2009-Nissan-Cube / About-This-Hack

Discover your hardware on macOS with this simple, user-friendly hardware info app that retains the beloved design language of the classic 'About This Mac' interface, while gaining access to a wealth of additional features.
MIT License
283 stars 23 forks source link

"Bootloader" section says "Apple UEFI" if Clover is used as a Bootloader #74

Closed 5T33Z0 closed 1 year ago

5T33Z0 commented 1 year ago

→ see Screenshot Clover

matxpa commented 1 year ago

@5T33Z0 @0xCUB3 @MDNich

Hi 2 different reasons to get this behavior \: (but I'm certain you know below things)

Capture d’écran 2023-10-25 à 09 30 53

May be other(s) reason(s) ? If someone knows ...

Regards

5T33Z0 commented 1 year ago

@matxpa Thanks for your explanations. In my case, bdmsg was missing since I am not using the Clover installer. I did the following to fix the issue:

matxpa commented 1 year ago

@5T33Z0 @0xCUB3 @MDNich

Hi

the better way could be to embed bdmesg as project component, but it causes another problem the behavior between Xcode 15.n and Xcode 14.n and older

with Xcode 15.n or Xcode 14.n an executable component like bdmesg must be declared as a copied file in Poject Resources folder if you want to keep that executable in a specific folder (aka binar(y/ies)

The use of bdmesg in this case is "Bundle.main.path(forResource: "/binary/bdmesg", ofType: "")!"

But with Xcode 15.n the above code result is "/Applications/About-This-Hack.app/Contents/Resources//binary/bdmesg" with 2 slashes between Resources and binary and it causes a crash so the solution is to use a Replace function when there's two slashes to eliminate one of the twos (Bundle.main.path(forResource: "/binary/bdmesg", ofType: "")!).replacingOccurrences(of: "//", with: "/")

And with Xcode 14.n the above code result is /Applications/About-This-Hack.app/Contents/Resources//binary/bdmesg and here replacing function does nothing coz there's no need to

Regards

5T33Z0 commented 1 year ago

So, the "real" solution would be to integrate bdmsg in the app.