Skip to content

armgit / soju

Public Imported from GitHub
0

Play Windows games on Apple Silicon Macs. Free, open-source app that installs the official Battle.net, Steam, Epic and GOG launchers and lists your games in one library.

Site: game pages carry their guide's requirements and checked/not checked lists; Diablo IV guide lists problems others reported (#122)

Mikek9a225cffc965
diff --git a/docs/guides/diablo-4-apple-silicon.html b/docs/guides/diablo-4-apple-silicon.html
index 89550c482a5..f189117ed53 100644
--- a/docs/guides/diablo-4-apple-silicon.html
+++ b/docs/guides/diablo-4-apple-silicon.html
@@ -105,6 +105,14 @@ soju battlenet # sign in, open Diablo IV, press Try For Free or Install,
<a href="https://github.com/BCD1210/soju/issues/new?template=compatibility.yml">compatibility report</a>; it goes on the
<a href="../mac/diablo-4.html">Diablo IV page</a>.</p>
+<h2>Problems others have reported</h2>
+<p>We did not see these in our short check. They come from <a href="https://github.com/MichaelLod/D4Mac#known-issues">D4Mac</a>, a project that runs Diablo IV the same way (Wine with Apple's Game Porting Toolkit), and from CodeWeavers:</p>
+<ul>
+ <li><strong>Freezes after minutes or hours on macOS older than 26.5.</strong> CodeWeavers wrote in May 2026 that Diablo IV needs the Rosetta changes in macOS 26.5. Update macOS before a long session.</li>
+ <li><strong>The first launch can hang while shaders compile.</strong> Force-quit the game and start it again; the second launch gets past it.</li>
+ <li><strong>Switching Spaces or opening Mission Control in full screen can freeze the game.</strong> Borderless windowed mode avoids it.</li>
+</ul>
+
<h2 id="questions">Questions</h2>
<div class="faq">
<details open><summary>Does Diablo IV run on Apple Silicon Macs?</summary><p>Through the Windows Battle.net client that Soju installs, Diablo IV started on an M4 Pro with macOS 26.5: the opening cinematic played, a character was created and the game loaded into the first area, where the character moved. It is drawn with Apple's D3DMetal. Sound, frame rate and long sessions were not checked.</p></details>
diff --git a/docs/guides/ko/diablo-4-mac.html b/docs/guides/ko/diablo-4-mac.html
index a58fb0b4e46..5341947c886 100644
--- a/docs/guides/ko/diablo-4-mac.html
+++ b/docs/guides/ko/diablo-4-mac.html
@@ -77,6 +77,14 @@ soju battlenet # 로그인 → 디아블로 4 → Try For Free(또는 Ins
</ul>
<p>맥에서 더 해 보셨다면 소주의 게임 상세 창에서 <strong>Show FPS</strong>를 켜고 나온 숫자를 <a href="https://discord.gg/eY6UHRCKZU">디스코드 한국어 채널</a>이나 <a href="https://github.com/BCD1210/soju/issues/new?template=compatibility.yml">호환성 제보</a>로 알려 주세요. <a href="../../ko/mac/diablo-4.html">디아블로 4 페이지</a>에 올립니다.</p>
+<h2>다른 곳에서 보고된 문제</h2>
+<p>짧게 확인하는 동안 저희는 겪지 않았습니다. 같은 방식(Wine과 애플 GPTK)으로 디아블로 4를 돌리는 <a href="https://github.com/MichaelLod/D4Mac#known-issues">D4Mac</a> 프로젝트와 CodeWeavers가 알린 내용입니다.</p>
+<ul>
+ <li><strong>macOS 26.5보다 낮은 버전에서 몇 분~몇 시간 뒤 멈춤.</strong> CodeWeavers는 2026년 5월에 디아블로 4가 macOS 26.5의 로제타 변경을 필요로 한다고 밝혔습니다. 오래 하기 전에 macOS를 업데이트하세요.</li>
+ <li><strong>첫 실행 때 셰이더를 만드는 동안 멈출 수 있음.</strong> 게임을 강제 종료하고 다시 켜면 두 번째부터는 넘어갑니다.</li>
+ <li><strong>전체 화면에서 Spaces를 바꾸거나 Mission Control을 열면 멈출 수 있음.</strong> 테두리 없는 창 모드로 하면 피할 수 있습니다.</li>
+</ul>
+
<h2 id="questions">자주 묻는 질문</h2>
<div class="faq">
<details open><summary>맥북(애플 실리콘)에서 디아블로 4 되나요?</summary><p>소주가 설치한 윈도우 배틀넷으로 M4 Pro, macOS 26.5에서 실행했습니다. 오프닝 영상이 나오고, 캐릭터를 만들고, 첫 지역에 들어가 캐릭터가 움직이는 것까지 확인했습니다. 그래픽은 애플 D3DMetal입니다. 소리, 프레임, 장시간 플레이는 확인하지 않았습니다.</p></details>
diff --git a/docs/ko/mac/diablo-2-resurrected.html b/docs/ko/mac/diablo-2-resurrected.html
index 2daefbbdf3a..bc96b695803 100644
--- a/docs/ko/mac/diablo-2-resurrected.html
+++ b/docs/ko/mac/diablo-2-resurrected.html
@@ -50,6 +50,14 @@
soju install # Battle.net 선택
soju battlenet # 로그인 → 게임 설치 → 플레이</code></pre>
<p>또는 <a href="../../ko/#install">소주 앱을 받아</a> 플랫폼에서 Battle.net을(를) 설치하세요. 애플 실리콘(M1 이상), macOS 14 이상이 필요합니다.</p>
+<h2>준비물</h2>
+<ul>
+ <li>애플 실리콘 맥 (M1 이상)</li>
+ <li><strong>macOS 26.4 이상 필수</strong>. 2026년 블리자드 안티치트 업데이트가
+ 로제타 버그를 유발했고, 애플이 26.4에서 수정했습니다</li>
+ <li>로제타2: <code>softwareupdate --install-rosetta</code></li>
+ <li>본인 배틀넷 계정 + 디아2 레저렉션 소지</li>
+</ul>
<p>해 보셨나요? <a href="https://discord.gg/eY6UHRCKZU">디스코드 한국어 채널</a>나 <a href="https://github.com/BCD1210/soju/issues/new?template=compatibility.yml">호환성 보고</a>로 알려 주시면 이 페이지에 반영합니다.</p>
<h2 id="questions">자주 묻는 질문</h2>
<div class="faq">
diff --git a/docs/ko/mac/diablo-4.html b/docs/ko/mac/diablo-4.html
index 210031f76d4..cd11c5d45d6 100644
--- a/docs/ko/mac/diablo-4.html
+++ b/docs/ko/mac/diablo-4.html
@@ -52,6 +52,27 @@
soju install # Battle.net 선택
soju battlenet # 로그인 → 게임 설치 → 플레이</code></pre>
<p>또는 <a href="../../ko/#install">소주 앱을 받아</a> 플랫폼에서 Battle.net을(를) 설치하세요. 애플 실리콘(M1 이상), macOS 14 이상이 필요합니다.</p>
+<h2>필요한 것</h2>
+<table>
+ <tr><th>항목</th><th>내용</th></tr>
+ <tr><td>맥</td><td>애플 실리콘. M4 Pro, macOS 26.5에서 확인했고 다른 맥은 확인하지 못했습니다.</td></tr>
+ <tr><td>계정</td><td>배틀넷 계정. 무료 체험판은 구매 없이 됩니다. 레벨 제한과 제공 기간은 블리자드가 정합니다.</td></tr>
+ <tr><td>애플 GPTK</td><td>소주가 설치할 때 받아 옵니다. 빠진 것이 있으면 <code>soju doctor</code>가 알려 줍니다.</td></tr>
+ <tr><td>용량</td><td>배틀넷 표시 기준 고해상도 에셋 제외 97.4GB, 포함 181GB. 설치 화면에서 High-Resolution Assets 체크를 풀면 줄어듭니다.</td></tr>
+</table>
+<h2>확인한 것</h2>
+<ul>
+ <li>배틀넷에서 체험판을 설치하고 게임을 실행했습니다.</li>
+ <li>설정 화면, 자막이 나오는 오프닝 영상, 직업 선택, 캐릭터 생성이 모두 정상으로 그려졌습니다.</li>
+ <li>첫 지역(Icehowl Taiga)에 들어가 인터페이스, 미니맵, 퀘스트가 표시됐고 캐릭터가 움직였습니다.</li>
+</ul>
+<h2>확인하지 않은 것</h2>
+<ul>
+ <li>소리, 프레임, 전투, 장시간 플레이</li>
+ <li>다른 사람과 함께 하는 플레이, 체험판 범위를 넘는 본편</li>
+ <li>다른 맥과 다른 macOS 버전</li>
+</ul>
+<p>맥에서 더 해 보셨다면 소주의 게임 상세 창에서 <strong>Show FPS</strong>를 켜고 나온 숫자를 <a href="https://discord.gg/eY6UHRCKZU">디스코드 한국어 채널</a>이나 <a href="https://github.com/BCD1210/soju/issues/new?template=compatibility.yml">호환성 제보</a>로 알려 주세요. <a href="../../ko/mac/diablo-4.html">디아블로 4 페이지</a>에 올립니다.</p>
<p>해 보셨나요? <a href="https://discord.gg/eY6UHRCKZU">디스코드 한국어 채널</a>나 <a href="https://github.com/BCD1210/soju/issues/new?template=compatibility.yml">호환성 보고</a>로 알려 주시면 이 페이지에 반영합니다.</p>
<h2 id="questions">자주 묻는 질문</h2>
<div class="faq">
diff --git a/docs/ko/mac/overwatch-2.html b/docs/ko/mac/overwatch-2.html
index 29ed37c4f2f..f65954201b2 100644
--- a/docs/ko/mac/overwatch-2.html
+++ b/docs/ko/mac/overwatch-2.html
@@ -52,6 +52,27 @@
soju install # Battle.net 선택
soju battlenet # 로그인 → 게임 설치 → 플레이</code></pre>
<p>또는 <a href="../../ko/#install">소주 앱을 받아</a> 플랫폼에서 Battle.net을(를) 설치하세요. 애플 실리콘(M1 이상), macOS 14 이상이 필요합니다.</p>
+<h2>필요한 것</h2>
+<table>
+ <tr><th>항목</th><th>내용</th></tr>
+ <tr><td>맥</td><td>애플 실리콘. M4 Pro·macOS 26.5에서 확인했고 다른 맥은 아직입니다.</td></tr>
+ <tr><td>계정</td><td>휴대폰 번호가 등록된 배틀넷 계정. 블리자드가 무료 설치 전에 요구합니다(account.battle.net → 보안).</td></tr>
+ <tr><td>애플 GPTK</td><td><code>atidxx64.dll</code>, <code>nvapi64.dll</code>까지 포함한 전체 파일. 소주 1.13.0의 <code>soju update</code>가 채워 주고, 빠져 있으면 <code>soju doctor</code>가 알려 줍니다.</td></tr>
+ <tr><td>저장 공간</td><td>배틀넷 기준 약 85GB</td></tr>
+</table>
+<h2>확인한 것</h2>
+<ul>
+ <li>계정에 휴대폰 번호를 등록한 뒤 배틀넷에서 설치됨</li>
+ <li>파일이 없을 때는 General Error (0xE0010110)로 멈췄고, 채운 뒤에는 로그인·온라인 메인 메뉴·시즌 화면까지 뜸</li>
+ <li>같은 엔진에서 디아블로 2 레저렉션도 그대로 타이틀 화면까지 뜸</li>
+</ul>
+<h2>확인 안 한 것</h2>
+<ul>
+ <li>실제 경기, 연습장, 플레이 중 프레임, 음성 채팅</li>
+ <li>오래 플레이했을 때</li>
+ <li>다른 맥과 macOS 버전</li>
+</ul>
+<p>맥에서 경기를 해 보셨다면 Platforms의 <strong>Show FPS in games</strong>를 켜고 나온 숫자를 <a href="https://discord.gg/eY6UHRCKZU">디스코드 한국어 채널</a>이나 <a href="https://github.com/BCD1210/soju/issues/new?template=compatibility.yml">호환성 보고</a>로 알려 주세요. <a href="../../ko/mac/overwatch-2.html">오버워치 2 페이지</a>에 반영합니다.</p>
<p>해 보셨나요? <a href="https://discord.gg/eY6UHRCKZU">디스코드 한국어 채널</a>나 <a href="https://github.com/BCD1210/soju/issues/new?template=compatibility.yml">호환성 보고</a>로 알려 주시면 이 페이지에 반영합니다.</p>
<h2 id="questions">자주 묻는 질문</h2>
<div class="faq">
diff --git a/docs/ko/mac/starcraft-remastered.html b/docs/ko/mac/starcraft-remastered.html
index 67b41d47c1a..4c6378ff4e6 100644
--- a/docs/ko/mac/starcraft-remastered.html
+++ b/docs/ko/mac/starcraft-remastered.html
@@ -50,6 +50,29 @@
soju install # Battle.net 선택
soju battlenet # 로그인 → 게임 설치 → 플레이</code></pre>
<p>또는 <a href="../../ko/#install">소주 앱을 받아</a> 플랫폼에서 Battle.net을(를) 설치하세요. 애플 실리콘(M1 이상), macOS 14 이상이 필요합니다.</p>
+<h2>준비물</h2>
+<table>
+ <tr><th>항목</th><th>내용</th></tr>
+ <tr><td>맥</td><td>애플 실리콘. M4 Pro, macOS 26.5에서 확인했고 다른 버전은 확인하지 못했습니다.</td></tr>
+ <tr><td>계정</td><td>배틀넷 계정. 스타크래프트 자체는 무료이고 리마스터 그래픽은 유료입니다. 시험한 계정은 리마스터를 보유하고 있습니다.</td></tr>
+ <tr><td>애플 게임 포팅 툴킷</td><td>소주의 배틀넷이 사용합니다. 설치할 때 소주가 애플 파일을 받아 애플 서명을 확인한 뒤 설치합니다.</td></tr>
+ <tr><td>용량</td><td>게임만 약 5.5GB. 배틀넷과 엔진은 별도입니다.</td></tr>
+</table>
+<h2>확인한 것</h2>
+<ul>
+ <li>예전에 설치해 둔 게임이라 배틀넷에 <strong>업데이트</strong> 버튼이 떴고, 업데이트가 끝나자 <strong>플레이</strong>로 바뀌었습니다.</li>
+ <li>인트로 영상이 재생됐고 클릭으로 넘어갔습니다.</li>
+ <li>배틀넷에 로그인된 상태로 메인 메뉴가 떴습니다. 버전은 1.23.10입니다.</li>
+ <li>싱글 플레이, 브루드워, 키보드로 캐릭터 이름 입력, 사용자 지정 게임, Bottleneck 맵에서 컴퓨터 1명과 밀리 대전.</li>
+ <li>리마스터 그래픽으로 커맨드 센터, SCV, 미네랄, 하단 조작판이 모두 정상으로 그려졌습니다.</li>
+</ul>
+<h2>확인하지 못한 것</h2>
+<ul>
+ <li>멀티플레이와 래더</li>
+ <li>소리</li>
+ <li>몇 분 이상 이어지는 플레이</li>
+ <li>Wine에서 어떤 그래픽 경로로 도는지</li>
+</ul>
<p>해 보셨나요? <a href="https://discord.gg/eY6UHRCKZU">디스코드 한국어 채널</a>나 <a href="https://github.com/BCD1210/soju/issues/new?template=compatibility.yml">호환성 보고</a>로 알려 주시면 이 페이지에 반영합니다.</p>
<h2 id="questions">자주 묻는 질문</h2>
<div class="faq">
diff --git a/docs/mac/diablo-2-resurrected.html b/docs/mac/diablo-2-resurrected.html
index 965ba68f543..1b14b6c3621 100644
--- a/docs/mac/diablo-2-resurrected.html
+++ b/docs/mac/diablo-2-resurrected.html
@@ -50,6 +50,15 @@
soju install # choose Battle.net
soju battlenet # sign in, install the game, press Play</code></pre>
<p>Or <a href="../#install">download the Soju app</a> and add Battle.net under Platforms. Needs an Apple Silicon Mac (M1 or newer) and macOS 14 or later.</p>
+<h2>Requirements</h2>
+<ul>
+ <li>Apple Silicon Mac (M1 or newer), verified on M4 Pro</li>
+ <li><strong>macOS 26.4 or newer required</strong>: a 2026 Blizzard anti-cheat
+ update triggered a Rosetta 2 bug that Apple fixed in 26.4. On older macOS the
+ game can stall even with everything else correct.</li>
+ <li>Rosetta 2 (<code>softwareupdate --install-rosetta</code>)</li>
+ <li>Your own Battle.net account and a D2R license</li>
+</ul>
<p>Tried it? Tell us in <a href="https://discord.gg/PwBjET6YZ3">#compatibility on Discord</a> or <a href="https://github.com/BCD1210/soju/issues/new?template=compatibility.yml">send a compatibility report</a> and this page gets updated.</p>
<h2 id="questions">Questions</h2>
<div class="faq">
diff --git a/docs/mac/diablo-4.html b/docs/mac/diablo-4.html
index 5375a6a0473..39955f78a30 100644
--- a/docs/mac/diablo-4.html
+++ b/docs/mac/diablo-4.html
@@ -52,6 +52,30 @@
soju install # choose Battle.net
soju battlenet # sign in, install the game, press Play</code></pre>
<p>Or <a href="../#install">download the Soju app</a> and add Battle.net under Platforms. Needs an Apple Silicon Mac (M1 or newer) and macOS 14 or later.</p>
+<h2>What you need</h2>
+<table>
+ <tr><th>Item</th><th>Detail</th></tr>
+ <tr><td>Mac</td><td>Apple Silicon. Checked on an M4 Pro with macOS 26.5; other Macs are untested.</td></tr>
+ <tr><td>Account</td><td>A Battle.net account. The free trial needs no purchase; Blizzard sets its level cap and how long it is offered.</td></tr>
+ <tr><td>Apple's Game Porting Toolkit</td><td>Soju downloads it during setup. <code>soju doctor</code> says if anything is missing.</td></tr>
+ <tr><td>Disk</td><td>97.4 GB without High-Resolution Assets, 181 GB with them, as Battle.net reported it. Untick High-Resolution Assets on the install screen to save the space.</td></tr>
+</table>
+<h2>What we checked</h2>
+<ul>
+ <li>Battle.net installed the trial and started the game.</li>
+ <li>The setup screens, the opening cinematic with subtitles, class selection and character creation all drew correctly.</li>
+ <li>The game loaded into the first area (Icehowl Taiga) with the interface, minimap and quest shown, and the character moved.</li>
+</ul>
+<h2>What we did not check</h2>
+<ul>
+ <li>Sound, frame rate, combat and long sessions.</li>
+ <li>Playing with other people, and the full game beyond the trial.</li>
+ <li>Other Macs and macOS versions.</li>
+</ul>
+<p>Played further on your Mac? Turn on <strong>Show FPS</strong> in the game's sheet in Soju and tell us the number in
+<a href="https://discord.gg/PwBjET6YZ3">#compatibility on Discord</a> or in a
+<a href="https://github.com/BCD1210/soju/issues/new?template=compatibility.yml">compatibility report</a>; it goes on the
+<a href="../mac/diablo-4.html">Diablo IV page</a>.</p>
<p>Tried it? Tell us in <a href="https://discord.gg/PwBjET6YZ3">#compatibility on Discord</a> or <a href="https://github.com/BCD1210/soju/issues/new?template=compatibility.yml">send a compatibility report</a> and this page gets updated.</p>
<h2 id="questions">Questions</h2>
<div class="faq">
diff --git a/docs/mac/overwatch-2.html b/docs/mac/overwatch-2.html
index 7a3dc82b043..ba6b64c4474 100644
--- a/docs/mac/overwatch-2.html
+++ b/docs/mac/overwatch-2.html
@@ -52,6 +52,30 @@
soju install # choose Battle.net
soju battlenet # sign in, install the game, press Play</code></pre>
<p>Or <a href="../#install">download the Soju app</a> and add Battle.net under Platforms. Needs an Apple Silicon Mac (M1 or newer) and macOS 14 or later.</p>
+<h2>What you need</h2>
+<table>
+ <tr><th>Item</th><th>Detail</th></tr>
+ <tr><td>Mac</td><td>Apple Silicon. Checked on an M4 Pro with macOS 26.5; other Macs are untested.</td></tr>
+ <tr><td>Account</td><td>A Battle.net account with a phone number on it. Blizzard asks for one before the free install; add it at account.battle.net under Security.</td></tr>
+ <tr><td>Apple's Game Porting Toolkit</td><td>All of Apple's shims, including <code>atidxx64.dll</code> and <code>nvapi64.dll</code>. Soju 1.13.0 adds them with <code>soju update</code>; <code>soju doctor</code> says if they are missing.</td></tr>
+ <tr><td>Disk</td><td>About 85 GB for the game, as Battle.net reported it.</td></tr>
+</table>
+<h2>What we checked</h2>
+<ul>
+ <li>Battle.net installed the game after the phone number was added to the account.</li>
+ <li>Without the shims the game stopped with General Error (0xE0010110). With them it loaded, signed in and showed the main menu online, with the season and pass screens.</li>
+ <li>Diablo II: Resurrected still reached its title screen on the same engine after the change.</li>
+</ul>
+<h2>What we did not check</h2>
+<ul>
+ <li>A match, the practice range, frame rate in play, or voice chat.</li>
+ <li>Long sessions.</li>
+ <li>Other Macs and macOS versions.</li>
+</ul>
+<p>Played a match on your Mac? Turn on <strong>Show FPS in games</strong> under Platforms and tell us the number in
+<a href="https://discord.gg/PwBjET6YZ3">#compatibility on Discord</a> or in a
+<a href="https://github.com/BCD1210/soju/issues/new?template=compatibility.yml">compatibility report</a>; it goes on the
+<a href="../mac/overwatch-2.html">Overwatch 2 page</a>.</p>
<p>Tried it? Tell us in <a href="https://discord.gg/PwBjET6YZ3">#compatibility on Discord</a> or <a href="https://github.com/BCD1210/soju/issues/new?template=compatibility.yml">send a compatibility report</a> and this page gets updated.</p>
<h2 id="questions">Questions</h2>
<div class="faq">
diff --git a/docs/mac/starcraft-remastered.html b/docs/mac/starcraft-remastered.html
index fcd488ec770..95eaf672723 100644
--- a/docs/mac/starcraft-remastered.html
+++ b/docs/mac/starcraft-remastered.html
@@ -50,6 +50,29 @@
soju install # choose Battle.net
soju battlenet # sign in, install the game, press Play</code></pre>
<p>Or <a href="../#install">download the Soju app</a> and add Battle.net under Platforms. Needs an Apple Silicon Mac (M1 or newer) and macOS 14 or later.</p>
+<h2>What you need</h2>
+<table>
+ <tr><th>Item</th><th>Detail</th></tr>
+ <tr><td>Mac</td><td>Apple Silicon. We ran it on an M4 Pro with macOS 26.5; other versions are untested.</td></tr>
+ <tr><td>Account</td><td>A Battle.net account. StarCraft itself is free there; the Remastered graphics are a paid upgrade, and our test account has them.</td></tr>
+ <tr><td>Apple's Game Porting Toolkit</td><td>Battle.net in Soju uses it. Soju downloads Apple's files during setup and checks Apple's signature before installing them.</td></tr>
+ <tr><td>Disk</td><td>About 5.5 GB for the game in our install, on top of Battle.net and the engine.</td></tr>
+</table>
+<h2>What we checked</h2>
+<ul>
+ <li>Battle.net showed <strong>Update</strong> for an older install; the update finished and the button changed to <strong>Play</strong>.</li>
+ <li>The intro video played and a click skipped it.</li>
+ <li>The main menu came up signed in to Battle.net, version 1.23.10.</li>
+ <li>Single Player, Expansion, a new character name typed on the keyboard, Play Custom, a melee game on the Bottleneck map against one computer player.</li>
+ <li>The match loaded with the Remastered graphics: command centre, SCVs, minerals and the console all drew correctly.</li>
+</ul>
+<h2>What we did not check</h2>
+<ul>
+ <li>Multiplayer and ladder games.</li>
+ <li>Sound.</li>
+ <li>Sessions longer than a few minutes.</li>
+ <li>Which graphics path the game uses under Wine.</li>
+</ul>
<p>Tried it? Tell us in <a href="https://discord.gg/PwBjET6YZ3">#compatibility on Discord</a> or <a href="https://github.com/BCD1210/soju/issues/new?template=compatibility.yml">send a compatibility report</a> and this page gets updated.</p>
<h2 id="questions">Questions</h2>
<div class="faq">
diff --git a/site/mac_games.py b/site/mac_games.py
index 210a66b23d8..fc571849220 100644
--- a/site/mac_games.py
+++ b/site/mac_games.py
@@ -272,7 +272,7 @@ def game_page(lang, g):
<tr><th>{'날짜' if lang == 'ko' else 'Date'}</th><td>{esc(checked)}</td></tr>
</table>
{steps(lang, g) if runnable else ''}
-<p>{report}</p>
+{guide_sections(path, guide)}<p>{report}</p>
<h2 id="questions">{'자주 묻는 질문' if lang == 'ko' else 'Questions'}</h2>
<div class="faq">
""" + "\n".join(f" <details{' open' if i == 0 else ''}><summary>{esc(q)}</summary><p>{esc(a)}</p></details>"
@@ -288,6 +288,29 @@ def game_page(lang, g):
return path, page(lang, title, desc, canonical, alternates, body, faq, base, game, image, noindex=est)
+GUIDE_SECTIONS = ("What you need", "Requirements", "What we checked", "What we did not check",
+ "필요한 것", "준비물", "확인한 것", "확인하지 않은 것", "확인 안 한 것", "확인하지 못한 것")
+
+
+def guide_sections(page_path, guide):
+ """The requirements and checked / not checked sections of a game's guide, for its game page.
+
+ The guide stays the one place they are written. Links that were relative to the guide's
+ folder are pointed back at it."""
+ if not guide:
+ return ""
+ src = (DOCS / page_path).parent / guide
+ if not src.is_file():
+ return ""
+ folder = guide.rsplit("/", 1)[0] + "/"
+ out = []
+ for m in re.finditer(r"<h2[^>]*>(.*?)</h2>(.*?)(?=<h2|</main>)", src.read_text(), re.S):
+ if m.group(1).strip() in GUIDE_SECTIONS:
+ block = re.sub(r'(href|src)="(?!https?:|mailto:|#|\.\./)([^"]+)"', lambda x: f'{x.group(1)}="{folder}{x.group(2)}"', m.group(2).strip())
+ out.append(f"<h2>{m.group(1).strip()}</h2>\n{block}")
+ return "\n".join(out) + ("\n" if out else "")
+
+
def slugify(title):
t = re.sub(r"[\u2122\u00ae\u00a9]", "", title) # ™ ® © would become "tm" etc.
t = unicodedata.normalize("NFKD", t).encode("ascii", "ignore").decode().lower()