Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A simple batch script for installing Pocketmine in source form on Windows
@echo off
TITLE PocketMine-MP Source Installer
cd /d %~dp0
if exist %~dp0PocketMine-MP\ goto PMSTART
where git >nul 2>nul || (powershell -command "& { iwr https://github.com/git-for-windows/git/releases/download/v2.21.0.windows.1/PortableGit-2.21.0-64-bit.7z.exe -OutFile PortableGit.exe }" & start PortableGit.exe & pause)
if exist .\PortableGit\cmd\git.exe (
set GIT=.\PortableGit\cmd\git.exe
del PortableGit.exe
) else (
set GIT=git
)
%GIT% clone https://github.com/pmmp/PocketMine-MP.git -b stable --recursive
rd /s /q PortableGit
cd PocketMine-MP
del start.cmd
del start.ps1
powershell -command "& { iwr https://raw.githubusercontent.com/pmmp/PocketMine-MP/02ef0bfbb40442e4b03f6dc45c58510c49beb978/start.cmd -OutFile start.cmd }"
powershell -command "& { iwr https://raw.githubusercontent.com/pmmp/PocketMine-MP/2a09aaf4568cf8f6449a82a7e23fae2ab9975b1a/start.ps1 -OutFile start.ps1 }"
powershell -command "& { iwr https://ci.appveyor.com/api/buildjobs/7f3cnq1lficv4ho2/artifacts/php-7.3.9-vc15-x64.zip -OutFile php-7.3.9-vc15-x64.zip }"
powershell -command "Expand-Archive -Path php-7.3.9-vc15-x64.zip -DestinationPath ."
del php-7.3.9-vc15-x64.zip
start /w vc_redist.x64.exe
powershell -command "& { iwr https://getcomposer.org/installer -OutFile composer-setup.php }"
.\bin\php\php.exe composer-setup.php --install-dir=bin
.\bin\php\php.exe .\bin\composer.phar install --no-interaction --ansi
del composer-setup.php
mkdir plugins
cd tests\plugins\PocketMine-DevTools
..\..\..\bin\php\php.exe -dphar.readonly=0 .\src\DevTools\ConsoleScript.php --make .\ --relative .\ --out ..\..\..\plugins\DevTools.phar
cd ..\..\..
:PMSTART
echo Starting PocketMine-MP
pause
cls
cd %~dp0PocketMine-MP
.\start.cmd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.