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.4.0b3.tar.gz (9.3 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.4.0b3-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file bmgen-2023.4.0b3.tar.gz.

File metadata

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

File hashes

Hashes for bmgen-2023.4.0b3.tar.gz
Algorithm Hash digest
SHA256 462d79a8a81bcb420e2b7379381e5dba4ddaa403056636a17b8c7a374ed38c13
MD5 479b40ecb0e004a19e39e175179be8d5
BLAKE2b-256 85e9dbe3e86e55f13ebe0914671bfbe6dc717cec0d547351502f4c82799c7e89

See more details on using hashes here.

File details

Details for the file bmgen-2023.4.0b3-py3-none-any.whl.

File metadata

  • Download URL: bmgen-2023.4.0b3-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.4.0b3-py3-none-any.whl
Algorithm Hash digest
SHA256 5e86f0d3f0b073bcc48021ff0b37237ac6f4bda2ac951baa964539660ab8b5f5
MD5 d89c4bff243ec15c8b06df41ab733c44
BLAKE2b-256 556ce8680947a806b0efa5d536349174a08b10769349521a7dd1709d61f5a230

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