Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .idea/copilot.data.migration.agent.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 17 additions & 26 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,52 +2,42 @@

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

## Build Commands
## Build

**IMPORTANT: This project ONLY builds on Windows with MSVC toolchain. Do not attempt to build on Linux.**
This project uses CMake with vcpkg for dependency management, builds only on Windows and requires Visual Studio 2017+.

This project uses CMake with vcpkg for dependency management and requires Visual Studio 2017+ on Windows:

```bash
# Configure build (requires VCPKG_ROOT environment variable)
cmake --preset x64-release # or x86-release

# Build all modules
cmake --build build/x64-release

# Run tests
cd build/x64-release && ctest

# Package for distribution
cd build/x64-release && cpack --config CPackConfig.cmake -C RelWithDebInfo
```

Build presets available: `x64-release`, `x64-debug`, `x86-release`, `x86-debug`
Do not attempt to build the code or run tests, as the environment is not set up for it.

## Development Guidelines

This project uses **C++23** and follows KISS (Keep It Simple, Stupid) and DRY (Don't Repeat Yourself) principles.

**Avoid magic numbers** - use named constants instead.
Avoid magic numbers.

## Architecture Overview

This project implements Observer plugin modules for FAR Manager that handle exotic archive formats. The codebase follows a plugin architecture where each module implements the Observer API to support different archive formats.
This project implements Observer plugin modules for FAR Manager that handle exotic archive formats. The codebase follows
a plugin architecture where each module implements the Observer API to support different archive formats.

### Core Components

- **API Layer** (`src/api.h`, `src/dll.cpp`): Implements the Observer plugin API with standard functions like `OpenStorage`, `CloseStorage`, `GetItem`, `ExtractItem`
- **Archive Wrapper** (`src/archive.h`, `src/archive.cpp`): Provides a unified interface that wraps format-specific extractors
- **Extractor Interface** (`src/modules/extractor.h`): Defines the abstract interface that all format extractors must implement
- **API Layer** (`src/api.h`, `src/dll.cpp`): Implements the Observer plugin API with standard functions like
`OpenStorage`, `CloseStorage`, `GetItem`, `ExtractItem`
- **Archive Wrapper** (`src/archive.h`, `src/archive.cpp`): Provides a unified interface that wraps format-specific
extractors
- **Extractor Interface** (`src/modules/extractor.h`): Defines the abstract interface that all format extractors must
implement

### Module Structure

Each supported format has its own module under `src/modules/`:

- `renpy/`: RenPy visual novel archives (.rpa files) with pickle support
- `zanzarah/`: Zanzarah game archives (.pak files)
- `zanzarah/`: Zanzarah game archives (.pak files)
- `rpgmaker/`: RPG Maker archives (in development)

Each module contains:

- Format-specific implementation (e.g., `renpy.cpp`)
- Module definition file (`.def`) for DLL exports
- Configuration file (`observer_user.ini`)
Expand All @@ -62,4 +52,5 @@ Each module contains:

### Testing Framework

Located in `src/tests/` with a custom framework (`framework/observer.h`) that simulates the Observer API for testing archive operations without requiring FAR Manager.
Located in `src/tests/` with a custom framework (`framework/observer.h`) that simulates the Observer API for testing
archive operations without requiring FAR Manager.