Skip to main content

SCons tool to build BennuGD project

Project description

scons-tool-bennugd

Code style: black

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']
	)

# Declare three targets
env.Dcl('lib.dcl', 'lib/lib.prg')
env.Dcb('game.dcb', 'game/game.prg', DCBCLIBS='lib/lib.dcl')
env.Dcb('tool.dcb', 'game/tool.prg', DCBCLIBS='lib/lib.dcl')

TIPS

The extension of the targets and source files can be omitted.

Finally, try it out.

To build all targets:

scons

To clean:

scons -c

To build only game target:

scons game

You may want to check the Example.

SCons is a very feature rich build-system and highly customizable.

It can also be used with PixTudio!

The variable DCBC allows defining the DCB compiler, which can be set to pxtb.

env = Environment(
	toolpath = [PyPackageDir('sconstool.bennugd')],
	tools = ['default', 'dcbc'],
	DCBC = '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.1.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

scons_tool_bennugd-1.0.1-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: scons-tool-bennugd-1.0.1.tar.gz
  • Upload date:
  • Size: 5.5 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.1.tar.gz
Algorithm Hash digest
SHA256 2ca9657e7be2fb582c8f84be4cdb16e76ad5dde062e68af16e5a012ab9d9afbb
MD5 dfbe8eea17f471e0affaafac3b7508c4
BLAKE2b-256 c123913328a8bfa6010f79d3244aa22901f1232449e24fb5335c27983d9fb4c6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scons_tool_bennugd-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.9 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ecf7eb14d5edad11655f3292359963ebf75d4cb242307b74c6bdd23a0342a129
MD5 b714be69d5bcf780d5dd76d54f5b0492
BLAKE2b-256 108130fb59c5e36046a13eab9c5e73835bcd87ddced02470782219b54321ee1f

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