@@ -15,40 +15,20 @@ if [[ "$OS" == MINGW* ]] || [[ "$OS" == MSYS* ]] || [[ "$OS" == CYGWIN* ]]; then
1515 OS=" Windows"
1616fi
1717
18- # OVERRIDE: Force x86_64 builds on unsupported platforms (macOS, Linux ARM64)
19- # Set to false to restore original behavior
20- FORCE_X86_64_OVERRIDE=true
21-
22- if [ " $FORCE_X86_64_OVERRIDE " = true ]; then
23- if [ " $OS " = " Darwin" ]; then
24- echo " ⚠️ Using x86_64 build on macOS (will use Rosetta 2 on ARM Macs)"
25- OS=" Linux"
26- ARCH=" x86_64"
27- elif [ " $OS " = " Linux" ] && ([ " $ARCH " = " aarch64" ] || [ " $ARCH " = " arm64" ]); then
28- echo " ⚠️ Using x86_64 build on Linux ARM64 (requires emulation support)"
29- ARCH=" x86_64"
30- fi
31- fi
32-
33- # PHP build URL (PocketMine PHP 8.4 with gRPC built-in)
34- # Note: Only Linux x86_64 and Windows x64 pre-built binaries are available
18+ # PHP build URL (PocketMine PHP 8.3 with gRPC built-in)
19+ # Source: secmc/PHP-Binaries
3520if [ " $OS " = " Darwin" ]; then
36- echo " ❌ Pre-built PHP binaries are not available for macOS"
37- echo " "
38- echo " Please use one of these alternatives:"
39- echo " "
40- echo " Option 1: Use system PHP with manual gRPC installation"
41- echo " - Install PHP 8.1+ via Homebrew: brew install php"
42- echo " - Install gRPC extension: pecl install grpc"
43- echo " - Install protobuf extension: pecl install protobuf"
44- echo " "
45- echo " Option 2: Use Docker"
46- echo " - See CUSTOM_PHP.md for Docker setup instructions"
47- echo " "
48- echo " Option 3: Run on Linux (VM or WSL)"
49- echo " - Transfer your plugin to a Linux x86_64 system"
50- echo " "
51- exit 1
21+ # macOS - both arm64 and x86_64 supported!
22+ if [ " $ARCH " = " arm64" ]; then
23+ PHP_BUILD_URL=" https://github.com/secmc/PHP-Binaries/releases/download/pm5-php-8.3-latest/PHP-8.3-MacOS-arm64-PM5.tar.gz"
24+ PHP_BIN=" bin/php7/bin/php"
25+ IS_WINDOWS=false
26+ else
27+ # x86_64 or other arch - use x86_64 build
28+ PHP_BUILD_URL=" https://github.com/secmc/PHP-Binaries/releases/download/pm5-php-8.3-latest/PHP-8.3-MacOS-x86_64-PM5.tar.gz"
29+ PHP_BIN=" bin/php7/bin/php"
30+ IS_WINDOWS=false
31+ fi
5232elif [ " $OS " = " Linux" ]; then
5333 if [ " $ARCH " = " aarch64" ] || [ " $ARCH " = " arm64" ]; then
5434 echo " ❌ Pre-built PHP binaries are not available for Linux ARM64"
@@ -67,18 +47,18 @@ elif [ "$OS" = "Linux" ]; then
6747 exit 1
6848 else
6949 # Linux x86_64 - supported!
70- PHP_BUILD_URL=" https://github.com/NetherGamesMC/php-build-scripts /releases/download/pm5-php-8.4 -latest/PHP-8.4 -Linux-x86_64-PM5.tar.gz"
50+ PHP_BUILD_URL=" https://github.com/secmc/PHP-Binaries /releases/download/pm5-php-8.3 -latest/PHP-8.3 -Linux-x86_64-PM5.tar.gz"
7151 PHP_BIN=" bin/php7/bin/php"
7252 IS_WINDOWS=false
7353 fi
7454elif [ " $OS " = " Windows" ]; then
7555 # Windows x64 - supported!
76- PHP_BUILD_URL=" https://github.com/NetherGamesMC/php-build-scripts /releases/download/pm5-php-8.4 -latest/PHP-8.4 -Windows-x64-PM5.zip"
56+ PHP_BUILD_URL=" https://github.com/secmc/PHP-Binaries /releases/download/pm5-php-8.3 -latest/PHP-8.3 -Windows-x64-PM5.zip"
7757 PHP_BIN=" bin/php/php.exe"
7858 IS_WINDOWS=true
7959else
8060 echo " ❌ Unsupported OS: $OS "
81- echo " Pre-built binaries available for: Linux x86_64, Windows x64"
61+ echo " Pre-built binaries available for: macOS (arm64/x86_64), Linux x86_64, Windows x64"
8262 echo " See CUSTOM_PHP.md for manual installation on other platforms"
8363 exit 1
8464fi
@@ -91,8 +71,8 @@ if [ -f "$PHP_BIN" ]; then
9171 PHP_VERSION=$( $PHP_BIN -v | head -n 1)
9272 echo " $PHP_VERSION "
9373else
94- echo " 📥 Downloading pre-compiled PHP 8.4 with gRPC..."
95- echo " Source: NetherGamesMC/php-build-scripts "
74+ echo " 📥 Downloading pre-compiled PHP 8.3 with gRPC..."
75+ echo " Source: secmc/PHP-Binaries "
9676 echo " "
9777
9878 # Download PHP build
0 commit comments