# PAL4PackTool **Repository Path**: betesla/pal4-pack-tool ## Basic Information - **Project Name**: PAL4PackTool - **Description**: 仙剑奇侠传4 PAL4打包工具 - **Primary Language**: C++ - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 5 - **Forks**: 4 - **Created**: 2025-04-17 - **Last Updated**: 2026-04-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # PAL4 CPK Toolkit Standalone toolkit for reading, packing, unpacking, mounting, and validating PAL4 `CPK` archives. 这是从主 PAL4 重建工程中拆出的独立 `CPK` 工具链仓库,当前同时服务于: - 独立构建和发布 `CPK` 工具 - 作为主工程的 Git 子模块复用 - 继续沉淀 `CPK` 格式、兼容性规则和回归测试 ## Scope Current repository contents: - `CPK` archive reader - package packer / unpacker - writable workspace mount flow - unpacked metadata sidecars - PAL4-specific storage rules and compatibility handling - Win32 GUI + CLI entrypoints - focused tests and docs ## Layout - `include/pal4/` Public headers for the standalone toolkit - `src/engine/` Core `CPK` read/write/mount implementation - `src/platform/win32/` Win32 GUI implementation - `tools/` Extra comparison / investigation tools - `tests/` Toolkit-only regression tests - `docs/` Format notes and tool usage docs - `third_party/minilzo/` Bundled miniLZO dependency used by the current writer/reader path ## Build ### Visual Studio generator (Win32) ```powershell cmake -S . -B build -A Win32 cmake --build build --config Debug cmake --build build --config Release ``` ### Main outputs - `build/Debug/pal4_cpk_tool.exe` - `build/Release/pal4_cpk_tool.exe` - `build/Debug/pal4_cpk_compare_tool.exe` - `build/Debug/pal4_cpk_toolkit_tests.exe` ## Tests Run the toolkit regression set: ```powershell $env:PAL4_TEST_FILTER='Cpk' .\build\Debug\pal4_cpk_toolkit_tests.exe ``` ## Documentation - [Tool usage](docs/cpk_tool.md) - [CPK format notes](docs/cpk_format.md) ## Main Targets - `pal4_cpk_core` - `pal4_cpk_tool_support` - `pal4_cpk_tool` - `pal4_cpk_compare_tool` - `pal4_cpk_toolkit_tests` ## Integration This repository is designed to work in two modes: - standalone build - embedded into the PAL4 main workspace through `add_subdirectory(...)` or a Git submodule