Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-12-23 23:00:35 +01:00
Drop macOS native support
This served a good purpose when I used macOS as a primary development system, but those days are gone (I use Linux now). The spirit of multiple variants is preserved by our special Java 11+ optimized compression.
Dieser Commit ist enthalten in:
Ursprung
b3bd773fea
Commit
793e938dd1
@ -1,23 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ ! -d zlib-ng ]; then
|
||||
echo "Cloning zlib-ng..."
|
||||
git clone https://github.com/zlib-ng/zlib-ng.git
|
||||
fi
|
||||
|
||||
echo "Compiling zlib-ng..."
|
||||
cd zlib-ng
|
||||
CFLAGS="-fPIC -O3" ./configure --zlib-compat --static
|
||||
make clean && make
|
||||
cd ..
|
||||
|
||||
# Modify as you need.
|
||||
MBEDTLS_ROOT=mbedtls
|
||||
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home
|
||||
CFLAGS="-O3 -I$JAVA_HOME/include/ -I$JAVA_HOME/include/darwin/ -fPIC -shared"
|
||||
|
||||
clang $CFLAGS -Izlib-ng src/main/c/jni_util.c src/main/c/jni_zlib_deflate.c src/main/c/jni_zlib_inflate.c \
|
||||
src/main/c/jni_zlib_common.c zlib-ng/libz.a -o src/main/resources/macosx/velocity-compress.dylib
|
||||
clang $CFLAGS -I $MBEDTLS_ROOT/include -shared $MBEDTLS_ROOT/library/aes.c $MBEDTLS_ROOT/library/aesni.c \
|
||||
$MBEDTLS_ROOT/library/platform.c $MBEDTLS_ROOT/library/platform_util.c src/main/c/jni_util.c src/main/c/jni_cipher.c \
|
||||
-o src/main/resources/macosx/velocity-cipher.dylib
|
@ -23,13 +23,6 @@ public class NativeConstraints {
|
||||
IS_AMD64 = osArch.equals("amd64") || osArch.equals("x86_64");
|
||||
}
|
||||
|
||||
static final BooleanSupplier MACOS = () -> {
|
||||
return NATIVES_ENABLED
|
||||
&& CAN_GET_MEMORYADDRESS
|
||||
&& System.getProperty("os.name", "").equalsIgnoreCase("Mac OS X")
|
||||
&& IS_AMD64;
|
||||
};
|
||||
|
||||
static final BooleanSupplier LINUX = () -> {
|
||||
return NATIVES_ENABLED
|
||||
&& CAN_GET_MEMORYADDRESS
|
||||
|
@ -62,9 +62,6 @@ public class Natives {
|
||||
|
||||
public static final NativeCodeLoader<VelocityCompressorFactory> compress = new NativeCodeLoader<>(
|
||||
ImmutableList.of(
|
||||
new NativeCodeLoader.Variant<>(NativeConstraints.MACOS,
|
||||
copyAndLoadNative("/macosx/velocity-compress.dylib"), "native (macOS)",
|
||||
LibdeflateVelocityCompressor.FACTORY),
|
||||
new NativeCodeLoader.Variant<>(NativeConstraints.LINUX,
|
||||
copyAndLoadNative("/linux_x64/velocity-compress.so"),
|
||||
"libdeflate (Linux amd64)",
|
||||
@ -78,9 +75,6 @@ public class Natives {
|
||||
|
||||
public static final NativeCodeLoader<VelocityCipherFactory> cipher = new NativeCodeLoader<>(
|
||||
ImmutableList.of(
|
||||
new NativeCodeLoader.Variant<>(NativeConstraints.MACOS,
|
||||
copyAndLoadNative("/macosx/velocity-cipher.dylib"), "mbed TLS (macOS)",
|
||||
NativeVelocityCipher.FACTORY),
|
||||
new NativeCodeLoader.Variant<>(NativeConstraints.LINUX,
|
||||
copyAndLoadNative("/linux_x64/velocity-cipher.so"), "mbed TLS (Linux amd64)",
|
||||
NativeVelocityCipher.FACTORY),
|
||||
|
Binäre Datei nicht angezeigt.
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren