[go: nahoru, domu]

Skip to content
Neil Richardson edited this page Sep 20, 2015 · 3 revisions

Command line tools

For convenience, provided are some command line tools to assist with development.

Scripts/GameGen.py

Will initialise and setup a new repository for a game project.

Usage example:

python PathTo/Psybrus/Scripts/GameGen.py --name MyGame --branch develop
  • --name/-n - Game name. Will create a folder of the same name in the current working directory, and use that as the project root.
  • --branch/-b - Branch of Psybrus to use. If omitted, it will take the current commit and be detached from head. Recommended to specify 'develop' if you wish to get regular updates, or do development on Psybrus features.

Once this script runs, it will initialise a new git repo, copy in template game files, and clone Psybrus and its submodules into the project. This should be in a state where it can be built for all platforms using the provided scripts and utilities.

Scripts/ProjectGen.py (In game, ProjectGen.bat/ProjectGen.sh)

Used to generate projects to build your game. Will generate GNU Makefiles for most platforms, and a Visual Studio solution for the Windows build.

Provided in the root of your game project should be ProjectGen.bat & ProjectGen.sh. These are provided as a shortcut to launch the script.

Usage example:

ProjectGen.bat --toolset windows-vs-v140
  • --toolset/-t - Toolset to generate projects for.

Once ran, it will output projects to the "Projects" directory. If ran without specifying a toolset, it will prompt available options for current host OS.

Scripts/Build.py (In game, Build.bat/Build.sh)

Used to build from command line. Will generate appropriate projects, then invoke the tools required to build the game and engine.

Usage example:

./Build.sh --toolset html5-clang-asmjs --config debug
  • --toolset/-t - Toolset to build with.
  • --config/-c - Configuration to build (debug, release, profile, production)

This will generate projects first, then build for the toolset required. Can be used to help automate the process.

Scripts/Deploy.py (In game, Build.bat/Build.sh)

Used to deploy game. Will build, run importer, and package up the game for deployment. This tool is still a WIP, but will eventually wrap up functionality such as deploying HTML5 builds to a web service, creating a full installer for Windows, .app for OSX, and appropriate packages for Linux. Currently it will only really deal with building an APK for Android.

Usage example:

./Deploy.sh --toolset android-gcc-arm --config production
  • --toolset/-t - Toolset to deploy with.
  • --config/-c - Configuration to deploy (debug, release, profile, production)