Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AnomalyFramework - Raylib Windows Build System 🚀

AnomalyFramework is a portable, zero-configuration build system and project boilerplate designed to make compiling Raylib C/C++ projects on Windows as simple as possible.

The main goal is to remove the usual setup process required for C/C++ game development. Instead of manually installing a compiler, configuring environment variables, copying DLLs, and preparing release files, AnomalyFramework attempts to handle the entire process automatically.

Write your code. Run build.bat. Get a working .exe.


🌟 Key Features

⚡ Zero-Setup Auto-Compiler

If a suitable C++ compiler such as g++ or MinGW is not available, AnomalyFramework can automatically detect the situation and configure a portable MinGW-w64 environment.

This allows the project to remain portable without requiring the developer to manually configure a compiler installation.

🔍 Smart Compiler Detection

The build system searches for existing compiler environments instead of blindly installing a new one.

It can detect toolchains such as:

  • MSYS2
  • MinGW
  • MinGW-w64
  • w64devkit
  • WinLibs
  • Strawberry Perl environments
  • Existing g++ installations

This makes it possible to use an already-installed compiler whenever possible.

📦 Automated Packaging

After compilation, the build system can prepare a production-ready package containing:

  • The compiled .exe
  • Required Raylib DLL files
  • Required runtime dependencies
  • Release ZIP archive

This means the executable can be distributed without manually collecting dependencies.

🧹 Clean Project Structure

AnomalyFramework separates source code, headers, libraries, temporary build files, and release packages.

This keeps the project organized even as the codebase grows.

🪟 Windows Focused

The framework is currently designed specifically around the Windows development environment.

It aims to provide a simple workflow for developers who want to build Raylib games without setting up a large game engine or complicated build system.


🎮 Why AnomalyFramework?

Setting up a C/C++ game development environment on Windows can involve several manual steps:

  1. Install a compiler.
  2. Configure PATH variables.
  3. Install Raylib.
  4. Configure include directories.
  5. Configure library directories.
  6. Configure linker arguments.
  7. Copy required DLL files.
  8. Compile the project.
  9. Prepare the executable for distribution.

AnomalyFramework attempts to reduce this process to:

build.bat

The goal is to make the framework behave more like a small self-contained development environment rather than requiring every machine to have an identical configuration.


📁 Project Directory Structure

AnomalyFramework/
│
├── build/
│   └── # Temporary object files and build artifacts
│
├── include/
│   └── # C/C++ header files (.h, .hpp)
│
├── libs/
│   └── # Raylib libraries, DLLs and static libraries
│
├── output/
│   └── # Compiled executable files
│
├── share/
│   └── # Release ZIP packages and runtime dependencies
│
├── src/
│   └── # C/C++ source files (.c, .cpp)
│
└── build.bat
    # Main automated build script

🛠️ Build Process

The general build pipeline looks like this:

                 ┌─────────────────┐
                 │    build.bat    │
                 └────────┬────────┘
                          │
                          ▼
                 ┌─────────────────┐
                 │ Detect Compiler  │
                 └────────┬────────┘
                          │
                ┌─────────┴─────────┐
                │                   │
                ▼                   ▼
        Compiler Found       Compiler Missing
                │                   │
                │                   ▼
                │          Configure Portable
                │             MinGW-w64
                │                   │
                └─────────┬─────────┘
                          ▼
                 ┌─────────────────┐
                 │ Compile Sources │
                 └────────┬────────┘
                          ▼
                 ┌─────────────────┐
                 │   Link Raylib   │
                 └────────┬────────┘
                          ▼
                 ┌─────────────────┐
                 │   Create .exe   │
                 └────────┬────────┘
                          ▼
                 ┌─────────────────┐
                 │ Package Release │
                 └────────┬────────┘
                          ▼
                 ┌─────────────────┐
                 │   share/*.zip   │
                 └─────────────────┘

🚀 Quick Start

1. Clone the repository

Clone the project to your computer.

2. Open the project directory

Navigate to the AnomalyFramework directory.

3. Add your source code

Place your C/C++ source files inside:

src/

For example:

src/
├── main.cpp
├── Player.cpp
└── Enemy.cpp

Headers can be placed inside:

include/

For example:

include/
├── Player.hpp
└── Enemy.hpp

4. Run the build script

Simply execute:

build.bat

The build system will handle compiler detection and compilation.


💻 Example main.cpp

A minimal Raylib program can look like this:

#include "raylib.h"

int main()
{
    InitWindow(800, 450, "AnomalyFramework");

    while (!WindowShouldClose())
    {
        BeginDrawing();

        ClearBackground(RAYWHITE);

        DrawText(
            "Hello from AnomalyFramework!",
            250,
            200,
            20,
            BLACK
        );

        EndDrawing();
    }

    CloseWindow();

    return 0;
}

After building, the resulting executable will be placed inside:

output/

📦 Release Packaging

The framework is designed to separate development files from distributable files.

Development files remain inside the project while release files are collected into:

share/

A typical release may look like:

share/
└── AnomalyFramework-Windows.zip
    │
    ├── AnomalyFramework.exe
    ├── raylib.dll
    └── required runtime files

This makes it easier to distribute the game to another Windows computer.


🔧 Compiler Support

AnomalyFramework is designed around the GNU C/C++ toolchain.

Commonly supported environments include:

Toolchain Detection
MinGW
MinGW-w64
MSYS2
w64devkit
WinLibs
g++ in PATH
Strawberry Perl environments 🔎 Detection support

The build system attempts to reuse an existing compiler before configuring another environment.


🎨 Raylib

AnomalyFramework is built around Raylib, a simple and lightweight library for game and graphics programming.

Raylib provides functionality for:

  • Window management
  • Input handling
  • 2D rendering
  • 3D rendering
  • Audio
  • Text rendering
  • Textures
  • Models
  • Shaders
  • Gamepad support

Official Raylib website:

https://www.raylib.com/


🧠 Design Philosophy

AnomalyFramework follows a few simple principles.

Keep It Simple

A developer should not need to understand a complicated build system just to compile a small game.

Stay Portable

The project should avoid depending heavily on machine-specific configuration.

Automate Repetitive Tasks

Compiler detection, compilation, DLL handling, and packaging are repetitive tasks that can be automated.

Keep Development Transparent

Unlike large game engines, AnomalyFramework does not attempt to hide the underlying C/C++ environment.

You still have direct access to:

C++
↓
Raylib
↓
Compiler
↓
Executable

⚙️ Build Output

After a successful build, the project can contain files similar to:

output/
├── Game.exe
└── raylib.dll

Temporary compilation files remain separated from the final executable.

For example:

build/
├── main.o
├── Player.o
└── Enemy.o

This prevents temporary compiler artifacts from cluttering the source directory.


🧪 Development Workflow

A typical development workflow is:

Write Code
    ↓
Save
    ↓
Run build.bat
    ↓
Compile
    ↓
Run Game.exe
    ↓
Test
    ↓
Modify Code
    ↓
Repeat

The framework is intentionally designed around a simple command-line workflow.


📋 Requirements

The main target environment is:

  • Windows
  • C or C++ source code
  • Raylib
  • A supported MinGW/GCC-based compiler

A compiler does not necessarily need to be manually installed, depending on the configuration of the build script.


🔒 No Heavy Game Engine

AnomalyFramework is not a game engine.

It does not try to provide:

  • Scene editors
  • Visual scripting
  • Asset browsers
  • Physics editors
  • Animation editors
  • Entity inspectors

Instead, it provides a lightweight foundation for developers who want to build their own systems directly in C/C++ with Raylib.


📌 Current Status

AnomalyFramework is currently a hobby / experimental project.

The project is actively designed around improving the Windows C/C++ development workflow for small Raylib projects.

Features and implementation details may change as the project evolves.


🗺️ Roadmap

Possible future improvements include:

  • Better compiler detection
  • Improved MinGW-w64 automatic setup
  • Better error messages
  • Incremental compilation
  • Faster rebuilds
  • Automatic dependency detection
  • Configurable compiler flags
  • Debug/release build modes
  • Custom project configuration
  • Automatic versioned releases
  • Better ZIP packaging
  • Optional CMake integration
  • More Raylib project templates

🤝 Contributing

Contributions, bug reports, suggestions, and improvements are welcome.

If you find a problem with the build system, please open an issue and include:

  • Windows version
  • Compiler/toolchain being used
  • Build output
  • Error message
  • Steps required to reproduce the problem

🐛 Bug Reports

When reporting a build problem, providing the complete terminal output is extremely useful.

For example:

build.bat

[Compiler Detection]
Searching for g++...

[Compiler]
Found: ...

[Build]
Compiling src/main.cpp...

[Error]
...

This makes it easier to identify whether the problem comes from compiler detection, compilation, linking, or packaging.


📜 License

This project is currently distributed under the license included in this repository.

Please check the repository's license file for the exact terms of use.


⭐ Support

If you find AnomalyFramework useful, consider giving the repository a ⭐ on GitHub.

It helps the project gain visibility and motivates further development.


👨‍💻 Author

AnomalyDev

AnomalyFramework is developed as a hobby project with the goal of making C/C++ and Raylib development on Windows simpler, more portable, and less frustrating.


🚀 AnomalyFramework

Simple build system. Portable compiler environment. Raylib. C/C++. Windows.

Write Code → Build → Run

About

This is the Raylib framework, which includes an automatic compiler for Windows.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages