здравствуйте, можете дать файл start.cmd, по дефолту он открывает файл PocketMine-MP.phar, но мне надо чтобы и работало в src.
код файла
@echo off
TITLE PocketMine-MP server software for Minecraft: Bedrock Edition
cd /d %~dp0
set PHP_BINARY=
where /q php.exe
if %ERRORLEVEL%==0 (
set PHP_BINARY=php
)
if exist bin\php\php.exe (
rem always use the local PHP binary if it exists
set PHPRC=“”
set PHP_BINARY=bin\php\php.exe
)
if “%PHP_BINARY%”==“” (
echo Couldn’t find a PHP binary in system PATH or “%~dp0bin\php”
echo Please refer to the installation instructions at Installation & Updating — PocketMine-MP Documentation
pause
exit 1
)
if exist PocketMine-MP.phar (
set POCKETMINE_FILE=PocketMine-MP.phar
) else (
echo PocketMine-MP.phar not found
echo Downloads can be found at Releases · pmmp/PocketMine-MP · GitHub
pause
exit 1
)
if exist bin\mintty.exe (
start “” bin\mintty.exe -o Columns=88 -o Rows=32 -o AllowBlinking=0 -o FontQuality=3 -o Font=“Consolas” -o FontHeight=10 -o CursorType=0 -o CursorBlinks=1 -h error -t “PocketMine-MP” -i bin/pocketmine.ico -w max %PHP_BINARY% %POCKETMINE_FILE% --enable-ansi %*
) else (
REM pause on exitcode != 0 so the user can see what went wrong
%PHP_BINARY% %POCKETMINE_FILE% %* || pause
)
сам то я не разобрался, взял код с litecore но там он не рабочий
start.php (2,5 КБ)
(Переименуй в .cmd)
Не тестил, заранее говорю
Could not open input file: src\pocketmine\PocketMine.
Для продолжения нажмите любую клавишу . . .
там расширение ты забыл подписсать, новая ошибка
C:\Users\Колян\Desktop\local>я╗┐@echo off
“я╗┐@echo” не является внутренней или внешней
командой, исполняемой программой или пакетным файлом.
C:\Users\Колян\Desktop\local>TITLE PocketMine-MP ╤Б╨╡╤А╨▓╨╡╤А ╨┤╨╗╤П Minecraft: Bedrock Edition
C:\Users\Колян\Desktop\local>cd /d C:\Users\Колян\Desktop\local\
C:\Users\Колян\Desktop\local>set PHP_BINARY=
C:\Users\Колян\Desktop\local>where /q php.exe
C:\Users\Колян\Desktop\local>if 1 == 0 (set PHP_BINARY=php )
C:\Users\Колян\Desktop\local>if exist bin\php\php.exe (
rem always use the local PHP binary if it exists
set PHPRC=“”
set PHP_BINARY=bin\php\php.exe
)
C:\Users\Колян\Desktop\local>if “bin\php\php.exe” == “” (
echo ╨Э╨╡ ╤Г╨┤╨░╨╗╨╛╤Б╤М ╨╜╨░╨╣╤В╨╕ ╨┤╨▓╨╛╨╕╤З╨╜╤Л╨╣ ╤Д╨░╨╣╨╗ PHP ╨▓ ╤Б╨╕╤Б╤В╨╡╨╝╨╜╨╛╨╝ ╨┐╤Г╤В╨╕ ╨╕╨╗╨╕ “C:\Users\Колян\Desktop\local\bin\php”
echo ╨б╨╝. ╨╕╨╜╤Б╤В╤А╤Г╨║╤Ж╨╕╨╕ ╨┐╨╛ ╤Г╤Б╤В╨░╨╜╨╛╨▓╨║╨╡ ╨╜╨░ ╤Б╤В╤А╨░╨╜╨╕╤Ж╨╡ Installation & Updating — PocketMine-MP Documentation.
pause
exit 1
)
C:\Users\Колян\Desktop\local>if exist PocketMine-MP.phar (set POCKETMINE_FILE=PocketMine-MP.phar ) else (if exist src\pocketmine\PocketMine.php (set POCKETMINE_FILE=src\pocketmine\PocketMine.php ) else (
echo ╨п╨┤╤А╨╛ ╤Г╤Б╤В╨░╨╜╨╛╨▓╨╗╨╡╨╜╨╛ ╨╜╨╡╨║╨╛╤А╤А╨╡╨║╤В╨╜╨╛!
echo ╨б╨║╨░╤З╨░╤В╤М ╤П╨┤╤А╨╛ ╨▓╤Л ╨╝╨╛╨╢╨╡╤В╨╡ ╨╜╨░ Releases · pmmp/PocketMine-MP · GitHub
pause
exit 1
) )
C:\Users\Колян\Desktop\local>if exist bin\mintty.exe (start “” bin\mintty.exe -o Columns=88 -o Rows=32 -o AllowBlinking=0 -o FontQuality=3 -o Font=“Consolas” -o FontHeight=10 -o CursorType=0 -o CursorBlinks=1 -h error -t “PocketMine-MP” -i bin/pocketmine.ico -w max bin\php\php.exe src\pocketmine\PocketMine.php --enable-ansi ) else (
REM pause on exitcode != 0 so the user can see what went wrong
bin\php\php.exe src\pocketmine\PocketMine.php || pause
)
Warning: require(C:\Users\Колян\Desktop\local\src\vendor\composer/…/…/src/CoreConstants.php): Failed to open stream: No such file or directory in C:\Users\Колян\Desktop\local\src\vendor\composer\autoload_real.php on line 69
Fatal error: Uncaught Error: Failed opening required ‘C:\Users\Колян\Desktop\local\src\vendor\composer/…/…/src/CoreConstants.php’ (include_path=‘.;pocketmine-php-bin\pear’) in C:\Users\Колян\Desktop\local\src\vendor\composer\autoload_real.php:69
Stack trace:
#0 C:\Users\Колян\Desktop\local\src\vendor\composer\autoload_real.php(59): composerRequire39c0c2c62adb229863e69d516fcc45e1(‘e54d4abbfb143f3…’, ‘C:\Users\\xD0\x9A\xD0\xBE\xD0\xBB…’)
#1 C:\Users\Колян\Desktop\local\src\vendor\autoload.php(7): ComposerAutoloaderInit39c0c2c62adb229863e69d516fcc45e1::getLoader()
#2 C:\Users\Колян\Desktop\local\src\pocketmine\PocketMine.php(231): require_once(‘C:\Users\\xD0\x9A\xD0\xBE\xD0\xBB…’)
#3 C:\Users\Колян\Desktop\local\src\pocketmine\PocketMine.php(324): pocketmine\server()
#4 {main}
thrown in C:\Users\Колян\Desktop\local\src\vendor\composer\autoload_real.php on line 69
Для продолжения нажмите любую клавишу . . .
Текущая кодовая страница: 1251
Warning: require(C:\Users\Колян\Desktop\local\src\vendor\composer/…/…/src/CoreConstants.php): Failed to open stream: No such file or directory in C:\Users\Колян\Desktop\local\src\vendor\composer\autoload_real.php on line 69
Fatal error: Uncaught Error: Failed opening required ‘C:\Users\Колян\Desktop\local\src\vendor\composer/…/…/src/CoreConstants.php’ (include_path=‘.;pocketmine-php-bin\pear’) in C:\Users\Колян\Desktop\local\src\vendor\composer\autoload_real.php:69
Stack trace:
#0 C:\Users\Колян\Desktop\local\src\vendor\composer\autoload_real.php(59): composerRequire39c0c2c62adb229863e69d516fcc45e1(‘e54d4abbfb143f3…’, ‘C:\Users\\xD0\x9A\xD0\xBE\xD0\xBB…’)
#1 C:\Users\Колян\Desktop\local\src\vendor\autoload.php(7): ComposerAutoloaderInit39c0c2c62adb229863e69d516fcc45e1::getLoader()
#2 C:\Users\Колян\Desktop\local\src\pocketmine\PocketMine.php(231): require_once(‘C:\Users\\xD0\x9A\xD0\xBE\xD0\xBB…’)
#3 C:\Users\Колян\Desktop\local\src\pocketmine\PocketMine.php(324): pocketmine\server()
#4 {main}
thrown in C:\Users\Колян\Desktop\local\src\vendor\composer\autoload_real.php on line 69
Для продолжения нажмите любую клавишу . . .
Тут уже вины start.cmd нет
Это ошибка ядра
(Нажми на Вопрос решен, ты получил свой start.cmd)