corpnewt / ProperTree

Cross platform GUI plist editor written in python.
BSD 3-Clause "New" or "Revised" License
2.65k stars 435 forks source link

clover config.plist #6

Closed roddy20 closed 4 years ago

roddy20 commented 4 years ago

https://github.com/CloverHackyColor/CloverBootloader/blob/master/CloverPackage/CloverV2/EFI/CLOVER/config-sample.plist cannot be opened Снимок экрана 2019-12-07 в 11 47 07

roddy20 commented 4 years ago

PS both Mac and Win10, the same error

roddy20 commented 4 years ago

error in string

#SmbiosVersion 0x0206

can it be HEX or number only? 518 ?

roddy20 commented 4 years ago

solved, in original config file it must be string 0x0206, not integer

vit9696 commented 4 years ago

Why is this being closed? Hexadecimal numbers in integers are supported by plist format by all major editors, and are not limited by the spec either. This remains being a bug, which should be fixed.

roddy20 commented 4 years ago

see the comment above

corpnewt commented 4 years ago

Should be fixed as of this commit. It seems this is a limitation of python's plistlib module (2.7 code here and 3.8 code here) assuming base-10 integers at all times. I've monkey patched the end_integer function to check for the 0x prefix and react accordingly.

It also mimics Xcode's approach of loading the hex, then displaying and saving as a base-10 integer. I tested loading the Clover config-sample.plist with both python 2.7.16 and 3.7.5.

Please let me know if you have other issues with it,

-CorpNewt

roddy20 commented 4 years ago

works OK now Thanks