diff --git a/locales/installer/ko-kr.json b/locales/installer/ko-kr.json index c2d1c78..90e2d42 100644 --- a/locales/installer/ko-kr.json +++ b/locales/installer/ko-kr.json @@ -290,7 +290,8 @@ "settingCopyFail": "설정 복사 실패 ({{name}}): {{message}}", "settingCopySummary": "기존 마인크래프트 설정 복사: 새로 복사 {{copied}}개 / 동기화(options 류 덮어쓰기) {{synced}}개 / 보존(이미 존재) {{skipped}}개.", "settingCopyError": "기존 설정 복사 중 오류: {{message}}", - "runtimeDirMissing": ".minecraft/{{dir}} 가 없습니다. 마인크래프트 런처를 한 번 실행한 뒤 다시 시도해주세요.", + "runtimeDirMissing": ".minecraft/{{dir}} 가 없어 공용 링크를 만들 수 없습니다(런처가 이 폴더에 직접 받게 됩니다).", + "runtimeDirCreated": ".mc_custom/{{dir}} 폴더를 새로 만들었습니다(런처가 여기에 직접 다운로드).", "runtimeDirExists": ".mc_custom/{{dir}} 가 실제 폴더로 이미 존재 — 건너뜀.", "runtimeLinkCreated": "링크 생성: .mc_custom/{{dir}} → .minecraft/{{dir}}", "runtimeLinkFail": "링크 생성 실패 ({{dir}}): {{message}}", diff --git a/package.json b/package.json index a138d10..6d31e08 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "minecraft-music-quiz-installer", - "version": "0.4.20", + "version": "0.4.21", "description": "마인크래프트 음악퀴즈 간편설치기 + 관리 사이트", "main": "dist/installer/main.js", "scripts": { diff --git a/src/installer/main.ts b/src/installer/main.ts index 922bf5b..8d17d76 100644 --- a/src/installer/main.ts +++ b/src/installer/main.ts @@ -1755,7 +1755,19 @@ async function linkMinecraftRuntimeDirs(customRoot: string): Promise { const src = path.join(mcRoot, dir) const dst = path.join(customRoot, dir) if (!fs.existsSync(src)) { + // .minecraft 에 원본이 없으면(바닐라를 한 번도 안 받았거나 런처가 다른 위치를 쓰는 + // 환경) 링크를 만들 수 없다. 이때 그냥 건너뛰면 .mc_custom/ 이 아예 없어 + // 런처가 "Unable to prepare assets for download" 로 실패한다. 빈 폴더라도 만들어 + // 런처가 그 gameDir 에 직접 받아갈 수 있게 한다(없을 때만). sendLog(t('log.runtimeDirMissing', { dir })) + try { + if (!fs.existsSync(dst)) { + await fsp.mkdir(dst, { recursive: true }) + sendLog(t('log.runtimeDirCreated', { dir })) + } + } catch (err) { + sendLog(t('log.runtimeLinkFail', { dir, message: (err as Error).message })) + } continue } let existing: import('node:fs').Stats | null = null