Add archiver dep (v7 — v8 dropped the function-style default export
that the @types still describe) and a new src/installer-rp/pack.ts
that assembles the resource pack tree under tempDir/resourcepack/
and zips it to %appdata%/.minecraft/resourcepacks/<key>_musicquiz.zip.
The tree matches Minecraft 1.21+ painting variant + custom sound
conventions:
pack.mcmeta pack_format 34,
supported 34..75
assets/musicquiz/sounds.json stream:true per track
assets/musicquiz/sounds/track_NN.ogg from tempDir/music
assets/musicquiz/textures/painting/cover_NN.png from tempDir/painting
Music NN.ogg is renamed to track_NN.ogg at copy time so the sound
event ids stay readable. The painting_variant JSON definitions are
intentionally NOT generated here — those live in the data pack and
are owned by /op/datapack on the website.
Wire step 2-4 of the install IPC to call buildResourcepackZip with
the now-populated music/painting temp dirs. Step 2-5 is now just a
log line since buildResourcepackZip writes directly to the final
path.
Verified by a node smoke test: tempDir of two stub ogg files plus
two 256x256 PNGs produces a valid zip with the expected entries
and UTF-8 Korean strings in pack.mcmeta description.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
36 lines
1.2 KiB
JSON
36 lines
1.2 KiB
JSON
{
|
|
"name": "minecraft-music-quiz-installer",
|
|
"version": "0.1.0",
|
|
"description": "마인크래프트 음악퀴즈 간편설치기 + 관리 사이트",
|
|
"main": "dist/installer/main.js",
|
|
"scripts": {
|
|
"build": "tsc -p tsconfig.json",
|
|
"start": "tsc -p tsconfig.server.json && node dist/server/app.js",
|
|
"dev:server": "tsc -p tsconfig.server.json && node dist/server/app.js",
|
|
"installer": "tsc -p tsconfig.installer.json && electron .",
|
|
"installer:rp": "tsc -p tsconfig.installer-rp.json && electron dist/installer-rp/main.js",
|
|
"dist:win": "tsc -p tsconfig.installer.json && electron-builder --win"
|
|
},
|
|
"dependencies": {
|
|
"@types/archiver": "^7.0.0",
|
|
"archiver": "^7.0.1",
|
|
"ejs": "^3.1.10",
|
|
"express": "^4.19.2",
|
|
"express-session": "^1.18.0",
|
|
"extract-zip": "^2.0.1",
|
|
"multer": "^1.4.5-lts.1",
|
|
"nat-upnp": "^1.1.1",
|
|
"sharp": "^0.34.5"
|
|
},
|
|
"devDependencies": {
|
|
"@types/ejs": "^3.1.5",
|
|
"@types/express": "^4.17.21",
|
|
"@types/express-session": "^1.18.0",
|
|
"@types/multer": "^1.4.11",
|
|
"@types/node": "^22.5.0",
|
|
"electron": "^31.4.0",
|
|
"electron-builder": "^24.13.3",
|
|
"typescript": "^5.5.4"
|
|
}
|
|
}
|