The previous setup packaged the development `.env` into the installer
resources, mixing local server settings (PORT/HOST/SESSION_SECRET) with
the build-time site domain. Introduce a dedicated `.env.build`:
- electron-builder configs now copy `.env.build` (gitignored) into
`resources/`, no longer touching the dev `.env`.
- `loadEnv()` prefers `resources/.env.build` first, falling back to
`resources/.env` (for operators who hand-edit the packaged file),
then `<root>/.env.build`, then `<root>/.env`.
- `.env.build.example` documents the build-only keys (SITE_BASE_URL,
MANIFEST_URL, MUSIC_CONCURRENCY); server-side keys stay in `.env`.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Both electron-builder configs now produce a single-file portable .exe
instead of an NSIS installer. Removes installer/uninstaller icons and
the install-directory wizard — users can run the .exe directly.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The root package.json's `main` field points at dist/installer/main.js
because that's the default `npm run installer` entry. Without an
override, `electron-builder --config electron-builder-rp.yml` would
package the resourcepack installer with the wrong main, so the exe
would start the regular installer (or fail outright).
Add `extraMetadata.main: dist/installer-rp/main.js` so the packaged
package.json is rewritten at build time to point at the right entry.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Reviewer follow-ups:
1) Preserve mods/ for vanilla packs. `downloadModsFolder` now checks
`!pack.modsFolder` BEFORE wiping — vanilla packs (no modsFolder) no
longer clobber a user's hand-curated mods directory. Wipe still runs
for modded packs to keep different MC versions from colliding.
2) Always rename the extracted map to `saves/<퀴즈이름>/`, regardless of
the zip's top-level layout. The zip is now extracted into a temp
directory under saves/, and:
- if the temp has a single subdirectory, that subdirectory's content
becomes the world;
- otherwise the temp dir itself (e.g. level.dat + region/ at root) is
the world.
In either case, it is renamed atomically to `saves/<sanitized name>`
(or `<name>_2` etc. if a user world collides). Marker tracks the
final folder name for participant cleanup.
User request: replace both .exe icons.
- Added build/icon.ico (multi-size 16/32/48/64/128/256) and build/icon.png
generated from the new music-note artwork.
- electron-builder.yml: set win.icon, nsis installer/uninstaller icons,
buildResources=build, include build/icon.* in files for runtime use.
- New electron-builder-rp.yml + dist:win:rp script so the resourcepack
installer also packages with the same icon.
- BrowserWindow({ icon }) wired in both installer and installer-rp main
processes so the running window's titlebar/taskbar icon matches.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>