Skip to main content

SCons tool to build BennuGD project

Project description

scons-tool-bennugd

SCons tool to build BennuGD projects.

Installation

There are a few ways to install this tool for your SCons project.

From pypi

This method may be preferable if you build your project under a virtualenv. To add a scons-tool-bennugd from pypi, type (within your virtualenv):

pip install scons-tool-bennugd

Or, if your project uses pipenv:

pipenv install --dev scons-tool-bennugd

Alternatively, you may add this to your Pipfile:

[dev-packages]
scons-tool-bennugd = "*"

The tool will be installed as a namespaced package sconstool.bennugd in the project's virtual environment.

As a git submodule

In your git repository, add the scons-tool-bennugd as a submodule:

git submodule add git://bitbucket.org/dacucar/scons-tool-bennugd.git

Manually downloading dcbc module

Download the dcbc tool module into the site_scons/site_tools.

mkdir -p site_scons/site_tools
curl https://bitbucket.org/dacucar/scons-tool-bennugd/raw/HEAD/sconstool/bennugd/dcbc.py -o site_scons/site_tools/dcbc.py 

Usage example

First, create your game sources:

game/
│
└───lib/
│   │   lib.prg
|   |   lib.h
│
└───game/
│   │   game.prg
│   │   game_part_1.prg
|   |   ...
│
└───tool/
    │   tool.prg
    │   tool_part_1.prg
    |   ...

In this example, tool and game depend on lib. Also game_part_1.prg is included in game.prg and tool_part_1.prg is included in tool.prg.

Then, write SConstruct file.

# SConstruct
env = Environment(
	# We need to tell scons how to find the tool package...
	# ...if you installed it with pip/pipenv use
	toolpath = [PyPackageDir('sconstool.bennugd')],
	# ... OR if you installed it as a git submodule
	# toolpath = ['scons-tool-bennugd/sconstool/bennugd']
	# ... OR if you downloaded the dcbc.py into site_scons/site_tools, then there is no need to specify toolpath

	tools = ['default', 'dcbc'],
	DCBC = '/path/to/bgdc'
	)

env.Dcl('lib', 'lib/lib')
env.Dcb('game', 'game/game', DCBCLIBS='lib/lib')
env.Dcb('tool', 'game/tool', DCBCLIBS='lib/lib')

Finally, try it out.

To build all targets:

scons

To clean:

scons -c

To build only game target:

scons game

SCons is a very feature rich build-system and highly customizable. Make sure to read the documentation if you want to know what else you can do.

It can also be used with PixTudio!

Instead of specifying path to bgdc, we can specify a path to pxtb.

env = Environment(
	toolpath = [PyPackageDir('sconstool.bennugd')],
	tools = ['default', 'dcbc'],
	DCBC = '/path/to/pxtb'
	)

Supported Options

The following options are accepted by the Dcl and the Dcb builders:

Variable Default Description
DCBC "bgdc" DCB compiler.
DCBCFLAGS "" Additional compilation flags.
DCBCMACROS {} Additional compilation macros, expressed as a dictionary.
DCBCPATH [] Additional paths where the compiler shall search for files.
DCBCFILES [] A list of files that shall be added to the dcb.
DCBCLIBS [] A list of libraries that shall be included by the compiler.
DCBCLIBEXTENSION ".dcl" The extension used when compiling in libmode.

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

scons-tool-bennugd-1.0.0.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

scons_tool_bennugd-1.0.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file scons-tool-bennugd-1.0.0.tar.gz.

File metadata

  • Download URL: scons-tool-bennugd-1.0.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for scons-tool-bennugd-1.0.0.tar.gz
Algorithm Hash digest
SHA256 7437acbf93b8740be5d9820dde63e4aca4b50260bdb5adb871c2a071a335cb0f
MD5 958f91ba3b34f6de8c7f5b692baffc30
BLAKE2b-256 effd2d5d4120983a7e3b631a88092d81d80661542b77eb6fe27b3b6225728a47

See more details on using hashes here.

File details

Details for the file scons_tool_bennugd-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: scons_tool_bennugd-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for scons_tool_bennugd-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 46f4d693608c4fd4c2fbe2018239c74714ccb6a8060c32435aac7997767be7f4
MD5 05cc2c5584e3e240414281ed06ad9f05
BLAKE2b-256 4d3c24d1538ef2e460b79edb3e9156871e27a91c0adb1ff3f2c72633e2231693

See more details on using hashes here.

Supported by

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