# The Forge: Downloading and Compiling

For most users, the pre-built "Spirits" (binaries) are the easiest way to summon the Witch. However, for those who wish to go into the forge and build the program from source, a few rituals must be observed.

## 1. The Pre-compiled Spirits

Official binaries for the "Big 3" operating systems (Windows, macOS, and Linux) can be found at the following location:

- Download: https://up.lod.bz/CPWitch

## 2. The Alchemist's Tools

To compile the source code yourself, you will need the Lazarus IDE (Version 4.0 or higher) and the Free Pascal (FPC) compiler. Information regarding necessary frameworks (such as the MPLA Framework) and other dependencies can be found in the project's README.

## 3. The Primary Forge (macOS)

Currently, the "Master" version of the source is forged on macOS. This environment utilizes automated scripts that handle the project's complex resource needs and dynamically create essential build files:

- Image Transmutation: The project contains approximately 500 images. On macOS, these are automatically processed, scaled, and optimized for the UI.
- Dynamic Unit Generation: The build scripts automatically generate internal Pascal units and definition files required for compilation, such as `icons.pp`, `version.pp`, and `version.def`.
- The Great Resource: These images and versioning data are compiled into a massive Lazarus Resource file (`.lrs`).
- Automated Versioning: Internal scripts handle build number increments and the generation of localized documentation.

## 4. The Universal Forge (Windows & Linux)

While initial resource generation requires the macOS environment, the resulting source code is truly cross-platform. Once those dynamic units and resource files are generated, the project can be opened in Lazarus on Windows or Linux and compiled immediately.

Note: For stable Alpha and Beta releases, these generated files are typically included in the repository to allow for immediate compilation on any platform without needing the macOS-specific scripts.

## 5. Acquiring the Source

The Witch's source code is hosted on GitHub. You can clone the repository or browse the code at the following link:

- Source: https://github.com/shidel/CPWitch

`git clone https://github.com/shidel/CPWitch.git`

## Spells and Incantations

- The Grimoire: A Conjuring Guide
- Face of the Witch: The main window
- Art of Transmutation: Unicode to Codepage
- Precognition: Codepage to Unicode
- Tuning the Cauldron: Options and Settings
- Expanding the Vocabulary: Master and User Dictionaries
- The Forge: Downloading and Compiling
- Glossary: The Pocket Reference

Documentation languages: English, German, Spanish, French, Portuguese, Turkish and Ukrainian.