@@ -4,183 +4,71 @@ Chocolate Doom compiled to WebAssembly for running in web browsers.
44
55## Prerequisites
66
7- ### Docker (모든 플랫폼 - 권장)
8-
9- ** Docker만 설치하면 모든 플랫폼(macOS, Windows, Linux)에서 동일하게 빌드할 수 있습니다.**
10-
11- - ** Docker Desktop** : [ docker.com] ( https://www.docker.com/products/docker-desktop ) 에서 다운로드 및 설치
12- - ** Docker Compose** : Docker Desktop에 포함되어 있음
13-
14- ### macOS
15-
16- - ** Emscripten SDK** : ` brew install emscripten ` or install from [ emscripten.org] ( https://emscripten.org )
17- - ** Autotools** : ` brew install autoconf automake libtool `
18- - ** pkg-config** : ` brew install pkgconf `
19- - ** Python 3** : Usually pre-installed, or ` brew install python3 `
20-
21- ### Windows
22-
23- Windows에서는 다음 두 가지 방법 중 하나를 선택할 수 있습니다:
24-
25- #### 방법 1: MSYS2 사용 (권장)
26-
27- 1 . ** MSYS2 설치** : [ msys2.org] ( https://www.msys2.org/ ) 에서 다운로드 및 설치
28- 2 . ** MSYS2 터미널 실행** 후 다음 명령어 실행:
29- ``` bash
30- # 패키지 업데이트
31- pacman -Syu
32-
33- # 필수 도구 설치
34- pacman -S base-devel autoconf automake libtool pkgconf python
35-
36- # Emscripten SDK 설치
37- git clone https://github.com/emscripten-core/emsdk.git
38- cd emsdk
39- ./emsdk install latest
40- ./emsdk activate latest
41- source ./emsdk_env.sh
42- ```
43-
44- 3 . ** MSYS2 터미널에서 프로젝트 빌드** (이 터미널에서 모든 빌드 명령어 실행)
45-
46- #### 방법 2: WSL (Windows Subsystem for Linux)
47-
48- 1 . ** WSL 설치** : PowerShell에서 ` wsl --install ` 실행
49- 2 . ** WSL 터미널 실행** 후:
50- ``` bash
51- # Ubuntu/Debian 기반
52- sudo apt-get update
53- sudo apt-get install -y autoconf automake libtool pkg-config python3 python3-pip
54-
55- # Emscripten SDK 설치
56- git clone https://github.com/emscripten-core/emsdk.git
57- cd emsdk
58- ./emsdk install latest
59- ./emsdk activate latest
60- source ./emsdk_env.sh
61- ```
62-
63- 3 . ** WSL 터미널에서 프로젝트 빌드**
64-
65- ### Linux
66-
67- - ** Autotools** : ` sudo apt-get install autoconf automake libtool pkg-config ` (Ubuntu/Debian) or ` sudo yum install autoconf automake libtool pkgconfig ` (RHEL/CentOS)
68- - ** Emscripten SDK** : [ emscripten.org] ( https://emscripten.org ) 에서 설치
69- - ** Python 3** : Usually pre-installed
7+ ** Docker Desktop만 설치하면 됩니다** (모든 플랫폼: macOS, Windows, Linux)
8+
9+ - [ Docker Desktop 다운로드] ( https://www.docker.com/products/docker-desktop )
10+ - Docker Compose는 Docker Desktop에 포함되어 있음
7011
7112## Build
7213
73- ### Dev Container 사용 (가장 권장 - VS Code/Cursor )
14+ ### Dev Container 사용 (권장 )
7415
75- ** Cursor나 VS Code에서 컨테이너 내부에서 직접 개발할 수 있습니다 :**
16+ ** VS Code 또는 Cursor에서 :**
7617
77- 1 . ** Cursor/VS Code에서 프로젝트 열기**
78- 2 . ** 명령 팔레트** (` Cmd+Shift+P ` / ` Ctrl+Shift+P ` ) 열기
18+ 1 . 프로젝트 열기
19+ 2 . 명령 팔레트 (` Cmd+Shift+P ` / ` Ctrl+Shift+P ` )
79203 . ** "Dev Containers: Reopen in Container"** 선택
80- 4 . 컨테이너가 빌드되고 자동으로 연결됩니다
21+ 4 . 컨테이너 빌드 완료 후 자동 연결
8122
82- 컨테이너 내부에서:
83- - 터미널이 자동으로 컨테이너 환경에서 실행됩니다
84- - Emscripten이 자동으로 설정됩니다
85- - 바로 빌드할 수 있습니다:
23+ 컨테이너 내부 터미널에서:
8624
8725``` bash
88- # 빌드 스크립트 사용
26+ # 빌드 스크립트 실행
8927/usr/local/bin/build.sh
90-
91- # 또는 수동으로
92- source /opt/emsdk/emsdk_env.sh
93- autoreconf -fiv
94- emconfigure ./configure --enable-emscripten
95- emmake make -j4 -k
9628```
9729
98- ### Docker Compose 사용
30+ 빌드된 파일은 ` src/ ` 디렉토리에 생성됩니다:
31+ - ` chocolate-doom.html ` , ` chocolate-heretic.html ` , ` chocolate-hexen.html ` , ` chocolate-strife.html `
32+ - ` chocolate-setup.html ` , ` chocolate-server.html `
33+ - 각각의 ` .wasm ` 및 ` .js ` 파일
34+
35+ ### Docker Compose 사용 (대안)
9936
100- 모든 플랫폼에서 동일하게 작동합니다 :
37+ Dev Container를 사용할 수 없는 경우 :
10138
10239``` bash
103- # Docker 이미지 빌드 (최초 1회만, 시간이 걸릴 수 있음 )
40+ # 이미지 빌드 (최초 1회 )
10441docker-compose build
10542
106- # 컨테이너 내에서 빌드 실행
43+ # 빌드 실행
10744docker-compose run --rm build /usr/local/bin/build.sh
108-
109- # 또는 컨테이너에 접속해서 수동으로 빌드
110- docker-compose run --rm build bash
111- # 컨테이너 내에서:
112- # source /opt/emsdk/emsdk_env.sh
113- # autoreconf -fiv
114- # emconfigure ./configure --enable-emscripten
115- # emmake make -j4 -k
116- ```
117-
118- 빌드된 파일은 호스트의 ` src/ ` 디렉토리에 생성됩니다.
119-
120- ### 로컬 빌드
121-
122- Docker 없이 로컬에서 빌드하려면:
123-
124- ``` bash
125- # Generate configure script
126- autoreconf -fiv
127-
128- # Configure with Emscripten
129- emconfigure ./configure --enable-emscripten
130-
131- # Build (ignore icon file errors - games will build successfully)
132- emmake make -j4 -k
13345```
13446
135- ** Note** : You may see errors about missing icon files (` doom.png ` , ` hexen.png ` , etc.) in the ` data/ ` directory. These are optional and can be ignored - the game files will build successfully.
136-
137- Output files in ` src/ ` :
138- - ` chocolate-doom.html ` , ` chocolate-heretic.html ` , ` chocolate-hexen.html ` , ` chocolate-strife.html `
139- - ` chocolate-setup.html ` , ` chocolate-server.html `
140- - Corresponding ` .wasm ` and ` .js ` files
141-
14247## Run
14348
14449``` bash
14550cd src
14651python3 -m http.server 8000
14752```
14853
149- Open ` http://localhost:8000/chocolate-doom.html ` in your browser.
54+ 브라우저에서 ` http://localhost:8000/chocolate-doom.html ` 열기
15055
151- ** Note** : You need a WAD file (e.g., ` doom1.wad ` , ` doom2.wad ` ) to play. Modify ` index.html ` 's ` preRun ` section to preload your WAD file .
56+ ** Note** : 게임을 실행하려면 WAD 파일( ` doom1.wad ` , ` doom2.wad ` 등)이 필요합니다. ` index.html ` 의 ` preRun ` 섹션을 수정하여 WAD 파일을 미리 로드하세요 .
15257
15358## Deploy to GitHub Pages
15459
155- This project includes a GitHub Actions workflow that automatically builds and deploys to GitHub Pages .
60+ GitHub Actions가 자동으로 빌드하고 배포합니다 .
15661
15762### Setup
15863
159- 1 . ** Enable GitHub Pages ** in your repository settings:
160- - Go to Settings → Pages
161- - Source: Select "GitHub Actions"
64+ 1 . Repository Settings → Pages
65+ 2 . Source: ** "GitHub Actions" ** 선택
66+ 3 . ` main ` 브랜치에 push하면 자동 배포
16267
163- 2 . ** Push to main/master branch** - The workflow will automatically:
164- - Build the project with Emscripten
165- - Deploy to GitHub Pages
166- - Your site will be available at ` https://<username>.github.io/ascii-doom/ `
167-
168- ### Manual Deployment
169-
170- If you want to deploy manually:
171-
172- ``` bash
173- # Build the project
174- autoreconf -fiv
175- emconfigure ./configure --enable-emscripten
176- emmake make -j4 -k
177-
178- # Copy files to docs/ directory (if using docs/ folder for Pages)
179- # Or push src/ directory contents to gh-pages branch
180- ```
68+ 사이트는 ` https://<username>.github.io/ascii-doom/ ` 에서 확인할 수 있습니다.
18169
18270## Troubleshooting
18371
184- - ** Build fails with "No rule to make target" ** : Run ` autoreconf -fiv ` first
185- - ** Icon file errors ** ( ` doom.png ` , ` hexen.png ` , etc.): These are optional - ignore them. Use ` -k ` flag to continue building despite errors
186- - ** wasm-ld error ** : ` emmake make clean && emmake make -k `
72+ - ** 컨테이너 연결 실패 ** : Docker Desktop이 실행 중인지 확인
73+ - ** 빌드 실패 ** : ` emmake make clean && emmake make -j4 -k` 재시도
74+ - ** 아이콘 파일 에러 ** : 무시해도 됨 (게임 빌드에는 영향 없음)
0 commit comments