Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 40986bee11 | |||
| bf225f51e1 |
@@ -75,6 +75,7 @@
|
||||
"baseUrl": " URL: {{url}}",
|
||||
"baseReceived": "베이스 리소스팩 받음 ({{kb}} KB)",
|
||||
"baseAbsent": "베이스 리소스팩 없음(resourcepackPath 빈 값) — 새 리소스팩으로 생성",
|
||||
"baseRemoved": "베이스 리소스팩 삭제: {{path}}",
|
||||
"buildingZip": "리소스팩 zip 빌드 중… ({{name}})",
|
||||
"installComplete": "설치 완료: {{path}}",
|
||||
"cancelRequested": "취소 요청됨. 실행 중 프로세스 {{count}}개 중단…",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "minecraft-music-quiz-installer",
|
||||
"version": "0.2.3",
|
||||
"version": "0.2.5",
|
||||
"description": "마인크래프트 음악퀴즈 간편설치기 + 관리 사이트",
|
||||
"main": "dist/installer/main.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -421,6 +421,22 @@ ipcMain.handle('rp:install:start', async (): Promise<{ resourcepackPath: string
|
||||
|
||||
// 2-6. %appdata%/.mc_custom/resourcepacks/ 에 배치 (위 빌드가 직접 outZipPath 에 저장)
|
||||
sendLog(t('log.installComplete', { path: resourcepackPath }))
|
||||
|
||||
// 2-7. 베이스 리소스팩은 우리가 임시폴더에 받아서 빌드에 이미 얹었으므로,
|
||||
// 메인 설치기가 `.mc_custom/resourcepacks/<resourcepackPath>` 에 받아둔
|
||||
// 원본 zip 은 MC 리소스팩 목록에 굳이 남길 필요 없다. 삭제하되, 사용자가
|
||||
// outputPackName 을 base 파일명과 똑같이 둬서 우리가 방금 쓴 최종 zip 과
|
||||
// 같은 경로면 그대로 둔다(우리 산출물을 지우면 안 되므로).
|
||||
if (pack.resourcepackPath) {
|
||||
const basePackPath = path.join(resourcepackDir, pack.resourcepackPath)
|
||||
if (path.resolve(basePackPath) !== path.resolve(resourcepackPath)) {
|
||||
try {
|
||||
await fsp.rm(basePackPath, { force: true })
|
||||
sendLog(t('log.baseRemoved', { path: basePackPath }))
|
||||
} catch { /* 없으면 무시 */ }
|
||||
}
|
||||
}
|
||||
|
||||
sendProgress({ phase: 'package', message: t('progress.installComplete'), done: true })
|
||||
return { resourcepackPath }
|
||||
} finally {
|
||||
|
||||
@@ -1219,7 +1219,16 @@ async function installFabricLoader(pack: PackDefinition, customRoot: string): Pr
|
||||
|
||||
// 4) fabric-installer CLI 자동 실행.
|
||||
// client 모드 + -noprofile: launcher_profiles.json 은 우리 코드가 직접 갱신하므로 fabric-installer 가 덮어쓰지 않게 한다.
|
||||
// JVM stdout 인코딩 강제 UTF-8:
|
||||
// 한국 윈도우의 시스템 codepage 는 cp949(MS949) 라서 fabric-installer 가
|
||||
// 한글을 cp949 로 stdout 에 쓰면 우리가 utf-8 로 디코드해서 깨져 보인다.
|
||||
// `file.encoding` 은 default Charset, `stdout/stderr.encoding` 은
|
||||
// System.out/err 의 PrintStream 인코딩(Java 18+). 둘 다 지정하면
|
||||
// 구버전·신버전 JDK 모두에서 안전.
|
||||
const args = [
|
||||
'-Dfile.encoding=UTF-8',
|
||||
'-Dstdout.encoding=UTF-8',
|
||||
'-Dstderr.encoding=UTF-8',
|
||||
'-jar', installerJar,
|
||||
'client',
|
||||
'-mcversion', pack.mcVersion,
|
||||
|
||||
Reference in New Issue
Block a user