Skip to content

Commit

Permalink
Stop building PM4 binaries
Browse files Browse the repository at this point in the history
PM4 was on 8.1 when support ended, so this shouldn't break anything.
  • Loading branch information
dktapps committed Feb 2, 2024
1 parent fe8618c commit bc8d04b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
name: PM${{ matrix.pm-version-major }}
strategy:
matrix:
pm-version-major: [4, 5]
pm-version-major: [5]

uses: ./.github/workflows/main-pm-matrix.yml
with:
Expand Down
15 changes: 6 additions & 9 deletions compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ LIBZIP_VERSION="1.10.1"
SQLITE3_VERSION="3440200" #3.44.2
LIBDEFLATE_VERSION="dd12ff2b36d603dbb7fa8838fe7e7176fcbd4f6f" #1.19

EXT_PTHREADS_VERSION="4.2.2"
EXT_PMMPTHREAD_VERSION="6.0.12"
EXT_YAML_VERSION="2.2.3"
EXT_LEVELDB_VERSION="317fdcd8415e1566fc2835ce2bdb8e19b890f9f3"
Expand Down Expand Up @@ -238,6 +237,9 @@ done
if [ "$PM_VERSION_MAJOR" == "" ]; then
write_error "Please specify PocketMine-MP major version target with -P (e.g. -P5)"
exit 1
elif [ "$PM_VERSION_MAJOR" -lt 5 ]; then
write_error "PocketMine-MP 4.x and older are no longer supported"
exit 1
fi

write_out "opt" "Compiling with configuration for PocketMine-MP $PM_VERSION_MAJOR"
Expand Down Expand Up @@ -1034,13 +1036,8 @@ function get_pecl_extension {
cd "$BUILD_DIR/php"
write_out "PHP" "Downloading additional extensions..."

if [ "$PM_VERSION_MAJOR" -ge 5 ]; then
get_github_extension "pmmpthread" "$EXT_PMMPTHREAD_VERSION" "pmmp" "ext-pmmpthread"
THREAD_EXT_FLAGS="--enable-pmmpthread"
else
get_github_extension "pthreads" "$EXT_PTHREADS_VERSION" "pmmp" "ext-pmmpthread" #"v" needed for release tags because github removes the "v"
THREAD_EXT_FLAGS="--enable-pthreads"
fi
get_github_extension "pmmpthread" "$EXT_PMMPTHREAD_VERSION" "pmmp" "ext-pmmpthread"


get_github_extension "yaml" "$EXT_YAML_VERSION" "php" "pecl-file_formats-yaml"
#get_pecl_extension "yaml" "$EXT_YAML_VERSION"
Expand Down Expand Up @@ -1160,7 +1157,7 @@ $HAS_DEBUG \
--enable-mbstring \
--disable-mbregex \
--enable-calendar \
$THREAD_EXT_FLAGS \
--enable-pmmpthread \
--enable-fileinfo \
--with-libxml \
--enable-xml \
Expand Down
16 changes: 6 additions & 10 deletions windows-compile-vs.bat
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ set PTHREAD_W32_VER=3.0.0
set LEVELDB_MCPE_VER=1c7564468b41610da4f498430e795ca4de0931ff
set LIBDEFLATE_VER=dd12ff2b36d603dbb7fa8838fe7e7176fcbd4f6f

set PHP_PTHREADS_VER=4.2.2
set PHP_PMMPTHREAD_VER=6.0.12
set PHP_YAML_VER=2.2.3
set PHP_CHUNKUTILS2_VER=0.3.5
Expand Down Expand Up @@ -76,6 +75,10 @@ if "%PM_VERSION_MAJOR%"=="" (
call :pm-echo-error "Please specify PocketMine-MP major version by setting the PM_VERSION_MAJOR environment variable"
exit 1
)
if "%PM_VERSION_MAJOR%" lss "5" (
call :pm-echo-error "PocketMine-MP 4.x and older are no longer supported"
exit 1
)

call :pm-echo "Compiling with configuration for PocketMine-MP %PM_VERSION_MAJOR%"

Expand Down Expand Up @@ -219,14 +222,7 @@ cd /D ..
call :pm-echo "Getting additional PHP extensions..."
cd /D php-src\ext

set THREAD_EXT_FLAGS=""
if "%PM_VERSION_MAJOR%" geq "5" (
call :get-extension-zip-from-github "pmmpthread" "%PHP_PMMPTHREAD_VER%" "pmmp" "ext-pmmpthread" || exit 1
set THREAD_EXT_FLAGS="--with-pmmpthread=shared"
) else (
call :get-extension-zip-from-github "pthreads" "%PHP_PTHREADS_VER%" "pmmp" "ext-pmmpthread" || exit 1
set THREAD_EXT_FLAGS="--with-pthreads=shared"
)
call :get-extension-zip-from-github "pmmpthread" "%PHP_PMMPTHREAD_VER%" "pmmp" "ext-pmmpthread" || exit 1
call :get-extension-zip-from-github "yaml" "%PHP_YAML_VER%" "php" "pecl-file_formats-yaml" || exit 1
call :get-extension-zip-from-github "chunkutils2" "%PHP_CHUNKUTILS2_VER%" "pmmp" "ext-chunkutils2" || exit 1
call :get-extension-zip-from-github "igbinary" "%PHP_IGBINARY_VER%" "igbinary" "igbinary" || exit 1
Expand Down Expand Up @@ -304,7 +300,7 @@ call configure^
--with-mysqlnd^
--with-openssl^
--with-pcre-jit^
%THREAD_EXT_FLAGS%^
--with-pmmpthread=shared^
--with-simplexml^
--with-sodium^
--with-sqlite3=shared^
Expand Down

0 comments on commit bc8d04b

Please sign in to comment.