Skip to main content

Broken Mouse Studios' build solution

Project description

bmgen - Broken Mouse Studios' build solution

DISCLAIMER

This project is currently in it's beta phase!

It needs to be cleaned up and does not yet have it's full set of features. You may quickly hit it's limits.

You should expect API changes and are welcome to give feedback via https://git.brokenmouse.studio/bms/bmgen/issues

Features

  • build scripts written in Python
  • incremental builds
  • temporary build directories
  • colorful and easy to read output
  • simple build commands

Installation

  • Install bmgen via pip install bmgen or python3 -m pip install bmgen

Building a simple C project

This example shows a script which builds two files named main.c and game.c into a binary named mygame with SDL2.

The directory structure created by bmgen will look like this:

- bin/
  - dbg/
    - obj/
      - main.o
      - game.o
    - mygame

The following is a breakdown of the script.

  1. First import the clang command:
from bmgen.commands.clang import clang
  1. Then set the base output directory and tell bmgen to create the base, variant and the clang command's object directory:
inst.base_output_dir = 'bin'
inst.update_output_dir()
clang.update_object_dir()
  1. Build the program via clang:
clang('mygame', ['main.c', 'game.c'], ['sdl2'])

The final bmgen.py looks like this:

from bmgen.commands.clang import clang

inst.base_output_dir = 'bin'
inst.update_output_dir()
clang.update_object_dir()

clang('mygame', ['main.c', 'game.c'], ['sdl2'])

Building the program is now as easy as running bmgen in your terminal!

License

© Broken Mouse Studios 2023
https://brokenmouse.studio

This software and it's accompanying files are licensed under the Mozilla Public License Version 2.0.

For the license's contents, see LICENSE or go to https://mozilla.org/MPL/2.0/.

By submitting patches or merge/pull requests, you grant Broken Mouse Studios the permission to use, copy, modify, distribute, publish and/or relicense the contributions you have made to the project.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bmgen-2023.5.0b0.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bmgen-2023.5.0b0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file bmgen-2023.5.0b0.tar.gz.

File metadata

  • Download URL: bmgen-2023.5.0b0.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for bmgen-2023.5.0b0.tar.gz
Algorithm Hash digest
SHA256 b1b0eac7717ee0afc6fc58c8488ede603a10e630a7c8038d9c48e77df0e6a3ec
MD5 1f6bb9fe34f5e93aae850027ed6152e2
BLAKE2b-256 f74ad4e2d6b0071cc39601134bef1a1732d04126a35ab686c9d9b807fcb3bf7e

See more details on using hashes here.

File details

Details for the file bmgen-2023.5.0b0-py3-none-any.whl.

File metadata

  • Download URL: bmgen-2023.5.0b0-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for bmgen-2023.5.0b0-py3-none-any.whl
Algorithm Hash digest
SHA256 90c22c63f2b415e6ecfe9527a2ec080d75f46b96ceecf7f964cebf6ee2616580
MD5 1229473abe0adcb04c3482f4745cf1ac
BLAKE2b-256 5b3d1bcd0cc312b65be7b4b51efbe4363dfc59436a6787f30558b304a4698773

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page