Skip to content

Commit

Permalink
opencore 0.8.0 support(opencore 0.8.0 지원)
Browse files Browse the repository at this point in the history
  • Loading branch information
dropdb220 committed May 28, 2022
1 parent d5485c1 commit 12bb36a
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 13 deletions.
2 changes: 1 addition & 1 deletion electron-builder.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"appId": "com.mswgen.opencore-updater",
"copyright": "Copyright (c) 2021 mswgen\nLicensed under the MIT License",
"copyright": "Copyright (c) 2021~2022 mswgen",
"directories": {
"output": "out"
},
Expand Down
7 changes: 4 additions & 3 deletions index-korean.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<div id="get-started">
<img src="./Logo.png" alt="OpenCore Logo" height="30%" width="30%">
<h1>OpenCore Updater</h1>
<h2>지원되는 최신 버전: 0.7.9</h2>
<h2>지원되는 최신 버전: 0.8.0</h2>
<button id="start">시작하기</button>
</div>
<div id="select-opencore-version">
Expand All @@ -26,7 +26,8 @@ <h1>OpenCore 버전 선택</h1>
<li>0.6.3 미만의 버전은 지원되지 않습니다.</li>
</ul>
<select id="oc-version-selection">
<option value="0.7.9" selected>0.7.9</option>
<option value="0.8.0" selected>0.8.0</option>
<option value="0.7.9">0.7.9</option>
<option value="0.7.8">0.7.8</option>
<option value="0.7.7">0.7.7</option>
<option value="0.7.6">0.7.6</option>
Expand All @@ -48,7 +49,7 @@ <h1>OpenCore 버전 선택</h1>
</div>
<div id="efiinfo">
<h1>EFI 정보</h1>
<p>최신 버전: 0.7.9</p>
<p>최신 버전: 0.8.0</p>
<p>현재 버전: <span id="oc-version"></span></p>
<p>사용 중인 kext:</p>
<div id="using-kexts"></div>
Expand Down
7 changes: 4 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<div id="get-started">
<img src="./Logo.png" alt="OpenCore Logo" height="30%" width="30%">
<h1>OpenCore Updater</h1>
<h2>Current supported version: 0.7.9</h2>
<h2>Current supported version: 0.8.0</h2>
<button id="start">Get started</button>
</div>
<div id="select-opencore-version">
Expand All @@ -26,7 +26,8 @@ <h1>Select OpenCore version</h1>
<li>Versions older than 0.6.3 are not supported.</li>
</ul>
<select id="oc-version-selection">
<option value="0.7.9" selected>0.7.9</option>
<option value="0.8.0" selected>0.8.0</option>
<option value="0.7.9">0.7.9</option>
<option value="0.7.8">0.7.8</option>
<option value="0.7.7">0.7.7</option>
<option value="0.7.6">0.7.6</option>
Expand All @@ -48,7 +49,7 @@ <h1>Select OpenCore version</h1>
</div>
<div id="efiinfo">
<h1>Your EFI info</h1>
<p>Latest version is 0.7.9.</p>
<p>Latest version is 0.8.0.</p>
<p>Your OpenCore version is <span id="oc-version"></span>.</p>
<p>You're using the following kexts:</p>
<div id="using-kexts"></div>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "oc-updater",
"productName": "OpenCore Updater",
"version": "1.2.3",
"version": "1.2.4",
"description": "OpenCore Updater",
"main": "dist/index.js",
"scripts": {
Expand Down
9 changes: 5 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import plist from 'plist';
import { autoUpdater } from 'electron-updater';
const PID = Math.floor(Math.random() * 1000000);
const checksums = {
'fd918e96a271e3bd7cebed9f5fcdbf8437fa91640d8e58f9ab950f03bec360fe': '0.8.0',
'297602a36ba60b3968e876297fc5d94770a7abefffdc7ed59cd56a9bd01f8917': '0.7.9',
'a2db0a0ca004be20a3a6347367a1cf9bf2b3c383c1927e0b5bf9aee88c19da20': '0.7.8',
'b8f1408556f338b9af478e92df494c7400149fd24c4148928fcbef0cc8b7f991': '0.7.8',
Expand Down Expand Up @@ -35,11 +36,11 @@ const checksums = {
'dc2381c5ab49ac79ed6be75f9867c5933e6f1e88cb4e860359967fc5ee4916e3': '0.6.3'
}
const versions = {
OpenCore: ['0.7.9', 79],
OpenCore: ['0.8.0', 80],
VirtualSMC: '1.2.9',
Lilu: '1.6.0',
WhateverGreen: '1.5.8',
AppleALC: '1.7.0',
AppleALC: '1.7.1',
VoodooPS2Controller: '2.2.8',
VoodooI2C: '2.7',
ECEnabler: '1.0.2',
Expand All @@ -51,8 +52,8 @@ const versions = {
NVMeFix: '1.0.9',
itlwm: '2.1.0',
IntelBluetoothFirmware: '2.1.0',
CpuTscSync: '1.0.7',
CPUFriend: '1.2.4',
CpuTscSync: '1.0.8',
CPUFriend: '1.2.5',
AirportBrcmFixup: '2.1.4',
BrcmPatchRAM: '2.6.1',
RealtekCardReader: ['0.9.6', '0.9.6_b998818'],
Expand Down
2 changes: 1 addition & 1 deletion src/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function afterOcverSelection(ocver: string, efidir: string) {
const ocverNum = Number(ocver.split('.').join(''));
document.querySelector('#oc-version')!.innerHTML = ocver;
document.querySelector('#using-kexts')!.innerHTML = kexts.join('<br>');
if (ocverNum < 79) {
if (ocverNum < 80) {
document.querySelector('#is-outdated')!.innerHTML = isKorean ? '구버전 OpenCore를 사용하고 있어요.' : 'Your OpenCore is outdated.';
document.querySelector<HTMLElement>('#update')!.style.display = 'block';
document.querySelector('#update')?.addEventListener('click', async () => {
Expand Down
29 changes: 29 additions & 0 deletions src/update/079-to-080.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// import plist and fs
import fs from 'fs';
import plist from 'plist';
export default {
from: 79,
configPlistChange: true,
exec: (file: string) => {
// read ${file} as utf8, parse it as plist, and save it to variable `plistParsed`
const plistParsed: any = plist.parse(fs.readFileSync(file, 'utf8'));
/*
// Changes of OpenCore 0.8.0:
set Kernel - Quirks - CustomPciSerialDevice to false
set Kernel - Quirks - ForceAquantiaEthernet to false
create a new dictionary at Misc - Serial
inside it, set Override to false
set Init to Misc - Debug - SerialInit value
finally, delete Misc - Debug - SerialInit
*/
plistParsed.Misc.Quirks.CustomPciSerialDevice = false;
plistParsed.Misc.Quirks.ForceAquantiaEthernet = false;
plistParsed.Misc.Serial = {
Override: false,
Init: plistParsed.Misc.Debug.SerialInit
};
delete plistParsed.Misc.Debug.SerialInit;
// finally, write it back
fs.writeFileSync(file, plist.build(plistParsed));
}
}

0 comments on commit 12bb36a

Please sign in to comment.