Skip to content

Commit

Permalink
ui redesign
Browse files Browse the repository at this point in the history
  • Loading branch information
dropdb220 committed Feb 9, 2024
1 parent c364bb5 commit 1764c8a
Show file tree
Hide file tree
Showing 16 changed files with 834 additions and 761 deletions.
14 changes: 10 additions & 4 deletions README-ko.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,29 @@ OpenCore Updater를 우클릭하고 "열기"를 선택하세요. macOS가 개발

EFI 디렉토리(보통 /Volumes/EFI/EFI)를 선택하세요. 바로 아래에 BOOT와 OC 폴더가 있어야 합니다.

또는 EFI 디렉토리를 앱 아이콘에 드래그하세요.

EFI가 마운트되지 않았다면, 터미널에서 아래 명령어를 입력해 EFI를 마운트하세요:

```bash
sudo diskutil mount $(diskutil list | grep -in "EFI" | head -n1 | awk '{print $7}')
```

OpenCore 버전이 감지되었다면, 사용중인 OpenCore 버전과 사용중인 kext 리스트가 뜹니다.
OpenCore 버전이 감지되었다면, 사용중인 OpenCore 버전이 뜹니다.

OpenCore 버전이 감지되지 않았다면, 사용중인 OpenCore 버전을 선택하라는 창이 뜹니다. 사용중인 버전을 선택하고 `버전 선택`을 누르세요.
OpenCore 버전이 감지되지 않았다면, 사용중인 OpenCore 버전을 선택하라는 창이 뜹니다. 사용중인 버전을 선택해주세요.

구버전 OpenCore를 사용하고 있다면 앱이 OpenCore를 업데이트할지 묻습니다. `업데이트`를 누르면 OpenCore가 업데이트됩니다.

앱이 OpenCore, kext, 바이너리 데이터를 다운로드합니다. 시간이 오래 걸리거나 중간에 렉이 걸릴 수 있습니다. **앱을 닫지 마세요.**
앱이 OpenCore, kext, 바이너리 데이터를 다운로드합니다.

다운로드가 끝나면 기존 EFI를 백업하고 파일을 바꿉니다.

파일 변경이 끝나면 config.plist를 수정합니다. 모두 완료되었다면, 완료되었다는 창이 뜹니다. 추가로 업데이트되지 않은 kext 목록, 백업 디렉토리 위치, OpenCore vault를 사용 중이었을 경우 관련 메세지가 뜹니다. 이제 컴퓨터를 재부팅하세요.
파일 변경이 끝나면 config.plist를 수정합니다. 모두 완료되었다면, 완료되었다는 창이 뜹니다. 추가로 업데이트되지 않은 kext 목록, 백업 디렉토리 위치, OpenCore vault 관련 내용을 보려면 '완료'라고 쓰여져 있는 부분을 클릭하세요.

이제 컴퓨터를 재부팅하면 업데이트된 EFI가 적용됩니다.

여러 EFI를 업데이트하려면 각 EFI 디렉토리를 앱 아이콘에 드래그하거나 '다른 EFI 열기'를 누르세요.

## 문제 해결

Expand Down
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,27 @@ When the app opens, press `Get Started`. A dialog will appear asking you to sele

Select your EFI directory. It's usually /Volumes/EFI/EFI. It should have BOOT and OC directories inside.

You may also drag the EFI directory to the Dock icon of the app.

If the EFI is not mounted, run the following command in Terminal to mount EFI:

```bash
sudo diskutil mount $(diskutil list | grep -in "EFI" | head -n1 | awk '{print $7}')
```

If your OpenCore version is detected, your OpenCore version and list of kexts you are using will be displayed.
If your OpenCore version is detected, your OpenCore version will be displayed.

If your OpenCore version is not detected, you will be asked to select the OpenCore version you are using. Select the version you are using and press `Select this version`.
If your OpenCore version is not detected, you will be asked to select the OpenCore version you are using. Select the version you are using.

If you are not using the latest version of OpenCore, the app will ask you to update. Press `Update` to update OpenCore.

The app will start to download OpenCore, kexts, and Binary Data. this might take some time and you might see the spinning beach ball. DO NOT CLOSE THE APP.
The app will start to download OpenCore, kexts, and Binary Data.

When the app finishes downloading, it will create a backup of your old EFI and will replace files with the new ones.

Then, it will update config.plist. When it's done, it will display that it's done. It will also display the list of not updated kexts, the backup directory, and that OpenCore Vault is disabled(if it was enabled). You need to reboot your computer to see the changes.
Then, it will update config.plist. When it's done, it will display that it's done. Click the 'Finished' text to see the list of not updated kexts, the backup directory, and whether OpenCore Vault is disabled. You need to reboot your computer to see the changes.

To update multiple EFis, drag each EFI directory to the Dock icon of the app or click 'Open another EFI'.

## Troubleshooting

Expand All @@ -50,7 +54,7 @@ So if you want to use OpenCore Vault, you need to create vault again and enable

### My OpenCore version is not detected

OpenCore Updater checks your OpenCore version by comparing the SHA-256 hash of your OpenCore.efi and the list of hashes in the app. If the hash is not listed in the app, it can't detect your OpenCore version. You can just manually select the version you are using and press `Select this version`.
OpenCore Updater checks your OpenCore version by comparing the SHA-256 hash of your OpenCore.efi and the list of hashes in the app. If the hash is not listed in the app, it can't detect your OpenCore version. You can just manually select the version you are using.

If you are using too old version (before 0.6.3), you need to manually update to 0.6.3 first and then use this app to update to the latest version.

Expand Down
34 changes: 34 additions & 0 deletions build/after-pack.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// electron macOS afterPack hook
// read Info.plist
// add CFBundleDocumentTypes
/*
<dict>
<key>CFBundleTypeName</key>
<string>Unknown document</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSIsAppleDefaultForType</key>
<true />
<key>LSItemContentTypes</key>
<array>
<string>public.data</string>
</array>
</dict>
*/
const fs = require('fs');
const plist = require('plist');
const path = require('path');
module.exports = context => {
const { appOutDir } = context;
const infoPlistPath = path.join(appOutDir, 'OpenCore Updater.app', 'Contents', 'Info.plist');
const infoPlist = plist.parse(fs.readFileSync(infoPlistPath, 'utf8'));
infoPlist.CFBundleDocumentTypes = [
{
CFBundleTypeName: 'Folder',
CFBundleTypeRole: 'Editor',
LSItemContentTypes: ['public.directory'],
LSHandlerRank: 'None'
},
];
fs.writeFileSync(infoPlistPath, plist.build(infoPlist));
}
Binary file modified build/icon.icns
Binary file not shown.
8 changes: 5 additions & 3 deletions electron-builder.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"!out",
"!etc"
],
"buildNumber": "0",
"buildNumber": "53",
"mac": {
"category": "public.app-category-utilities",
"electronLanguages": [
Expand All @@ -45,10 +45,12 @@
]
}
],
"icon": "build/icon.icns"
"icon": "build/icon.icns",
"darkModeSupport": true
},
"dmg": {
"title": "${productName}",
"artifactName": "${productName}-${version}-${arch}.dmg"
}
},
"afterPack": "build/after-pack.js"
}
86 changes: 5 additions & 81 deletions index-korean.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<head>
<title>OpenCore Updater</title>
<meta charset="UTF-8">
<meta name="color-scheme" content="light dark">
<link rel="stylesheet" href="index.css">
<script src="dist/renderer.js"></script>
</head>
Expand All @@ -15,87 +16,10 @@ <h1>OpenCore Updater</h1>
<h2>지원되는 최신 버전: 0.9.8</h2>
<button id="start">시작하기</button>
</div>
<div id="select-opencore-version">
<h1>OpenCore 버전 선택</h1>
<p>OpenCore 버전을 확인할 수 없습니다. 아래에서 버전을 선택해주세요.</p>
<p>제한 사항:</p>
<ul>
<li>DEBUG 빌드는 RELEASE 빌드로 변경됩니다.</li>
<li>32비트 버전은 64비트 버전으로 변경됩니다.</li>
<li>OpenCore vault가 비활성화됩니다. 이 경우 config.plist-Misc-Security-Vault가 Optional로 바뀝니다.</li>
<li>0.6.3 미만의 버전은 지원되지 않습니다.</li>
</ul>
<select id="oc-version-selection">
<option value="0.9.8" selected>0.9.8</option>
<option value="0.9.7">0.9.7</option>
<option value="0.9.6">0.9.6</option>
<option value="0.9.5">0.9.5</option>
<option value="0.9.4">0.9.4</option>
<option value="0.9.3">0.9.3</option>
<option value="0.9.2">0.9.2</option>
<option value="0.9.1">0.9.1</option>
<option value="0.9.0">0.9.0</option>
<option value="0.8.9">0.8.9</option>
<option value="0.8.8">0.8.8</option>
<option value="0.8.7">0.8.7</option>
<option value="0.8.6">0.8.6</option>
<option value="0.8.5">0.8.5</option>
<option value="0.8.4">0.8.4</option>
<option value="0.8.3">0.8.3</option>
<option value="0.8.2">0.8.2</option>
<option value="0.8.1">0.8.1</option>
<option value="0.8.0">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>
<option value="0.7.5">0.7.5</option>
<option value="0.7.4">0.7.4</option>
<option value="0.7.3">0.7.3</option>
<option value="0.7.2">0.7.2</option>
<option value="0.7.1">0.7.1</option>
<option value="0.7.0">0.7.0</option>
<option value="0.6.9">0.6.9</option>
<option value="0.6.8">0.6.8</option>
<option value="0.6.7">0.6.7</option>
<option value="0.6.6">0.6.6</option>
<option value="0.6.5">0.6.5</option>
<option value="0.6.4">0.6.4</option>
<option value="0.6.3">0.6.3</option>
</select>
<button id="confirm-version">버전 선택</button>
</div>
<div id="efiinfo">
<h1>EFI 정보</h1>
<p>최신 버전: 0.9.8</p>
<p>현재 버전: <span id="oc-version"></span></p>
<p>사용 중인 kext:</p>
<div id="using-kexts"></div>
<p id="is-outdated">최신 버전의 OpenCore를 사용하고 있습니다.</p>
<button id="update">업데이트</button>
</div>
<div id="update-in-progress">
<h1>업데이트 중...</h1>
<p>EFI를 업데이트하고 있습니다.</p>
<br><br>
<p id="progress">1/7. OpenCore 다운로드 중...</p>
<!--
1. OpenCore 다운로드 중...
2. kext 다운로드 중...
3. 바이너리 데이터 다운로드 중...
4. 백업 생성 중...
5. 파일 변경 중...
6. config.plist 수정 중...
7. 정리하는 중...
-->
</div>
<div id="success">
<img src="checkmark-flat.png" alt="checkmark" height="30%" width="30%">
<h1>업데이트 완료</h1>
<p>OpenCore가 업데이트되었습니다. <span id="kexts-not-updated-exists">하지만 다음 kext는 업데이트되지 않았지만, 최신 버전이 있을 수 있습니다:</span></p>
<p id="kexts-not-updated"></p>
<p id="vault-removed">OpenCore vault가 감지되어 config.plist-Misc-Security-Vault가 Optional로 변경되었습니다. OpenCore vault를 사용하려면 vault를 다시 만들어주세요.</p>
<p>기존 EFI의 백업이 <span id="backup-location"></span>에 생성되었습니다.</p>
<div id="update-list"></div>
<div id="open-efi-container">
<div></div>
<button id="open-efi">다른 EFI 열기</button>
</div>
</body>

Expand Down
69 changes: 18 additions & 51 deletions index.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,13 @@
}
body {
text-align: center;
font-family: BlinkMacSystemFont, 'SF Pro', 'Apple SD Gothic Neo', 'Helvetica Neue', sans-serif;
font-family: BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Helvetica Neue', sans-serif;
}

li {
width: fit-content;
}

#select-opencore-version {
display: none;
}

#efiinfo {
display: none;
}

#update-in-progress {
display: none;
}

#success {
display: none;
}

#start {
border: 1px solid transparent;
background-color: #30bcd5;
Expand All @@ -41,42 +25,25 @@ li {
background-color: #28acc3;
}

#update {
border: 1px solid transparent;
background-color: #30bcd5;
border-radius: 40px;
font-size: 1.2rem;
padding: .6rem 1.4rem;
transition: background-color .1s ease;
cursor: pointer;
display: none;
#get-started {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 100%;
}

#update:hover {
background-color: #28acc3;
}

#confirm-version {
border: 1px solid transparent;
background-color: #30bcd5;
border-radius: 40px;
font-size: 1.2rem;
padding: .6rem 1.4rem;
transition: background-color .1s ease;
cursor: pointer;
display: block;
#open-efi-container {
display: grid;
grid-template-columns: 1fr auto;
width: 100%;
margin-top: 10px;
}

#confirm-version:hover {
background-color: #28acc3;
}

#vault-removed {
#open-efi {
margin-right: 12px;
border: 1px solid #545050;
border-radius: 5px;
display: none;
}

#oc-version-selection {
border: 1px solid transparent;
border-radius: 40px;
padding: .6rem 1.4rem;
}
padding: 3px 10px;
}
Loading

0 comments on commit 1764c8a

Please sign in to comment.