From 557e35ca05279971e00af3c3ef3249c578fb3ee2 Mon Sep 17 00:00:00 2001 From: mswgen <54498184+mswgen@users.noreply.github.com> Date: Wed, 17 Nov 2021 12:17:35 +0900 Subject: [PATCH] =?UTF-8?q?fix=20config.plist=20bugs=20(config.plist=20?= =?UTF-8?q?=EA=B4=80=EB=A0=A8=20=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/update/066-to-067.ts | 10 ++++++---- src/update/069-to-070.ts | 4 ++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/update/066-to-067.ts b/src/update/066-to-067.ts index f3bd87a..455ae4a 100644 --- a/src/update/066-to-067.ts +++ b/src/update/066-to-067.ts @@ -6,11 +6,13 @@ export default { exec: (file: string) => { const plistParsed: any = plist.parse(fs.readFileSync(file, 'utf8')); let cnt = 0; - for (let booterPatch of plistParsed.Booter.Patch) { - if (booterPatch.Identifier == '') { - plistParsed.Booter.Patch[cnt].Identifier = 'Any'; + if ('Patch' in plistParsed.Booter) { + for (let booterPatch of plistParsed.Booter.Patch) { + if (booterPatch.Identifier == '') { + plistParsed.Booter.Patch[cnt].Identifier = 'Any'; + } + cnt++; } - cnt++; } plistParsed.UEFI.Audio.ResetTrafficClass = false; delete plistParsed.UEFI.Input.KeyMergeThreshold; diff --git a/src/update/069-to-070.ts b/src/update/069-to-070.ts index 7961d74..4e7f7f0 100644 --- a/src/update/069-to-070.ts +++ b/src/update/069-to-070.ts @@ -23,6 +23,7 @@ export default { delete plistParsed.PlatformInfo.Generic.AdviseWindows; plistParsed.UEFI.Output.GopPassThrough = plistParsed.UEFI.Output.GopPassThrough == true ? 'Enabled' : 'Disabled'; plistParsed.UEFI.ProtocolOverrides.AppleEg2Info = false; + if (!('PickerVariant' in plistParsed.Misc.Boot)) plistParsed.Misc.Boot.PickerVariant = 'Modern'; switch (plistParsed.Misc.Boot.PickerVariant) { case 'Auto': plistParsed.Misc.Boot.PickerVariant = 'Auto'; @@ -36,6 +37,9 @@ export default { case 'Old': plistParsed.Misc.Boot.PickerVariant = 'Acidanthera\\Chardonnay'; break; + default: + plistParsed.Misc.Boot.PickerVariant = 'Acidanthera\\GoldenGate'; + break; } fs.writeFileSync(file, plist.build(plistParsed)); }