Skip to content

About

A shared dev script for B2 patches

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

T6-B2DEVSCRIPT

A shared dev script for B2 patches.

Caution

If you came here looking for competitive patches downloads, wrong repository. Head to B2OP for HR/SR, B2FR for First Room.

  • compile.pyw builds a patch's debug, release and dist variants (GUI, or CLI with --cli). It is stdlib-only and needs Python 3.11+ (tkinter for the GUI).
  • setup_dev.bat / setup_dev.ps1 (Windows) and setup_dev.sh (Linux, macOS) prepare a patch checkout for development: they check Python and gsc-tool, link the T6-B2CORE checkout in as core, and write the local settings (.b2local.json).

Adding it to a patch

git submodule add https://github.com/B2ORG/T6-B2DEVSCRIPT devscript

The patch root needs b2build.json (the tracked project config). Everything runs straight from the submodule and finds the patch it is checked out in by itself.

Setting up a patch checkout

Clone the patch with its submodule, or check the submodule out in an existing clone:

git clone --recurse-submodules <patch repository>
git submodule update --init

Then run the setup once, from the patch root:

devscript\setup_dev.bat          Windows (or double-click it)
./devscript/setup_dev.sh         Linux, macOS

Options for unattended setup (core path, game scripts folder) are listed at the top of each script; ./devscript/setup_dev.sh --help prints them too.

Building

python devscript/compile.pyw                 GUI
python devscript/compile.pyw --cli [opts]    command line (see --help)

CI checkouts need submodules: true (for actions/checkout).

How the patch root is found

  1. --repo-root PATH (-RepoRoot for setup_dev.ps1)
  2. the nearest directory above the script that holds b2build.json
  3. the nearest directory above the working directory that holds b2build.json

Updating a patch to a newer builder

git -C devscript pull origin main
git add devscript

Each patch pins its own builder commit, so updating one patch does not change another.

About

A shared dev script for B2 patches

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages