Compare commits

..

7 Commits

Author SHA1 Message Date
4f496eac10 release: v1.0.0 정식 배포
기능 변경 없이 버전만 1.0.0 으로 승격(config 파일 지원, fabric meta 설치,
다운로드 오류 URL 표시 등 0.4.x 누적 기능 포함).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-16 21:57:45 +09:00
d4e4378602 revert(installer): config zip 경로를 /file/configs (복수)로 되돌림 (v0.4.30)
사용자가 서버 폴더를 configs(복수)로 정리하기로 해, 단수 config 로 바꿨던
것을 원복. resolveManifestRelative subDir 'configs', 타입 주석/로케일 힌트/
리포지토리 폴더(file/configs)/버전(0.4.30) 모두 복수로 통일.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-11 17:47:43 +09:00
9e9eae0920 fix(installer): config zip 경로 단수화 소스 반영 (v0.4.29)
이전 커밋(082dae5)은 file/configs→config 폴더 rename 만 담기고 실제 소스
변경이 누락됐다. resolveManifestRelative subDir 를 'config' 로, 관련
타입 주석/로케일 힌트/버전(0.4.29)까지 반영.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-11 00:23:48 +09:00
082dae5a90 fix(installer): config zip 다운로드 경로를 /file/config (단수)로 정정 (v0.4.29)
설치기가 /file/configs (복수)에서 받으려 해 서버의 file/config (단수)에
올린 zip 을 못 찾아 HTTP 404 로 실패했다. 마인크래프트 config 폴더 및
운영 서버 디렉터리 규칙에 맞춰 단수 config 로 통일.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-11 00:23:18 +09:00
7508f3b11b fix(installer): 다운로드 HTTP 오류에 실패한 URL 표시 (v0.4.28)
fetchBuffer/downloadStream 이 4xx/5xx 에 "HTTP 404" 처럼 상태코드만 던져,
어떤 파일(mods/resourcepack/map/config/server)이 없는지 알 수 없었다.
에러 메시지에 실패 URL 을 붙여 config 미업로드 등 원인을 바로 식별 가능하게 함.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-11 00:08:59 +09:00
bed47e88a0 docs: Fabric 로더 힌트를 meta 프로필 JSON 방식으로 정정
관리자 편집기 platformLoaderHint 가 아직 "fabric-installer CLI 설치"라고
설명하고 있었으나, 실제 설치기는 자바 없이 Fabric Meta profile JSON 을 받아
.minecraft/versions 에 직접 저장한다. UI 설명을 실제 동작에 맞춤.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-10 23:47:48 +09:00
ab928b13e0 feat: config 파일(.zip) 입력/다운로드 지원 (v0.4.27)
관리자 편집기에서 맵 파일과 서버 파일 사이에 "config 파일 (.zip)" 필드를
추가하고, 간편설치기가 /file/configs/<name> zip 을 받아 게임 폴더(.mc_custom)
루트에 그대로 풀도록 했다(zip 안의 config/ 가 .mc_custom/config/ 로 배치).

- PackDefinition.configPath 추가 + store 정규화/기본값
- 설치기 downloadConfigZip 헬퍼 + client:install 흐름 반영
- 편집기 필드, op 저장 파싱, 로케일 키(server/installer)
- docs/installer.md 다운로드 단계 갱신, file/configs/ 폴더 생성

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-10 23:43:54 +09:00
10 changed files with 39 additions and 5 deletions

View File

@@ -80,7 +80,7 @@
- `vanilla` → 건너뜀. - `vanilla` → 건너뜀.
- `fabric` → fabric-installer(자바 필요) 를 돌리지 않고, fabric meta 에서 버전 프로필 JSON 을 직접 받아 `.minecraft\versions\fabric-loader-Y-X\fabric-loader-Y-X.json` 으로 저장한다(`https://meta.fabricmc.net/v2/versions/loader/<mc>/<loader>/profile/json`). 자바가 없어도 되므로 "spawn java ENOENT" 나 바닐라 선행 실행이 필요 없다. 라이브러리는 프로필 JSON 에 적힌 maven url 을 보고 런처가 실행 시 자동으로 받는다. (fabric 버전/라이브러리는 런처 폴더 `.minecraft` 에 있어야 런처가 찾으며, `.mc_custom` 에 두면 "Unable to prepare assets for download" 로 실패한다.) - `fabric` → fabric-installer(자바 필요) 를 돌리지 않고, fabric meta 에서 버전 프로필 JSON 을 직접 받아 `.minecraft\versions\fabric-loader-Y-X\fabric-loader-Y-X.json` 으로 저장한다(`https://meta.fabricmc.net/v2/versions/loader/<mc>/<loader>/profile/json`). 자바가 없어도 되므로 "spawn java ENOENT" 나 바닐라 선행 실행이 필요 없다. 라이브러리는 프로필 JSON 에 적힌 maven url 을 보고 런처가 실행 시 자동으로 받는다. (fabric 버전/라이브러리는 런처 폴더 `.minecraft` 에 있어야 런처가 찾으며, `.mc_custom` 에 두면 "Unable to prepare assets for download" 로 실패한다.)
- `forge` / `neoforge``platform.downloadUrl` 의 설치 jar 다운로드(사용자가 직접 실행하거나 마인크래프트 런처가 인식). - `forge` / `neoforge``platform.downloadUrl` 의 설치 jar 다운로드(사용자가 직접 실행하거나 마인크래프트 런처가 인식).
4. `modsFolder` 의 모든 `.jar``resourcepackPath` zip, `mapPath` zip 을 자동 다운로드. 4. `modsFolder` 의 모든 `.jar``resourcepackPath` zip, `mapPath` zip, `configPath` zip 을 자동 다운로드. (`configPath` zip 은 `.mc_custom` 루트에 그대로 풀려 `config/` 등이 배치됨)
5. `.minecraft\{assets,libraries,versions}``.mc_custom\{assets,libraries,versions}` 로 junction 링크. (없으면 "Unable to prepare assets for download" 오류로 마인크래프트가 실패하기 때문) 5. `.minecraft\{assets,libraries,versions}``.mc_custom\{assets,libraries,versions}` 로 junction 링크. (없으면 "Unable to prepare assets for download" 오류로 마인크래프트가 실패하기 때문)
6. `.minecraft\launcher_profiles.json` 에 해당 음악퀴즈 이름의 프로필을 추가/갱신: 6. `.minecraft\launcher_profiles.json` 에 해당 음악퀴즈 이름의 프로필을 추가/갱신:
- `gameDir` = `%APPDATA%\.mc_custom` - `gameDir` = `%APPDATA%\.mc_custom`

0
file/configs/.gitkeep Normal file
View File

View File

@@ -233,8 +233,10 @@
"labelExtract": "{{label}} 압축 해제: {{dir}}", "labelExtract": "{{label}} 압축 해제: {{dir}}",
"labelServerFile": "서버 파일", "labelServerFile": "서버 파일",
"labelMap": "맵", "labelMap": "맵",
"labelConfigFile": "config 파일",
"skipServerZip": "서버 파일(serverPath)이 비어 있어 서버 zip 다운로드를 건너뜁니다.", "skipServerZip": "서버 파일(serverPath)이 비어 있어 서버 zip 다운로드를 건너뜁니다.",
"skipMapZip": "맵 다운로드를 건너뜁니다 (mapPath 비어 있음 또는 참가자 모드).", "skipMapZip": "맵 다운로드를 건너뜁니다 (mapPath 비어 있음 또는 참가자 모드).",
"skipConfigZip": "config 파일(configPath)이 비어 있어 config zip 다운로드를 건너뜁니다.",
"cleanupInstallerMap": "이전 설치에서 풀어둔 맵 {{count}}개를 정리합니다.", "cleanupInstallerMap": "이전 설치에서 풀어둔 맵 {{count}}개를 정리합니다.",
"mapInstalledAs": "맵을 saves/{{name}} 으로 설치했습니다.", "mapInstalledAs": "맵을 saves/{{name}} 으로 설치했습니다.",
"clearMods": "기존 mods 폴더({{dir}})를 비우고 새로 받습니다.", "clearMods": "기존 mods 폴더({{dir}})를 비우고 새로 받습니다.",

View File

@@ -117,7 +117,7 @@
"platformDownloadUrl": "플랫폼 설치파일 URL", "platformDownloadUrl": "플랫폼 설치파일 URL",
"platformDownloadHint": "도메인 없이 입력하면 manifest.json 도메인의 <code>/file/platforms/&lt;파일명&gt;</code>으로 해석됩니다.", "platformDownloadHint": "도메인 없이 입력하면 manifest.json 도메인의 <code>/file/platforms/&lt;파일명&gt;</code>으로 해석됩니다.",
"platformLoaderVersion": "Fabric Loader 버전", "platformLoaderVersion": "Fabric Loader 버전",
"platformLoaderHint": "선택한 마인크래프트 버전 기준 Fabric Loader 목록입니다. 설치기는 최신 fabric-installer 를 받아 자동으로 CLI 설치합니다.", "platformLoaderHint": "선택한 마인크래프트 버전 기준 Fabric Loader 목록입니다. 설치기는 자바 없이 Fabric Meta 의 프로필 JSON 을 받아 .minecraft/versions 에 직접 저장합니다.",
"platformLoaderEmpty": "호환 로더 없음", "platformLoaderEmpty": "호환 로더 없음",
"platformLoaderPickMc": "마인크래프트 버전을 먼저 선택하세요", "platformLoaderPickMc": "마인크래프트 버전을 먼저 선택하세요",
"platformLoaderLoadFailed": "로더 목록 로드 실패: {{message}}", "platformLoaderLoadFailed": "로더 목록 로드 실패: {{message}}",
@@ -134,6 +134,8 @@
"jdkLtsSuffix": " (LTS)", "jdkLtsSuffix": " (LTS)",
"mapPath": "맵 파일 (.zip)", "mapPath": "맵 파일 (.zip)",
"mapPathHint": "/file/maps/ 아래 zip 파일 이름.", "mapPathHint": "/file/maps/ 아래 zip 파일 이름.",
"configPath": "config 파일 (.zip)",
"configPathHint": "/file/configs/ 아래 zip 파일 이름. 게임 폴더 루트에 그대로 풀립니다(보통 zip 안에 config/ 폴더).",
"serverPath": "서버 파일 (.zip)", "serverPath": "서버 파일 (.zip)",
"serverPathHint": "/file/servers/ 아래 zip 파일 이름. 멀티 모드 전용.", "serverPathHint": "/file/servers/ 아래 zip 파일 이름. 멀티 모드 전용.",
"modsFolder": "모드 폴더 이름", "modsFolder": "모드 폴더 이름",

View File

@@ -1,6 +1,6 @@
{ {
"name": "minecraft-music-quiz-installer", "name": "minecraft-music-quiz-installer",
"version": "0.4.26", "version": "1.0.0",
"description": "마인크래프트 음악퀴즈 간편설치기 + 관리 사이트", "description": "마인크래프트 음악퀴즈 간편설치기 + 관리 사이트",
"main": "dist/installer/main.js", "main": "dist/installer/main.js",
"scripts": { "scripts": {

View File

@@ -152,7 +152,7 @@ function fetchBuffer(url: string, redirects = 0, attempt = 0): Promise<Buffer> {
} }
if (code >= 400) { if (code >= 400) {
response.resume() response.resume()
reject(new Error(`HTTP ${code}`)) reject(new Error(`HTTP ${code}: ${url}`))
return return
} }
const chunks: Buffer[] = [] const chunks: Buffer[] = []
@@ -627,7 +627,7 @@ function downloadStream(
res.resume() res.resume()
fileStream.close(() => { fileStream.close(() => {
signal.removeEventListener('abort', onAbort) signal.removeEventListener('abort', onAbort)
if (!settled) { settled = true; reject(new Error(`HTTP ${sc}`)) } if (!settled) { settled = true; reject(new Error(`HTTP ${sc}: ${url}`)) }
}) })
return return
} }
@@ -765,6 +765,20 @@ async function downloadServerZip(pack: PackDefinition, targetDir: string): Promi
await downloadAndExtractZip(url, t('log.labelServerFile'), targetDir) await downloadAndExtractZip(url, t('log.labelServerFile'), targetDir)
} }
/**
* config zip 을 게임 폴더(.mc_custom) 루트에 그대로 풀어 넣는다.
* zip 안에 `config/` 폴더가 들어 있으면 `.mc_custom/config/` 로 배치된다.
* configPath 가 비어 있으면 건너뛴다.
*/
async function downloadConfigZip(pack: PackDefinition, customRoot: string): Promise<void> {
if (!pack.configPath) {
sendLog(t('log.skipConfigZip'))
return
}
const url = resolveManifestRelative(pack.configPath, 'configs')
await downloadAndExtractZip(url, t('log.labelConfigFile'), customRoot)
}
/** /**
* 설치러가 saves/ 에 풀어놓은 최상위 폴더(또는 파일) 목록을 기록하는 마커 파일. * 설치러가 saves/ 에 풀어놓은 최상위 폴더(또는 파일) 목록을 기록하는 마커 파일.
* 재설치 시 잔여물을 안전하게 정리하고, 싱글→참가자 전환 시에도 * 재설치 시 잔여물을 안전하게 정리하고, 싱글→참가자 전환 시에도
@@ -1432,6 +1446,9 @@ ipcMain.handle('client:install', async (_event, payload: ClientInstallPayload) =
await downloadMapZip(pack.pack, customRoot) await downloadMapZip(pack.pack, customRoot)
} }
// config zip 은 게임 폴더(.mc_custom) 루트에 그대로 풀어 config/ 등을 배치한다.
await downloadConfigZip(pack.pack, customRoot)
// 런처가 .mc_custom 을 gameDir 로 잡아도 assets/libraries/versions 를 // 런처가 .mc_custom 을 gameDir 로 잡아도 assets/libraries/versions 를
// 찾을 수 있도록 .minecraft 의 해당 폴더로 junction 링크. // 찾을 수 있도록 .minecraft 의 해당 폴더로 junction 링크.
await linkMinecraftRuntimeDirs(customRoot) await linkMinecraftRuntimeDirs(customRoot)

View File

@@ -604,6 +604,7 @@ opRouter.post('/op/dashboard/:packName', requireAuth, async (req, res, next) =>
clientRecommendedRam: Number(pickFirstValue(req.body.clientRecommendedRam)), clientRecommendedRam: Number(pickFirstValue(req.body.clientRecommendedRam)),
recommendedJdk: Number(pickFirstValue(req.body.recommendedJdk)), recommendedJdk: Number(pickFirstValue(req.body.recommendedJdk)),
mapPath: pickFirstValue(req.body.mapPath), mapPath: pickFirstValue(req.body.mapPath),
configPath: pickFirstValue(req.body.configPath),
serverPath: pickFirstValue(req.body.serverPath) serverPath: pickFirstValue(req.body.serverPath)
} }

View File

@@ -55,6 +55,7 @@ export function defaultPackDefinition(name: string): PackDefinition {
clientRecommendedRam: 4096, clientRecommendedRam: 4096,
recommendedJdk: DEFAULT_JDK_MAJOR, recommendedJdk: DEFAULT_JDK_MAJOR,
mapPath: '', mapPath: '',
configPath: '',
serverPath: '' serverPath: ''
} }
} }
@@ -142,6 +143,7 @@ export function normalizePackDefinition(input: Partial<PackDefinition> & Record<
clientRecommendedRam: clampNumber(input.clientRecommendedRam, fallback.clientRecommendedRam), clientRecommendedRam: clampNumber(input.clientRecommendedRam, fallback.clientRecommendedRam),
recommendedJdk: normalizeRecommendedJdk(input.recommendedJdk), recommendedJdk: normalizeRecommendedJdk(input.recommendedJdk),
mapPath: sanitizeZipFileName(input.mapPath), mapPath: sanitizeZipFileName(input.mapPath),
configPath: sanitizeZipFileName(input.configPath),
serverPath: sanitizeZipFileName(input.serverPath) serverPath: sanitizeZipFileName(input.serverPath)
} }
} }

View File

@@ -41,6 +41,11 @@ export interface PackDefinition {
recommendedJdk: number recommendedJdk: number
/** /file/maps/<mapPath> 에서 받아 .mc_custom/saves 로 풀 zip 파일 이름. */ /** /file/maps/<mapPath> 에서 받아 .mc_custom/saves 로 풀 zip 파일 이름. */
mapPath: string mapPath: string
/**
* /file/configs/<configPath> 에서 받아 게임 폴더(.mc_custom) 루트에 그대로 푸는 zip
* 파일 이름. 보통 zip 안에 `config/` 폴더를 담는다. 빈 문자열이면 받지 않는다.
*/
configPath: string
/** /file/servers/<serverPath> 에서 받아 서버 설치 경로로 풀 zip 파일 이름. */ /** /file/servers/<serverPath> 에서 받아 서버 설치 경로로 풀 zip 파일 이름. */
serverPath: string serverPath: string
} }

View File

@@ -96,6 +96,11 @@
<input name="mapPath" value="<%= pack.mapPath %>" placeholder="my-map.zip" pattern=".+\.zip" /> <input name="mapPath" value="<%= pack.mapPath %>" placeholder="my-map.zip" pattern=".+\.zip" />
<small class="muted"><%= t('editor.mapPathHint') %></small> <small class="muted"><%= t('editor.mapPathHint') %></small>
</label> </label>
<label>
<span><%= t('editor.configPath') %></span>
<input name="configPath" value="<%= pack.configPath %>" placeholder="my-config.zip" pattern=".+\.zip" />
<small class="muted"><%= t('editor.configPathHint') %></small>
</label>
<label> <label>
<span><%= t('editor.serverPath') %></span> <span><%= t('editor.serverPath') %></span>
<input name="serverPath" value="<%= pack.serverPath %>" placeholder="my-server.zip" pattern=".+\.zip" /> <input name="serverPath" value="<%= pack.serverPath %>" placeholder="my-server.zip" pattern=".+\.zip" />