mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-08-19 17:40:38 +00:00
1.5 KiB
1.5 KiB
Building
Pre-requisites
- A bash shell (git bash is sufficient for Windows)
gitavailable in your shell- PHP 8.2 or newer available in your shell
composeravailable in your shell
Custom PHP binaries
Because PocketMine-MP requires several non-standard PHP extensions and configuration, PMMP provides scripts to build custom binaries for running PocketMine-MP, as well as prebuilt binaries.
- Prebuilt binaries
- Compile scripts are provided as a submodule in the path
build/php
If you use a custom binary, you'll need to replace composer usages in this guide with path/to/your/php path/to/your/composer.phar.
Setting up environment
git clone https://github.com/pmmp/PocketMine-MP.gitcomposer install
Checking out a different branch to build
git checkout <branch to checkout>- Re-run
composer installto synchronize dependencies.
Optimizing for release builds
- Add the flags
--no-dev --classmap-authoritativeto yourcomposer installcommand. This will reduce build size and improve autoloading speed.
Building PocketMine-MP.phar
Run composer make-server using your preferred PHP binary. It'll drop a PocketMine-MP.phar into the current working directory.
You can also use the --out option to change the output filename.
Running PocketMine-MP from source code
Run src/PocketMine.php using your preferred PHP binary.